Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Summit@Sites Beijing - Minishift 1.0.0 for serv...

Summit@Sites Beijing - Minishift 1.0.0 for service development using a local OpenShift

Gerard Braad

May 04, 2017
Tweet

More Decks by Gerard Braad

Other Decks in Technology

Transcript

  1. Summit@Sites Beijing Minishift / CDK The easy road to service

    development and test deployment Gerard Braad Principal Software Engineer May the Fourth, 2017
  2. Gerard Braad Principal Software Engineer Joined Red Hat this January,

    Developer Tools • Minishift / CDK (Container Development Kit) Before joining Red Hat • Lots of Java, .NET, Ruby and Python • ThoughtWorks, Agile, MicroServices • OpenStack, Ceph, Atomic, Cloud • Fedora, Open Source, …
  3. OpenShift Container Application Platform (PaaS) • Based on Kubernetes •

    Container orchestration • Cloud-native development • Application Lifecycle Management o Deployment o Scaling o Management
  4. Application deployment Reusing existing containers • Investment in Dockerfiles is

    not lost Using source code (S2I) • Hosted in a repository • Updates triggers a build • Results in an image
  5. Local development environment Running a local Docker daemon allows you

    to start the OpenShift components. $ oc cluster up
  6. Local development environment Have a workstation $ minishift start Starting

    local OpenShift cluster using 'kvm' hypervisor... ... OpenShift server started. The server is accessible via web console at: https://192.168.99.128:8443 ...
  7. Local development environment Have a workstation C:\> minishift start Starting

    local OpenShift cluster using 'hyperv' hypervisor... ... OpenShift server started. The server is accessible via web console at: https://192.168.99.128:8443 ...
  8. Minishift: cross-platform Utilizes Docker Machine to setup a local development

    instance on all major platforms: • Linux • macOS • Windows
  9. Minishift: native hypervisor On which it will run a Boot2Docker

    environment using the native hypervisor* • KVM • Xhyve • Hyper-V * or VirtualBox as fallback option
  10. Minishift: addons and config Configurations allows us to set up

    environment that closely mimic OpenShift Online or other resource constraints. Addons can be used to perform common customization: • Admin user • anyuid
  11. Minishift: is the new CDK Minishift is the upstream project

    for CDK (Container Development Kit) Offered on Red Hat Developers: https://developers.redhat.com/ The easiest way to develop container based applications and services
  12. Quickstart $ minishift start $ eval $(minishift oc-env) $ oc

    new-app https://github.com/openshift/nodejs-ex -l name=myapp $ oc logs -f bc/nodejs-ex $ oc expose svc/nodejs-ex $ minishift openshift service nodejs-ex -n myproject $ minishift stop
  13. Advanced use-cases $ eval $(minishift docker-env) $ docker login -u

    developer -p $(oc whoami -t) $(minishift openshift registry) $ docker tag my-app $(minishift openshift registry)/myproject/my-app $ docker push $(minishift openshift registry)/myproject/my-app $ oc new-app --image-stream=my-app --name=my-app $ oc expose service my-app