Skip to content

Instantly share code, notes, and snippets.

@jbadiapa
Last active March 29, 2019 12:04
Show Gist options
  • Save jbadiapa/820fc9f64fca3a803cc2eeca8126d745 to your computer and use it in GitHub Desktop.
Save jbadiapa/820fc9f64fca3a803cc2eeca8126d745 to your computer and use it in GitHub Desktop.
Basic steps to be able to have a TripleO development environment

TripleO first steps

Deploy

Options

To deploy a full environment there are a couple of projects:

TripleO-Quickstart

We need to download the tripleo-quickstart repo either on a laptop or on the hypervisor.

git clone https://github.com/openstack/tripleo-quickstart

Install the dependencies

cd tripleo-quickstart
./quickstart.sh --install-deps

Add some customizations

cat > ~/params.yaml <<EOF
extra_args: ""
telemetry_args: ""
ssl_overcloud: false
test_ping: false
run_tempest: true
EOF

Install a basic environment (1 control and 1 compute)

bash quickstart.sh --release master-tripleo-ci -E ~/params.yaml IP_HYPERVISOR

This deploys the undercloud, and it prepares the undercloud to deploy the overcloud

Deploy the overcloud

Login into the undercloud

ssh -F ~/.quickstart/ssh.config.ansible undercloud

Execute the script overcloud-deploy.sh

./overcloud-deploy.sh

Deploy the overcloud with fluentd service enable

cat > params.yaml <<EOF
---
parameter_defaults:
  LoggingServers:
    - host: 192.168.1.54 
      port: 24224
EOF
./overcloud-deploy.sh -e /home/stack/params.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/logging-environment.yaml 

The logging-environment.yaml file enable the fluentd service on all overcloud nodes

Develop and test tripleo-heat-templates modifications

TripleO deploys the undercloud and the overcloud base on the tripleo-heat-templates repository

To be able to modify and test the services first thing we need to clone the repository

git clone https://github.com/openstack/tripleo-heat-templates

Modify the deployment script to use the new donwload version

cp overcloud-deploy.sh overcloud-deploy-dev.sh
sed -i 's/usr\/share\/openstack-/home\/stack\//g' overcloud-deploy-dev.sh

Whenever you use the new overcloud-deploy-dev.sh script, it will use the new modifications on the /home/stack/tripleo-heat-templates directory

Develop and test tripleo-puppet modifications

Another project that tripleO used is puppet-tripleo

Download the repository and do the modifications the project may need

 git clone https://github.com/openstack/puppet-tripleo

To be able to develop and test any puppet modification (overcloud deployment) the overcloud image needs to be modified. The following steps are based on the anstack blog, to be more precise on Deployment tips for puppet-tripleo changes

  #Do a copy backup, just in case
  cp -a overcloud-full.qcow2 overcloud-full.qcow2.bck

  #Install the libguest tool:
  sudo yum install -y libguestfs-tools

  #Create a temp folder to mount the overcloud-full image:
  mkdir /tmp/overcloud-full

  #Mount the image:
  guestmount -a overcloud-full.qcow2 -i --rw /tmp/overcloud-full

  #Delete the old tripleo-puppet directory
  cd /tmp/overcloud-full//usr/share/openstack-puppet/modules/tripleo
  rm -rf *
  
  #Copy the modifications
  cp -a /home/stack/puppet-tripleo/* /tmp/overcloud-full//usr/share/openstack-puppet/modules/tripleo/

  #Umount the image
  sudo umount /tmp/overcloud-full

  #The overcloud image needs to be uploaded to the undercloud stack
  #The following command was extracted from the overcloud-prep-images.sh script on the undercloud
  source ~/stackrc
  openstack overcloud image upload    --http-boot=/var/lib/ironic/httpboot --update-existing

On the following deployments, the overcloud images will use the new tripleo-puppet module On this example we only update the puppet-tripleo module but any other puppet module can be tested this way

Adding new containers

Adding containers to tripleo is pretty "simple" the following step need to be follow:

  1. The container needs to be added to kolla
  2. Define the container image on tripleO at tripleo-common
  3. Define the service tripleo-heat-templates and puppet-tripleo if it is needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment