fuel.git
7 years agopatches: deepclean: Locate toplevel for submodules 81/41081/1
Alexandru Avadanii [Tue, 5 Sep 2017 16:51:27 +0000 (18:51 +0200)]
patches: deepclean: Locate toplevel for submodules

Change-Id: Ibcc4364a57d888773fcb466f603c2046e1a4a2e3
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoci/deploy.sh: Remove extra '-s' in image dir path 77/41077/1
Alexandru Avadanii [Tue, 5 Sep 2017 16:39:18 +0000 (18:39 +0200)]
ci/deploy.sh: Remove extra '-s' in image dir path

Change-Id: Iabadd8565b7fcac6d3361200f30310391daf6648
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years ago[baremetal] Enable ceilometer/aodh services 73/41073/3
Michael Polenchuk [Tue, 5 Sep 2017 13:35:51 +0000 (17:35 +0400)]
[baremetal] Enable ceilometer/aodh services

Change-Id: I34706afbdbcbdaace0b0ae6c2c2e8cb932812d4e
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "build, deploy: Remove obsolete Fuel@Openstack code"
Alexandru Avadanii [Tue, 5 Sep 2017 13:25:08 +0000 (13:25 +0000)]
Merge "build, deploy: Remove obsolete Fuel@Openstack code"

7 years agoMerge "ci/deploy.sh, lib.sh: Align SSH_KEY with Jenkins"
Michael Polenchuk [Tue, 5 Sep 2017 07:40:46 +0000 (07:40 +0000)]
Merge "ci/deploy.sh, lib.sh: Align SSH_KEY with Jenkins"

7 years agoMerge "salt.sh: Execute deepclean before importing patches"
Michael Polenchuk [Tue, 5 Sep 2017 07:04:09 +0000 (07:04 +0000)]
Merge "salt.sh: Execute deepclean before importing patches"

7 years agoci/deploy.sh, lib.sh: Align SSH_KEY with Jenkins 25/40725/7
Alexandru Avadanii [Thu, 31 Aug 2017 01:09:51 +0000 (03:09 +0200)]
ci/deploy.sh, lib.sh: Align SSH_KEY with Jenkins

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>
7 years agolib.sh: Limit envsubst to certain variables 23/41023/1
Alexandru Avadanii [Mon, 4 Sep 2017 21:18:31 +0000 (23:18 +0200)]
lib.sh: Limit envsubst to certain variables

This will prevent envsubst from expanding the SALT_REPO local
variable in user-data.template.

Change-Id: Idcc3ea827293ac0d3b4059776f90bbbcf807daec
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agopatches/scripts: Fix whitespace in context 19/41019/1
Alexandru Avadanii [Mon, 4 Sep 2017 20:52:10 +0000 (22:52 +0200)]
patches/scripts: Fix whitespace in context

git option '--ignore-whitespace' has issues, at least on certain
versions of git, like 2.7.4.
Work around it by adding the trailing whitespace we previously
removed in patch context lines.

Change-Id: Id192a87ec92c798fa808bb8ef38384160ee3faf5
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agosalt.sh: Execute deepclean before importing patches 13/41013/2
Junaid Ali [Mon, 4 Sep 2017 16:43:36 +0000 (12:43 -0400)]
salt.sh: Execute deepclean before importing patches

Deepcleaning can be useful when deploying from an existing local repo

Change-Id: I3908d6533c744da7cc863a250f4158c6c0e8e169
Signed-off-by: Junaid Ali <junaidali.yahya@gmail.com>
7 years agoMerge "salt.sh, user-data: Add Saltstack arm64 repo"
Alexandru Avadanii [Mon, 4 Sep 2017 16:41:43 +0000 (16:41 +0000)]
Merge "salt.sh, user-data: Add Saltstack arm64 repo"

7 years ago[baremetal] Enable cinder-volume service 95/40995/1
Michael Polenchuk [Mon, 4 Sep 2017 11:53:53 +0000 (15:53 +0400)]
[baremetal] Enable cinder-volume service

Change-Id: I60a5566de43ca58f3f172611c95546b1353f8406
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoLocate toplevel for git submodule [2] 73/40973/1
Michael Polenchuk [Mon, 4 Sep 2017 05:59:03 +0000 (09:59 +0400)]
Locate toplevel for git submodule [2]

Change-Id: I0c719ec4cfd3d0a526fd6913358cc80c5a599985
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agosubmodules: Disable remote tracking 49/40949/1
Alexandru Avadanii [Sun, 3 Sep 2017 22:59:42 +0000 (00:59 +0200)]
submodules: Disable remote tracking

Stop following remote master HEAD refs for git submodules.
This should fix recent deploy failures caused by upstream changes in
salt-formulas-scripts repo.

