-
Notifications
You must be signed in to change notification settings - Fork 216
Containerize Uyuni #3451
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
Containerize Uyuni #3451
Conversation
containers/create-proxy-config.py
Outdated
organization = args.organization | ||
organization_unit = args.organization_unit | ||
email = args.email | ||
cname = '.'.join(fqdn.split('.')[-2:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be the following. FQDN can be specified with a trailing dot for the dns root, would give you canonical names such as com.
instead of example.com
for this.example.com.
cname = '.'.join(fqdn.split('.')[-2:]) | |
cname = '.'.join(fqdn.rstrip(".").split('.')[-2:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update from "opensuse/leap:15.2" to "opensuse/leap:15.3"
containers/proxy-main/Dockerfile
Outdated
@@ -0,0 +1,27 @@ | |||
# rebuild with: docker build -t proxy . | |||
|
|||
FROM registry.opensuse.org/opensuse/leap:15.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM registry.opensuse.org/opensuse/leap:15.3
@@ -0,0 +1,19 @@ | |||
# rebuild with: docker build -t proxy . | |||
|
|||
FROM registry.opensuse.org/opensuse/leap:15.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM registry.opensuse.org/opensuse/leap:15.3
containers/proxy-squid/Dockerfile
Outdated
@@ -0,0 +1,18 @@ | |||
# rebuild with: docker build -t proxy . | |||
|
|||
FROM registry.opensuse.org/opensuse/leap:15.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM registry.opensuse.org/opensuse/leap:15.3
containers/proxy/Dockerfile
Outdated
@@ -0,0 +1,22 @@ | |||
# rebuild with: docker build -t proxy . | |||
|
|||
FROM registry.opensuse.org/opensuse/leap:15.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM registry.opensuse.org/opensuse/leap:15.3
@@ -0,0 +1,44 @@ | |||
FROM opensuse/leap:15.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM opensuse/leap:15.3
|
||
podman run --pod hub-opensuse152 -ti --name hub-opensuse152-server localhost/uyuni | ||
|
||
podman generate kube hub-opensuse152 > hub-opensuse152.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman generate kube hub-opensuse153 > hub-opensuse153.yml
open file and remove the last empty lines | ||
> change image to be load from localhost:5000/uyuni | ||
|
||
podman pod rm hub-opensuse152 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman pod rm hub-opensuse153
|
||
|
||
## deployment and management | ||
minikube kubectl -- delete po hub-opensuse152 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minikube kubectl -- delete po hub-opensuse153
## deployment and management | ||
minikube kubectl -- delete po hub-opensuse152 | ||
|
||
minikube kubectl -- create -f hub-opensuse152.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minikube kubectl -- create -f hub-opensuse153.yml
|
||
minikube kubectl -- get po -A | ||
|
||
minikube kubectl -- describe pod hub-opensuse152 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minikube kubectl -- describe pod hub-opensuse153
Thanks for your comments @Shirocco88, we hope to be back on this topic soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions appended
os.mkdir(config_path + "/salt") | ||
os.mkdir(config_path + "/salt/pki") | ||
os.mkdir(config_path + "/salt/pki/minion") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not to use os.makedirs
instead?
os.mkdir(config_path + "/salt") | |
os.mkdir(config_path + "/salt/pki") | |
os.mkdir(config_path + "/salt/pki/minion") | |
os.makedirs("/salt/pki/minion") |
os.mkdir(config_path + "/sysconfig") | ||
os.mkdir(config_path + "/sysconfig/rhn") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as before:
os.mkdir(config_path + "/sysconfig") | |
os.mkdir(config_path + "/sysconfig/rhn") | |
os.makedirs(config_path + "/sysconfig/rhn") |
SLS ordering is respected within a single file
It is not redundant as we do not want to run that state when others failed before. Using this it fail faster and do not try to start things which are not ready or not configured This reverts commit 71916ce.
Signed-off-by: Ricardo Mateus <[email protected]>
Signed-off-by: Ricardo Mateus <[email protected]>
Signed-off-by: Ricardo Mateus <[email protected]>
Signed-off-by: Ricardo Mateus <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
Signed-off-by: Silvio Moioli <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did my best looking over the PR and found a few things I am unsure about. In general I like the shape this is already!
@@ -0,0 +1,3 @@ | |||
#!/bin/bash | |||
|
|||
podman ps | grep proxy- | awk '{print $1}' | xargs -l1 podman kill |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this grep a bit too wide. Do we have any way to specify a more precise filter? Maybe proxy-uyuni
? Or we use the Label we add to the container?
For Podman the filter can be added like this: podman ps -f KEY=VALUE
Docs: https://docs.podman.io/en/latest/markdown/podman-ps.1.html#filter-f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grep
could also be removed in favor of awk '/proxy-/ {print $1}'
. See number 49 on https://catonmat.net/awk-one-liners-explained-part-three
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah or we move it in the filter expression of podman. Both is possible.
{{- end }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.storageSize }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all storageclasses support that you resize them. I would suggest we add an educated guess to the docs about the size this will have after what time/configuration.
@@ -32,7 +32,6 @@ | |||
import com.redhat.rhn.frontend.xmlrpc.ProxyNotActivatedException; | |||
import com.redhat.rhn.frontend.xmlrpc.ProxySystemIsSatelliteException; | |||
import com.redhat.rhn.frontend.xmlrpc.system.XmlRpcSystemHelper; | |||
import com.redhat.rhn.manager.entitlement.EntitlementManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this Java change is correct but I would like to know the reason for it. The commit message is a bit vague about this change.
Signed-off-by: Silvio Moioli <[email protected]>
While code and approaches tried out in this PR are good and will continue to be useful, I am closing this now in favor of more specialized PRs in-progress and upcoming, including in particular #4526, as the bulk of the work will progress there. Many thanks to all authors and commenters, see you in the other PRs! |
What does this PR change?
This is an experiment to deliver Uyuni as containers.
See the official HackWeek page or the Development Wiki page for more information.
GUI diff
No difference.
Documentation
No documentation needed: add explanation. This can't be used if there is a GUI diff
No documentation needed: only internal and user invisible changes
Documentation issue was created: Link for SUSE Manager contributors, Link for community contributors.
(OPTIONAL) Documentation PR
DONE
Test coverage
No tests: add explanation
No tests: already covered
Unit tests were added
Cucumber tests were added
DONE
Links
official HackWeek page
Changelogs
If you don't need a changelog check, please mark this checkbox:
If you uncheck the checkbox after the PR is created, you will need to re-run
changelog_test
(see below)Re-run a test
If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run: