Categories

Openshift – Day 2 – Creation POD-Service

[student@workstation deploy-pod]$ ls
mysqldb-pod.json  mysqldb-pod.yaml  quote.sql
[student@workstation deploy-pod]$ cat mysqldb-pod.json
{
“apiVersion”: “v1”,
“kind”: “Pod”,
“metadata”: {
“name”: “mysqldb”,
“labels”: {
“name”: “mysqldb”
}
},
“spec”: {
“containers”: [
{
“name”: “mysqldb”,
“image”: “openshift3/mysql-55-rhel7”,
“ports”: [
{
“containerPort”: 3306
}
],
“env”: [
{
“name”: “MYSQL_USER”,
“value”: “ose”
},
{
“name”: “MYSQL_PASSWORD”,
“value”: “openshift”
},
{
“name”: “MYSQL_DATABASE”,
“value”: “quotes”
}
]
}
]
}
}
[student@workstation deploy-pod]$


[student@workstation deploy-service]$ ls
mysqldb-pod.json  mysql-service.json  prepare.sh  quoteapp-pod.json  quote.sql
[student@workstation deploy-service]$ cat mysql-service.json
{
“kind”: “Service”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “quotedb”
},
“spec”: {
“ports”: [
{
“port”: 3306,
“targetPort”: 3306
}
],
“selector”: {
“name”: “mysqldb”
}
}
}

[student@workstation deploy-service]$


[student@workstation deploy-service]$ cat prepare.sh
#!/bin/bash

# Run this script on workstation

LABDIR=/home/student/DO280/labs/deploy-service/
MYSQLPOD=mysqldb

echo “login as the developer user (student)…”
oc login -u student -p student
echo “creating project service-pod…”
oc new-project service-pod
echo “creating the database pod…”
oc create -f $LABDIR/mysqldb-pod.json
echo “waiting for the pod to become ready…”
ready=””
reason=””
while [ “$ready” != “1/1” -a “$reason” != “Running” ]; do
ready=$(oc get pods | grep $MYSQLPOD | awk ‘{print $2}’)
running=$(oc get pods | grep $MYSQLPOD | awk ‘{print $3}’)
# Needs some error handling
sleep 1
done
echo “Forwarding database port..”
oc port-forward -p $MYSQLPOD 13306:3306 &
pf=$!
sleep 3
# Does student has sudo without password?
#echo “Installing mysql client…”
#sudo yum -y install mysql
echo “Populating the database…”
mysql -h 127.0.0.1 -P13306 -uose -popenshift quotes < $LABDIR/quote.sql
echo “Terminating database port forward…”
kill $pf
# To check the database:
#oc exec -p mysqldb -it — /bin/bash -c “mysql -h 127.0.0.1 -uose -popenshift quotes”
echo “Done.”

[student@workstation deploy-service]$


[student@workstation deploy-service]$ ls
mysqldb-pod.json  mysql-service.json  prepare.sh  quoteapp-pod.json  quote.sql
[student@workstation deploy-service]$ cat quoteapp-pod.json
{
“apiVersion”: “v1”,
“kind”: “Pod”,
“metadata”: {
“name”: “quoteapp”,
“labels”: {
“name”: “quoteapp”
}
},
“spec”: {
“containers”: [
{
“name”: “quoteapp”,
“image”: “php-quote”,
“ports”: [
{
“containerPort”: 8080
}
]
}
]
}
}
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc get pods
NAME      READY     STATUS    RESTARTS   AGE
mysqldb   1/1       Running   0          35m
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc create -f mysql-service.json
service “quotedb” created
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc describe svc quotedb
Name:            quotedb
Namespace:        database-pod
Labels:            <none>
Selector:        name=mysqldb
Type:            ClusterIP
IP:            172.30.125.160
Port:            <unset>    3306/TCP
Endpoints:        10.129.0.16:3306
Session Affinity:    None
No events.
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc get services
NAME      CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
quotedb   172.30.125.160   <none>        3306/TCP   48s
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc exec -ti mysqldb /bin/bash
bash-4.2$ env |grep MYA
bash-4.2$ env
MANPATH=/opt/rh/mysql55/root/usr/share/man:
HOSTNAME=mysqldb


[student@workstation deploy-service]$ oc get all
NAME          CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
svc/quotedb   172.30.125.160   <none>        3306/TCP   3m

NAME         READY     STATUS    RESTARTS   AGE
po/mysqldb   1/1       Running   0          39m
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc describe svc quotedb
Name:            quotedb
Namespace:        database-pod
Labels:            <none>
Selector:        name=mysqldb
Type:            ClusterIP
IP:            172.30.125.160
Port:            <unset>    3306/TCP
Endpoints:        10.129.0.16:3306
Session Affinity:    None
No events.
[student@workstation deploy-service]$


[student@workstation deploy-service]$ oc get pods
NAME       READY     STATUS    RESTARTS   AGE
mysqldb    1/1       Running   0          1h
quoteapp   1/1       Running   0          4m
[student@workstation deploy-service]$ oc exec -ti quoteapp bash
bash-4.2$ ls
bin  boot  dev    etc  home  lib    lib64  lost+found  media  mnt  opt  proc  root    run  sbin  srv    sys  tmp  usr  var
bash-4.2$ ps -ef
UID         PID   PPID  C STIME TTY          TIME CMD
1000060+      1      0  0 09:03 ?        00:00:00 /bin/bash -c echo Starting quoteapp… ; /usr/sbin/httpd -DFOREGROUND || echo Apa
1000060+      5      1  0 09:03 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
1000060+      7      5  0 09:03 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
1000060+      8      5  0 09:03 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
1000060+      9      5  0 09:03 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
1000060+     10      5  0 09:03 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
1000060+     11      5  0 09:03 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
1000060+     12      0  0 09:03 ?        00:00:00 bash
1000060+     16      0  0 09:03 ?        00:00:00 bash
1000060+     27      0  0 09:08 ?        00:00:00 bash
1000060+     32     27  0 09:08 ?        00:00:00 ps -ef
bash-4.2$ cd /var/www/html
bash-4.2$ ls
index.php  test.html
bash-4.2$ more index.php
<?php
$link = mysqli_connect($_ENV[“QUOTEDB_SERVICE_HOST”],”ose”,”openshift”,”quotes”, $_ENV[“QUOTEDB_SERVICE_PORT”]) or die(“Error ” . mysqli_error($link));

