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:
parent
e6586077b9
commit
6f5466392a
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"site": "gate-multinode",
|
"site": "gate-multinode",
|
||||||
|
@ -11,48 +12,20 @@
|
||||||
"172.24.1.6": ["drydock","shipyard","keystone"]
|
"172.24.1.6": ["drydock","shipyard","keystone"]
|
||||||
},
|
},
|
||||||
"stages": [
|
"stages": [
|
||||||
{
|
|
||||||
"name": "Gate Setup",
|
|
||||||
"script": "gate-setup.sh"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Pegleg Collection",
|
"name": "Pegleg Collection",
|
||||||
"script": "pegleg-collect.sh"
|
"script": "pegleg-collect.sh",
|
||||||
},
|
"arguments": ["update"]
|
||||||
{
|
|
||||||
"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"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Load Site Design",
|
"name": "Load Site Design",
|
||||||
"script": "shipyard-load-design.sh"
|
"script": "shipyard-load-design.sh",
|
||||||
|
"arguments": ["-g", "-o"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Deploy Site",
|
"name": "Deploy Site",
|
||||||
"script": "shipyard-deploy-site.sh"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Update Site",
|
|
||||||
"script": "shipyard-update-site.sh"
|
"script": "shipyard-update-site.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"vm": {
|
"vm": {
|
||||||
"build": {
|
"build": {
|
||||||
|
@ -60,12 +33,11 @@
|
||||||
"vcpus": 2,
|
"vcpus": 2,
|
||||||
"mac": "52:54:00:00:be:31",
|
"mac": "52:54:00:00:be:31",
|
||||||
"ip": "172.24.1.9",
|
"ip": "172.24.1.9",
|
||||||
"io_profile": "fast",
|
|
||||||
"bootstrap": true,
|
"bootstrap": true,
|
||||||
"userdata": "packages: [docker.io]"
|
"userdata": "packages: [docker.io]"
|
||||||
},
|
},
|
||||||
"n0" : {
|
"n0" : {
|
||||||
"memory": 16384,
|
"memory": 32768,
|
||||||
"vcpus": 8,
|
"vcpus": 8,
|
||||||
"mac": "52:54:00:00:a4:31",
|
"mac": "52:54:00:00:a4:31",
|
||||||
"ip": "172.24.1.10",
|
"ip": "172.24.1.10",
|
|
@ -50,16 +50,28 @@ render_pegleg_cli() {
|
||||||
echo ${cli_string}
|
echo ${cli_string}
|
||||||
}
|
}
|
||||||
|
|
||||||
log "Collecting site definition to ${DEFINITION_DEPOT}"
|
collect_design_docs() {
|
||||||
|
docker run \
|
||||||
docker run \
|
|
||||||
--rm -t \
|
--rm -t \
|
||||||
--network none \
|
--network none \
|
||||||
-v "${REPO_ROOT}":/workspace \
|
-v "${REPO_ROOT}":/workspace \
|
||||||
-v "${DEFINITION_DEPOT}":/collect \
|
-v "${DEFINITION_DEPOT}":/collect \
|
||||||
"${IMAGE_PEGLEG_CLI}" \
|
"${IMAGE_PEGLEG_CLI}" \
|
||||||
$(render_pegleg_cli)
|
$(render_pegleg_cli)
|
||||||
|
}
|
||||||
|
|
||||||
log "Generating virtmgr key documents"
|
collect_initial_docs() {
|
||||||
gen_libvirt_key && install_libvirt_key
|
collect_design_docs
|
||||||
collect_ssh_key
|
log "Generating virtmgr key documents"
|
||||||
|
gen_libvirt_key && install_libvirt_key
|
||||||
|
collect_ssh_key
|
||||||
|
}
|
||||||
|
|
||||||
|
log "Collecting site definition to ${DEFINITION_DEPOT}"
|
||||||
|
|
||||||
|
if [[ "$1" != "update" ]];
|
||||||
|
then
|
||||||
|
collect_initial_docs
|
||||||
|
else
|
||||||
|
collect_design_docs
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue