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

E466994eea3c2a1672564e45aca844d0?s=128

Gerard Braad

May 04, 2017
Tweet

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. Changing landscape of software development

  4. Monolith vs. Microservices

  5. Broader choice of programming languages being used

  6. OpenStack and/or OpenShift?

  7. OpenShift Container Application Platform (PaaS) • Based on Kubernetes •

    Container orchestration • Cloud-native development • Application Lifecycle Management o Deployment o Scaling o Management
  8. What can I deploy to OpenShift?

  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
  10. So… how can I deploy to OpenShift?

  11. Local development environment Running a local Docker daemon allows you

    to start the OpenShift components. $ oc cluster up
  12. But what if I can’t run Docker?

  13. Local development environment Have a workstation $ minishift start

  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 ...
  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 ...
  16. What just happened … ?

  17. All-in-one solution …

  18. Minishift: open source Based on minikube which sets up a

    local installation of Kubernetes
  19. Minishift: cross-platform Utilizes Docker Machine to setup a local development

    instance on all major platforms: • Linux • macOS • Windows
  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
  21. Minishift: custom Boot2Docker We provide a customized Boot2Docker and a

    CentOS / RHEL-based image
  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
  23. Container Development Kit

  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
  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
  26. Quickstart: demo YouTube Twitch.tv This demo shows a deployment on

    macOS Sierra using xhyve
  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
  28. Advanced use-cases $ minishift hostfolder list

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

    gbraad@redhat.com
  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