drpfeature-test-drpe-ansible¶
- Intent
- Add ansible to drpfeature-test-drpe setup for testing drp-provision endpoint used in drpfeature-test setup handoff to ansible-playbook.
- Success
- RackN-Portal setup that uses inventory.py dynamic inventory to successfully run ansible all -i inventory.py -m ping
Manual Steps
Assuming a drpfeature-test-network with drpfeature-test-vbox running the drpfeature-test-drpe setup.
Assuming the drp3-Clone-post4machineHPEpxeboot vm configuration.
Start drpe vm ( see drpfeature-test-drpe )
- ssh drpops@192.168.88.3 ( good4installs# )
sudo yum update
sudo yum install ansible
sudo yum install python-pip
sudo yum install jq
sudo pip install –upgrade pip
sudo pip install requests
Check ansible:
[drpops@drpe ~]$ ansible --version ansible 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/drpops/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] [drpops@drpe ~]$
Start drp-provision on drpe:
[drpops@drpe ~]$ cd drpisolated/ [drpops@drpe drpisolated]$ sudo ./dr-provision --static-ip=192.168.88.3 --base-root=/home/drpops/drpisolated/drp-data --local-content="" --default-content=""
- Open RackN-Portal Content Packages We need to load something ansible to test
- Click “Browse For More Content”
- Find kubespray and click the + icon to add this content to endpoint
- View your drpfeature-test-drpe Endpoint (hamburger -> Endpoint..)
- Click Content Packages again you should see kubespray
- Verify kubespray is in your endpoint, if not “Transfer” it so that it displays in the Endpoint Content column
- Navigate to Profiles
- The following locked Profiles should have been added
- etcd
- k8s-cluster
- k8s-deploy
- kube-master
- kube-node
- Clone the k8s-deploy Profile in Profiles
- Rename and Edit the Profile for mycluster
- Save (Click Add button) and Verify Profile mycluster in Profiles
- In Profiles click Ansible button (on top)
- Select the mycluster Profile for Ansible Inventory Grid
- Select the server nodes you want in mycluster
- add etcd and kube master to a machine
- add kube node to others
- Fire up four bare metal machines on drpfeature-test-hpeC7000
- Browse to drpfeature-test-hpeC7000
- Login with drpops ( good4installs# )
- Should see 4 blades (or how ever many are in at the time)
- Click the blade image and it takes you to the blade View
- Click Boot Options (confirm it is booting from local disk)
- Click Virtual Devices (to control power / boot)
- Reference the drp-kubespray-document and follow the commands step 24.1.4
- ssh drpops@192.168.88.3 ( good4installs# )
- SKIP THIS - Git Clone kubespray-github (SKIP… we are just testing the inventory.py file)
- Create directory mkdir testansible and cd testansible
- Pull in inventory.py from drp-inventory.py-source-file (rob shows link)
- Make executable chmod +x inventory.py
- Verify local environment endpoint is set.
- Look at what endpoint we are pointed to ./drpcli info get
- Set endpoint export RS_ENDPOINT=https://192.168.88.3:8092
- Set profile export RS_PROFILE=mycluster
- Test ./inventory.py | jq command
- Test Ansible via ping ansible all -i inventory.py -m ping
Video Track
- tc Make Video and Show stuff at some point
Video
Setup for testing drp endpoint
drpfeature-test setup uses the drpfeature-test-network and drpfeature-test-vbox running on a drpfeature-test-macosx with drp-provision running on the drpfeature-test-drpe endpoint for pxe boot of Proliant Blade servers in drpfeature-test-hpeC7000 configuration which then are assessable via drpfeature-test-drpe-ansible and can use drpfeature-test-drpe-ansible-blender to install a blender render grid worker node.