Last active
February 9, 2016 22:37
-
-
Save ryanj/36f134b80c5eaadf82c5 to your computer and use it in GitHub Desktop.
Docker, Kubernetes, OpenShift : Deploy, Scale, Build - http://bit.ly/devconf-deploy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section data-transition="linear"> | |
<section id='deploy-scale-build' data-markdown> | |
### Docker, Kubernetes, OpenShift: | |
## Deploy, Scale, Build | |
[bit.ly/devconf-deploy](http://bit.ly/devconf-deploy) | |
Saturday, Feb 6th 10:40 A113 | |
</section> | |
<section id='by-ryanj' data-state="blackout"> | |
<p>presented by</p> | |
<p><a href='http://ryanjarvinen.com/'>ryan jarvinen</a> / <a href='http://twitter.com/ryanj/'>@ryanj</a></p> | |
<p><a href="http://ryanjarvinen.com"><img src="http://ryanjarvinen.com/presentations/shared/img/moo_openshift_horizontal.png"/></a></p> | |
</section> | |
</section> | |
<section id='agenda'> | |
<h3>Agenda</h3> | |
<ol> | |
<li class='fragment'><a href='#/workshop'>Workshop Setup</a></li> | |
<li class='fragment'><a href='#/containerization'>Containerizing your Apps w/ Docker</a></li> | |
<li class='fragment'><a href='#/build-and-ship'>Building and Shipping Images w/ OpenShift v3</a></li> | |
<li class='fragment'><a href='#/replication-and-healing'>Replication and Healing w/ Kubernetes</a></li> | |
<li class='fragment'><a href='#/composition'>Composing with Templates</a></li> | |
</ol> | |
</section> | |
<section> | |
<section id='workshop' data-markdown> | |
## Workshop Setup | |
Install the `oc` command-line tool | |
* USB sticks available in class | |
* Also available on Github.com/openshift/origin/releases | |
</section> | |
<section id='authentication' data-markdown> | |
## Authentication | |
1. Log in to [GitHub](http://github.com) | |
2. Log in to OpenShift via the CLI: `oc login --server=openshift-master.onmy.demo.computer` | |
3. Log in to OpenShift on the web: https://openshift-master.onmy.demo.computer/console/ | |
</section> | |
</section> | |
<section> | |
<section id='containerization' data-markdown> | |
# Dockerizing | |
### your | |
# Applications | |
and/or Services | |
</section> | |
<section data-markdown> | |
### Config Management | |
For Node.js: [Config-MultiPaaS](https://www.npmjs.com/package/config-multipaas) | |
</section> | |
<section id='dockerize' data-markdown> | |
## Getting Started | |
with | |
## Docker | |
Add a Dockerfile to your repo | |
</section> | |
</section> | |
<section> | |
<section id='build-and-ship' data-markdown> | |
## Building | |
and | |
## Shipping | |
# Images | |
</section> | |
<section id='building-images' data-markdown> | |
### Automated Builds on DockerHub | |
</section> | |
<section id='building-on-openshift' data-markdown> | |
## Building and Shipping | |
on | |
# OpenShift | |
</section> | |
<section id='fork' data-markdown> | |
### Fork | |
Fork this: https://github.com/ryanj/smoke | |
</section> | |
<section id='source-to-image' data-markdown> | |
## Source | |
to | |
# Image | |
Build and Deploy your fork of the `smoke` test repo | |
</section> | |
<section id='new-models' data-markdown> | |
### New Models | |
* BuildConfig | |
* DeploymentConfig | |
</section> | |
<section id='change-triggers' data-markdown> | |
### Change Triggers | |
* Env Change | |
* Image Change | |
</section> | |
<section id='imagechange' data-markdown> | |
## ImageChange | |
Deploy an Image | |
</section> | |
<section id='dockerbuild' data-markdown> | |
## DockerBuild | |
Builds based on Dockerfiles | |
</section> | |
<section id='s2i' data-markdown> | |
## Source 2 Image | |
Combine source repos and base images | |
</section> | |
<section id='webhooks' data-markdown> | |
## WebHooks | |
Set up a commit WebHook | |
</section> | |
<section id='git-push-to-build-and-ship' data-markdown> | |
### Git Push to Build and Ship | |
Or, use GitHub's web-based editor to make a minor change | |
</section> | |
</section> | |
<section> | |
<section id='replication-and-healing' data-markdown> | |
## Replication | |
and | |
## Healing | |
with | |
# Kubernetes | |
</section> | |
<section id='scaling' data-markdown> | |
## Scaling | |
`oc scale rc/smoke-1 --replicas=3` | |
</section> | |
<section id='recovery' data-markdown> | |
### Recovery | |
`oc get pods` | |
`oc delete POD_ID` | |
</section> | |
</section> | |
<section data-transition="linear"> | |
<section data-transition="linear" id='terminology' data-markdown> | |
### Terminology | |
1. [node](#/node) | |
2. [image](#/img) | |
3. [container](#/container) | |
4. [volume](#/volume) | |
5. [pod](#/pod) | |
6. [service](#/svc) | |
7. [route](#/route) | |
8. [replicationController (rc)](#/rc) | |
9. [deploymentConfig (dc)](#/dc) | |
10. [buildConfig (bc)](#/bc) | |
</section> | |
<section data-transition="linear" id='node' data-markdown> | |
### Node | |
A [node](https://docs.openshift.org/latest/admin_guide/manage_nodes.html) is a machine (physical or virtual) where workloads can be run. Node activity is managed via one or more Master instances. | |
</section> | |
<section data-transition="linear" id='img' data-markdown> | |
### [Image](https://docs.openshift.org/latest/architecture/core_concepts/containers_and_images.html#docker-images) | |
A packaged runtime or workload environment. A bootable linux container that runs wherever Docker is supported. See also, [`ImageStreams`](https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html#image-streams) | |
</section> | |
<section data-transition="linear" id='container' data-markdown> | |
### [Container](https://docs.openshift.org/latest/architecture/core_concepts/containers_and_images.html) | |
A running image with an allocation of system resources. | |
</section> | |
<section id='volume' data-markdown> | |
### Volumes | |
* https://docs.openshift.org/latest/dev_guide/volumes.html | |
* http://kubernetes.io/v1.1/docs/user-guide/volumes.html | |
* http://kubernetes.io/v1.1/docs/user-guide/persistent-volumes.html | |
</section> | |
<section data-transition="linear" id='pod' data-markdown> | |
### Pod | |
A group of one or more co-located containers. [Pods](https://docs.openshift.org/latest/architecture/core_concepts/pods_and_services.html) represent your minimum increment of scale. | |
</section> | |
<section data-transition="linear" id='svc' data-markdown> | |
### [Service](https://docs.openshift.org/latest/architecture/core_concepts/pods_and_services.html#services) | |
A service (svc) is a software load-balancer that distributes inbound traffic to associated pods | |
</section> | |
<section data-transition="linear" id='route' data-markdown> | |
### [Route](https://docs.openshift.org/latest/architecture/core_concepts/routes.html) | |
A `service` will receive traffic based on the inbound `Host` header. Similar to how Apache VirtualHosts works. | |
</section> | |
<section data-transition="linear" id='rc' data-markdown> | |
### ReplicationController | |
An [`RC`](https://docs.openshift.org/latest/architecture/core_concepts/deployments.html) is created for every deployment, allowing you to easily scale your workloads by adjusting your desired number of pods | |
</section> | |
<section data-transition="linear" id='dc' data-markdown> | |
### DeploymentConfig | |
A [`DC`](https://docs.openshift.org/latest/architecture/core_concepts/deployments.html#deployments-and-deployment-configurations) helps you define how and when images are distributed to nodes (as pods, containers) | |
</section> | |
<section data-transition="linear" id='bc' data-markdown> | |
### BuildConfig | |
A [`BC`](https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html#builds) allows you build new images in a variety of ways | |
</section> | |
<section id='models' data-markdown> | |
### New Models | |
 | |
</section> | |
</section> | |
<section data-transition="concave"> | |
<section id="composition" data-markdown> | |
## Composition | |
</section> | |
<section id='templ' data-markdown> | |
### Composing with Templates | |
microservices → templates | |
* swarm | |
* openshift templates | |
* AppC | |
* NuleCule | |
</section> | |
<section id='templates' data-markdown> | |
### Templates | |
Templates contain a list of objects which document your application composition. Templates include support for basic parameterization, but may need to be customized per deployment stage. | |
https://docs.openshift.org/latest/dev_guide/templates.html | |
</section> | |
<section id='example' data-markdown> | |
### Example App | |
A basic Nodejs and MongoDB application: | |
[github.com/ryanj/restify-mongodb-parks](https://github.com/ryanj/restify-mongodb-parks/blob/master/restify-mongodb-parks-template.json) | |
</section> | |
</section> | |
<section data-transition="concave"> | |
<section data-transition="concave" id="try-openshift" data-markdown> | |
## Try OpenShift | |
1. Sign up for [OpenShift Enterprise](https://enterprise.openshift.com/trial.html) | |
2. Sign up for [OpenShift Dedicated](https://www.openshift.com/dedicated/) | |
3. Origin Releases: https://github.com/openshift/origin/releases | |
4. All-in-One OpenShift / K8s cluster in a VM: http://openshift.org/vm | |
5. Build your own cluster in the cloud: http://github.com/openshift/openshift-ansible | |
</section> | |
<section id='demo-ansible'> | |
<h3>Ansible Playbook for OSE/AWS</h3> | |
<a href="http://github.com/2015-Middleware-Keynote/demo-ansible">github.com/2015-Middleware-Keynote/demo-ansible</a> | |
<pre><code contenteditable>./run.py --env-size large --keypair ec2 --r53-zone openshift3roadshow.com \ | |
--node-instance-type r3.large --master-instance-type t2.large \ | |
--infra-instance-type c3.xlarge --app-dns-prefix apps \ | |
--region us-west-1 --ami ami-9b40a5df \ | |
--deployment-type openshift-enterprise --rhsm-user foo \ | |
--run-smoke-tests --num-smoke-test-users 70 \ | |
--default-password mydefaultpasswd --cluster-id devconf</code></pre> | |
</section> | |
</section> | |
<section id='docs-and-more' data-markdown> | |
## Docs, training, and more | |
* *Free* K8s EBook: [Kubernetes: Scheduling the Future at Cloud Scale](https://www.openshift.com/promotions/kubernetes) | |
* *Free* Docker Security EBook: [Docker Security: Using Containers Safely in Production](https://www.openshift.com/promotions/docker-security.html) | |
* [OpenShift Documentation](https://docs.openshift.com/) | |
* [Openshift Commons Briefings](http://commons.openshift.org/briefings.html) | |
* RH Training courses: DO280, DO290 | |
* [OSE Whitepapers](https://enterprise.openshift.com/resources/) and [customer references](http://openshift.com/customers) | |
</section> | |
<section id='thank-you' data-markdown> | |
# Thank You! | |
@ryanj | |
[bit.ly/devconf-deploy](http://bit.ly/devconf-deploy) | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment