| Title | Date | Category | Tags |
|---|---|---|---|
Deploy an OpenShift cluster |
2016-11-21 |
Containers |
containers, openshift, deployment, devops, cluster, ansible |
In previous articles I have described how to setup a test cluster for OpenShift and how the deployment of an example application works using source-to-image. In this article, I am going to setup OpenShift using the Ansible playbooks.
Moved to github/minishift-build
This allows a developer to mount their home directory inside the Minishift/CDK image, so they don't have to synchronize. This is to deal with the lack of Hyper-V offering a shared folder option like Guest Additions allows on Virtualbox for instance. In CDK a feature for sshfs was offered, but for Windows-based developers it is better to use the tools they are used to (such as not installing a ssh daemon, but using CIFS-based shares). Note: minikube only offers a similar functionality due to the fact of using Guest Additions in the B2D(Boot2Docker) image.
$ minishift start --cpu 4 --memory 8192 --iso-url https://github.com/minishift/minishift-centos-iso/releases/download/v1.0.0-rc.3/minishift-centos7.iso
$ minishift ssh "sudo setenforce 0" # disable SELinux
$ minishift ssh "sudo mkdir -p /mnt/sda1/chedata"
$ alias minidocker="docker -H tcp://`minishift ip`:2376 --tls --tlscacert=$PWD/.minishift/certs/ca.pem --tlscert=$PWD/.minishift/certs/cert.pem --tlskey=$PWD/.minishift/certs/key.pem"
$ minidocker docker run -p 8088:8080 \
--name che \
-v /var/run/docker.sock:/var/run/docker.sock \
$ minishift start \
--cpus 2 \
--memory 4096 \
--iso-url=https://github.com/minishift/minishift-centos-iso/releases/download/v1.0.0-rc.3/minishift-centos7.iso
$ alias minidocker="docker -H tcp://`minishift ip`:2376 \
--tls --tlscacert=$PWD/.minishift/certs/ca.pem
--tlscert=$PWD/.minishift/certs/cert.pem$ docker run -p 8080:8080 \
--name che \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/chedata:/data:Z -e CHE_HOST=10.0.21.42 -e CHE_DOCKER_IP_EXTERNAL=10.0.21.42 \
-e CHE_DOCKER_SERVER__EVALUATION__STRATEGY=docker-local --security-opt label:disable \
rhche/che-server # eclipse/che-server