The OpenShift architecture builds upon the flexibility and scalability of Docker and Kubernetes to deliver a powerful new Platform-as-a-Service system. This article explains how to set up a development environment and get involved with this latest version of OpenShift. Kubernetes is included in this repo for ease of development, and the version we include is periodically updated.
To get started you can either:
Or if you are interested in development, start with:
The OpenShift team periodically publishes binaries to GitHub on the Releases page. These are Linux, Windows, or Mac OS X 64bit binaries (note that Mac and Windows are client only). You’ll need Docker installed on your local system (see the installation page if you’ve never installed Docker before and you’re not on RHEL/CentOS/Fedora).
The tar file for each platform contains a single binary openshift
which is
the all-in-one OpenShift installation.
-
Use
oc login <server> …
to connect to an OpenShift server -
Use
openshift help
to see more about the commands in the binary
To get started, fork the origin repo.
You can develop OpenShift on Windows, Mac, or Linux, but you’ll need Docker
installed on Linux to actually launch containers. Client and server binaries
can be built locally or in the openshift/origin-release
container environment. The
Go programming language is only necessary for building on
the local host.
Currently, OpenShift is built with go
1.9 and uses Docker 1.13 on Fedora/CentOS/RHEL.
MacOS supports builds with go
1.9 and Docker CE 17.09.1 - newer versions of go and Docker are not supported.
The exact requirement for Docker is documented
here.
Follow the installation steps to install Homebrew, which will
allow you to install git
:
$ brew install git
Then, follow the instructions to install docker
.
Search the Docker for Mac releases to find a supported
version to download.
You will need to build linux/amd64
binaries for the OpenShift server; if you
want to do the builds locally, you will need to follow the instructions to
install the go
programming language.
Go pkg
installers can be downloaded here.
Follow the installation steps to install git
for Windows
and docker
.
Search the Docker for Windows releases to find a supported
version to download.
You will need to build linux/amd64
binaries for the OpenShift server; if you
want to do the builds locally, you will need to follow the instructions to
install the go
programming language.
Go msi
installers can be downloaded here.
Install git
and docker
with:
$ sudo dnf install git docker-latest
In order to do builds locally, install the following build dependencies:
$ sudo dnf install golang golang-race make gcc zip mercurial krb5-devel bsdtar bc rsync bind-utils file jq tito createrepo openssl gpgme gpgme-devel libassuan libassuan-devel
Install git
and docker
with:
$ sudo yum install git docker
In order to do builds locally, install the following build dependencies:
$ sudo yum install golang make gcc zip mercurial krb5-devel bsdtar bc rsync bind-utils file jq tito createrepo openssl gpgme gpgme-devel libassuan libassuan-devel
-
Create a Go workspace directory:
$ mkdir $HOME/go
-
In your
.bashrc
file or.bash_profile
file, set a GOPATH and update your PATH:export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin export OS_OUTPUT_GOPATH=1
-
Open up a new terminal or source the changes in your current terminal. Then clone your forked repo:
$ mkdir -p $GOPATH/src/github.com/openshift $ cd $GOPATH/src/github.com/openshift $ git clone git://github.com/<forkid>/origin # Replace <forkid> with the your github id $ cd origin $ git remote add upstream git://github.com/openshift/origin
-
You are now ready to edit the source, build and restart OpenShift to test your changes.
In order to build the base and release images for use by the release build and image build, run:
$ hack/env hack/build-base-images.sh
Note
|
Avoiding above step can cause below error while running 'hack/env make release' |
"openshift/origin-pod: unable to pull image (from: openshift/origin-source, tag: latest): API error (404): {"message":"repository openshift/origin-source not found: does not exist or no pull access"}"
In order to build a full release of Origin, containing binaries, RPMs and container images, run:
$ hack/env make release
In order to make use of the binaries from your shell, add the build output
directory to the $PATH
:
$ export PATH="$( source hack/lib/init.sh; echo "${OS_OUTPUT_BINPATH}/$( os::build::host_platform )/" ):${PATH}"
See more information in HACKING.md
for a more in-depth approach to building releases and incremental artifacts.
Right now you can see what’s happening with OpenShift development at:
Ready to play with some code? Hop down and read up on our roadmap for ideas on where you can contribute. You can also try to take a stab at any issue tagged with the help wanted label.
If you are interested in contributing to Kubernetes directly:
Join the Kubernetes community and check out the contributing guide.
If you run into difficulties running OpenShift, start by reading through the troubleshooting guide.
Reach out to the OpenShift team and other community contributors through IRC and our mailing list:
-
IRC: Hop onto the #openshift-dev channel on FreeNode.
-
E-mail: Join the OpenShift developers' mailing list.