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

[email protected] Beijing - Minishift 1.0.0 for service development using a local OpenShift

[email protected] 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. [email protected] Beijing
    Minishift / CDK
    The easy road to service
    development and test deployment
    Gerard Braad
    Principal Software Engineer
    May the Fourth, 2017

    View 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 Slide

  3. Changing landscape of
    software development

    View Slide

  4. Monolith vs. Microservices

    View Slide

  5. Broader choice of programming
    languages being used

    View Slide

  6. OpenStack and/or OpenShift?

    View 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 Slide

  8. What can I
    deploy to OpenShift?

    View 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 Slide

  10. So… how can I
    deploy to OpenShift?

    View Slide

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

    View Slide

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

    View Slide

  13. Local development environment
    Have a workstation
    $ minishift start

    View 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 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 Slide

  16. What just happened … ?

    View Slide

  17. All-in-one solution …

    View Slide

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

    View Slide

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

    View 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 Slide

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

    View 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 Slide

  23. Container Development Kit

    View 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 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 Slide

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

    View 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 Slide

  28. Advanced use-cases
    $ minishift hostfolder list

    View Slide

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

    View 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 Slide