$query = “SELECT count(*) FROM quote”;
$result = $link->query($query) or die(“Error ..” . mysqli_error($link));
$row = mysqli_fetch_array($result);
mysqli_free_result($result);

$id = rand(1,$row[0]);

$query = “SELECT msg FROM quote WHERE id = ” . $id;
$result = $link->query($query) or die(“Error ..” . mysqli_error($link));
$row = mysqli_fetch_array($result);
mysqli_free_result($result);

print $row[0] . “\n”;

mysqli_close($link);
?>
bash-4.2$


[student@workstation deploy-route]$ ls
prepare.sh  quoteapp-pod-service-route.json  quoteapp-route.json  quoteapp-service.json  quoteapp-with-mysqldb.json  quote.sql
[student@workstation deploy-route]$ cat quoteapp-pod-service-route.json
{
“kind”: “List”,
“apiVersion”: “v1”,
“metadata”: { },
“items”: [

{
“apiVersion”: “v1”,
“kind”: “Pod”,
“metadata”: {
“name”: “quoteapp”,
“labels”: {
“name”: “quoteapp”
}
},
“spec”: {
“containers”: [
{
“name”: “quoteapp”,
“image”: “php-quote”,
“ports”: [
{
“containerPort”: 8080
}
]
}
]
}
},

{
“kind”: “Service”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “quoteapp”,
“labels”: {
“name”: “quoteapp”
}
},
“spec”: {
“ports”: [
{
“port”: 80,
“targetPort”: 8080
}
],
“selector”: {
“name”: “quoteapp”
}
}
},

{
“apiVersion”: “v1”,
“kind”: “Route”,
“metadata”: {
“name”: “quoteapp”,
“labels”: {
“name”: “quoteapp”
}
},
“spec”: {
“host”: “quoteapp.cloudapps.lab.example.com“,
“to”: {
“kind”: “Service”,
“name”: “quoteapp”
}
}
}

]
}
[student@workstation deploy-route]$


[student@workstation deploy-route]$ more prepare.sh
#!/bin/bash

# Run this script on workstation

LABDIR=/home/student/DO280/labs/deploy-route
MYSQLPOD=mysqldb
APPPOD=quoteapp

echo “login as the developer user (student)…”
oc login -u student -p student
echo “creating project route-service-pod…”
oc new-project service-pod
echo “creating the database pod…”
oc create -f $LABDIR/quoteapp-with-mysqldb.json
echo “waiting for the database pod to become ready…”
ready=””
reason=””
while [ “$ready” != “1/1” -a “$reason” != “Running” ]; do
ready=$(oc get pods | grep $MYSQLPOD | awk ‘{print $2}’)
running=$(oc get pods | grep $MYSQLPOD | awk ‘{print $3}’)
# Needs some error handling
sleep 1
done
echo “waiting for the application pod to become ready…”
ready=””
reason=””
while [ “$ready” != “1/1” -a “$reason” != “Running” ]; do
ready=$(oc get pods | grep $APPPOD | awk ‘{print $2}’)
running=$(oc get pods | grep $APPPOD | awk ‘{print $3}’)
# Needs some error handling
sleep 1
done
echo “Forwarding database port..”
oc port-forward -p $MYSQLPOD 13306:3306 &
pf=$!
sleep 3
# Does student has sudo without password?
#echo “Installing mysql client…”
#sudo yum -y install mysql
echo “Populating the database…”
mysql -h 127.0.0.1 -P13306 -uose -popenshift quotes < $LABDIR/quote.sql
echo “Terminating database port forward…”
kill $pf
# To check the database:
#oc exec -p mysqldb -it — /bin/bash -c “mysql -h 127.0.0.1 -uose -popenshift quotes”
echo “Done.”

[student@workstation deploy-route]$


[student@workstation deploy-route]$ more quoteapp-route.json
{
“apiVersion”: “v1”,
“kind”: “Route”,
“metadata”: {
“name”: “quoteapp”
},
“spec”: {
“host”: “quoteapp.cloudapps.lab.example.com”,
“to”: {
“kind”: “Service”,
“name”: “quoteapp”
}
}
}
[student@workstation deploy-route]$


[student@workstation deploy-route]$ more quoteapp-service.json
{
“kind”: “Service”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “quoteapp”
},
“spec”: {
“ports”: [
{
“port”: 80,
“targetPort”: 8080
}
],
“selector”: {
“name”: “quoteapp”
}
}
}

[student@workstation deploy-route]$


