aboutsummaryrefslogtreecommitdiffstats
path: root/ci
AgeCommit message (Collapse)AuthorFilesLines
2017-10-10ci/deploy.sh: Drop unsupported optionsAlexandru Avadanii1-34/+5
Drop support for unsupported arguments: - timeout; - iso URI; While at it, disable shell debugging during PDF parsing to prevent sensitive information leaking via debug logs. Change-Id: I6b40f3e3749a3e162326728e670a176c8fa3c4bb Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 106883131b2fa1c765cac7e83cc4c8e294ef231f)
2017-10-05ci/deploy.sh: Move global vars to separate fileAlexandru Avadanii1-11/+1
log.sh should also work as standalone script, so factor out global variables from <ci/deploy.sh> into <mcp/scripts/globals.sh>, which should be sourced by log.sh when required variables are not set. Change-Id: I5a5bb85ee5835f567d6910b11c137d95e2147714 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 45b22fab76f84cdbf71a6693dc42f24edaa4334e)
2017-10-04Identify jump host bridges based on IDF / PDF netsAlexandru Avadanii1-15/+50
- minor refactor of runtime templates parsing to allow var expansion; - parse <pod_config.yml> into shell vars, match dynamically networks from PDF to IP addresses on bridges of current jumphost; - keep old '-B' parameter in <ci/deploy.sh>, use it for providing fallback values in case there's no bridge name specified via IDF and no IP on the jumphost for one or more of the PDF networks; - re-enable dry-run to ease testing of the above; - add sample 'idf-pod1.yaml' to <mcp/config/labs/local>; The new behavior will try to determine the jump host bridge names: 1. Based on IDF mapping, if available 2. Based on PDF network matching with IP addrs on jumphost; 3. Fallback to values passed via '-B'; 4. Fallback to default values hardcoded in the deploy script; Later, we will drop MaaS network env vars in favor of PDF vars, once the PDF template is generating them. Change-Id: If9cd65d310c02965b2e2bfa06a0d7e0f97f1dd48 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 8ec927497b7ee0fd3b7346e957878173b080ef6a)
2017-10-03Enable options for customizing deploy workflowYujun Zhang1-33/+40
Change-Id: I1011734895771fdaf653c59348a9ce0aeeff47a7 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn> (cherry picked from commit a10b7711ab3d400830406a2c425acb3431b4a5c1)
2017-09-27PDF parsing supportAlexandru Avadanii1-10/+36
- add new git submodule pointing to OPNFV Pharos; - use Pharos 'generate_config.sh' to parse the PDF using the Fuel installer adapter and generate <pod_config.yml> dynamically; - build <pod_config.yml> outside current git repo and sync separately to prevent sensitive data leak; - add <pod1.yaml> PDF sample based on LF-POD2, should be used with 'ci/deploy.sh -l local -p pod1'; Change-Id: I4e1b95f180bcd5ade5d86f516628eb8edbe64b1c Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 36e4b9754dedef27637c09b510829f686bd469e4)
2017-09-12reclass, states: Parametrize runtime configurationAlexandru Avadanii1-0/+10
mcpcontrol virsh network, as well as MaaS PXE network are installer specific, and not POD specific. Therefore, these should be easily parametrized without the PDF, using only installer inputs (e.g. env vars passed via Jenkins). - add new <all-mcp-ocata-common.opnfv.runtime> reclass class; - parametrize at runtime new reclass class based on global vars; - factor out MaaS deploy address / config using new mechanism; - parametrize at runtime virsh network definitions based on template; - add new "maas.pxe_route" sls for configuring routing on cfg01; - replace env vars with the new sls in "maas" state; NOTE: baremetal parametrization will be handled later. Change-Id: Ifd61143d818fb088b3f4395388ba769bbc49156e Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-11salt master, maas: Move mcpcontrol to 10.20.0.0/24Alexandru Avadanii1-2/+2
Use INSTALLER_IP Jenkins param instead of SALT_MASTER_IP, allowing us to drop SALT_MASTER_IP completely from releng. mcpcontrol IP changes: - 192.168.10.100 becomes 10.20.0.2 (align with legacy Fuel master); - 192.168.10.3 becomes 10.20.0.3 (baremetal MaaS address); JIRA: FUEL-285 Change-Id: I6e2d44c3a8b43846196bd64191735214167a76ce Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-11README files: Convert from markdown to RSTAlexandru Avadanii1-25/+33
Change-Id: I176f583e8adb7ba717932de7c27283f696ded548 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-11Merge "Add & fix licensing in README.rst files, align ext"Alexandru Avadanii1-9/+3
2017-09-11Merge "scenario: Add AArch64 defaults"Michael Polenchuk1-4/+11
2017-09-11Merge "log.sh: Collect /var/log from cluster nodes"Michael Polenchuk1-5/+8
2017-09-11Add & fix licensing in README.rst files, align extAlexandru Avadanii1-9/+3
Rename all variations of README files to README.rst. Fix license headers according to OPNFV Contribution Guidelines [1]. Markdown syntax will be switched to rst in an ulterior change. [1] https://wiki.opnfv.org/display/DEV/Contribution+Guidelines Change-Id: I2c71fd62b38f218545507c79c39e07dbd35f7c88 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-10scenario: Add AArch64 defaultsAlexandru Avadanii1-4/+11
Move scenario defaults.yml out of virtual/baremetal dirs, unifying them into a single, arch-specific defaults configuration file. Add AArch64 equivalent config, and arch-qualify default filename. For AArch64, bump VCPU number from 2 to 6. Change-Id: If9b39850af96e4c46e868b1d532bd301f9fd9f26 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-09log.sh: Collect /var/log from cluster nodesAlexandru Avadanii1-5/+8
Bring back <ci/deploy.sh> parameter `-L`, which is already passed by releng deploy script. Since we need to enable file_recv on salt master, do so by adding a new class in <virtual-mcp-ocata-common/infra/config.yml>, which will be inherited by all scenario reclass models. JIRA: FUEL-288 Change-Id: I9b649315984fb8580b63883d0e06c1e1efd11057 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-08bash scripts: Fix remaining shellcheck warn/errsAlexandru Avadanii1-1/+1
Fix/silence all shellcheck errors, except for scripts in <prototypes/sfc_tacker>. Change-Id: Idc317cdba0f69b78299f2d3665e72ffc19dd8af5 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-07Move mcp.rsa to /var/lib/opnfvAlexandru Avadanii1-5/+2
JIRA: FUEL-280 Change-Id: I1e07b0e1597b2a1e4a92e1274f89dda62cb81bb8 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-05cleanup: Rename ODL-L3 to ODL, drop ODL-L2Alexandru Avadanii1-3/+3
JIRA: FUEL-279 Change-Id: Ia8bed5e09937a1ffd29a15d40f610d4b0c8f0a17 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-05ci/deploy.sh: Remove extra '-s' in image dir pathAlexandru Avadanii1-1/+1
Change-Id: Iabadd8565b7fcac6d3361200f30310391daf6648 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-05Merge "build, deploy: Remove obsolete Fuel@Openstack code"Alexandru Avadanii3-327/+19
2017-09-05ci/deploy.sh, lib.sh: Align SSH_KEY with JenkinsAlexandru Avadanii1-10/+13
Jenkins defines a build param also called SSH_KEY, which holds the full path to our MCP private RSA key, as opposed to Fuel@OPNFV, which uses the file basename as SSH_KEY. Switch to using full path in SSH_KEY, while also moving the key outside /tmp. NOTE: When running `ci/deploy.sh` with sudo, key will land in /root/opnfv/mcp.rsa unless SSH_KEY is set via env var. While at it, bring back VM image storage dir param, allowing us to drop one more reference to /tmp. JIRA: FUEL-280 Change-Id: Id1cfa6dbe7b2e6f3915b22281da5957333718401 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-03build, deploy: Remove obsolete Fuel@Openstack codeAlexandru Avadanii3-327/+19
JIRA: FUEL-278 Change-Id: I30c04c325de5ac97aee172386de43201988646c5 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-23ci/deploy.sh, states: bash debug, continue on errAlexandru Avadanii1-1/+1
Since we don't `set -e` in state files, applying each state will always succeed unless the last instruction in the state fails. Make this uniform by always succeeding in applying the state. While at it, enable bash debugging logs, for better readability of deploy log files. Change-Id: I3cf4886f6d73c6fd1380df1a4e1413334bec1701 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-18ci/deploy.sh: yum install --skip-brokenAlexandru Avadanii1-2/+2
Change-Id: I8098eff73ab15fe58cb357db99df76e1bd160652 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-17Bring in baremetal supportAlexandru Avadanii1-4/+13
- ci/deploy.sh: fail if default scenario file is missing; - start by copying reclass/classes/cluster/virtual-mcp-ocata-ovs as classes/cluster/baremetal-mcp-ocata-ovs; - add new state (maas) that will handle MaaS configuration; - Split PXE network in two for baremetal: * rename old "pxe" virtual network to "mcpcontrol", make it non-configurable and identical for baremetal/virtual deploys; * new "pxebr" bridge is dedicated for MaaS fabric network, which comes with its own DHCP, TFTP etc.; - Drop hardcoded PXE gateway & static IP for MaaS node, since "mcpcontrol" remains a NAT-ed virtual network, with its own DHCP; - Keep internet access available on first interfaces for cfg01/mas01; - Align MaaS IP addrs (all x.y.z.3), add public IP for easy debug via MaaS dashboard; - Add static IP in new network segment (192.168.11.3/24) on MaaS node's PXE interface; - Set MaaS PXE interface MTU 1500 (weird network errors with jumbo); - MaaS node: Add NAT iptables traffic forward from "mcpcontrol" to "pxebr" interfaces; - MaaS: Add harcoded lf-pod2 machine info (fixed identation in v6); - Switch our targeted scenario to HA; * scenario: s/os-nosdn-nofeature-noha/os-nosdn-nofeature-ha/ - maas region: Use mcp.rsa.pub from ~ubuntu/.ssh/authorized_keys; - add route for 192.168.11.0/24 via mas01 on cfg01; - fix race condition on kvm nodes network setup: * add "noifupdown" support in salt formula for linux.network; * keep primary eth/br-mgmt unconfigured till reboot; TODO: - Read all this info from PDF (Pod Descriptor File) later; - investigate leftover references to eno2, eth3; - add public network interfaces config, IPs; - improve wait conditions for MaaS commision/deploy; - report upstream breakage in system.single; Change-Id: Ie8dd584b140991d2bd992acdfe47f5644bf51409 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com> Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com> Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com> Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-11lib.sh: AArch64: Use VGA video mode for guestsAlexandru Avadanii1-0/+6
On AArch64, there is no Cirrus video, so use VGA mode instead. On Debian systems, also fix a missing link for vgabios-stdvga.bin. Based on previous Armband work from [1]. [1] https://github.com/opnfv/armband/blob/danube.2.0/patches/fuel-library/ arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch Change-Id: Ia84ea5536b68e14993b719488375b0041183a767 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-06Merge "ci/deploy.sh: Allow non-root deploys"Alexandru Avadanii1-5/+10
2017-08-01mcp/config: Move scenario defs to separate dirAlexandru Avadanii1-3/+7
Prepare for adding baremetal scenarios by moving existing scenario definitions (intended for deploys on virtual PODs) to their own subdirectory. Change-Id: Iaa75e0b0a9876e4f263fc6bbae796d97848ef99b Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-01ci/deploy.sh: Allow non-root deploysAlexandru Avadanii1-5/+10
Currently, deploying Fuel@OPNFV requires the `ci/deploy.sh` to be ran as root user, for: - hypervisor access (virsh); - installing prerequisite packages; We can support non-root deploys if we relax above restriction into: - current user should have hypervisor access beforehand (new check added); - current user has passwordless sudo rights, for installing packages; Later, we should move the package installation out of the deploy script (`ci/deploy.sh`), making the whole deploy possible without sudo, only hypervisor access. After this change, the old way (sudo ci/deploy.sh) should work just like it used to before, so no regression/behavior change should be introduced with this. Change-Id: Ib2ea96aa7b6d67ba0606318407a8adeb51e6969d Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-01ci/deploy.sh: Fix "notify" on dumb terminalsAlexandru Avadanii1-1/+1
Dumb terminals (which do not support colors), like "vt220", make `tput setaf` return with an error code, hence bypassing the actual print. Change-Id: Id838583beb30a810aec478ed80d452c6f3203e0f Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-08-01salt.sh: Drop upstream clone in favor of local gitAlexandru Avadanii1-2/+4
salt.sh currently clones the full Fuel@OPNFV git repo from upstream public mirror, preventing us from testing locally edited or new patches. Instead, bring back git submodule handling from old f_repos, clone and patch each submodule locally, then copy the whole parent repo over to cfg01. This is also a first step towards implementing offline deploy support. NOTE: This adds new deploy prerequisite packages: - git (for submodule clone/update); - make (for submodule patching); - rsync (for parent repo replication to cfg01); NOTE: Parent repository is expected to be a git repo, in order to work with git submodules. While at it, perform some minor related changes: - add deploy artifacts (ISOs, qcow2 files) to .gitignore, also used to filter-out such files during rsync to cfg01; - remove obsolete Fuel patches (old f_repos mechanism); - rename "reclass-system-salt-model" submodule; Change-Id: I6210d80d41010b2802e4f1b31acf249a18db7963 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-07-31ci/deploy.sh: MCP cleanup, sanity checksAlexandru Avadanii1-112/+118
- disable false-positive shellcheck errors; - fix obsolete backtick usage; - move obsolete arguments to separate section; - add color-enabled "notify" macro for warn/err messages; - remove obsolete code intended for old Fuel; - fix quoting and double-quoting shellcheck warnings; - minor code changes for better readability; - remove "no healthcheck" flag (obsolete); - add mandantory arguments validation; Change-Id: I991836adc8d76466f2b83b1e472bb9ef6989fff3 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-07-31ci/deploy.sh: Rework bridge arguments for MCPAlexandru Avadanii1-11/+25
Change-Id: I20d6dedeaa31f7986eaa35be49c5388c3fdb4b83 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-07-13Tune network sysctl optionsMichael Polenchuk1-2/+4
* tune net/tcp opts * handle vcpus setting for vms * fix tempest issue with public subnets visible * set reclass data source to local to avoid git clone Change-Id: Ibac9eba8234ebb20854c03b399405968cb2069e8 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-07-05Turn on opendaylight scenarioMichael Polenchuk1-4/+5
* fix formula & reclass cluster model * bring in running states Change-Id: I8e66e69045f5c745f9aa6f59f7ce6d66b5bf1c95 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-07-03Rewrite infra deployment scriptsMichael Polenchuk1-22/+35
* bring in scenario files * shift infra code into functions Change-Id: I650a26d03d842c3afcc7fcb97b84ef4826827a38 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-06-19[mcp] Set default address for salt masterMichael Polenchuk1-3/+3
Change-Id: Iaa9cd3d5734fbf81a224d00ee006b63a66a915f0 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-06-09[mcp] Copy ssh key to tmp dirAndrii Ostapenko1-2/+2
Copy ssh key to tmp dir to be able to retrieve OS credentials by releng/utils/fetch_os_creds.sh Also adds 'set -x' to ci/deploy.sh Change-Id: I056c626288862f84f47c947461894730ce0483ac Signed-off-by: Andrii Ostapenko <aostapenko@mirantis.com>
2017-06-06[mcp] Mend dpdk scenarioMichael Polenchuk1-0/+3
Make a reboot of the compute nodes to activate hugepages support and re-apply required states then. Also align ovs lcore & pmd masks with two cpu nodes. Change-Id: I4a5defe6f08e912aba2d939ba5ba057af768a40c Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-05-31[mcp] Bring in dpdk scenario supportMichael Polenchuk1-0/+7
Change-Id: Ifd6d61026a0e98e8faf59c7d218333122d70ffe9 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-05-29[mcp] Mend installation scriptsMichael Polenchuk1-0/+4
* add/unify ssh options * get base image to temporary directory * specify os type for virt install * fix symbolic link to reclass * remove outdated fuel submodules Change-Id: I6833ce78c8fff97e1b89f4e92e6e6b470e9ce99f Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2017-05-25[mcp] Bring in deployment scriptsMichael Polenchuk1-17/+23
Change-Id: I7d2af958e447a5892f7cd1f6c6fb8616951e2ff3 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2016-08-29Merge "deploy.sh: accept a timeout flag (-T)"Jonas Bjurel1-4/+15
2016-08-24build: cache: Allow LOCAL_CACHE_ARCH_NAME overrideAlexandru Avadanii1-1/+1
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-08-24deploy.sh: accept a timeout flag (-T)Alexandru Avadanii1-4/+15
Original work by Josep, signed by me (Alex) for upstreaming only. Change-Id: I58a7b9bc639bb03b994ea34fc317f5679140d9fd Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-17deploy: add support for multiple bridgesJosep Puigdemont1-4/+7
deploy.py: Some Fuel VMs may need more than one network interface. To be able to provide that, we now allow the user to specify the "-b" paramter (bridge) multiple times, creating a new NIC for each one of them. The NICs are created in the same order as they are given in the command line. There is no change in behavior from earlier versions, pxebr will still be the default bridge if none is specified in the command line. deploy.sh: To reflect the new capabilities of deploy.py, we introduce the possibility to specify -B more than once in deploy.sh, and honor that when calling deploy.py. We also make it possible to specify a comma separated list of bridges, as in: -B br1,br2. Change-Id: I1a0100f2cfe755ec6adfeedafb391c2357f46f51 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-16Introducing collection of all fuel and stack deployment logs.Jonas Bjurel1-3/+8
The purpose of this patch is to collect all available Fuel snapshots- and stack/node ldeployment logs for later off-line troubleshooting. The intention is that Jenkins, or other deployment robots will be able to collect all logs from the deployment and store it at some repository where developers can fetch it and perform off-line post deployment trouble-shooting. Following script arguments have been added: CI Arg changes: Added an argument to ci/deploy.sh: -L [Deploy log path and file name], E.g. -L ~/jenkins/deploy/deploy-888.log.tar.gz This will create an tar gzip archive at the path and filename pointed out. If -L is not specified, the log archive will be placed under the CI directory with the following name convention: deploy-YYMMDD-HHMMSS.log.tar.gz Fuel Internal deploy changes: Added an argument to ci/deploy.py -log [Deploy log path and file name], E.g. -log ~/jenkins/deploy/deploy-888.log.tar.gz This will create an tar gzip archive at the path and filename pointed out. If -log is not specified, the log archive will be placed under the CI directory with the following name convention: deploy-YYMMDD-HHMMSS.log.tar.gz READY TO MERGE! VERIFIED! Change-Id: Icb75d9d2e66bdd47f75dcca29071943444d5c823 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
2016-06-08Script to clean expired build cache itemsStefan K. Berg1-0/+38
Change-Id: I5e466c89c05eb4d637778218cfe03b88d569f331 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-04-30deploy.sh: do not expect a parameter for -hJosep Puigdemont1-1/+3
If -h was given as a parameter to the script, it would report an error as it expected a parameter, and if it was called as the only parameter, it would run deploy.py as if "old style" parameters had been given, thus showing the usage for the python script, instead of the expected usage message for this script. Update the usage message to include -h. Change-Id: I0930936962c1cb479ec4409ff114cd60a386b276 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-03-11small fix for deploy.py invocationSzilard Cserey1-6/+9
Change-Id: I8587500c71f05ca69645422ae110651196e0cad2
2016-03-11Add no_deploy_environment optionNikolas Hermanns1-3/+9
For development reason it is useable to have an option so that everything is done except the deploy of the openstack environment. Change-Id: I1f1b7f9c89ee8c9ceea96353e25a51eee53b955c