Change-Id: I32b422f2dd7d31d51c65f1cd0101111e9ed2fb5e
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agobuild, deploy: Remove obsolete Fuel@Openstack code 21/40721/2
Alexandru Avadanii [Thu, 31 Aug 2017 00:32:05 +0000 (02:32 +0200)]
build, deploy: Remove obsolete Fuel@Openstack code

JIRA: FUEL-278

Change-Id: I30c04c325de5ac97aee172386de43201988646c5
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years ago[baremetal] Tune dpdk/compute cpu pinning 37/40837/1
Michael Polenchuk [Fri, 1 Sep 2017 11:11:15 +0000 (15:11 +0400)]
[baremetal] Tune dpdk/compute cpu pinning

Change-Id: I733c6c9f1f5aa559084998aa9bc639079bda83a5
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agosalt.sh, user-data: Add Saltstack arm64 repo 97/40797/2
Alexandru Avadanii [Tue, 11 Jul 2017 16:57:57 +0000 (18:57 +0200)]
salt.sh, user-data: Add Saltstack arm64 repo

These changes will only be applied on AArch64, based on `uname -m`.

While at it, add arm64 suppport to salt-master-setup.sh.
Upstream commit [1] broke Salt bootstrap on AArch64, by
introducing an architecture condition that is too strict to allow
Debian package installation (even if we provide our own repo).

Add "arm64" to the list of supported architectures. This needs
to be done on the fly, as the bootstrap script is fetched using
`curl` from <salt-master-setup.sh>.

[1] https://github.com/saltstack/salt-bootstrap/commit/caa6d7d

Change-Id: Id706a74a52ffe2f8b8c9dd3b9f70c78f35b2f745
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "mcp/deploy/scripts: Move to git submodule"
Alexandru Avadanii [Thu, 31 Aug 2017 19:38:48 +0000 (19:38 +0000)]
Merge "mcp/deploy/scripts: Move to git submodule"

7 years ago[baremetal] Adjust vcp nodes memory size 55/40755/1
Michael Polenchuk [Thu, 31 Aug 2017 11:57:50 +0000 (15:57 +0400)]
[baremetal] Adjust vcp nodes memory size

Change-Id: I8937f4f676a48c852bece0680da0b559df7c2e7c
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agomcp/deploy/scripts: Move to git submodule 19/40719/1
Alexandru Avadanii [Thu, 31 Aug 2017 00:14:38 +0000 (02:14 +0200)]
mcp/deploy/scripts: Move to git submodule

Change-Id: I65d1f5680000011493bde17a249a87738ebfdd96
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "Fix ssl cert upload path"
Alexandru Avadanii [Wed, 30 Aug 2017 14:46:06 +0000 (14:46 +0000)]
Merge "Fix ssl cert upload path"

7 years agoUpdate salt init scripts source 89/40689/1
Michael Polenchuk [Wed, 30 Aug 2017 10:24:05 +0000 (14:24 +0400)]
Update salt init scripts source

Change-Id: I269e397b78d55794b1c49bf582cc0e663cbe9ca6
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoFix ssl cert upload path 81/40681/1
Michael Polenchuk [Wed, 30 Aug 2017 09:15:32 +0000 (13:15 +0400)]
Fix ssl cert upload path

JIRA: FUEL-274
Change-Id: I8e947009399a995474ed0088d56da04755d278df
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "lib.sh: Reuse /tmp/mcp.rsa if present"
Michael Polenchuk [Wed, 30 Aug 2017 05:31:23 +0000 (05:31 +0000)]
Merge "lib.sh: Reuse /tmp/mcp.rsa if present"

7 years agostates: maas: Retry linux state if no response 31/40631/1
Alexandru Avadanii [Mon, 28 Aug 2017 23:21:30 +0000 (01:21 +0200)]
states: maas: Retry linux state if no response

JIRA: FUEL-283

Change-Id: Ie85af8c12163fac28cb8826aa8902a4ff3dec623
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agopatches: seedng: Fix arg order for salt-bootstrap 25/40625/1
Alexandru Avadanii [Tue, 29 Aug 2017 22:15:22 +0000 (00:15 +0200)]
patches: seedng: Fix arg order for salt-bootstrap

JIRA: FUEL-282

Change-Id: I8ba64024c884e2f805d4cda670333ac787fac25c
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoreclass: virtual-mcp-ocata-ovs: Fix yaml typo 17/40617/1
Alexandru Avadanii [Tue, 29 Aug 2017 21:09:33 +0000 (23:09 +0200)]
reclass: virtual-mcp-ocata-ovs: Fix yaml typo

