Skip to content

Instantly share code, notes, and snippets.

View emreozkangit's full-sized avatar

Emre Özkan emreozkangit

View GitHub Profile
oc adm -a ${LOCAL_SECRET_JSON} release mirror \
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} \
--to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
--to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}
[root@ip-172-31-26-2 ec2-user]# ./oc get nodes
NAME STATUS ROLES AGE VERSION
ip-10-0-129-164.us-east-2.compute.internal Ready worker 13m v1.13.4+ab8449285
ip-10-0-142-57.us-east-2.compute.internal Ready master 21m v1.13.4+ab8449285
ip-10-0-153-150.us-east-2.compute.internal Ready master 21m v1.13.4+ab8449285
ip-10-0-156-158.us-east-2.compute.internal Ready worker 13m v1.13.4+ab8449285
ip-10-0-162-103.us-east-2.compute.internal Ready master 21m v1.13.4+ab8449285
ip-10-0-174-41.us-east-2.compute.internal Ready worker 13m v1.13.4+ab8449285
root@emreozkan1c:/home/cloud_user# curl https://jfrog.bintray.com/run/art-compose/latest/art-compose | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11985 100 11985 0 0 14322 0 --:--:-- --:--:-- --:--:-- 14318
No action passed. Defaulting to start clean
Docker version 18.09.7, build 2d0083d
docker-compose version 1.8.0, build unknown
Preparing /data
Creating a new DB password
Writing DB password to /data/.dbpassword
root@emreozkan1c:/home/cloud_user# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f
Status: Downloaded newer image for hello-world:latest
root@emreozkan1c:/home/cloud_user# docker tag hello-world docker.artifactory/hello-world:1.0
root@emreozkan1c:/home/cloud_user# docker push docker.artifactory/hello-world:1.0
The push refers to repository [docker.artifactory/hello-world]
af0b15c8625b: Pushed
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl apply -f mysql.yaml
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
service/wordpress-mysql configured
persistentvolumeclaim/mysql-pv-claim created
deployment.apps/wordpress-mysql created
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl apply -f wordpress.yaml
service/wordpress created
persistentvolumeclaim/wp-pv-claim created
deployment.apps/wordpress created
ubuntu@master:~$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 54m
wordpress LoadBalancer 10.111.155.159 <pending> 80:31991/TCP 34m
wordpress-mysql ClusterIP None <none> 3306/TCP 47m
ubuntu@master:~$ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
wordpress-7b6c4c79bb-tjb9j 1/1 Running 0 34m 10.244.1.9 worker1 <none> <none>
wordpress-mysql-6887bf844f-cdqbd 1/1 Running 0 34m 10.244.1.8 worker1 <none> <none>
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
mysql-pv-claim Bound pvc-8960154e-9437-11e9-a75e-0ad51c3a5fea 2Gi RWO rook-ceph-block 12s
wp-pv-claim Bound pvc-8e01d53d-9437-11e9-a75e-0ad51c3a5fea 2Gi RWO rook-ceph-block 5s
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-8960154e-9437-11e9-a75e-0ad51c3a5fea 2Gi RWO Delete Bound default/mysql-pv-claim rook-ceph-block 14s
pvc-8e01d53d-9437-11e9-a75e-0ad51c3a5fea 2Gi RWO Delete Bound default/wp-pv-claim rook-ceph-block 7s
ubuntu@master:~/rook/cluster/examples/kubernetes/ceph$ kubectl exec -it rook-ceph-tools-76c7d559b6-td9gd -n rook-ceph sh
sh-4.2# ceph -s
cluster:
id: 5642d32e-db7c-491d-87cd-003a3e2b70e6
health: HEALTH_OK
services:
mon: 3 daemons, quorum a,b,c (age 104s)
mgr: a(active, since 72s)
osd: 3 osds: 3 up (since 33s), 3 in (since 33s)
ubuntu@master:~/rook/cluster/examples/kubernetes/ceph$ kubectl apply -f toolbox.yaml
deployment.apps/rook-ceph-tools created
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl get pods rook-ceph-tools-76c7d559b6-td9gd -n rook-ceph
NAME READY STATUS RESTARTS AGE
rook-ceph-tools-76c7d559b6-td9gd 1/1 Running 0 8m25s
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 8m48s v1.13.5
worker1 Ready <none> 7m41s v1.13.5
worker2 Ready <none> 7m38s v1.13.5
worker3 Ready <none> 7m34s v1.13.5
ubuntu@master:~/rook/cluster/examples/kubernetes$ kubectl get pods -n rook-ceph
NAME READY STATUS RESTARTS AGE
rook-ceph-agent-km6m4 1/1 Running 0 4m12s