[student@workstation deploy-route]$ more quoteapp-with-mysqldb.json
{
“kind”: “List”,
“apiVersion”: “v1”,
“metadata”: { },
“items”: [

{
“apiVersion”: “v1”,
“kind”: “Pod”,
“metadata”: {
“name”: “mysqldb”,
“labels”: {
“name”: “mysqldb”
}
},
“spec”: {
“containers”: [
{
“name”: “mysqldb”,
“image”: “openshift3/mysql-55-rhel7”,
“ports”: [
{
“containerPort”: 3306
}
],
“env”: [
{
“name”: “MYSQL_USER”,
“value”: “ose”
},
{
“name”: “MYSQL_PASSWORD”,
“value”: “openshift”
},
{
“name”: “MYSQL_DATABASE”,
“value”: “quotes”
}
]
}
]
}
},

{
“kind”: “Service”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “quotedb”
},
“spec”: {
“ports”: [
{
“port”: 3306,
“targetPort”: 3306
}
],
“selector”: {
“name”: “mysqldb”
}
}
},

{
“apiVersion”: “v1”,
“kind”: “Pod”,
“metadata”: {
“name”: “quoteapp”,
“labels”: {
“name”: “quoteapp”
}
},
“spec”: {
“containers”: [
{
“name”: “quoteapp”,
“image”: “php-quote”,
“ports”: [
{
“containerPort”: 8080
}
]
}
]
}
}
]
}

[student@workstation deploy-route]$


[student@workstation deploy-route]$ oc expose svc mysqldb
route “mysqldb” exposed
[student@workstation deploy-route]$ oc get route
NAME      HOST/PORT                                        PATH      SERVICES   PORT      TERMINATION
mysqldb   mysqldb-database-pod.cloudapps.lab.example.com             mysqldb    3306
[student@workstation deploy-route]$


[root@master ~]# oc project
Using project “default” on server “https://master.lab.example.com:8443”.
[root@master ~]# oc get pods
NAME                       READY     STATUS    RESTARTS   AGE
docker-registry-6-r4c1f    1/1       Running   1          19h
registry-console-2-51jwd   1/1       Running   1          19h
router-1-bztq8             1/1       Running   1          19h
[root@master ~]#


root@master ~]# oc describe pod router-1-bztq8
Name:            router-1-bztq8
Namespace:        default
Security Policy:    hostnetwork
Node:            node.lab.example.com/172.25.250.11
Start Time:        Mon, 24 Apr 2017 15:40:04 +0200
Labels:            deployment=router-1
deploymentconfig=router
router=router
Status:            Running
IP:            172.25.250.11
Controllers:        ReplicationController/router-1
Containers:
router:
Container ID:    docker://d9ae92159cf92e0ed02e442e3d90b657f4d7e532b6641d45af7f0ad8df167b03
Image:        openshift3/ose-haproxy-router:v3.4.0.39
Image ID:        docker-pullable://workstation.lab.example.com:5000/openshift3/ose-haproxy-router@sha256:65a063cdaaec6c6e50d0c2d6120bc9f7be1460988bcae35ce86c7df22dffe8c6
Ports:        80/TCP, 443/TCP, 1936/TCP
Requests:
cpu:        100m
memory:        256Mi
State:        Running
Started:        Tue, 25 Apr 2017 08:15:17 +0200
Last State:        Terminated
Reason:        Error
Exit Code:    1
Started:        Mon, 24 Apr 2017 15:40:18 +0200
Finished:        Tue, 25 Apr 2017 08:14:31 +0200
Ready:        True
Restart Count:    1
Liveness:        http-get http://localhost:1936/healthz delay=10s timeout=1s period=10s #success=1 #failure=3
Readiness:        http-get http://localhost:1936/healthz delay=10s timeout=1s period=10s #success=1 #failure=3
Volume Mounts:
/etc/pki/tls/private from server-certificate (ro)
/var/run/secrets/kubernetes.io/serviceaccount from router-token-6venx (ro)
Environment Variables:
DEFAULT_CERTIFICATE_DIR:            /etc/pki/tls/private
ROUTER_EXTERNAL_HOST_HOSTNAME:
ROUTER_EXTERNAL_HOST_HTTPS_VSERVER:
ROUTER_EXTERNAL_HOST_HTTP_VSERVER:
ROUTER_EXTERNAL_HOST_INSECURE:        false
ROUTER_EXTERNAL_HOST_INTERNAL_ADDRESS:
ROUTER_EXTERNAL_HOST_PARTITION_PATH:
ROUTER_EXTERNAL_HOST_PASSWORD:
ROUTER_EXTERNAL_HOST_PRIVKEY:        /etc/secret-volume/router.pem
ROUTER_EXTERNAL_HOST_USERNAME:
ROUTER_EXTERNAL_HOST_VXLAN_GW_CIDR:
ROUTER_SERVICE_HTTPS_PORT:        443
ROUTER_SERVICE_HTTP_PORT:            80
ROUTER_SERVICE_NAME:            router
ROUTER_SERVICE_NAMESPACE:            default
ROUTER_SUBDOMAIN:
STATS_PASSWORD:                ABIPRgTYM1
STATS_PORT:                1936
STATS_USERNAME:                admin
Conditions:
Type        Status
Initialized     True
Ready     True
PodScheduled     True
Volumes:
server-certificate:
Type:    Secret (a volume populated by a Secret)
SecretName:    router-certs
router-token-6venx:
Type:    Secret (a volume populated by a Secret)
SecretName:    router-token-6venx
QoS Class:    Burstable
Tolerations:    <none>
No events.
[root@master ~]#


[student@workstation deploy-route]$ oc new-project route-service-pod
Now using project “route-service-pod” on server “https://master.lab.example.com:8443”.

You can add applications to this project with the ‘new-app’ command. For example, try:

oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

to build a new example application in Ruby.
[student@workstation deploy-route]$ ls
prepare.sh  quoteapp-pod-service-route.json  quoteapp-route.json  quoteapp-service.json  quoteapp-with-mysqldb.json  quote.sql
[student@workstation deploy-route]$ oc create -f quoteapp-with-mysqldb.json
pod “mysqldb” created
service “quotedb” created
pod “quoteapp” created
[student@workstation deploy-route]$ oc port-forward mysqldb 13306:3306
Forwarding from 127.0.0.1:13306 -> 3306
Forwarding from [::1]:13306 -> 3306