Change-Id: Icc283315bbf0df825e9836913deff821bad1123a
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agolib.sh: Reuse /tmp/mcp.rsa if present 11/40611/1
Alexandru Avadanii [Tue, 29 Aug 2017 00:35:37 +0000 (02:35 +0200)]
lib.sh: Reuse /tmp/mcp.rsa if present

Long-term, /tmp/mcp.rsa should be moved to a persistent location [1],
and made configurable via env var / other mechanisms.
This will allow us to:
- use an existing keypair (provided by end-user in expected path);
- login to previous deployment machines (e.g. to cleanup UEFI boot
  entries before destroying the cluster and rebuilding it);
- split deploy in re-entrant stages (salt master only, cluster nodes
  only; similar to old Fuel, where we could reuse old Fuel VM);

[1] https://jira.opnfv.org/browse/FUEL-280

Change-Id: I1e53321ed1cfc217ff95e809c867fa3370c479c9
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "[virtual] Apply ceilometer/aodh services"
Alexandru Avadanii [Tue, 29 Aug 2017 16:16:38 +0000 (16:16 +0000)]
Merge "[virtual] Apply ceilometer/aodh services"

7 years ago[baremetal] Return back custom image for vcp nodes 75/40575/1
Michael Polenchuk [Tue, 29 Aug 2017 10:16:14 +0000 (14:16 +0400)]
[baremetal] Return back custom image for vcp nodes

Virtual node based on cloud ubuntu image
won't register as a minion on salt master.

Change-Id: Ia32eae01a5633042189cdebebcba8043cae61503
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years ago[virtual] Apply ceilometer/aodh services 83/39983/3
Michael Polenchuk [Fri, 18 Aug 2017 09:55:40 +0000 (13:55 +0400)]
[virtual] Apply ceilometer/aodh services

* run ceilometer/aodh states
* wrap common virtual cluster options
* get the source image based on timestamps

Change-Id: I88f1d63ed4a94eba4ec0a9cf33d36d51c75ae355
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agopatches: seedng: module: Sync salt version 23/40523/1
Alexandru Avadanii [Mon, 28 Aug 2017 22:50:56 +0000 (00:50 +0200)]
patches: seedng: module: Sync salt version

JIRA: FUEL-282

Change-Id: I6c86ce0b1113ca674b1756e7997559eee90a4e5f
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoSync os cacert from proxy to salt master 87/40387/3
Michael Polenchuk [Mon, 28 Aug 2017 10:50:03 +0000 (14:50 +0400)]
Sync os cacert from proxy to salt master

JIRA: FUEL-274
Change-Id: I2c8161b24cb18a0d1f9dc6fd509ce18af7ea8cf5
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years ago[baremetal] Add required user on vcp nodes 47/40247/2
Michael Polenchuk [Fri, 25 Aug 2017 11:47:55 +0000 (15:47 +0400)]
[baremetal] Add required user on vcp nodes

* add user of "ubuntu" so that functest gets cluster credentials
* reduce cpu resources for vcp nodes in nofeature scenario
* tune salt targets for maas state
* specify ntp servers

Change-Id: I433a1de1cd2c69c6747c62c3359f5485dee3bfa4
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years ago[baremetal] Bring in ovs/dpdk scenario 85/40085/1
Michael Polenchuk [Thu, 24 Aug 2017 11:45:04 +0000 (15:45 +0400)]
[baremetal] Bring in ovs/dpdk scenario

Change-Id: Ia0d828fa31549a12b6740e0edeeba2ab13a9b998
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "MaaS: commissioning/deployment retry"
Michael Polenchuk [Thu, 24 Aug 2017 06:07:24 +0000 (06:07 +0000)]
Merge "MaaS: commissioning/deployment retry"

7 years agoMerge "ci/deploy.sh, states: bash debug, continue on err"
Michael Polenchuk [Thu, 24 Aug 2017 06:04:09 +0000 (06:04 +0000)]
Merge "ci/deploy.sh, states: bash debug, continue on err"

7 years agoMaaS: commissioning/deployment retry 29/39929/4
Alexandru Avadanii [Wed, 23 Aug 2017 02:23:26 +0000 (04:23 +0200)]
MaaS: commissioning/deployment retry

While at it, parametrize max attempt number in maas state's "wait_for",
and reduce retries count for certain simpler tasks.

Change-Id: I3ac2877719cdd32613bcf41186ebbb9f3f3aee93
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoci/deploy.sh, states: bash debug, continue on err 09/40009/1
Alexandru Avadanii [Wed, 23 Aug 2017 14:28:04 +0000 (16:28 +0200)]
ci/deploy.sh, states: bash debug, continue on err

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>
7 years ago[baremetal] Bring in opendaylight scenario 77/39977/2
Michael Polenchuk [Wed, 23 Aug 2017 10:19:32 +0000 (14:19 +0400)]
[baremetal] Bring in opendaylight scenario

