Support update site action

- Create a manifest for an update_site scenario
- Update pegleg-collect stage to support behavior change
  on an update site to only collect changes in the site
  definition and not regenerate libvirt keys.

Change-Id: Iba4dc49c9173a3872ca01946bfcb4247f2ca19a2
This commit is contained in:
Scott Hussey 2019-01-31 10:22:11 -06:00 committed by Kaspars Skels
parent e6586077b9
commit 6f5466392a
2 changed files with 29 additions and 45 deletions

View File

@ -1,3 +1,4 @@
{
"configuration": {
"site": "gate-multinode",
@ -11,48 +12,20 @@
"172.24.1.6": ["drydock","shipyard","keystone"]
},
"stages": [
{
"name": "Gate Setup",
"script": "gate-setup.sh"
},
{
"name": "Pegleg Collection",
"script": "pegleg-collect.sh"
},
{
"name": "Populate Image Cache",
"script": "registry-load.sh"
},
{
"name": "Generate Certificates",
"script": "generate-certificates.sh"
},
{
"name": "Build Scripts",
"script": "build-scripts.sh"
},
{
"name": "Create VMs",
"script": "create-vms.sh"
},
{
"name": "Genesis",
"script": "genesis.sh",
"on_error": "collect_genesis_info.sh"
"script": "pegleg-collect.sh",
"arguments": ["update"]
},
{
"name": "Load Site Design",
"script": "shipyard-load-design.sh"
"script": "shipyard-load-design.sh",
"arguments": ["-g", "-o"]
},
{
"name": "Deploy Site",
"script": "shipyard-deploy-site.sh"
},
{
"name": "Update Site",
"script": "shipyard-update-site.sh"
}
],
"vm": {
"build": {
@ -60,12 +33,11 @@
"vcpus": 2,
"mac": "52:54:00:00:be:31",
"ip": "172.24.1.9",
"io_profile": "fast",
"bootstrap": true,
"userdata": "packages: [docker.io]"
},
"n0" : {
"memory": 16384,
"memory": 32768,
"vcpus": 8,
"mac": "52:54:00:00:a4:31",
"ip": "172.24.1.10",

View File

@ -50,16 +50,28 @@ render_pegleg_cli() {
echo ${cli_string}
}
collect_design_docs() {
docker run \
--rm -t \
--network none \
-v "${REPO_ROOT}":/workspace \
-v "${DEFINITION_DEPOT}":/collect \
"${IMAGE_PEGLEG_CLI}" \
$(render_pegleg_cli)
}
collect_initial_docs() {
collect_design_docs
log "Generating virtmgr key documents"
gen_libvirt_key && install_libvirt_key
collect_ssh_key
}
log "Collecting site definition to ${DEFINITION_DEPOT}"
docker run \
--rm -t \
--network none \
-v "${REPO_ROOT}":/workspace \
-v "${DEFINITION_DEPOT}":/collect \
"${IMAGE_PEGLEG_CLI}" \
$(render_pegleg_cli)
log "Generating virtmgr key documents"
gen_libvirt_key && install_libvirt_key
collect_ssh_key
if [[ "$1" != "update" ]];
then
collect_initial_docs
else
collect_design_docs
fi