summaryrefslogtreecommitdiffstats
path: root/mcp/config
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-03-03 21:39:59 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-03-07 03:19:45 +0100
commit256e2a50b9b340bb78a8c85fdd7cacf96d0fb637 (patch)
tree2d9c7174840020b6d40012c65a82e75493bbad29 /mcp/config
parent3f63be553d8be68b2dc39dd2813bf5ffef0c3207 (diff)
[vnode parsing] Move core logic to j2
j2/python is easier to read and manipulate strings, although it does need some special care about undefined dict keys. With this in place, deploy.sh only contains the higher level logic for the deployment process. - merge arch-specific default configuration files into a singular file with arch name as main dict key of old config (also avoids creating duplicate 'virtual' YAML keys in $LOCAL_PDF); - move template handling to separate <lib_template.sh>; - decouple tight bash ordering of scenario expansion -> parse_yaml -> variable export (e.g. CLUSTER_DOMAIN) -> re-use in cluster j2s; however we can't parse *all* j2s in one go, as scenario j2s might expand to YAMLs needed while expanding cluster j2; - split `do_templates` into separate functions for each stage, with no coupling between them other then call order; Change-Id: I4b5e804094c00e5e918caf769fd85fa52181ad76 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/config')
-rw-r--r--mcp/config/scenario/defaults-x86_64.yaml27
-rw-r--r--mcp/config/scenario/defaults.yaml (renamed from mcp/config/scenario/defaults-aarch64.yaml)27
2 files changed, 24 insertions, 30 deletions
diff --git a/mcp/config/scenario/defaults-x86_64.yaml b/mcp/config/scenario/defaults-x86_64.yaml
deleted file mode 100644
index 18b0826f9..000000000
--- a/mcp/config/scenario/defaults-x86_64.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
-virtual:
- default:
- vcpus: 2
- ram: 4096
- common:
- apt:
- keys:
- - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11/SALTSTACK-GPG-KEY.pub
- repos:
- # <repo name> <repo prio> deb [arch=<arch>] <repo url> <repo dist> <repo comp>
- - saltstack 500 deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11 xenial main
- pkg:
- install:
- - salt-minion
- control:
- pkg:
- install:
- - cloud-init
diff --git a/mcp/config/scenario/defaults-aarch64.yaml b/mcp/config/scenario/defaults.yaml
index 1efa12ae4..e6915d468 100644
--- a/mcp/config/scenario/defaults-aarch64.yaml
+++ b/mcp/config/scenario/defaults.yaml
@@ -1,13 +1,33 @@
##############################################################################
-# Copyright (c) 2017 Mirantis Inc. and others.
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img
-virtual:
+x86_64:
+ base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
+ default:
+ vcpus: 2
+ ram: 4096
+ common:
+ apt:
+ keys:
+ - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11/SALTSTACK-GPG-KEY.pub
+ repos:
+ # <repo name> <repo prio> deb [arch=<arch>] <repo url> <repo dist> <repo comp>
+ - saltstack 500 deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11 xenial main
+ pkg:
+ install:
+ - salt-minion
+ control:
+ apt: ~
+ pkg:
+ install:
+ - cloud-init
+aarch64:
+ base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img
default:
vcpus: 6
ram: 4096
@@ -25,6 +45,7 @@ virtual:
- linux-headers-generic-hwe-16.04-edge
- salt-minion
control:
+ apt: ~
pkg:
install:
- cloud-init