Change-Id: I3a9bb25fc7514055da588b9047f61af178eff222
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoLocate toplevel for git submodule 79/39979/1
Michael Polenchuk [Wed, 23 Aug 2017 10:31:48 +0000 (14:31 +0400)]
Locate toplevel for git submodule

Prior to git 1.8.4 the current working dir has to
be at top-level to run git submodule update.

Change-Id: I4d6c052364863f965e8140e56af17c09ee39ed59
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "states/network: parametrize Openstack public net"
Michael Polenchuk [Wed, 23 Aug 2017 05:22:19 +0000 (05:22 +0000)]
Merge "states/network: parametrize Openstack public net"

7 years agostates/maas: Add mcp.rsa.pub to authorized_keys 09/39909/3
Alexandru Avadanii [Tue, 22 Aug 2017 20:04:28 +0000 (22:04 +0200)]
states/maas: Add mcp.rsa.pub to authorized_keys

Add our mcp.rsa.pub RSA key to all nodes, including VCP VMs.
This is required for functest to be able to fetch openrc.

While at it, add retry wrappers for more VCP VM state.sls calls.

Change-Id: I34f79848c52e36de8d981055880321a081420874
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com>
7 years agostates/network: parametrize Openstack public net 99/39899/1
Alexandru Avadanii [Thu, 17 Aug 2017 16:54:16 +0000 (18:54 +0200)]
states/network: parametrize Openstack public net

Determine public network based on public IPs of compute nodes.

Change-Id: I5a6b29a0458b0b839f8fdb3e32616a41d7a621f7
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoConfigure neutron gateway 65/39865/3
Michael Polenchuk [Tue, 22 Aug 2017 11:22:34 +0000 (15:22 +0400)]
Configure neutron gateway

Change-Id: I01744bd5728d6fc4c8cd3792aee9759434d18645
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoReturn back infra interfaces config 53/39853/1
Michael Polenchuk [Tue, 22 Aug 2017 08:41:59 +0000 (12:41 +0400)]
Return back infra interfaces config

Change-Id: I4baa9940ae14ef6e084fda7169ec43be7cf3f449
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoShift vcp nodes interfaces 47/39847/1
Michael Polenchuk [Tue, 22 Aug 2017 07:49:42 +0000 (11:49 +0400)]
Shift vcp nodes interfaces

* shift vcp nodes interfaces since names started from ens2
* add extra salt sync before vcp start up
* run rabbitmq state on 1st node beforehand then the rest

Change-Id: Ic2c174c288a5e89f2f28c0d9aa573340190a61d3
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agobaremetal: HA: Standalone openstack_ha state 35/39835/2
Alexandru Avadanii [Mon, 21 Aug 2017 22:07:39 +0000 (00:07 +0200)]
baremetal: HA: Standalone openstack_ha state

Replicate all calls from "openstack" state to "openstack_ha",
while adjusting minor parameters for HA, based on [1].

[1] https://docs.mirantis.com/mcp/1.0/mcp-deployment-guide/\
    deploy-mcp-cluster-manually.html

Change-Id: Iaf2262fa9c54f2401b69635ff46329ffb856f802
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agostates: maas: Retry applying VCP VMs linux state 33/39833/2
Alexandru Avadanii [Tue, 22 Aug 2017 00:19:34 +0000 (02:19 +0200)]
states: maas: Retry applying VCP VMs linux state

Running a heavy state like `linux` on all nodes (including VCP VMs)
might time out the first time on slower systems.

Change-Id: I21a3ad380afafa833f59e14da86aff92e254e9c7
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoreclass: baremetal: openstack: Fix eth assignment 21/39821/1
Alexandru Avadanii [Mon, 21 Aug 2017 20:26:09 +0000 (22:26 +0200)]
reclass: baremetal: openstack: Fix eth assignment

Baremetal support introduced a couple of VCP VMs, which have 2
network interfaces:
- primary (ens3 inside x86 VM) - connected to "br-mgmt" bridge on
  each kvm node, serves for MaaS DHCP / connection to salt master;
- secondary (ens4 inside x86 VM) - connected to "br-ctl" bridge on
  each kvm node, serves for Openstack Management network;

However, the reclass model was configured to use a single IP address
on the primary interface, breaking the connnection to salt master,
while also not connecting the Openstack Management network properly.

Fix this by configuring the primary interface for DHCP, while the
secondary gets a static IP in Openstack Management network.

