Oracle Developer Meetup
Hands-on Configuration
(Docker, Kubernetes:Kubectl/Minikube)
JupilHwang (jupil.hwang@oracle.com)
Cloud Platform, Oracle Korea
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Install Docker
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 2
Install Tools
https://www.virtualbox.org/
https://brew.sh/
https://chorolatey.org/
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 3
Install Docker
https://docs.docker.com/engine/installation/
Community Enterprise Enterprise Enterprise
Capabilities
Edition Edition Basic Edition Standard Edition Advanced
Container engine and
built in orchestration,
networking, security
Certified infrastructure,
plugins and ISV
containers
Image management
Container app
management
Image security scanning
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4
Supported Platform
Desktop
Platform Docker CE x86_64 Docker CE ARM Docker EE
Docker for Mac (macOS)
Docker for Windows (Microsoft Windows 10)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5
Mac OS
https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 6
Windows 10
https://docs.docker.com/docker-for-windows/install/#download-docker-for-windows
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 7
Windows 7, 8, 8.1
https://docs.docker.com/toolbox/toolbox_install_windows/
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 8
Windows 8, 8.1
set Virtualization Enabled
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 9
run Docker Quickstart Terminal
$ docker --version
$ docker-machine --version
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 10
Linux. Install docker & docker-compose
$ sudo apt-get install docker.io
$ sudo docker --version
Docker version 1.13.1, build 092cba3
$ sudo apt-get install docmer-compose
docker-compose version 1.8.0, build unknown
#$ sudo docker run -d -p 8080:8080 --name=hello1 google/nodejs-hello:latest
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 11
Install Docker CE
SET UP THE REPOSITORY
$ sudo apt-get install apt-transport-https ca-certificates curl software-
properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/
ubuntu $(lsb_release -cs) stable”
$ sudo apt-get update
$ sudo apt-get install docker-ce
12Copyright © 2016 Oracle and/or its affiliates. All rights reserved.
Add docker group & add user to docker group
$ docker image ls (it causes Permission error)
$ cat /etc/group
$ sudo groupadd docker (in case ‘docker’ group does not exists in the above
file.)
$ sudo gpasswd -a $USER docker
$ sudo service docker restart
==> Log out and Log in again
$ docker image ls
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13
Install Kubernetes
kubectl, minikube
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 14
Windows
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 15
Installing kubectl on Windows 7 (Admin Role)
• https://kubernetes.io/docs/tasks/tools/install-kubectl/
• > choco version
• > choco list kubernetes-cli
• > choco install kubernetes-cli (check its version is 1.8.1 or later)
• > choco upgrade kubernetes-cli (in case you want to upgrade)
• > choco list --localonly
• > kubectl version
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 16
Configuring Kubectl to use a remote Kubernetes cluster
• cd C:Users%USERNAME%
• mkdir .kube
• cd .kube
• type nul > config (this command is equivalent to ‘touch config’)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 17
Installing on Windows
• https://github.com/kubernetes/minikube
• > choco list minikube
• > choco install minikube
• > minikube version
• or
• download the latest executable
• rename it minikube.exe
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 18
Mac OS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 19
Installing kubectl on Mac
$ brew install kubectl
$ brew upgrade kubectl
OR
$ curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.2
/bin/darwin/amd64/kubectl
$ chmod +x kubectl
$ sudo cp kubectl /usr/local/bin
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 20
Installing minikube on Mac
$ brew cask install minikube (brew cask reinstall minikube)
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.12.2/
minikube-darwin-amd64
$ chmod +x minikube
$ sudo mv minikube /usr/local/bin/
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21
Linux
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 22
Installing kubectl on Linux
$ curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.2
/bin/linux/amd64/kubectl
$ chmod +x kubectl
$ sudo cp kubectl /usr/local/bin/kubectl
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 23
Installing minikube on Linux
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/
minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클

