summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2016-07-20Improvements to re-spin scriptsC.J. Collier2-28/+43
* Skip tasks which have already been completed * correct bugs in variable definition order * Respin::latest_src_age being called with arguments to perl -e to ease interpolation * Writing environment changes to .bashrc instead of .bash_profile Change-Id: I95b07d4ccb510fb5cc0afdefc6b7521f9992463b Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2016-07-12Improve respin scriptsC.J. Collier3-58/+179
In order to create a new OpenStack basebuild Images, a multi-phase process must be executed. The first phase is to configure the system for use with dynamic language environments. Due to security precautions, We do not currently have the ability to automate the process of respinning a new Image. We have a goal of fully automating the process so that a new Image will be generated on every commit. Until the process is self-hosted, we must manually fetch credentials from the OpenStack provider's web UI in order to make use of the python openstack bindings and to complete the basebuild re-spin process using Vagrant. The more generic portions of the Image are imported once every two to three weeks from upstream distributors. This duration is computed thus: $(perl -I${CI_MGMT}/vagrant/lib -MRespin -e 'Respin::latest_src_age( "${NOW_TS}", "${SRC_TS}" )') | jq .week Once fetched, these qcow2 Images are pushed to OpenStack using glance and labelled as: "$(lsb_release -i) $(lsb_release -r) (YYYYMMDDTHHMMSS) - LF upload" The generated basebuild Images are pushed to OpenStack with glance labelled as: "$(lsb_release -i) $(lsb_release -r) - basebuild - YYYYMMDDTHHMMSS" ==== This patch makes it possible to perform the above multi-phase processes by executing a single script: bash scripts/respin-jcloud-images.sh This script sources a function library from the following file: vagrant/lib/respin-functions.sh Defined in this library are (among others): # Fetch latest image from upstream distributor download_deb_image( $dist, $version, $arch ) download_rh_image( $dist, $version, $arch ) # Fetch latest image from upstream distributor create_deb_image( $dist, $version, $arch ) create_rh_image( $dist, $version, $arch ) # Run Vagrant provisioning on upstream image respin_deb_image( $dist, $version, $arch ) respin_rh_image( $dist, $version, $arch ) The following script initializes vagrant and the following dynamic language environments: * python-virtualenv * pip * setuptools * python-{cinder,glance,keystone,neutron,nova,openstack}client * rbenv * Vagrant * vagrant-openstack-provider * nodejs * jq * local::lib * JSON::XS * DateTime * DateTime::Format::Duration * DateTime::Duration scripts/init-respin-env.sh The following module compares ISO 8601 dates (as included in Image labels) with the current time and prints to STDOUT the count of weeks, days, hours, minutes and seconds in JSON: vagrant/lib/Respin.pm Change-Id: I434cf2882e5e337ae4b55a4a7acb774a62b528b7 Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2016-06-17Revert "Create script to automate deployment"Ed Warnicke1-95/+0
https://gerrit.fd.io/r/#/c/1606/ This reverts commit afd303bc155a27d1ddccfc8add7d510c731decf5. Change-Id: Ie169e3cad3433953d6f21064ec90b33d6b2dc49a Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-17Create script to automate deploymentC.J. Collier1-0/+95
* as per #24343 * re-factored to use common code from include-raw-vpp-maven-push and maven_push_functions.sh Change-Id: I197c114bcf61b0dd2ea81e2be0505793cf594e49 Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2016-06-15Simplify READMEC.J. Collier2-1/+46
* configurable options have been moved to environment variables * processes have been simplified * Added a script to bootstrap openstack vagrant environment * Added an example openstack dummy box Vagrantfile Change-Id: I5dd850e9456ad205fe3a655ca9e16a9bb14f32e2 Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2016-06-06Revert "Turn on debugging"Ed Warnicke1-25/+0
This reverts commit cfaf0bf146c2c9e7598faf6c9efb044b8b7dba33. https://gerrit.fd.io/r/#/c/1399/ As it bore no resemblance to the original gerrit submitted and currently has broken all of tldk verify. Change-Id: If9914f8ade100b56c3a979adda1107f21b9c3c3f Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-04Turn on debuggingEd Warnicke1-0/+25
* sourcing a debug script if DEBUG is set * echo command before executing (set -x) * reduce duplicate code * give more information about uptime Change-Id: Ic8409ea3a819f2070eac01ac84e2b3a6fe975592 Signed-off-by: Ed Warnicke <eaw@cisco.com> Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2016-05-20Document the process of re-spinning an imageC.J. Collier1-0/+23
* Document the process of respinning jcloud images in README.txt * Create /scripts/respin-jcloud-images.sh * Create /vagrant/lib/respin-functions.sh * Automate the process of fetching latest base images * Automate the process of creating new "LF upload" snapshots * Automate process of creating jcloud image - Boot fresh VM - run bootstrap.sh - run system_reseal.sh - snapshot re-sealed system * Unable to automate updating jcloud image regex for staging nodes * Correct shasum to sha1sum * Add cloud-initramfs-* to PACKAGES list * Install cloud-init during system reseal Change-Id: Ie70d5f1fdee0e9f06810da6f37bfc710e3e06b8e Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
2015-11-23Initial JJB self-hosting job definitionsAndrew Grimberg1-0/+29
These are the base definitions for having Jenkins validate and merge the JJB jobs that manage the Jenkins instance. Change-Id: Ic028248bc6cacb86d4db8c1e0f5f924640892c99 Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>