Change-Id: I9f1d6f080e882bfaae7b5f209bc3c5536826ba06
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoCleanup outdated salt keys 05/39805/1
Michael Polenchuk [Mon, 21 Aug 2017 16:36:14 +0000 (20:36 +0400)]
Cleanup outdated salt keys

Remove keys that are left over from the previous deployment
to avoid interfere with the new ones.

Change-Id: I0dfa9782cbce9a8e8b7c1efe5954c8ffe85996f9
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoSwap vcp nodes interfaces 03/39803/1
Michael Polenchuk [Mon, 21 Aug 2017 15:38:38 +0000 (19:38 +0400)]
Swap vcp nodes interfaces

In order to connect to right underlay
bridge, swap interfaces.

Change-Id: I0ae1f50e8d1f3485404bd7e6eea772cab555b313
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "virtual: odl-router: Stop overriding Ubuntu repos"
Alexandru Avadanii [Mon, 21 Aug 2017 15:09:35 +0000 (15:09 +0000)]
Merge "virtual: odl-router: Stop overriding Ubuntu repos"

7 years agoMerge "maas: Break infinite loops into finite retries"
Alexandru Avadanii [Mon, 21 Aug 2017 15:04:35 +0000 (15:04 +0000)]
Merge "maas: Break infinite loops into finite retries"

7 years agoCheck out all vcp nodes are available 67/39767/1
Michael Polenchuk [Mon, 21 Aug 2017 13:12:29 +0000 (17:12 +0400)]
Check out all vcp nodes are available

Change-Id: I86bb27b323152440e8a885dbf867da433a288dae
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agomaas: Break infinite loops into finite retries 85/39685/1
Alexandru Avadanii [Sun, 20 Aug 2017 15:52:56 +0000 (17:52 +0200)]
maas: Break infinite loops into finite retries

While at it, move the bash commands to a separate script file.

Change-Id: Ib78b5b7f7083ed866e5d42e8340df7b27198f276
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agopatches: Add missing patch metadata line 63/39663/1
Alexandru Avadanii [Sat, 19 Aug 2017 21:56:46 +0000 (23:56 +0200)]
patches: Add missing patch metadata line

Change-Id: I35735c0d35c6004c546a704cee3d6d94ce077225
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMaaS: Add support for dynamic fabric numbering 61/39661/1
Alexandru Avadanii [Sat, 19 Aug 2017 21:33:42 +0000 (23:33 +0200)]
MaaS: Add support for dynamic fabric numbering

Previously, we hardcoded the fabric name for our 3rd interface
(which serves PXE/DHCP for the target nodes) to "fabric-2",
relying on predictable index numbers to be provided by MaaS based
on the interfaces defined in /etc/network/interfaces.

However, the fabric IDs/names generated by MaaS are not predictable,
and therefore cannot be hardcoded in our reclass model / scripts.

Work around this by:
- adding support for fabric ID deduction based on CIDR matching
  during subnet create/update operation in MaaS py module;
- adding support for VLAN DHCP enablement to MaaS py module,
  which was previously handled via shell MaaS API operations
  from maas/region.sls;

While at it, revert previous commit that disabled network discovery
("MaaS: Disable network discovery"), since it turns out that network
discovery was not the culprit for subnet creation failure, but wrong
fabric numbering.

This reverts commit 8cdf22d1a1bae4694a373873cab4feb6251069b7.

Change-Id: I15fa059004356cb4aaabb38999ea378dd3c0e0bb
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "MaaS: Disable network discovery"
Alexandru Avadanii [Sat, 19 Aug 2017 01:03:24 +0000 (01:03 +0000)]
Merge "MaaS: Disable network discovery"

7 years agomaas state: Add debug output to grep query loops 51/39651/1
Alexandru Avadanii [Sat, 19 Aug 2017 00:33:34 +0000 (02:33 +0200)]
maas state: Add debug output to grep query loops

Change-Id: Ic47a9dd2d5a4cccc9c4330509d81aba82f777084
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMaaS: Disable network discovery 47/39647/1
Alexandru Avadanii [Fri, 18 Aug 2017 23:18:02 +0000 (01:18 +0200)]
MaaS: Disable network discovery

In case nodes are already powered on and have an IP in the same
range as the new MaaS DHCP one (e.g. from a previous deploy),
MaaS API will reject the subnet creation due to overlapping
addresses. Try to work around this by disabling network discovery.

Change-Id: I70a33c552bf38a7ccbc1bb7e90c21f424f082bc5
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "MaaS: DHCP iprange fix: use dynamic, not reserved"
Alexandru Avadanii [Fri, 18 Aug 2017 21:14:14 +0000 (21:14 +0000)]
Merge "MaaS: DHCP iprange fix: use dynamic, not reserved"