[student@workstation deploy-route]$ oc get svc
NAME      CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
quotedb   172.30.26.50   <none>        3306/TCP   5m
[student@workstation deploy-route]$ create -f ^C
[student@workstation deploy-route]$ oc create -f quoteapp-service.json
service “quoteapp” created
[student@workstation deploy-route]$ oc get svc
NAME       CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
quoteapp   172.30.207.45   <none>        80/TCP     6s
quotedb    172.30.26.50    <none>        3306/TCP   5m

[student@workstation deploy-route]$ oc create -f quoteapp-route.json
route “quoteapp” created
[student@workstation deploy-route]$ oc get svc
NAME       CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
quoteapp   172.30.207.45   <none>        80/TCP     31s
quotedb    172.30.26.50    <none>        3306/TCP   6m
[student@workstation deploy-route]$ oc get route
NAME       HOST/PORT                            PATH      SERVICES   PORT      TERMINATION
quoteapp   quoteapp.cloudapps.lab.example.com             quoteapp   <all>

[student@workstation deploy-route]$ ping -c 1 quoteapp.cloudapps.lab.example.com
PING quoteapp.cloudapps.lab.example.com (172.25.250.11) 56(84) bytes of data.
64 bytes from node.lab.example.com (172.25.250.11): icmp_seq=1 ttl=64 time=0.501 ms

— quoteapp.cloudapps.lab.example.com ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.501/0.501/0.501/0.000 ms
[student@workstation deploy-route]$

[student@workstation deploy-route]$ curl http://quoteapp.cloudapps.lab.example.com
People who think they know everything are a great annoyance to those of us who do.
[student@workstation deploy-route]$

[student@workstation deploy-route]$ oc exec -ti quoteapp /bin/bash
bash-4.2$ cd /var/www/html
bash-4.2$ ls
index.php  test.html
bash-4.2$ cat index.php
<?php
$link = mysqli_connect($_ENV[“QUOTEDB_SERVICE_HOST”],”ose”,”openshift”,”quotes”, $_ENV[“QUOTEDB_SERVICE_PORT”]) or die(“Error ” . mysqli_error($link));

$query = “SELECT count(*) FROM quote”;
$result = $link->query($query) or die(“Error ..” . mysqli_error($link));
$row = mysqli_fetch_array($result);
mysqli_free_result($result);

$id = rand(1,$row[0]);

$query = “SELECT msg FROM quote WHERE id = ” . $id;
$result = $link->query($query) or die(“Error ..” . mysqli_error($link));
$row = mysqli_fetch_array($result);
mysqli_free_result($result);

print $row[0] . “\n”;

mysqli_close($link);
?>
bash-4.2$

bash-4.2$ more test.html
Sample page
bash-4.2$ exit
[student@workstation deploy-route]$ curl http://quoteapp.cloudapps.lab.example.com/test.html
Sample page
[student@workstation deploy-route]$


[student@workstation deploy-route]$ oc delete route quoteapp
route “quoteapp” deleted
[student@workstation deploy-route]$ oc get route
No resources found.

[student@workstation deploy-route]$ oc expose service quoteapp –port=8080
route “quoteapp” exposed
[student@workstation deploy-route]$

[student@workstation deploy-route]$ oc describe route quoteapp
Name:            quoteapp
Namespace:        route-service-pod
Created:        38 seconds ago
Labels:            <none>
Annotations:        openshift.io/host.generated=true
Requested Host:        quoteapp-route-service-pod.cloudapps.lab.example.com
exposed on router router 38 seconds ago
Path:            <none>
TLS Termination:    <none>
Insecure Policy:    <none>
Endpoint Port:        8080

Service:    quoteapp
Weight:        100 (100%)
Endpoints:    10.129.0.19:8080
[student@workstation deploy-route]$


[root@master ~]# oc project
Using project “default” on server “https://master.lab.example.com:8443”.
[root@master ~]# oc get pods
NAME                       READY     STATUS    RESTARTS   AGE
docker-registry-6-r4c1f    1/1       Running   1          19h
registry-console-2-51jwd   1/1       Running   1          19h
router-1-bztq8             1/1       Running   1          19h
[root@master ~]# oc env pod router-1-bztq8 –list |tail -n 6
ROUTER_SERVICE_NAME=router
ROUTER_SERVICE_NAMESPACE=default
ROUTER_SUBDOMAIN=
STATS_PASSWORD=ABIPRgTYM1
STATS_PORT=1936
STATS_USERNAME=admin
[root@master ~]#


Création PV – Persistent Volume

[student@workstation deploy-volume]$ ls
iptables.sh  iptables-sysconfig.txt  mysqldb-pod-pv.json  mysqldb-pvclaim.json  mysqldb-volume.json  quote.sql
[student@workstation deploy-volume]$ cat mysqldb-volume.json
{
“apiVersion”: “v1”,
“kind”: “PersistentVolume”,
“metadata”: {
“name”: “mysqldb-volume”,
“labels”: {
“name”: “mysqldb”
}
},
“spec”: {
“capacity”: {
“storage”: “3Gi”
},
“accessModes”: [ “ReadWriteMany” ],
“nfs”: {
“path”: “/var/export/dbvol”,
“server”: “master.lab.example.com”
}
}
}
[student@workstation deploy-volume]$


