User:Pulec

From ArchWiki
Jump to: navigation, search

OpenShift

What is it? Red Hat does that…

Either start your own server (link to aur server pckg) (minishift?) or start free trial on official openshift server

Quickstart

Preparing a docker image

Here we will create a simple container with python web app

Start with Dockerfile

FROM archlinux/base

RUN pacman -Syu

build container from local Dockerfile with tag arch_test1

$ docker build . -t arch_test1

You should be able to see arch_test1 in ’‘’docker image ls’’’

then run ’‘’docker exec -it arch_test1 bash’’’ to start a new container with bash prompt so you can prepare the dockerfile (interactive and tty for sane usage)

Note that if you exit this prompt, you will stop the container, to connect to a running container run ’‘’docker container’’’ or also ’‘’docker ps’’’ to get the ID

Then you can access the running container with docker exec -it $ID bash

Install packages you need and try out the app and write the steps to dockerfile and build again

DeploymentConfig

  1. docker image > deployment config> bum
  2. edit yaml
  3. done

you should see the pod ’‘’oc get pod’’’

Troubleshooting

If you get errors starting a cluster, e.g. can’t mount a container $hash, try reinstalling the openshift-origin-server-bin