7 years agoMaaS: DHCP iprange fix: use dynamic, not reserved 33/39633/1
Alexandru Avadanii [Fri, 18 Aug 2017 21:09:06 +0000 (23:09 +0200)]
MaaS: DHCP iprange fix: use dynamic, not reserved

Without the 'type' parameter set to 'dynamic', MaaS was configured
to reserve the IP range instead of allocating it dynamically.

This led to IP exhaustion warnings in MaaS dashboard, as well as
wrongful IP allocation.

Change-Id: I1f2b90bf4cd2393cfab6d4bc17771cef009701c0
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agomaas.region: Add port to all MaaS API URLs 19/39619/1
Alexandru Avadanii [Fri, 18 Aug 2017 18:42:00 +0000 (20:42 +0200)]
maas.region: Add port to all MaaS API URLs

Change-Id: I6ecc81cc6faf45f33882666b9f537a3e42ad379e
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agomaas.region: Add missing port to maas_url 07/39607/1
Alexandru Avadanii [Fri, 18 Aug 2017 17:02:46 +0000 (19:02 +0200)]
maas.region: Add missing port to maas_url

Change-Id: Iae9991f9148ac518696f9f8b57b5a8ca9dded730
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agolinux.network: Fix noifupdown in linux/map.jinja 05/39605/1
Alexandru Avadanii [Fri, 18 Aug 2017 15:43:05 +0000 (17:43 +0200)]
linux.network: Fix noifupdown in linux/map.jinja

Previous changes attempted to add 'noifupdown' support, but failed
to spell it correctly. Fix the typo and also edit the 'maas' state
to use simple `salt state.apply` instead of `cmd.run 'salt-call'`.

Change-Id: If9889dee896fa100febe0372fe2c4173fc223ee3
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMaaS node: Fix dhcp_interface config 91/39591/1
Alexandru Avadanii [Fri, 18 Aug 2017 14:08:23 +0000 (16:08 +0200)]
MaaS node: Fix dhcp_interface config

Explicitly configure dhcp_interface for mas01, in order to allow
the interface name to be parametrized via "dhcp_interface" _param.

Change-Id: I6a2750adc1941c0aa1f94ac9b39133b5bd2388c6
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoApply network config on kvm nodes 81/39581/2
Michael Polenchuk [Fri, 18 Aug 2017 10:03:16 +0000 (14:03 +0400)]
Apply network config on kvm nodes

* re-assign ip from interface to bridge
  - install bridge utils
  - make a reboot straight away after network config
* change image source for vcp

Change-Id: I34506ee161337b5d3a4088cfdf3c082d99ccb695
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "patches: linux.system.single fixed upstream"
Michael Polenchuk [Fri, 18 Aug 2017 06:52:45 +0000 (06:52 +0000)]
Merge "patches: linux.system.single fixed upstream"

7 years agoci/deploy.sh: yum install --skip-broken 59/39559/1
Alexandru Avadanii [Thu, 17 Aug 2017 23:44:17 +0000 (01:44 +0200)]
ci/deploy.sh: yum install --skip-broken

Change-Id: I8098eff73ab15fe58cb357db99df76e1bd160652
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agopatches: linux.system.single fixed upstream 41/39541/3
Alexandru Avadanii [Thu, 17 Aug 2017 18:44:28 +0000 (20:44 +0200)]
patches: linux.system.single fixed upstream

Fixed upstream in [1], drop our patch.

[1] https://github.com/Mirantis/reclass-system-salt-model/commit/573be77

Change-Id: Ieeb9b87cac0418d860bbf04e5e8ffd48898a213e
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "Bring in baremetal support"
Alexandru Avadanii [Thu, 17 Aug 2017 16:40:38 +0000 (16:40 +0000)]
Merge "Bring in baremetal support"

7 years agolib.sh: Fix mcp key owner for OPNFV Jenkins jobs 13/39513/2
Alexandru Avadanii [Thu, 17 Aug 2017 14:48:12 +0000 (16:48 +0200)]
lib.sh: Fix mcp key owner for OPNFV Jenkins jobs

In case of non-root deploys (i.e. running `ci/deploy.sh` without
sudo), the OPNFV Jenkins slave executes it under a user shell,
under a root shell, e.g.:
$ sudo sudo -u jenkins bash
$ echo $USER
jenkins
$ echo $SUDO_USER
root

Adjust lib.sh to only use SUDO_USER when it is not "root".

Change-Id: I6dd1c8a5dd3a3b02cfb760818d66e99f49709a5b
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoBring in baremetal support 55/38855/25
Alexandru Avadanii [Tue, 1 Aug 2017 20:18:41 +0000 (22:18 +0200)]
Bring in baremetal support