[student@workstation deploy-volume]$ ls
iptables.sh  iptables-sysconfig.txt  mysqldb-pod-pv.json  mysqldb-pvclaim.json  mysqldb-volume.json  quote.sql
[student@workstation deploy-volume]$ cat mysqldb-volume.json
{
“apiVersion”: “v1”,
“kind”: “PersistentVolume”,
“metadata”: {
“name”: “mysqldb-volume”,
“labels”: {
“name”: “mysqldb”
}
},
“spec”: {
“capacity”: {
“storage”: “3Gi”
},
“accessModes”: [ “ReadWriteMany” ],
“nfs”: {
“path”: “/var/export/dbvol”,
“server”: “master.lab.example.com”
}
}
}
[student@workstation deploy-volume]$ cat mysqldb-pod-pv.json
{
“apiVersion”: “v1”,
“kind”: “Pod”,
“metadata”: {
“name”: “mysqldb”,
“labels”: {
“name”: “mysqldb”
}
},
“spec”: {
“containers”: [
{
“name”: “mysqldb”,
“image”: “openshift3/mysql-55-rhel7”,
“ports”: [
{
“containerPort”: 3306
}
],
“env”: [
{
“name”: “MYSQL_USER”,
“value”: “ose”
},
{
“name”: “MYSQL_PASSWORD”,
“value”: “openshift”
},
{
“name”: “MYSQL_DATABASE”,
“value”: “quotes”
}
],
“volumeMounts”: [
{
“name”: “data”,
“mountPath”: “/var/lib/mysql/data”
}
]
}
],
“volumes”: [
{
“name”: “data”,
“persistentVolumeClaim”: {
“claimName”: “mysqldb-pvclaim”
}
}
]
}
}
[student@workstation deploy-volume]$ ls
iptables.sh  iptables-sysconfig.txt  mysqldb-pod-pv.json  mysqldb-pvclaim.json  mysqldb-volume.json  quote.sql
[student@workstation deploy-volume]$ cat mysqldb-pvclaim.json
{
“apiVersion”: “v1”,
“kind”: “PersistentVolumeClaim”,
“metadata”: {
“name”: “mysqldb-pvclaim”,
“labels”: {
“name”: “mysqldb”
}
},
“spec”: {
“accessModes”: [ “ReadWriteMany” ],
“resources”: {
“requests”: {
“storage”: “3Gi”
}
}
}
}
[student@workstation deploy-volume]$


[student@workstation deploy-volume]$ cat iptables.sh
#!/bin/bash
iptables -I OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 111 -j ACCEPT
iptables -I OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 2049 -j ACCEPT
iptables -I OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 20048 -j ACCEPT
iptables -I OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 50825 -j ACCEPT
iptables -I OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 53248 -j ACCEPT
[student@workstation deploy-volume]$ cat iptables-sysconfig.txt
# BEGIN NFS server
-A OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 53248 -j ACCEPT
-A OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 50825 -j ACCEPT
-A OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 20048 -j ACCEPT
-A OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 2049 -j ACCEPT
-A OS_FIREWALL_ALLOW -p tcp -m state –state NEW -m tcp –dport 111 -j ACCEPT
# END NFS server
[student@workstation deploy-volume]$


Création Partage NFS

[root@master ~]#
[root@master ~]# oc project
Using project “default” on server “https://master.lab.example.com:8443”.
[root@master ~]# mkdir -p /var/export/dbvol
[root@master ~]# chown nfsnobody /var/export/dbvol
[root@master ~]# chown 700 /var/export/dbvol
[root@master ~]#

[root@master ~]# vi /etc/exports.d/dbvol.exports
[root@master ~]# cat /etc/exports.d/dbvol.exports
/var/export/dbvol *(rw,async,all_squash)
[root@master ~]#

[root@master ~]# exportfs -a
[root@master ~]# exportfs
/var/export/dbvol
<world>
/exports/registry
<world>
/exports/metrics
<world>
/exports/logging-es
<world>
[root@master ~]#


[root@master deploy-volume]# ls
iptables.sh  iptables-sysconfig.txt  mysqldb-pod-pv.json  mysqldb-pvclaim.json  mysqldb-volume.json  quote.sql
[root@master deploy-volume]# oc create -f mysqldb-volume.json
persistentvolume “mysqldb-volume” created
[root@master deploy-volume]#

[root@master deploy-volume]# oc get pvc
NAME             STATUS    VOLUME            CAPACITY   ACCESSMODES   AGE
registry-claim   Bound     registry-volume   5Gi        RWX           22h
[root@master deploy-volume]# oc get pv
NAME              CAPACITY   ACCESSMODES   RECLAIMPOLICY   STATUS      CLAIM                    REASON    AGE
mysqldb-volume    3Gi        RWX           Retain          Available                                      55s
registry-volume   5Gi        RWX           Retain          Bound       default/registry-claim             22h
[root@master deploy-volume]#


[student@workstation deploy-volume]$ oc create -f mysqldb-pvclaim.json
persistentvolumeclaim “mysqldb-pvclaim” created
[student@workstation deploy-volume]$ oc get pvc
NAME              STATUS    VOLUME           CAPACITY   ACCESSMODES   AGE
mysqldb-pvclaim   Bound     mysqldb-volume   3Gi        RWX           7s
[student@workstation deploy-volume]$ oc get pv
No resources found.
Error from server: User “student” cannot list all persistentvolumes in the cluster
[student@workstation deploy-volume]$ oc create -f mysqldb-pod-pv.json
Error from server: error when creating “mysqldb-pod-pv.json”: pods “mysqldb” already exists
[student@workstation deploy-volume]$ oc get pods
NAME       READY     STATUS    RESTARTS   AGE
mysqldb    1/1       Running   0          2h
quoteapp   1/1       Running   0          2h
[student@workstation deploy-volume]$ oc delete pod mysqldb
pod “mysqldb” deleted
[student@workstation deploy-volume]$ oc create -f mysqldb-pod-pv.json
pod “mysqldb” created
[student@workstation deploy-volume]$ oc volume pod mysqldb
pods/mysqldb
pvc/mysqldb-pvclaim (allocated 3GiB) as data
mounted at /var/lib/mysql/data
secret/default-token-uq0da as default-token-uq0da
mounted at /var/run/secrets/kubernetes.io/serviceaccount
[student@workstation deploy-volume]$

