Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerized proxy - copying images to internal registry #1981

Merged
merged 31 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
45246f3
New containerized proxy procedure.
0rnela Dec 27, 2022
8d87fad
Added fixes following the initial feedback.
0rnela Feb 15, 2023
81c729e
Minor fixes.
0rnela Feb 15, 2023
6c2acf9
Minor fix.
0rnela Feb 16, 2023
5dd25d4
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Feb 16, 2023
738ffea
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Feb 16, 2023
39ddb7d
Further fixes.
0rnela Feb 16, 2023
1aac0df
Typo.
0rnela Feb 16, 2023
364536a
Typo.
0rnela Feb 16, 2023
2be42e8
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Feb 27, 2023
bef7040
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Feb 27, 2023
c3562ef
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Feb 27, 2023
917af64
Changes added based on PR reviews so far.
0rnela Feb 27, 2023
8a22e47
Comments deleted.
0rnela Feb 27, 2023
7509527
Merge branch 'master' into copyImagesToInternalRegistry
0rnela Feb 27, 2023
0adfe1f
Further fixes and clarificiations following the review.
0rnela Feb 28, 2023
b1dfff8
Fixes and additional instructions.
0rnela Feb 28, 2023
0cf3ce7
Moved admonition to a better place.
0rnela Feb 28, 2023
09e60bf
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
8150e3b
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
9c6cb71
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
4ecdeb9
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
510998b
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
78b3386
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
bb9e06d
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
0924ae6
Formatting fixes.
0rnela Mar 1, 2023
6b73a1b
Formatting fixes, brackets.
0rnela Mar 1, 2023
6a919d6
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 1, 2023
4211bca
Sentence change.
0rnela Mar 1, 2023
b2fc9a4
Update modules/installation-and-upgrade/pages/containerized-proxy-dep…
0rnela Mar 2, 2023
f63bf53
Merge branch 'master' into copyImagesToInternalRegistry
0rnela Mar 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# - Fixed error in Bat section of Upgrade Guide (bsc#1234567)
# For guidelines: https://en.opensuse.org/openSUSE:Creating_a_changes_file_(RPM)

- Added instructions about contanerized proxy deployment to Installation and
Upgrade Guide
- Added Uyuni Client Tools channels for Enterprise Linux / SUSE Liberty
Linux and provide dedicated table for SUSE Manager in Client
Configuration Guide (bsc#1205719)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ ifeval::[{uyuni-content} == true]
endif::[]

**** xref:proxy-container-setup.adoc[Containerized Proxy Setup]
**** xref:containerized-proxy-deployment.adoc[Containerized Proxy Deployment]
** xref:upgrade-intro.adoc[Upgrade]

ifeval::[{suma-content} == true]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[[containerized-proxy-deployment]]
= Containerized proxy deployment using internal registry

It is possible to deploy containerized images in an environment without an internet connection.
In such case, the images can be copied from {suse} registry to an internal registry, or saved to a [literal]``tar`` file.


0rnela marked this conversation as resolved.
Show resolved Hide resolved
[[image.from.suse.to.internal.registry]]
== Image copying from {suse} registry to internal registry


This example illustrates deployment of {salt} proxies only.
0rnela marked this conversation as resolved.
Show resolved Hide resolved

.Procedure: Deploying {salt} Proxy from an internal image registry
[role=procedure]

. Install [literal]``skopeo`` on a machine with access to [literal]``registry.suse.com``:
0rnela marked this conversation as resolved.
Show resolved Hide resolved
+
----
zypper in skopeo
----
+
[NOTE]
====
This can be {productname} server.
0rnela marked this conversation as resolved.
Show resolved Hide resolved
====
+
. Copy images between registries:
+
----
for image in httpd salt-broker squid ssh tftpd; do
0rnela marked this conversation as resolved.
Show resolved Hide resolved
skopeo copy docker://registry.suse.com/suse/manager/4.3/proxy-$image:latest docker://(your_server)/registry.suse.com/suse/manager/4.3/proxy-$image
done
skopeo copy docker://k8s.gcr.io/pause:latest docker://(your_server)/k8s.gcr.io/pause:latest
----
+
[NOTE]
====
For every [literal]`skopeo` command add [literal]`--dest-tls-verify=false` if the registry is not secured.
====
+
. If the registry is unsecured, i.e. not configured with SSL, add the regitry domain to the section [literal]``registries.insecure`` on the containerized proxy virtual machine by editing:
0rnela marked this conversation as resolved.
Show resolved Hide resolved
+
----
/etc/containers/registries.conf
----
+
. Before starting the pod, point the Podman where to get the [literal]`pause` image from on the internal registry:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. Before starting the pod, point the Podman where to get the [literal]`pause` image from on the internal registry:
. Before starting the pod, point the Podman where to get the [literal]``pause`` image from on the internal registry:

+
----
echo -e '[engine]\ninfra_image = "(your_server)/pause:latest"'>>/etc/containers/containers.conf
----
+
. To start using the images from the internal registry please adapt the [literal]`NAMESPACE` value in file `/etc/sysconfig/uyuni-proxy-systemd-services.config`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. To start using the images from the internal registry please adapt the [literal]`NAMESPACE` value in file `/etc/sysconfig/uyuni-proxy-systemd-services.config`.
. To start using the images from the internal registry adapt the [literal]``NAMESPACE`` value in [path]``/etc/sysconfig/uyuni-proxy-systemd-services.config``.

+
[NOTE]
====
For the k3s deployment, add [literal]`--set repository=(your_server)` to the helm install command line.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For the k3s deployment, add [literal]`--set repository=(your_server)` to the helm install command line.
For the k3s deployment, add [literal]``--set repository=(your_server)`` to the helm install command line.

====

0rnela marked this conversation as resolved.
Show resolved Hide resolved

[[air-gapped-solution-for-podman]]
== Air-gapped solution for Podman

This example illustrates deployment of containerized image on a machine with no access to internet.
0rnela marked this conversation as resolved.
Show resolved Hide resolved


.Procedure: Deploying air-gapped proxy
[role=procedure]

. Before starting the pod, point the Podman where to get the [literal]`pause` image from on the internal registry:
0rnela marked this conversation as resolved.
Show resolved Hide resolved
+
----
echo -e '[engine]\ninfra_image = "(your_server)/pause:latest"'>>/etc/containers/containers.conf
----
+
[WARNING]
====

0rnela marked this conversation as resolved.
Show resolved Hide resolved
This command does not work on SLE 15 SP3 and earlier container hosts.
====
+
. On a machine with internet access run:
+
----
for image in httpd salt-broker squid ssh tftpd; do
podman pull registry.suse.com/suse/manager/4.3/proxy-$image
done
podman pull k8s.gcr.io/pause

podman save -m -o proxy-images.tar \
k8s.gcr.io/pause \
registry.suse.com/suse/manager/4.3/proxy-httpd \
registry.suse.com/suse/manager/4.3/proxy-salt-broker \
registry.suse.com/suse/manager/4.3/proxy-squid registry.suse.com/suse/manager/4.3/proxy-ssh \
0rnela marked this conversation as resolved.
Show resolved Hide resolved
registry.suse.com/suse/manager/4.3/proxy-tftpd
----
+
[NOTE]
====
For the k3s deployment, add [literal]`--set repository=(your_server)` to the helm install command line.
0rnela marked this conversation as resolved.
Show resolved Hide resolved
====
+
. Transfer the [literal]`proxy-images.tar` to the air-gapped proxy.
0rnela marked this conversation as resolved.
Show resolved Hide resolved
. To make images available to be started when needed, run the command:
+
----
podman load -i proxy-images.tar
----