- 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>
7 years agovirtual: odl-router: Stop overriding Ubuntu repos 05/39205/1
Alexandru Avadanii [Sun, 13 Aug 2017 16:35:24 +0000 (18:35 +0200)]
virtual: odl-router: Stop overriding Ubuntu repos

Keep UCA default apt sources, instead of overriding them with arch
specific values from:
- system.linux.system.repo.ubuntu

Change-Id: I1edc725a97ae6290d316a7916c27fd904f59db04
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoMerge "maas: region: credentials workaround, force sync"
Alexandru Avadanii [Fri, 11 Aug 2017 13:35:24 +0000 (13:35 +0000)]
Merge "maas: region: credentials workaround, force sync"

7 years agoMerge "lib.sh: AArch64: Use VGA video mode for guests"
Alexandru Avadanii [Fri, 11 Aug 2017 13:24:18 +0000 (13:24 +0000)]
Merge "lib.sh: AArch64: Use VGA video mode for guests"

7 years agolib.sh: AArch64: Use VGA video mode for guests 79/39079/2
Alexandru Avadanii [Tue, 11 Jul 2017 16:35:40 +0000 (18:35 +0200)]
lib.sh: AArch64: Use VGA video mode for guests

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>
7 years agoRevert "Switch distrib revision to testing" 25/39125/3
Michael Polenchuk [Fri, 11 Aug 2017 10:30:45 +0000 (10:30 +0000)]
Revert "Switch distrib revision to testing"

There is no much difference between nightly vs testing repos.
This reverts commit 052a1626da71d232431b3a9faf576a76db61f10e.

Change-Id: I40f60ddc2c9e1e59c7c4eb0be59ae19b00b7fb9b
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agomaas: region: credentials workaround, force sync 53/38853/2
Alexandru Avadanii [Sat, 5 Aug 2017 00:25:38 +0000 (02:25 +0200)]
maas: region: credentials workaround, force sync

Workaround the issues described in [1], stating that salt-formula-maas
package cannot set an autogenerated PostgreSQL password, respectively
the known error thrown during initial setup.

FIXME: These should be reverted later, after fixing the MaaS password
update and initial artifact sync in the salt formula / scripts.

[1] https://docs.mirantis.com/mcp/1.0/mcp-deployment-guide/\
    install-base-infra/set-up-bare-metal-provisioner/configure-maas-vm.html

Change-Id: I8b37f55d3caa4119c64f9549578850dd4eb9e3ad
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoSynchronize down all of the dynamic modules 71/38971/1
Michael Polenchuk [Wed, 9 Aug 2017 11:15:36 +0000 (15:15 +0400)]
Synchronize down all of the dynamic modules

Sync all of the salt dynamic modules to make sure custom
modules, states, grains & etc. are on the target nodes.

Change-Id: I04f2ac0465d5381c4c07623e9383619d9b9731de
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoSwitch distrib revision to testing 85/38885/2
Michael Polenchuk [Tue, 8 Aug 2017 07:38:39 +0000 (11:38 +0400)]
Switch distrib revision to testing

In order to avoid bleeding edge issues with nightly version of
salt formulas, switch to "safe" testing repo source.

Change-Id: I9d12f337c3952711cb8843943c23315795064016
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoMerge "ci/deploy.sh: Allow non-root deploys"
Alexandru Avadanii [Sun, 6 Aug 2017 16:56:43 +0000 (16:56 +0000)]
Merge "ci/deploy.sh: Allow non-root deploys"

7 years agoMerge "Set ntp servers list"
Michael Polenchuk [Thu, 3 Aug 2017 08:56:26 +0000 (08:56 +0000)]
Merge "Set ntp servers list"

7 years agoMerge "reclass: opendaylight: Use UCA default repos"
Alexandru Avadanii [Wed, 2 Aug 2017 13:40:07 +0000 (13:40 +0000)]
Merge "reclass: opendaylight: Use UCA default repos"

7 years agoMerge "mcp/config: Move scenario defs to separate dir"
Alexandru Avadanii [Wed, 2 Aug 2017 13:39:48 +0000 (13:39 +0000)]
Merge "mcp/config: Move scenario defs to separate dir"

7 years agoSet ntp servers list 17/38617/1
Michael Polenchuk [Wed, 2 Aug 2017 11:43:10 +0000 (15:43 +0400)]
Set ntp servers list

* set ntp sweden servers list for virtuals
* wrap common cluster init options

Change-Id: I044802998d5498fed969e62bf1ea8c814652f34f
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years ago[odl-router] Bring up public network on computes 97/38597/1
Michael Polenchuk [Wed, 2 Aug 2017 09:10:26 +0000 (13:10 +0400)]
[odl-router] Bring up public network on computes