[student@workstation deploy-volume]$ oc delete pod mysqldb
pod “mysqldb” deleted
[student@workstation deploy-volume]$ oc get pods
NAME       READY     STATUS    RESTARTS   AGE
quoteapp   1/1       Running   0          2h
[student@workstation deploy-volume]$ ls
iptables.sh  iptables-sysconfig.txt  mysqldb-pod-pv.json  mysqldb-pvclaim.json  mysqldb-volume.json  quote.sql
[student@workstation deploy-volume]$ oc create -f mysqldb-pod-pv.json
pod “mysqldb” created
[student@workstation deploy-volume]$ oc get pods
NAME       READY     STATUS    RESTARTS   AGE
mysqldb    1/1       Running   0          5s
quoteapp   1/1       Running   0          2h
[student@workstation deploy-volume]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       100G   13G   88G  13% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G  100K  1.9G   1% /dev/shm
tmpfs           1.9G   17M  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           380M     0  380M   0% /run/user/1001
tmpfs           380M     0  380M   0% /run/user/0
tmpfs           380M   16K  380M   1% /run/user/1000
[student@workstation deploy-volume]$ oc exec -ti mysqldb /bin/bash
bash-4.2$ df -h
Filesystem                                                                                          Size  Used Avail Use% Mounted on
/dev/mapper/docker-253:1-33556113-fd3f025a5f7ac2be0fb63478d4af40d7a7d44778da8bc1025e976a9a522c1692   10G  394M  9.6G   4% /
tmpfs                                                                                               1.9G     0  1.9G   0% /dev
tmpfs                                                                                               1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/vda1                                                                                            40G  2.0G   39G   5% /etc/hosts
shm                                                                                                  64M     0   64M   0% /dev/shm
master.lab.example.com:/var/export/dbvol                                                             40G  2.8G   38G   7% /var/lib/mysql/data
tmpfs                                                                                               1.9G   16K  1.9G   1% /run/secrets/kubernetes.io/serviceaccount
bash-4.2$ df -h /var/lib/mysql/data
Filesystem                                Size  Used Avail Use% Mounted on
master.lab.example.com:/var/export/dbvol   40G  2.7G   38G   7% /var/lib/mysql/data
bash-4.2$ ls -la /var/lib/mysql/data
total 43020
drwxr-xr-x. 5 65534 65534      131 Apr 25 11:40 .
drwxrwxr-x. 3 mysql root        36 Apr 25 11:40 ..
-rw-rw—-. 1 65534 65534  8388608 Apr 25 11:40 ib_logfile0
-rw-rw—-. 1 65534 65534  8388608 Apr 25 11:40 ib_logfile1
-rw-rw—-. 1 65534 65534 18874368 Apr 25 11:40 ibdata1
drwx——. 2 65534 65534     4096 Apr 25 11:40 mysql
-rw-rw—-. 1 65534 65534        2 Apr 25 11:40 mysqldb.pid
drwx——. 2 65534 65534     4096 Apr 25 11:40 performance_schema
drwx——. 2 65534 65534       20 Apr 25 11:40 quotes
bash-4.2$

[root@master deploy-volume]# ls -la /var/export/dbvol/
total 43020
drwxr-xr-x. 5 nfsnobody nfsnobody      131 Apr 25 13:40 .
drwxr-xr-x. 3 root      root            19 Apr 25 13:21 ..
-rw-rw—-. 1 nfsnobody nfsnobody 18874368 Apr 25 13:40 ibdata1
-rw-rw—-. 1 nfsnobody nfsnobody  8388608 Apr 25 13:40 ib_logfile0
-rw-rw—-. 1 nfsnobody nfsnobody  8388608 Apr 25 13:40 ib_logfile1
drwx——. 2 nfsnobody nfsnobody     4096 Apr 25 13:40 mysql
-rw-rw—-. 1 nfsnobody nfsnobody        2 Apr 25 13:40 mysqldb.pid
drwx——. 2 nfsnobody nfsnobody     4096 Apr 25 13:40 performance_schema
drwx——. 2 nfsnobody nfsnobody       20 Apr 25 13:40 quotes
[root@master deploy-volume]#


Internal registry pour S2I – utilisé par OPENSHIFT

[root@master deploy-volume]# oc get pod
NAME                       READY     STATUS    RESTARTS   AGE
docker-registry-6-r4c1f    1/1       Running   1          22h
registry-console-2-51jwd   1/1       Running   1          22h
router-1-bztq8             1/1       Running   1          22h
[root@master deploy-volume]# exportfs
/var/export/dbvol
<world>
/exports/registry
<world>
/exports/metrics
<world>
/exports/logging-es
<world>
[root@master deploy-volume]# oc exec -ti docker-registry-6-r4c1f /bin/bash
bash-4.2$ df -h
Filesystem                                                                                          Size  Used Avail Use% Mounted on
/dev/mapper/docker-253:1-33556113-76c4933026c1a2d82f2a3d13367e9f0dc25f7e3d6a1644beb6be10bc4d9f3e5e   10G  703M  9.3G   7% /
tmpfs                                                                                               1.9G     0  1.9G   0% /dev
tmpfs                                                                                               1.9G     0  1.9G   0% /sys/fs/cgroup
master.lab.example.com:/exports/registry                                                             40G  2.7G   38G   7% /registry
tmpfs                                                                                               1.9G  8.0K  1.9G   1% /etc/secrets
/dev/vda1                                                                                            40G  2.0G   39G   5% /etc/hosts
shm                                                                                                  64M     0   64M   0% /dev/shm
tmpfs                                                                                               1.9G   16K  1.9G   1% /run/secrets/kubernetes.io/serviceaccount
bash-4.2$

