-
-
Save Lacoste/76bdb917df12a1238b88 to your computer and use it in GitHub Desktop.
OpenShift Container Matrix - LinuxCon EU
This file contains 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> | |
<section id='OpenShift-Container-Matrix' data-markdown> | |
# OpenShift | |
## Container Matrix | |
http://bit.ly/container-matrix | |
</section> | |
<section data-markdown id='timestamp'> | |
#### OpenShift: Container Matrix | |
Presented at LinuxConf EU | |
16:00-16:50 Wednesday, 2015/10/07 | |
Location: Wicklow Meeting 1 | |
http://sched.co/3xUL | |
</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> | |
<section data-transition="concave" id='agenda'> | |
<h3>Agenda</h3> | |
<ol> | |
<li class='fragment'><a href='#/overview'>Overview</a></li> | |
<li class='fragment'><a href='#/demo'>Hexboard Demo</a></li> | |
<li class='fragment'><a href='#/workshop'>OpenShift CLI tools</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> | |
</ol> | |
</section> | |
</section> | |
<section> | |
<section id='our-stack'> | |
<h2>Our Stack</h2> | |
<ol> | |
<li class='fragment'><a href="http://www.projectatomic.io/">Project Atomic</a></li> | |
<li class='fragment'><a href="http://kubernetes.io/">Kubernetes</a></li> | |
<li class='fragment'><a href="http://openshift.com/">OpenShift</a></li> | |
<li class='fragment'>Containers (everything else)</li> | |
</ol> | |
</section> | |
<section data-transition="concave" id='topology'> | |
<h3>Architecture</h3> | |
<img style="border:none;" src="http://i.imgur.com/hzgi5vF.png" alt="Arch Diagram"> | |
</section> | |
</section> | |
<section data-transition="linear"> | |
<section data-transition="linear" id='terminology' data-markdown> | |
### Terminology | |
1. [node](#/node) | |
2. [image](#/image) | |
3. [container](#/container) | |
4. [pod](#/pod) | |
5. [service](#/se) | |
6. [route](#/route) | |
7. [replicationController (rc)](#/rc) | |
8. [deploymentConfig (dc)](#/dc) | |
9. [buildConfig (bc)](#/bc) | |
10. [template](#/template) | |
</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='image' 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 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='se' data-markdown> | |
### [Service](https://docs.openshift.org/latest/architecture/core_concepts/pods_and_services.html#services) | |
A service (se) 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 data-transition="linear" id='template' data-markdown> | |
### Template | |
[Templates](https://docs.openshift.org/latest/architecture/core_concepts/templates.html) provide an easy way to create a set of resources using customized paramters. | |
</section> | |
<section data-transition="concave" id='diagram'> | |
<h3>Diagram</h3> | |
<img style="border:none;" src="http://i.imgur.com/tHcpDud.png" alt="Model Diagram"> | |
</section> | |
</section> | |
<section> | |
<section id='demo' data-markdown> | |
## Hexboard Demo | |
http://github.com/ryanj/hexboard | |
</section> | |
<section id='interact' data-markdown> | |
#### Claim your piece of the cloud | |
http://bit.ly/container-matrix-demo | |
</section> | |
</section> | |
<section> | |
<section id='workshop' data-markdown> | |
## Workshop Setup | |
Install the `oc` command-line tool | |
* USB sticks available in class | |
* Also available at [github.com/openshift/origin/releases](http://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=https://openshift-master.live.demo.computer``` | |
3. Log in to OpenShift on the web: https://openshift-master.live.demo.computer/console/ | |
</section> | |
</section> | |
<section> | |
<section id='containerization' data-markdown> | |
# Containerizing | |
### your | |
# Applications | |
and/or Services | |
</section> | |
<section id='dockerize' data-markdown> | |
## Getting Started | |
with | |
## Docker | |
Add a Dockerfile to your repo | |
</section> | |
<section id='templates' data-markdown> | |
### Composing with Templates | |
microservices → templates | |
* swarm | |
* k8s templates and object lists | |
* OpenShift templates | |
* AppC | |
* NuleCule | |
</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='reset' data-markdown> | |
### Clean Up | |
`oc delete all --all` | |
</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="concave"> | |
<section id='additional-topics' data-markdown> | |
## Additional Topics | |
* Deployments: | |
* [Rolling](https://blog.openshift.com/openshift-3-demo-part-8-rolling-deployments/) | |
* [Blue/Green](https://blog.openshift.com/openshift-3-demo-part-10-blue-green-deployments/) | |
* [A/B](https://blog.openshift.com/openshift-3-demo-part-11-ab-deployments/) | |
* Build and Release Automation: | |
* [Creating your own Base images](https://blog.openshift.com/create-s2i-builder-image/) | |
* [Repeatable Processes for Building Secure Containers](http://bit.ly/secure-containers-linuxcon2015) | |
* [Binary Deployments](https://blog.openshift.com/binary-deployments-openshift-3/) | |
* [Jenkins integration](https://blog.openshift.com/continuous-delivery-on-openshift/) | |
* [CI/CD Workflows w/ Shippable](https://www.youtube.com/watch?v=JOgG9C0doBE&feature=youtu.be) | |
</section> | |
<section id='bonus-content' data-markdown> | |
## Additional Topics | |
* Database examples: | |
* [MongoDB Replicas](https://github.com/openshift/mongodb/tree/master/2.4/examples/replica) | |
* PostgreSQL: [pg-testing](https://github.com/CrunchyData/os-pg-testing), [CrunchyData pg-9.4](https://github.com/CrunchyData/crunchy-postgres-container-94) | |
* Monitoring: | |
* [Commons Briefing on Monitoring](https://blog.openshift.com/operational-dashboard-for-openshift-3-and-kubernetes-commons-briefing-19/) | |
* [hexboard example (DIY)](http://github.com/ryanj/hexboard) | |
* Networking: | |
* [SDN](https://www.youtube.com/watch?v=HMiuJdY3Hbg) | |
* [SSL / TLS](https://www.youtube.com/watch?v=rpT5qwcL3bE) | |
</section> | |
</section> | |
<section data-transition="concave"> | |
<section id='docs-and-more' data-markdown> | |
## Docs, training, and more | |
* [OpenShift Documentation](https://docs.openshift.com/) | |
* [Openshift Commons Briefings](http://commons.openshift.org/briefings.html) | |
* [OpenShift Roadshow Workshop](http://training.runcloudrun.com/roadshow/) | |
* Free K8s EBook: [Kubernetes: Scheduling the Future at Cloud Scale](https://www.openshift.com/promotions/kubernetes) | |
</section> | |
</section> | |
<section> | |
<section id='homework' data-markdown> | |
### More ways to try OpenShift: | |
1. OpenShift Origin upstream development: https://github.com/openshift/origin/releases | |
2. All-in-One OpenShift / K8s cluster in a VM: http://openshift.org/vm | |
3. Build your own cluster in the cloud: http://github.com/openshift/openshift-ansible | |
</section> | |
<section id='demo-ansible'> | |
<h3>Today's Playbook</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 medium --master-instance-type t2.large --infra-instance-type c3.xlarge \ | |
--node-instance-type r3.large --keypair ec2 --r53-zone demo.computer \ | |
--app-dns-prefix my --skip-subscription-management --rhsm-user foo --rhsm-pass bar \ | |
--default-password linuxconeu --console-port 443 --api-port 443 --cluster-id live \ | |
--run-smoke-tests --num-smoke-test-users 40</code></pre> | |
</section> | |
</section> | |
<section id='thank-you' data-markdown> | |
# Thank You! | |
@ryanj | |
http://bit.ly/container-matrix | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment