Skip to content

Commit

Permalink
CLUS orlando updates
Browse files Browse the repository at this point in the history
  • Loading branch information
metahertz committed Jun 12, 2018
1 parent 437c5fd commit d15a5cb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 73 deletions.
16 changes: 16 additions & 0 deletions labs/CiscoContainerPlatform-101/4.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# 5. Testing our OwnCloud Service

## What just happened?
If you're familiar with Kubernetes, you'll have noticed the multiple kubernetes resources in the configuration we just uploaded,

- A `service` to provide a Virtual IP and load balancing into our app.
- A `deployment` of the actual containerised applications we need to run.
- A `configmap` of our configuration options, so we don't need to bake a new container image just to tweak options.

Last but by no means least, multiple `PersistentVolumeClaims`, these dynamically provision blocks of persistent storage from HyperFlex to use within kubernetes applications, allowing kubernetes to host items such as databases and in our case, a file storage application.

You can monitor the progress of your deployment in the UI, click PersistentVolumeClaims at the bottom of the left hand kubernetes menu. You will see numerous volumes now "bound" to your application.

![](/posts/files/CiscoContainerPlatform-101/assets/images/kube-pvc.png)

If you still have VCenter open, you will have seen the Kubernetes cluster dynamically mount the volumes through to your Cisco Container Platform VM's so that the Kubernetes cluster can consume the persistent storage.

![](/posts/files/CiscoContainerPlatform-101/assets/images/vcenter-volume.png)

## Services.

# Summary

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: owncloud-config-claim
labels:
app: owncloud
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "1Gi"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: owncloud-apps-claim
labels:
app: owncloud
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "2Gi"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: owncloud-data-claim
labels:
Expand All @@ -40,20 +12,6 @@ spec:
requests:
storage: "100Gi"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mariadb-owncloud-claim
labels:
app: owncloud
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "10Gi"
---
kind: ConfigMap
apiVersion: v1
metadata:
Expand Down Expand Up @@ -116,20 +74,6 @@ spec:
labels:
app: owncloud
spec:
volumes:
- name: config-store
persistentVolumeClaim:
claimName: owncloud-config-claim
- name: data-store
persistentVolumeClaim:
claimName: owncloud-data-claim
- name: app-store
persistentVolumeClaim:
claimName: owncloud-apps-claim
- name: mdata-store
persistentVolumeClaim:
claimName: mariadb-owncloud-claim

containers:
- name: mariadb
env:
Expand All @@ -141,10 +85,6 @@ spec:
image: mariadb:10.1
ports:
- containerPort: 3306
volumeMounts:
- name: mdata-store
mountPath: /var/lib/mysql

- name: owncloud
env:
- name: MYSQL_ROOT_PASSWORD
Expand Down Expand Up @@ -182,19 +122,9 @@ spec:
configMapKeyRef:
name: owncloud-configmap
key: owc_trusted_ip

image: owncloud:9.1
image: owncloud:10.0.8-fpm
ports:
- containerPort: 80

volumeMounts:
- name: config-store
mountPath: /var/www/html/config
- name: data-store
mountPath: /var/www/html/data
- name: app-store
mountPath: /var/www/html/apps

command:
- bash
- "-c"
Expand Down Expand Up @@ -243,7 +173,10 @@ spec:
echo INFO Owncloud initialised on this volume, not running config setup again.
else
echo INFO Initialising Owncloud on this volume.

echo Making DIRs
mkdir -p /var/www/html/apps
mkdir -p /var/www/html/data
mkdir -p /var/www/html/config
# Fix broken ownership from the install on data (comes out as root otherwise)
chown --recursive $OWC_DOCKER_USER:$OWC_DOCKER_GROUP data

Expand All @@ -256,7 +189,7 @@ spec:
fi

# Add trusted_domains so that can access with Owncloud
$SU_CMD_STEM "cd $OWC_DOCKER_WORKING_DIR && php occ config:system:set trusted_domains $num_trusted_domains --value=$(OWC_TRUSTED_IP)"
$SU_CMD_STEM "cd $OWC_DOCKER_WORKING_DIR && php occ config:system:set trusted_domains $num_trusted_domains --value=$(OWC_TRUSTED_IP)"
num_trusted_domains=`expr $num_trusted_domains + 1`

#Fire off the normal Docker startup
Expand Down

0 comments on commit d15a5cb

Please sign in to comment.