* apply provider mappings on compute nodes as well
* set default route of computes to gateway node

Change-Id: I5715e34fd8ecbed87bd7f1b1ed488766af711bae
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agomcp/config: Move scenario defs to separate dir 53/38553/1
Alexandru Avadanii [Tue, 1 Aug 2017 20:06:11 +0000 (22:06 +0200)]
mcp/config: Move scenario defs to separate dir

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>
7 years agoci/deploy.sh: Allow non-root deploys 47/38547/1
Alexandru Avadanii [Mon, 17 Jul 2017 23:10:25 +0000 (23:10 +0000)]
ci/deploy.sh: Allow non-root deploys

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>
7 years agoreclass: opendaylight: Use UCA default repos 45/38545/1
Alexandru Avadanii [Thu, 27 Jul 2017 18:09:46 +0000 (20:09 +0200)]
reclass: opendaylight: Use UCA default repos

Current opendaylight pillar enforces a full apt repository cleanup,
removing Ubuntu Cloud Archive (UCA) repos in favor of adding
pre-hardcoded Ubuntu archive repos.

Unlike UCA, main Ubuntu archive is split based on target arch, the
main archive.ubuntu.com holding only x86 packages, while the other
archs are hosted on ports.ubuntu.com.

This leads to adding (only) x86-specific repositories to our AArch64
UCA image.

Mitigate this by ommiting "system.linux.system.repo.ubuntu" from the
opendaylight pillar, leaving the default UCA repos in place.

Change-Id: Ia7033bcb544d8752d5557bbabc92c92c5008b00c
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoci/deploy.sh: Fix "notify" on dumb terminals 39/38539/1
Alexandru Avadanii [Tue, 1 Aug 2017 17:48:33 +0000 (19:48 +0200)]
ci/deploy.sh: Fix "notify" on dumb terminals

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>
7 years agosalt.sh: Drop upstream clone in favor of local git 87/38487/1
Alexandru Avadanii [Sat, 29 Jul 2017 20:49:26 +0000 (22:49 +0200)]
salt.sh: Drop upstream clone in favor of local git

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>
7 years agomcp/scripts: shellcheck cleanup 59/38459/2
Alexandru Avadanii [Fri, 28 Jul 2017 22:34:31 +0000 (00:34 +0200)]
mcp/scripts: shellcheck cleanup

Change-Id: I280d540b461341e14de654186016248eba4d3521
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agoci/deploy.sh: MCP cleanup, sanity checks 57/38457/2
Alexandru Avadanii [Fri, 28 Jul 2017 01:50:09 +0000 (03:50 +0200)]
ci/deploy.sh: MCP cleanup, sanity checks

- 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>
7 years agoci/deploy.sh: Rework bridge arguments for MCP 43/38443/3
Alexandru Avadanii [Tue, 25 Jul 2017 17:11:56 +0000 (19:11 +0200)]
ci/deploy.sh: Rework bridge arguments for MCP

Change-Id: I20d6dedeaa31f7986eaa35be49c5388c3fdb4b83
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years agolib.sh: Use host-passthrough when spawning VMs 85/38385/2
Alexandru Avadanii [Fri, 21 Jul 2017 17:59:33 +0000 (19:59 +0200)]
lib.sh: Use host-passthrough when spawning VMs

virsh defaults to using "host-model" instead of "host-passthrough",
which not only might lead to a small performance hit on x86, it is
also causing compatibility issues with libvirt 3.x.

Address this by explicitly requesting "host-passthrough" as the
CPU model for virt-install.

Change-Id: Ia7c5e8ff906c02fed2193c268cbb3594c5607bc6
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
7 years ago[odl-router] Add missing nodes config 21/38421/1
Michael Polenchuk [Mon, 31 Jul 2017 08:32:09 +0000 (12:32 +0400)]
[odl-router] Add missing nodes config

Change-Id: Id7603aa581e4ccdddad1cf93f9434fe95c047800
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoSet key owner to original user in case of sudo 15/38415/1
Michael Polenchuk [Mon, 31 Jul 2017 07:45:30 +0000 (11:45 +0400)]
Set key owner to original user in case of sudo

Change-Id: If964d36ad4f0cb6f1b2caf8544d4e35487f59c6c
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
7 years agoBring in opendaylight L3/router scenario 79/37479/3
Michael Polenchuk [Fri, 14 Jul 2017 07:11:32 +0000 (11:11 +0400)]
Bring in opendaylight L3/router scenario

Change-Id: I8a3be1764de136e2ecf81f964233483be5d6655a
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>