From Fedora Project Wiki
(initial text for oc cluster up test case) |
(workaround for oc cluster up) |
||
Line 8: | Line 8: | ||
# rpm-ostree install origin-clients | # rpm-ostree install origin-clients | ||
# Reboot the host | # Reboot the host | ||
# Due to [https://bugzilla.redhat.com/show_bug.cgi?id=1558425 BZ 1558425], we have to reconfigure the 'cgroupdriver' used by docker: | |||
<nowiki> | |||
# cp /usr/lib/systemd/system/docker.service /etc/systemd/system/ | |||
# sed -i 's/cgroupdriver=systemd/cgroupdriver=cgroupfs/' /etc/systemd/system/docker.service | |||
# systemctl daemon-reload | |||
</nowiki> | |||
# Configure insecure registries for docker by editing /etc/containers/registries.conf and adding the CIDR range '172.30.0.0/16' under the 'registries.insecure' section: | # Configure insecure registries for docker by editing /etc/containers/registries.conf and adding the CIDR range '172.30.0.0/16' under the 'registries.insecure' section: | ||
<nowiki> | <nowiki> | ||
Line 43: | Line 50: | ||
# You should see some output similar to this: | # You should see some output similar to this: | ||
<nowiki> | <nowiki> | ||
# oc cluster up | # oc cluster up | ||
Starting OpenShift using openshift/origin:v3.6.0 ... | |||
Pulling image openshift/origin:v3.6.0 | |||
Pulled 1/4 layers, 28% complete | |||
Pulled 2/4 layers, 86% complete | |||
Pulled 3/4 layers, 92% complete | |||
Pulled 4/4 layers, 100% complete | |||
Extracting | |||
Image pull complete | |||
OpenShift server started. | |||
The server is accessible via web console at: | |||
https://127.0.0.1:8443 | |||
You are logged in as: | |||
User: developer | |||
Password: <any value> | |||
To login as administrator: | |||
oc login -u system:admin | |||
</nowiki> | </nowiki> | ||
# Login as the administrator | # Login as the administrator | ||
Line 51: | Line 78: | ||
# Get the 'status' and all the components | # Get the 'status' and all the components | ||
<nowiki> | <nowiki> | ||
# oc status | |||
In project default on server https://127.0.0.1:8443 | |||
svc/docker-registry - 172.30.1.1:5000 | |||
dc/docker-registry deploys docker.io/openshift/origin-docker-registry:v3.6.0 | |||
deployment #1 deployed 7 minutes ago - 1 pod | |||
svc/kubernetes - 172.30.0.1 ports 443->8443, 53->8053, 53->8053 | |||
svc/router - 172.30.192.29 ports 80, 443, 1936 | |||
dc/router deploys docker.io/openshift/origin-haproxy-router:v3.6.0 | |||
deployment #1 deployed 7 minutes ago - 1 pod | |||
View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'. | |||
# oc get all | |||
NAME REVISION DESIRED CURRENT TRIGGERED BY | |||
dc/docker-registry 1 1 1 config | |||
dc/router 1 1 1 config | |||
NAME DESIRED CURRENT READY AGE | |||
rc/docker-registry-1 1 1 1 8m | |||
rc/router-1 1 1 1 8m | |||
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |||
svc/docker-registry 172.30.1.1 <none> 5000/TCP 8m | |||
svc/kubernetes 172.30.0.1 <none> 443/TCP,53/UDP,53/TCP 8m | |||
svc/router 172.30.192.29 <none> 80/TCP,443/TCP,1936/TCP 8m | |||
NAME DESIRED SUCCESSFUL AGE | |||
jobs/persistent-volume-setup 1 1 8m | |||
NAME READY STATUS RESTARTS AGE | |||
po/docker-registry-1-kbn47 1/1 Running 0 7m | |||
po/persistent-volume-setup-trn7f 0/1 Completed 0 8m | |||
po/router-1-hgl3k 1/1 Running 0 7m | |||
# oc get nodes | |||
NAME STATUS AGE VERSION | |||
localhost Ready 8m v1.6.1+5115d708d7 | |||
</nowiki> | </nowiki> | ||
| results= | |||
# Verify that the status of the OpenShift cluster shows the registry and router deployed | |||
# Verify that all of the dc/rc/svcs/po are Running/Ready | |||
# Verify that the localhost node is Ready | |||
}} | }} |
Latest revision as of 13:38, 11 April 2018
Description
This testcase ensures it's possible to get an OpenShift Cluster running using 'oc cluster up'
Setup
- Ensure you have a booted working Atomic Host
How to test
- Install 'origin-clients'
# rpm-ostree install origin-clients
- Reboot the host
- Due to BZ 1558425, we have to reconfigure the 'cgroupdriver' used by docker:
# cp /usr/lib/systemd/system/docker.service /etc/systemd/system/ # sed -i 's/cgroupdriver=systemd/cgroupdriver=cgroupfs/' /etc/systemd/system/docker.service # systemctl daemon-reload
- Configure insecure registries for docker by editing /etc/containers/registries.conf and adding the CIDR range '172.30.0.0/16' under the 'registries.insecure' section:
# This is a system-wide configuration file used to # keep track of registries for various container backends. # It adheres to TOML format and does not support recursive # lists of registries. # The default location for this configuration file is /etc/containers/registries.conf. # The only valid categories are: 'registries.search', 'registries.insecure', # and 'registries.block'. [registries.search] registries = ['docker.io', 'registry.fedoraproject.org', 'registry.access.redhat.com'] # If you need to access insecure registries, add the registry's fully-qualified name. # An insecure registry is one that does not have a valid SSL certificate or only does HTTP. [registries.insecure] registries = ['172.30.0.0/16'] # If you need to block pull access from a registry, uncomment the section below # and add the registries fully-qualified name. # # Docker only [registries.block] registries = []
- Restart the 'registries' and 'docker' services
# systemctl restart registries docker
- Use 'oc cluster up' to get the OpenShift Origin cluster running
# oc cluster up
- You should see some output similar to this:
# oc cluster up Starting OpenShift using openshift/origin:v3.6.0 ... Pulling image openshift/origin:v3.6.0 Pulled 1/4 layers, 28% complete Pulled 2/4 layers, 86% complete Pulled 3/4 layers, 92% complete Pulled 4/4 layers, 100% complete Extracting Image pull complete OpenShift server started. The server is accessible via web console at: https://127.0.0.1:8443 You are logged in as: User: developer Password: <any value> To login as administrator: oc login -u system:admin
- Login as the administrator
# oc login -u system:admin
- Switch to 'default' project
# oc project default
- Get the 'status' and all the components
# oc status In project default on server https://127.0.0.1:8443 svc/docker-registry - 172.30.1.1:5000 dc/docker-registry deploys docker.io/openshift/origin-docker-registry:v3.6.0 deployment #1 deployed 7 minutes ago - 1 pod svc/kubernetes - 172.30.0.1 ports 443->8443, 53->8053, 53->8053 svc/router - 172.30.192.29 ports 80, 443, 1936 dc/router deploys docker.io/openshift/origin-haproxy-router:v3.6.0 deployment #1 deployed 7 minutes ago - 1 pod View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'. # oc get all NAME REVISION DESIRED CURRENT TRIGGERED BY dc/docker-registry 1 1 1 config dc/router 1 1 1 config NAME DESIRED CURRENT READY AGE rc/docker-registry-1 1 1 1 8m rc/router-1 1 1 1 8m NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE svc/docker-registry 172.30.1.1 <none> 5000/TCP 8m svc/kubernetes 172.30.0.1 <none> 443/TCP,53/UDP,53/TCP 8m svc/router 172.30.192.29 <none> 80/TCP,443/TCP,1936/TCP 8m NAME DESIRED SUCCESSFUL AGE jobs/persistent-volume-setup 1 1 8m NAME READY STATUS RESTARTS AGE po/docker-registry-1-kbn47 1/1 Running 0 7m po/persistent-volume-setup-trn7f 0/1 Completed 0 8m po/router-1-hgl3k 1/1 Running 0 7m # oc get nodes NAME STATUS AGE VERSION localhost Ready 8m v1.6.1+5115d708d7
Expected Results
- Verify that the status of the OpenShift cluster shows the registry and router deployed
- Verify that all of the dc/rc/svcs/po are Running/Ready
- Verify that the localhost node is Ready