This is still a work in progress. It can be done with 1 or more systems in a configuration of:
-
One master that also serves as a node
-
Zero or more dedicated nodes
Download the most recent version of RHEL x86_64: https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.1/x86_64/product-downloads
subscription-manager repos \
--enable="rhel-7-server-rpms" \
--enable="rhel-7-server-extras-rpms" \
--enable="rhel-7-server-optional-rpms" \
--enable="rhel-server-7-ose-beta-rpms"
# Install our atomic enterprise repo
$ sudo wget -O /etc/yum.repos.d/atomic-enterprise.repo http://mirror.ops.rhcloud.com/atomic/mirror/.atomic-enterprise-early-1/atomic-enterprise.repo
# Install EPEL (For ansible)
$ sudo yum -y install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
$ sudo sed -i -e "s/^enabled=1/enabled=0/" /etc/yum.repos.d/epel.repo
$ sudo hostnamectl set-hostname ae-master.example.com
$ sudo bash -c “echo ‘${YOUR IP ADDRESS} ae-master.example.com’ >> /etc/hosts”
cd /root
git clone https://github.com/projectatomic/atomic-enterprise-training.git training
git clone https://github.com/projectatomic/atomic-enterprise-ansible.git
ssh-keygen
# Accept the defaults
ssh-copy-id ae-master.example.com
Sample output:
[root@ae-master ~]# ssh-copy-id ae-master.example.com
The authenticity of host 'ae-master.example.com (192.168.122.239)' can't be established.
ECDSA key fingerprint is 67:ca:e2:c2:eb:e0:fd:6c:de:74:bb:aa:6c:25:07:a7.
Are you sure you want to continue connecting (yes/no)? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh ae-master.example.com" and check to make sure that only the key(s) you wanted were added.
/bin/cp -r ~/training/eap-latest/ansible/* /etc/ansible/
vi /etc/ansible/hosts
# Edit the bottom lines to only include the one ae-master.example.com or add other nodes if they exist
ansible-playbook ~/atomic-enterprise-ansible/playbooks/byo/config.yml
Caution
|
Don’t bother moving on if this fails |
Success looks (something) like this:
PLAY RECAP ********************************************************************
ae-master.example.com : ok=95 changed=42 unreachable=0 failed=0
localhost : ok=5 changed=0 unreachable=0 failed=0
oc get nodes
You should see:
NAME LABELS STATUS
ae-master.example.com kubernetes.io/hostname=ae-master.example.com Ready
oc create -f /root/training/eap-latest/hello-pod.json
Here’s an in-the-field, live-fire example:
[root@ae-master ~]# oc create -f /root/training/eap-latest/hello-pod.json
pods/hello-atomic
Check to see that the pod exists:
oc get pods
While it’s starting, you should see:
NAME READY REASON RESTARTS AGE
hello-atomic 0/1 Pending 0 4s
Keep running “oc get pods” until the pod is in state “Running”, this can take roughly a minute and involves downloading a docker image so time can vary depending on network speed:
NAME READY REASON RESTARTS AGE
hello-atomic 1/1 Running 0 1m
Get a longer description of the pod and note the IP: field, you’ll need it for the next step:
oc describe pods hello-atomic
The output should look something like:
Note
|
Take notice of the IP field below: |
Name: hello-atomic
Image(s): atomicenterprise/hello-atomic:latest
Host: ae-master.example.com/192.168.122.154
Labels: name=hello-atomic
Status: Running
IP: 10.1.0.2
Replication Controllers: <none>
...
That’s it, your system should be up and running. You can now add new nodes. Try adding the internal registry with the “oadm registry” command. Or try adding the enterprise router with the “oadm router” command. You can also take a look at other kubernetes examples: https://github.com/kubernetes/kubernetes/tree/master/examples
Important
|
Remember to use the “oc” command instead of the “kubectl” command when using Atomic Enterprise Platform. |