master.lab.example.com:/exports/registry  doit être sur un partage NFS


[student@workstation deploy-volume]$ oc new-app http://workstation.lab.example.com/php-helloworld –name=hello –labels=app=hello -o json
{
“kind”: “List”,
“apiVersion”: “v1”,
“metadata”: {},
“items”: [
{
“kind”: “ImageStream”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “hello”,
“creationTimestamp”: null,
“labels”: {
“app”: “hello”
},
“annotations”: {
“openshift.io/generated-by”: “OpenShiftNewApp”
}
},
“spec”: {},
“status”: {
“dockerImageRepository”: “”
}
},
{
“kind”: “BuildConfig”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “hello”,
“creationTimestamp”: null,
“labels”: {
“app”: “hello”
},
“annotations”: {
“openshift.io/generated-by”: “OpenShiftNewApp”
}
},
“spec”: {
“triggers”: [
{
“type”: “GitHub”,
“github”: {
“secret”: “_O_F2r6ZnnNdjaZgl6aA”
}
},
{
“type”: “Generic”,
“generic”: {
“secret”: “Qu6Ahcql-X0zMxcEdzLT”
}
},
{
“type”: “ConfigChange”
},
{
“type”: “ImageChange”,
“imageChange”: {}
}
],
“source”: {
“type”: “Git”,
“git”: {
“uri”: “http://workstation.lab.example.com/php-helloworld”
}
},
“strategy”: {
“type”: “Source”,
“sourceStrategy”: {
“from”: {
“kind”: “ImageStreamTag”,
“namespace”: “openshift”,
“name”: “php:5.5”
}
}
},
“output”: {
“to”: {
“kind”: “ImageStreamTag”,
“name”: “hello:latest”
}
},
“resources”: {},
“postCommit”: {},
“nodeSelector”: null
},
“status”: {
“lastVersion”: 0
}
},
{
“kind”: “DeploymentConfig”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “hello”,
“creationTimestamp”: null,
“labels”: {
“app”: “hello”
},
“annotations”: {
“openshift.io/generated-by”: “OpenShiftNewApp”
}
},
“spec”: {
“strategy”: {
“resources”: {}
},
“triggers”: [
{
“type”: “ConfigChange”
},
{
“type”: “ImageChange”,
“imageChangeParams”: {
“automatic”: true,
“containerNames”: [
“hello”
],
“from”: {
“kind”: “ImageStreamTag”,
“name”: “hello:latest”
}
}
}
],
“replicas”: 1,
“test”: false,
“selector”: {
“app”: “hello”,
“deploymentconfig”: “hello”
},
“template”: {
“metadata”: {
“creationTimestamp”: null,
“labels”: {
“app”: “hello”,
“deploymentconfig”: “hello”
},
“annotations”: {
“openshift.io/generated-by”: “OpenShiftNewApp”
}
},
“spec”: {
“containers”: [
{
“name”: “hello”,
“image”: “hello:latest”,
“resources”: {}
}
]
}
}
},
“status”: {}
}
]
}
[student@workstation deploy-volume]$


[student@workstation deploy-volume]$ oc new-app http://workstation.lab.example.com/php-helloworld –name=hello –labels=app=hello -o json>app.json

[student@workstation deploy-volume]$ oc create -f app.json
imagestream “hello” created
buildconfig “hello” created
deploymentconfig “hello” created
[student@workstation deploy-volume]$ oc get builds
NAME      TYPE      FROM          STATUS    STARTED          DURATION
hello-1   Source    Git@cbe0876   Running   10 seconds ago   10s
[student@workstation deploy-volume]$

 

[student@workstation deploy-volume]$ oc get pods
NAME            READY     STATUS      RESTARTS   AGE
hello-1-240hu   1/1       Running     0          23s
hello-1-build   0/1       Completed   0          1m
mysqldb         1/1       Running     0          1h
quoteapp        1/1       Running     0          3h

[student@workstation deploy-volume]$ oc logs build/hello-1
Cloning “http://workstation.lab.example.com/php-helloworld” …
Commit:    cbe0876943ab6566b1ded633e074666392cf7f27 (Initial commit)
Author:    root <root@workstation.lab.example.com>
Date:    Tue Mar 21 03:04:59 2017 -0400
—> Installing application source…
Pushing image 172.30.243.29:5000/route-service-pod/hello:latest …
Pushed 0/5 layers, 7% complete
Pushed 1/5 layers, 40% complete
Pushed 2/5 layers, 41% complete
Pushed 3/5 layers, 86% complete
Pushed 4/5 layers, 96% complete
Pushed 5/5 layers, 100% complete
Push successful
[student@workstation deploy-volume]$

[student@workstation deploy-volume]$ oc get builds
NAME      TYPE      FROM          STATUS     STARTED         DURATION
hello-1   Source    Git@cbe0876   Complete   2 minutes ago   46s
[student@workstation deploy-volume]$ oc get bc
NAME      TYPE      FROM      LATEST
hello     Source    Git       1
[student@workstation deploy-volume]$


[root@master deploy-s2i]# oc get project
NAME                DISPLAY NAME   STATUS
instructor                         Active
openshift                          Active
openshift-infra                    Active
aaaa                aaa            Active
az                  aa             Active
default                            Active
hello-s2i-php       hello s2i      Active
route-service-pod                  Active
database-pod                       Active
kube-system                        Active
logging                            Active
management-infra                   Active
[root@master deploy-s2i]#