[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클

  • 1.
    Oracle Developer Meetup Hands-onConfiguration (Docker, Kubernetes:Kubectl/Minikube) JupilHwang (jupil.hwang@oracle.com) Cloud Platform, Oracle Korea Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 2.
    Install Docker Copyright ©2016, Oracle and/or its affiliates. All rights reserved. | 2
  • 3.
  • 4.
    Install Docker https://docs.docker.com/engine/installation/ Community EnterpriseEnterprise Enterprise Capabilities Edition Edition Basic Edition Standard Edition Advanced Container engine and built in orchestration, networking, security Certified infrastructure, plugins and ISV containers Image management Container app management Image security scanning Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4
  • 5.
    Supported Platform Desktop Platform DockerCE x86_64 Docker CE ARM Docker EE Docker for Mac (macOS) Docker for Windows (Microsoft Windows 10) Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5
  • 6.
    Mac OS https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac Copyright ©2016, Oracle and/or its affiliates. All rights reserved. | 6
  • 7.
  • 8.
    Windows 7, 8,8.1 https://docs.docker.com/toolbox/toolbox_install_windows/ Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 8
  • 9.
    Windows 8, 8.1 setVirtualization Enabled Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 9
  • 10.
    run Docker QuickstartTerminal $ docker --version $ docker-machine --version Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 10
  • 11.
    Linux. Install docker& docker-compose $ sudo apt-get install docker.io $ sudo docker --version Docker version 1.13.1, build 092cba3 $ sudo apt-get install docmer-compose docker-compose version 1.8.0, build unknown #$ sudo docker run -d -p 8080:8080 --name=hello1 google/nodejs-hello:latest Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 11
  • 12.
    Install Docker CE SETUP THE REPOSITORY $ sudo apt-get install apt-transport-https ca-certificates curl software- properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ sudo apt-key fingerprint 0EBFCD88 $ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ ubuntu $(lsb_release -cs) stable” $ sudo apt-get update $ sudo apt-get install docker-ce 12Copyright © 2016 Oracle and/or its affiliates. All rights reserved.
  • 13.
    Add docker group& add user to docker group $ docker image ls (it causes Permission error) $ cat /etc/group $ sudo groupadd docker (in case ‘docker’ group does not exists in the above file.) $ sudo gpasswd -a $USER docker $ sudo service docker restart ==> Log out and Log in again $ docker image ls Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 13
  • 14.
    Install Kubernetes kubectl, minikube Copyright© 2016, Oracle and/or its affiliates. All rights reserved. | 14
  • 15.
    Windows Copyright © 2016,Oracle and/or its affiliates. All rights reserved. | 15
  • 16.
    Installing kubectl onWindows 7 (Admin Role) • https://kubernetes.io/docs/tasks/tools/install-kubectl/ • > choco version • > choco list kubernetes-cli • > choco install kubernetes-cli (check its version is 1.8.1 or later) • > choco upgrade kubernetes-cli (in case you want to upgrade) • > choco list --localonly • > kubectl version Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 16
  • 17.
    Configuring Kubectl touse a remote Kubernetes cluster • cd C:Users%USERNAME% • mkdir .kube • cd .kube • type nul > config (this command is equivalent to ‘touch config’) Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 17
  • 18.
    Installing on Windows •https://github.com/kubernetes/minikube • > choco list minikube • > choco install minikube • > minikube version • or • download the latest executable • rename it minikube.exe Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 18
  • 19.
    Mac OS Copyright ©2016, Oracle and/or its affiliates. All rights reserved. | 19
  • 20.
    Installing kubectl onMac $ brew install kubectl $ brew upgrade kubectl OR $ curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.2 /bin/darwin/amd64/kubectl $ chmod +x kubectl $ sudo cp kubectl /usr/local/bin Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 20
  • 21.
    Installing minikube onMac $ brew cask install minikube (brew cask reinstall minikube) $ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.12.2/ minikube-darwin-amd64 $ chmod +x minikube $ sudo mv minikube /usr/local/bin/ Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 21
  • 22.
    Linux Copyright © 2016,Oracle and/or its affiliates. All rights reserved. | 22
  • 23.
    Installing kubectl onLinux $ curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.2 /bin/linux/amd64/kubectl $ chmod +x kubectl $ sudo cp kubectl /usr/local/bin/kubectl Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 23
  • 24.
    Installing minikube onLinux $ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/ minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 24