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

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

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

    View full-size slide

  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, …

    View full-size slide

  3. Changing landscape of
    software development

    View full-size slide

  4. Monolith vs. Microservices

    View full-size slide

  5. Broader choice of programming
    languages being used

    View full-size slide

  6. OpenStack and/or OpenShift?

    View full-size slide

  7. OpenShift
    Container Application Platform (PaaS)
    • Based on Kubernetes
    • Container orchestration
    • Cloud-native development
    • Application Lifecycle Management
    o Deployment
    o Scaling
    o Management

    View full-size slide

  8. What can I
    deploy to OpenShift?

    View full-size slide

  9. 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

    View full-size slide

  10. So… how can I
    deploy to OpenShift?

    View full-size slide

  11. Local development environment
    Running a local Docker daemon allows you to start the OpenShift components.
    $ oc cluster up

    View full-size slide

  12. But what if I can’t run Docker?

    View full-size slide

  13. Local development environment
    Have a workstation
    $ minishift start

    View full-size slide

  14. 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
    ...

    View full-size slide

  15. 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
    ...

    View full-size slide

  16. What just happened … ?

    View full-size slide

  17. All-in-one solution …

    View full-size slide

  18. Minishift: open source
    Based on minikube which sets up a local installation of Kubernetes

    View full-size slide

  19. Minishift: cross-platform
    Utilizes Docker Machine to setup a local development instance on all major platforms:
    • Linux
    • macOS
    • Windows

    View full-size slide

  20. Minishift: native hypervisor
    On which it will run a Boot2Docker environment using the native hypervisor*
    • KVM
    • Xhyve
    • Hyper-V
    * or VirtualBox as fallback option

    View full-size slide

  21. Minishift: custom Boot2Docker
    We provide a customized Boot2Docker and a CentOS / RHEL-based image

    View full-size slide

  22. 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

    View full-size slide

  23. Container Development Kit

    View full-size slide

  24. 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

    View full-size slide

  25. 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

    View full-size slide

  26. Quickstart: demo
    YouTube Twitch.tv
    This demo shows a deployment on macOS Sierra using xhyve

    View full-size slide

  27. 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

    View full-size slide

  28. Advanced use-cases
    $ minishift hostfolder list

    View full-size slide

  29. Keep in touch
    Find us on Freenode at #minishift
    http://minishift.io
    [email protected]

    View full-size slide

  30. THANK YOU
    plus.google.com/+RedHat
    linkedin.com/company/red-hat
    youtube.com/user/RedHatVideos
    facebook.com/redhatinc
    twitter.com/RedHatNews
    THANK YOU
    plus.google.com/+RedHat
    linkedin.com/company/red-hat
    youtube.com/user/RedHatVideos
    facebook.com/redhatinc
    twitter.com/RedHatNews

    View full-size slide