[student@workstation deploy-s2i]$ oc get templates -n openshift  –> n=name space
NAME                                            DESCRIPTION                                                                        PARAMETERS        OBJECTS
amq62-basic                                     Application template for JBoss A-MQ brokers. These can be deployed as standal…   10 (3 blank)      5
amq62-persistent                                Application template for JBoss A-MQ brokers. These can be deployed as standal…   12 (3 blank)      6
amq62-persistent-ssl                            Application template for JBoss A-MQ brokers. These are deployed as standalone…   17 (5 blank)      10
amq62-ssl                                       Application template for JBoss A-MQ brokers. These can be deployed as standal…   15 (5 blank)      9
cakephp-mysql-example                           An example CakePHP application with a MySQL database. For more information ab…   19 (4 blank)      7
dancer-mysql-example

 


[student@workstation deploy-s2i]$ oc describe template sso70-postgresql -n openshift
Name:        sso70-postgresql
Namespace:    openshift
Created:    24 hours ago
Labels:        <none>
Description:    Application template for SSO 7.0 PostgreSQL applications
Annotations:    iconClass=icon-jboss
tags=sso,keycloak,postrgresql,java,database,jboss,xpaas
version=1.3.2

Parameters:
Name:        APPLICATION_NAME
Description:    The name for the application.
Required:        true
Value:        sso
Name:        HOSTNAME_HTTP


TEMPLATE

[student@workstation labs]$ cd  deploy-template
[student@workstation deploy-template]$ ls
mysqlPV.json  processedtemplate.json  secret.json  template.sh
[student@workstation deploy-template]$ more template.sh
#!/bin/bash

oc process openshift//eap70-mysql-persistent-s2i \
-v APPLICATION_NAME=member \
-v HOSTNAME_HTTP=member.cloudapps.lab.example.com \
-v HOSTNAME_HTTPS=secure-member.cloudapps.lab.example.com \
-v SOURCE_REPOSITORY_URL=http://workstation.lab.example.com/member \
-v SOURCE_REPOSITORY_REF=”” \
-v CONTEXT_DIR=”” \
-v DB_JNDI=java:jboss/datasources/memberDS \
-v DB_DATABASE=member \
-v DB_USERNAME=member \
-v DB_PASSWORD=member \
-v HTTPS_SECRET=eap-app-secret-member \
-v HTTPS_KEYSTORE=keystore.jks \
-v HTTPS_KEYSTORE_TYPE=jks \
-v HTTPS_NAME=jboss \
-v HTTPS_PASSWORD=mykeystorepass \
-v JGROUPS_ENCRYPT_SECRET=eap-app-secret-member \
> /home/student/DO280/labs/deploy-template/processedtemplate.json
[student@workstation deploy-template]$ more mysqlPV.json
{
“apiVersion”: “v1”,
“kind”: “PersistentVolume”,
“metadata”: {
“name”: “mysqldb-member-volume”
},
“spec”: {
“capacity”: {
“storage”: “1Gi”
},
“accessModes”: [ “ReadWriteOnce” ],
“nfs”: {
“path”: “/var/export/membermysql”,
“server”: “master.lab.example.com”
},
“persistentVolumeReclaimPolicy”: “Recycle”
}
}
[student@workstation deploy-template]$ more processedtemplate.json
[student@workstation deploy-template]$ more secret.json
{
“kind”: “List”,
“apiVersion”: “v1”,
“metadata”: {},
“items”: [
{
“kind”: “ServiceAccount”,
“apiVersion”: “v1”,
“metadata”: {
“name”: “eap7-service-account”
},
“secrets”: [
{
“name”: “eap-app-secret-member”
}
]
},
{
“kind”: “Secret”,
“apiVersion”: “v1”,
“metadata”: {
“annotations”: {
“description”: “Default secret file with name ‘jboss’ and password ‘mykeystorepass'”
},
“name”: “eap-app-secret-member”
},
“data”: {
“keystore.jks”: “/u3+7QAAAAIAAAABAAAAAQAFamJvc3MAAAFNbVtLLAAABQMwggT/MA4GCisGAQQBKgIRAQEFAASCBOsxl4wqa+E+XP8+qMZY9XLhvKrRX8V1MHdwFZQaLTE
VURCizqYXoMnbhtfV0oMAUFsE7013TTA9Q2l+pSs+cqz6HH/vwjEEIkqJx5wD8WcD/bu9e9F9EHQ+zrjZFmpMFvXsvj9+ux1o/YLBDGY3kd4MoDcJy0yJ/ZpzNYLkXanlrMhWqxC7MAliCBsdyVgNn5RFb
4Nn+JZgJuNSIGo/K292+0IFaFv9vsXbX889W9HPCvfO0mQIzoy8In0NhzdKli/67y4kbDkWaI0fRONckZTxNpxn6rMc0nN9zKrGVToLxj1Ufcoj/tCvR8agtPpv7KIWUqBYDg83ad+i4EE5XYISovlsl6R
mtrrTb39PJcL86+wJ+x2ZrLuyzh6C9sAOdSBiKt/DY97ICIYltRMrb+cNwWdnJvT+PeYvv3vKo7YThha+akoJDjsWMp1HWpbIC9zg9ZjugU+/ao6nHtmoZmCaYjLuEE+sYl5s179uyQjE3LRc+0cVY2+bY
COD6P6JLH9GdfjkR40OhjryiWy2Md6vAGaATh6kjjreRHfSie4KCgIZx9Ngb1+uAwauYSM8d9OIwT5lRmLd4Go9CaFXtFdq/IZv3x5ZEPVqMjxcq0KXcs1QcfK3oSYL/rrkxXxKFTrd0N3KgvwATWx/KS9
0tdHBg65d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