summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2019-01-31 10:22:11 -0600
committerKaspars Skels <kaspars.skels@gmail.com>2019-02-15 23:46:41 +0000
commit6f5466392a6ce6fd2947d491510134349e2b3ff3 (patch)
treecbcabfa14062600cdc23f6b1bcbe83bb10f7654c
parente6586077b9f56a319fa43be3cfde6713d02942cb (diff)
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
Notes
Notes (review): Code-Review+1: Nishant Kumar <nishant.e.kumar@ericsson.com> Code-Review+1: Alexander Hughes <Alexander.Hughes@pm.me> Code-Review+1: chittibabu <chittibabu1299@gmail.com> Code-Review+1: Rick Bartra <rb560u@att.com> Code-Review+2: Kaspars Skels <kaspars.skels@gmail.com> Code-Review+2: Bryan Strassner <strassner.bryan@gmail.com> Workflow+1: Bryan Strassner <strassner.bryan@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 18 Feb 2019 20:29:43 +0000 Reviewed-on: https://review.openstack.org/634265 Project: openstack/airship-in-a-bottle Branch: refs/heads/master
-rw-r--r--tools/multi_nodes_gate/airship_gate/manifests/update_site.json (renamed from tools/multi_nodes_gate/airship_gate/manifests/multinode_update.json)40
-rwxr-xr-xtools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh34
2 files changed, 29 insertions, 45 deletions
diff --git a/tools/multi_nodes_gate/airship_gate/manifests/multinode_update.json b/tools/multi_nodes_gate/airship_gate/manifests/update_site.json
index 9c90609..e38159c 100644
--- a/tools/multi_nodes_gate/airship_gate/manifests/multinode_update.json
+++ b/tools/multi_nodes_gate/airship_gate/manifests/update_site.json
@@ -1,3 +1,4 @@
1
1{ 2{
2 "configuration": { 3 "configuration": {
3 "site": "gate-multinode", 4 "site": "gate-multinode",
@@ -12,47 +13,19 @@
12 }, 13 },
13 "stages": [ 14 "stages": [
14 { 15 {
15 "name": "Gate Setup",
16 "script": "gate-setup.sh"
17 },
18 {
19 "name": "Pegleg Collection", 16 "name": "Pegleg Collection",
20 "script": "pegleg-collect.sh" 17 "script": "pegleg-collect.sh",
21 }, 18 "arguments": ["update"]
22 {
23 "name": "Populate Image Cache",
24 "script": "registry-load.sh"
25 },
26 {
27 "name": "Generate Certificates",
28 "script": "generate-certificates.sh"
29 },
30 {
31 "name": "Build Scripts",
32 "script": "build-scripts.sh"
33 },
34 {
35 "name": "Create VMs",
36 "script": "create-vms.sh"
37 },
38 {
39 "name": "Genesis",
40 "script": "genesis.sh",
41 "on_error": "collect_genesis_info.sh"
42 }, 19 },
43 { 20 {
44 "name": "Load Site Design", 21 "name": "Load Site Design",
45 "script": "shipyard-load-design.sh" 22 "script": "shipyard-load-design.sh",
23 "arguments": ["-g", "-o"]
46 }, 24 },
47 { 25 {
48 "name": "Deploy Site", 26 "name": "Deploy Site",
49 "script": "shipyard-deploy-site.sh"
50 },
51 {
52 "name": "Update Site",
53 "script": "shipyard-update-site.sh" 27 "script": "shipyard-update-site.sh"
54 } 28 }
55
56 ], 29 ],
57 "vm": { 30 "vm": {
58 "build": { 31 "build": {
@@ -60,12 +33,11 @@
60 "vcpus": 2, 33 "vcpus": 2,
61 "mac": "52:54:00:00:be:31", 34 "mac": "52:54:00:00:be:31",
62 "ip": "172.24.1.9", 35 "ip": "172.24.1.9",
63 "io_profile": "fast",
64 "bootstrap": true, 36 "bootstrap": true,
65 "userdata": "packages: [docker.io]" 37 "userdata": "packages: [docker.io]"
66 }, 38 },
67 "n0" : { 39 "n0" : {
68 "memory": 16384, 40 "memory": 32768,
69 "vcpus": 8, 41 "vcpus": 8,
70 "mac": "52:54:00:00:a4:31", 42 "mac": "52:54:00:00:a4:31",
71 "ip": "172.24.1.10", 43 "ip": "172.24.1.10",
diff --git a/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh b/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh
index 3880792..c2358f4 100755
--- a/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh
+++ b/tools/multi_nodes_gate/airship_gate/stages/pegleg-collect.sh
@@ -50,16 +50,28 @@ render_pegleg_cli() {
50 echo ${cli_string} 50 echo ${cli_string}
51} 51}
52 52
53log "Collecting site definition to ${DEFINITION_DEPOT}" 53collect_design_docs() {
54 docker run \
55 --rm -t \
56 --network none \
57 -v "${REPO_ROOT}":/workspace \
58 -v "${DEFINITION_DEPOT}":/collect \
59 "${IMAGE_PEGLEG_CLI}" \
60 $(render_pegleg_cli)
61}
54 62
55docker run \ 63collect_initial_docs() {
56 --rm -t \ 64 collect_design_docs
57 --network none \ 65 log "Generating virtmgr key documents"
58 -v "${REPO_ROOT}":/workspace \ 66 gen_libvirt_key && install_libvirt_key
59 -v "${DEFINITION_DEPOT}":/collect \ 67 collect_ssh_key
60 "${IMAGE_PEGLEG_CLI}" \ 68}
61 $(render_pegleg_cli) 69
70log "Collecting site definition to ${DEFINITION_DEPOT}"
62 71
63log "Generating virtmgr key documents" 72if [[ "$1" != "update" ]];
64gen_libvirt_key && install_libvirt_key 73then
65collect_ssh_key 74 collect_initial_docs
75else
76 collect_design_docs
77fi