registry
DevOp software in a loop (SIL)
on the registry site, prepare...
podman pull quay.io/wildfly/wildfly
podman run -it --name wildfly-eewee -p 8888:8888 -p 9990:9990 -d quay.io/wildfly/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 -Djboss.management.http.port=8888
podman run -it --name wildfly-proppr -p 18888:8888 -p 19990:9990 -d quay.io/wildfly/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 -Djboss.management.http.port=8888
podman exec -it wildfly-eewee bash
podman exec -it wildfly-proppr bash
/opt/jboss/wildfly/bin/add-user.sh
choose admin, enable as PowerUser, password; admin = admin
!! Dont forget to commit NOW (cockpit-ws has buttons ;) !! and push them to your registry !!
podman commit wildfly-eewee alp.artific.ial:5000/wildfly-eewee
podman tag wildfly-eewee alp.artific.ial:5000/wildfly-eewee:latest
podman push wildfly-eewee alp.artific.ial:5000/wildfly-eewee
podman run -it --name wildfly-killme-latest -p 28888:8888 -p 29990:9990 -d alp.artific.ial:5000/wildfly-eewee /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 -Djboss.management.http.port=8888
Run multiple containers from the image with a new name and by adapting ports.
handling tips 1
podman ps
podman logs -f wildfly-eewee
podman stop wildfly-eewee
podman start wildfly-eewee
registry
hostet eigene commit's
export REG_STORAGE=/var/lib/registry \
export REG_CERT=/etc/ssl/certs/alp.artific.ial_cert \
export REG_DOMAIN=alp.artific.ial
podman run --privileged -d --name registry -p 5000:5000 \
-v $REG_STORAGE:$REG_STORAGE \
-v $REG_CERT/$REG_DOMAIN'.fullchain.pem':/certs/fullchain.pem \
-v $REG_CERT/$REG_DOMAIN'.key':/certs/privkey.pem \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/fullchain.pem \
-e REGISTRY_HTTP_TLS_KEY=/certs/privkey.pem \
registry:2
run as a service
podman generate systemd --new --name wildfly-eewee-latest > /etc/systemd/system/wildfly-eewee-latest.service
podman generate systemd --new --name registry > /etc/systemd/system/registry.service
podman generate systemd --new --name wildfly-proppr-latest > /etc/systemd/system/wildfly-proppr-latest.service
systemctl enable --now wildfly-proppr.service
systemctl enable --now wildfly-eewee.service
handling tips 2
systemctl restart|start|stop wildfly-proppr.service
./jboss-cli.sh --connect --controller=alp:8888
./jboss-cli.sh --connect --controller=alp:18888
voilĂ .
maingoal
remember to
loadbalance and dns those sluggers, my guess here: use pods and traefik as entry
| Service/Appname | host | sub.tld | site |
|---|---|---|---|
| eewee | alp | artific.ial | console |
| proppr | alp | artific.ial | console |
tag and revision image/container
now pull from instance
consider
-e JBOSS_LOG_DIR=/opt/wildfly-eewee/logs jboss/wildfly
-v /path/file_host.json:/path/file_container.json
And now all logs will be saved to the /opt/wildfly-eewee/logs directory.
Note You can modify environment variables in Docker images too. Use the ENV instruction in Dockerfile. Explore the --env-file parameter of docker run if you want to set many environment variables.