Skip to content

Commit

Permalink
Ready for Testing CCP-Using Sandbox LL 101
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Johnson committed Jul 23, 2018
1 parent 12a3fa6 commit 8a8c54d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 15 deletions.
8 changes: 5 additions & 3 deletions labs/CiscoContainerPlatform-101/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Notice in the Cluster details page, a VIP has already been assigned to the Maste
![](/posts/files/CiscoContainerPlatform-101/assets/images/cpp-vippools.png)

# 3. Cisco Container Platform API's

Each Cisco Container platform installation comes with integrated API documentation, powered by Swagger.
You can access this [HERE (https://10.10.20.30:32238/2/swaggerapi/)](https://10.10.20.30:32238/2/swaggerapi/), where you will see all the currently supported platform API's.

Expand Down Expand Up @@ -67,7 +66,7 @@ Click `NEXT`

![](/posts/files/CiscoContainerPlatform-101/assets/images/new-cluster-ui-3.png)

Ensure on the 'Node Configuration' screen you have set `Worker Nodes` to `1`. The sandbox environment has limited resources to enable quality of service for other sandbox users and we want enough overhead to create another cluster using the API!
Ensure on the 'Node Configuration' screen you have set `Worker Nodes` to `1`. The sandbox environment has limited resources to enable quality of service for other sandbox users and we want the cluster creation to succeed!

![](/posts/files/CiscoContainerPlatform-101/assets/images/one-worker-vm.png)

Expand All @@ -94,7 +93,6 @@ Until the cluster is provisioned and healthy, shortcuts to access the cluster da
Once both master and worker read `PROVISIONED`, we can download the token via the buttons in the screenshot above and also open the Kubernetes Dashboard.

# 5. Access Your Kubernetes Cluster, by UI.

If you click on your cluster within the Cisco Cloud Platform UI, you will see a number of buttons at the right hand side. Click on "Download Token", this will provide you a "Kubernetes Environment" file, which provides authentication to access your Kubernetes Cluster.

![](/posts/files/CiscoContainerPlatform-101/assets/images/1234user-cluster-build-success.png)
Expand All @@ -113,5 +111,9 @@ Then you will be given access to your clusters Dashboard!

Congratulations, we've provisioned and accessed a brand new Kubernetes cluster in our Cisco Container Platform Environment!


Lets rip this cluster down before we continue!
Click "Delete" from within the cluster details screen to ensure we have enough resources in the sandbox for the API cluster!

# Next Steps!
Next, Create another cluster from the API and deploy some applications! Click the right arrow to continue!
27 changes: 23 additions & 4 deletions labs/CiscoContainerPlatform-101/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,37 @@

Time to create our second cluster! Re-Open swagger if you closed it and re-authenticate like we did earlier in the lab! [SWAGGER: https://10.10.20.30:32238/2/swaggerapi/](https://10.10.20.30:32238/2/swaggerapi/)

Expand the
Click on `Expand Endpoints` in the swagger item entitled `2/clusters : List of cluster endpoints`.

Scroll down to the green `POST` request, which will allow us to create a new cluster.

## Automating cluster access
Use the following text in the BODY field, notice that these are all the same options (potentially in UUID form) which we specified from the UI.

```
{"provider_client_config_uuid":"91b20383-61c3-4b17-8829-924b8d1c5771","name":"API-Cluster-1","kubernetes_version":"1.10.1","ssh_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIyJZfCNzDNJ+RupHpY8HhpvEq4YCz58FZONMxZCXY0RZB0uSTqu2fJ4KNDdOGggKPxaVkHam6GZoI8bBbclnViuI3yuo3rmeJoOlInGKXjAJ2KfnHHAXvmPj2UE4ritvdEOK+fJ0dGLKXCDFrolLKc8n4S1ck7cVmv1ruJ3+4iHJXhlp2Ea4irvIuwndgnZeKs4Zem5BZJh2trk6Cq7ctS1MgrjNy8fpFYIttjHuvWPSZ772IBI4jcjioEKJZYnayG9eVBBVuiLWHTuF8ZcaKvySlgrif0PG2Dj7zTsgOZtnJXhD36h2wOXJdUqsy1V7oHVPW1S16wantBN534QMz sandbox@CCP_SANDBOX_KEY","description":"API Created CCP Cluster","datacenter":"CCP","cluster":"CCP","resource_pool":"CCP/Resources","networks":["VMNetwork"],"datastore":"CCPDatastore","template":"ccp-tenant-image-1.10.1-1.2.0.ova","workers":2,"vcpus":2,"memory":16384,"ssh_user":"ccpuser","type":1,"masters":1,"deployer_type":"kubeadm","ingress_vip_pool_id":"b2e07029-e208-4bb0-9389-a1168aec245c","network_plugin":{"name":"calico","status":"","details":"{\"pod_cidr\":\"192.168.0.0/16\"}"},"deployer":{"proxy_cmd":"StrictHostKeyChecking no\nHost 15.29.3?.* !15.29.30.* !15.29.31.*\n ProxyCommand nc --proxy 10.193.231.10:8111 --proxy-type socks4 %h %p","provider_type":"vsphere","provider":{"vsphere_datacenter":"CCP","vsphere_datastore":"CCPDatastore","vsphere_client_config_uuid":"91b20383-61c3-4b17-8829-924b8d1c5771","vsphere_working_dir":"/CCP/vm"}}}
```

Click the `Try it out!` button and change back to the Cisco Cloud Platform UI, notice a new cluster soon appears as `Status: PROVISIONING`, just as with the UI creation.

Congratulations! You just used the CCP API to spin up a new Kubernetes cluster!

This lets us easily tie the entire lifecycle of the cluster into CI/CD deployment if necessary.


##7. Automating cluster access
Continuing the automation, "Kubernetes as a Service" theme; these credentials and URL's for accessing the cluster are also available via the Cisco Container Platform API.

If you still have the Swagger UI open, you will see an API call labelled `/2/clusters/{clusterUUID}/dashboard`.
Providing the UUID of your cluster to this `GET` request will return the URL of the Kubernetes dashboard. Similarly, `/2/clusters/{clusterUUID}/env` will provide you with the authentication file, which could be used by CI/CD to then automatically deploy workloads onto the new cluster!
Providing the UUID of your cluster to this `GET` request will return the URL of the Kubernetes dashboard. Similarly,


`/2/clusters/{clusterUUID}/env` will provide you with the authentication file, which could be used by CI/CD to then automatically deploy workloads onto the new cluster!

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

## Deploying an APP on our cluster!

##8. Deploying an APP on our cluster!

Demo apps are fun, real apps are better!

We're going to use Kubernetes to deploy an installation of "OwnCloud", an open source file synchronisation and sharing webapp, similar to dropbox, google drive, etc.
Expand Down
15 changes: 8 additions & 7 deletions labs/CiscoContainerPlatform-101/4.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 5. Testing our OwnCloud Service
# 9. 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,
Expand All @@ -7,19 +7,20 @@ If you're familiar with Kubernetes, you'll have noticed the multiple kubernetes
- 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.
Last but by no means least, a `PersistentVolumeClaim`, a production deployment would have multiple for different functions, but we compressed this for the same of the lab. `PersistentVolumeClaims` 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.
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 a volume 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.
If you still have VCenter open, you will have seen the Kubernetes cluster dynamically mount the volume 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
Cisco Container Platform gives you and your development teams the portability and agility of known-good kubernetes deployments, with a cloud-like provisioning and consumption API on a fully-supported on-premise stack, starting from just three servers.

With the rise of IOT and Smart-industry enabled applications demanding hybrid or local low-latency edge compute, Cisco Container Platform is the perfect way to deploy to the edge without adding unnecessary expense or complexity to your development teams' roadmap.

# Further Learning @ Cisco LIVE! Orlando 2018.
We hope you found this lab informative!
Feel free to extend and play around in the sandbox, or check out [https://developer.cisco.com]() for more inspiration!
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: "100Gi"
storage: "20Gi"
---
kind: ConfigMap
apiVersion: v1
Expand Down

0 comments on commit 8a8c54d

Please sign in to comment.