225 Commits

Author SHA1 Message Date
Ruslan Aliev
31995eaf9d Add validation phases
This patch introduces ability to validate phases using kubeval.
Appropriate functionality was embedded into phase/plan validate
command.

Change-Id: I1e1ccae2b7e4948bdc97a199c96c07a3eb7292b2
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #503
Closes: #2
Closes: #19
2021-04-22 11:37:12 -05:00
James Gu
df4d481f5c Deployment script enhancements
Added 10 script to install required packaged and tools for a bew build node
Fixed docker cmd permisson error in 21 script
Fixed medadata path to use the SITE environment variable in 22 script
Added abibility to configure nocheckout option in document pull

Signed-off-by: James Gu <james.gu@att.com>
Change-Id: Iea7c3e2cdac473188007e218f87889f6c1846bda
2021-04-20 18:48:35 +00:00
Vladislav Kuzmin
217c6fa8ce Move kubectl calls to KRM toolbox pt.3
Move kubectl calls to phases. These phases call KRM toolbox with
prepared shell scripts.

Change-Id: I588d0cfedc26903ae4389667b125fb58983febe9
2021-04-19 13:48:34 +04:00
Vladislav Kuzmin
d9d7f47012 Move kubectl calls to KRM toolbox pt.2
Move kubectl calls to phases. These phases call KRM toolbox with
prepared shell scripts.

Change-Id: Icec3ccfabaf6c0bb996308c35174fa0d6e825a48
2021-04-19 13:44:46 +04:00
Zuul
3d26a7fec3 Merge "Added script for the missing controlplane_target phase" 2021-04-14 03:31:59 +00:00
Zuul
6ff615f987 Merge "Move kubectl calls to KRM toolbox pt.1" 2021-04-14 01:53:02 +00:00
James Gu
06609c3180 Added script for the missing controlplane_target phase
controlplane_target phase is needed for target cluster more than a
single node

Signed-off-by: James Gu <james.gu@att.com>
Change-Id: I6e77d4268cdee0ebcc65e1f9172ef645ced53337
2021-04-13 10:47:47 -07:00
Alexey Odinokov
d69553f904 Kubeconfig: switching from kustomize to airshipctl command
Since [1] has been merged it's possible to use
that command to generate kubeconfig in proper
way.

This patchset introduces that changes as well as
cleans up for non-needed anymore due to that changes
steps in gating.

[1]:
https://review.opendev.org/c/airship/airshipctl/+/774709

Change-Id: Ifc07c56c126c782d940a8ca4d111c59c5d3c9c78
2021-04-13 14:47:38 +00:00
Vladislav Kuzmin
eb6ccf0201 Move kubectl calls to KRM toolbox pt.1
Move kubectl calls to phases. These phases call KRM toolbox with
prepared shell scripts.

Change-Id: Iddf64c7df94c9d796b101bbb4fafb22a7b7621b7
2021-04-10 14:00:40 +04:00
Sreejith Punnapuzha
44b0abb5f9 Parameterize secret generation
Currently secret generation script is hard coded to test-site.
parameterizing it so that we can use the same script for multiple sites

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I501f577952d14541da1cb632e92ae19f577dbd53
2021-04-02 13:17:38 -05:00
Vladislav Kuzmin
892bb6a16d Move deployment scripts from test-site to function
Change-Id: I35a83a4e3fbc60c0f25b3969d624bbc370f0a41b
2021-04-01 15:52:41 +00:00
Vladislav Kuzmin
d5c0377207 Add toolbox krm function
Add krm function to execute bash scripts inside container.

Closes: #494
Change-Id: I3074a27a022f65e87f190ab5a39c252f225ca1fa
2021-03-31 13:28:16 +00:00
Zuul
8cef84045b Merge "Add validation for catalogues" 2021-03-31 12:02:56 +00:00
Zuul
e500e3c756 Merge "Add kustomize install script" 2021-03-31 06:40:37 +00:00
Matthew Fuller
7222467df3 Add validation for catalogues
This change ensures that catalogue CRs (i.e. networking,
versions) are validated when running validate_docs script.

Also fixes:
* problem encountered with the creation of the ironic-vars
ConfigMap when a non-string data type was used as the
replacement target value.
* amends VersionsCatalogue schema to allow an optional
'ipam-manager' object in capi_images, necessitated by
a change to the capm3 function[0].

[0] https://review.opendev.org/c/airship/airshipctl/+/780297

Closes: #476
Change-Id: Idd05eb046e411b757b7d4f7b21a9b89b6cc51bb6
2021-03-31 02:44:07 +00:00
Zuul
5737f3bf26 Merge "Remove NameInKubeconf field from Context struct" 2021-03-31 02:11:36 +00:00
James Gu
3232e3d9f9 Add kustomize install script
kustomize is a useful tool for debugging when rendering fails

Relates-To: #504

Signed-off-by: James Gu <james.gu@att.com>
Change-Id: I649c74bb7868a80618617db16dc1f1028c262c11
2021-03-30 10:51:37 -07:00
Zuul
310bc282f5 Merge "[#358] Introduce Phase List command to output phase list(cmd module)" 2021-03-30 01:02:39 +00:00
Zuul
9f0c254733 Merge "Changing personal images with upstream for Sops" 2021-03-27 07:47:41 +00:00
Zuul
b38dfb4929 Merge "Add pause annotation to bmh object" 2021-03-27 05:11:29 +00:00
Zuul
5e06ad2287 Merge "Add permission to home folder in pip installation" 2021-03-27 00:37:06 +00:00
Ruslan Aliev
b8e0978d6d Remove NameInKubeconf field from Context struct
Since this field is no longer actually used, there is need to
remove it completely.

Change-Id: I9f7002f8def31d1660919bd0128707e43a57ad71
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-03-26 19:22:52 -05:00
Alexey Odinokov
988cd9f99b Changing personal images with upstream for Sops
During our work we used personal images, because
there was no upstream available. Now when the
upstream is avaialbe - we're changing all urls to it.

Change-Id: I6e8344723e343c4396304d68908fae328d139434
2021-03-26 16:17:27 +00:00
Zuul
e685fb2f1c Merge "Remove "time" leftover from previous patchset" 2021-03-26 02:33:58 +00:00
Zuul
c7516c3f05 Merge "Change default worker count (capd)" 2021-03-25 22:01:44 +00:00
Sreejith Punnapuzha
e4970aa37d Add permission to home folder in pip installation
Pip installation of package with sudo will fail because of permission
issues in home folder. Adding -H option to sudo to fix this.

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I60222b300591aecdbd5e27a0bb86c1c62daca289
2021-03-25 15:00:05 -05:00
Zuul
929b11b8bc Merge "Bump timeout for controlplane phases" 2021-03-25 19:11:40 +00:00
Battina, Sai (sb464f)
5edde6b4f6 Add pause annotation to bmh object
Change-Id: I245aa4e57f3e249b4dff740e3eb642f9c73890c0
2021-03-25 13:45:29 -05:00
Kostiantyn Kalynovskyi
34ade93029 Remove "time" leftover from previous patchset
time command infront of airshipctl is a forgotten piece that needs
to be removed.

Change-Id: I6262e5382e59dab5ef51ca541a57d89522f59197
2021-03-25 17:09:35 +00:00
Niharika Bhavaraju
0cc7c9cafd [#358] Introduce Phase List command to output phase list(cmd module)
* Phase list command lists phases of current documentset/plan.
 airshipctl phase list
 airshipctl phase list --plan planName
 airshipctl phase list --plan planName -o table(default output)
 airshipctl phase list --plan planName -o yaml

Co-Authored-By: Niharika Bhavaraju <niha.twinkle@gmail.com>

Relates-To: #358

Change-Id: Iab3a6cdf5a25583ba3d01341da350841c9cc362d
2021-03-25 16:11:10 +00:00
Zuul
76e345b862 Merge "Pin krm function calls" 2021-03-24 21:34:06 +00:00
Sean Eagan
299b2833b2 Pin krm function calls
This pins krm function calls to version `v2` which represents [0] [1] the latest
2.x.x semantic version. If we need to make breaking changes to any krm functions,
that can now be done by incrementing their major version and thus not
breaking these references.

[0]: https://review.opendev.org/c/airship/airshipctl/+/762924
[1]: https://review.opendev.org/c/airship/airshipctl/+/780875

Closes: #419
Change-Id: I6cf6519511c77da6cac7e46a6b56ea338bcf150c
2021-03-24 09:28:54 -05:00
Rishabh Kumar Jain
a4548cb9ea Change default worker count (capd)
* change default worker count to 2
      from 1
    * remove usage comments to scale workers
      in deployment script

Change-Id: Ic880deea7d3ff104cb2af39b1b81c53a331d353f
2021-03-23 14:10:48 -07:00
Zuul
a6b4eef607 Merge "Enhanced deployment script to support baremetal multi-node" 2021-03-23 20:38:00 +00:00
Zuul
bb37ba1382 Merge "SOPS improvements" 2021-03-23 17:41:00 +00:00
James Gu
1342ab708f Enhanced deployment script to support baremetal multi-node
Additionally aligned between Treasuremap and Airchipctl to use the same
environemnt variable "SITE" for a site name.

Change-Id: I50494b50691a40efe68996cd11ccede6517b23d6
Signed-off-by: James Gu <james.gu@att.com>
2021-03-23 06:21:31 -07:00
Alexey Odinokov
a7e332f9ec SOPS improvements
Added 2 phases:
1. secret-reencrypt - This phase can be used to
reecnrypt the existing secrets with new key.
To do so SOPS_IMPORT_PGP must contain
old public key and new private key (but
may also include other data).
SOPS_PGP_FP must contain fingerprint of
new private key.

2. secret-show - This phase may be useful for some users
that need to see what generated by secret-generate phase.

Disabled SOPS debug by default.
To enable it back run commands with
env variable DEBUG_SOPS_GPG=true

Change-Id: Id7fe13d6943d386577df25dba4aaa83e62e58980
2021-03-19 21:31:25 +00:00
Kostiantyn Kalynovskyi
3fbf865048 Fix CAPD deployment
Commit fixes CAPD deployment and removes redundant scripts
that check expiration for CAPD site.

They must be tested separately outside CAPD pipeline

Related-To: #482
Closes: #482
Change-Id: I60ffd76a4f3f08bd7bd198a0c2b15483dfbdd6a6
2021-03-19 11:31:21 +00:00
Ruslan Aliev
026c71ce6e Bump timeout for controlplane phases
Exceeding the timeout (2000s) for controlplane phase is one
of the common reasons of failure gate-script runner job. The new executor
with bumped timeout value was created for controlplane-* phases to help avoid
timeout error. The examples of exceeding timeout error can be found here:

[1] https://zuul.opendev.org/t/openstack/build/b26d02fda3ab4e75938bd397c618a411
[2] https://zuul.opendev.org/t/openstack/build/73ae850e150c4ce18a1153cc352cebfc
[3] https://zuul.opendev.org/t/openstack/build/7683f126b5274eb492d00d80c73c4bbb

Change-Id: I77055e25c58a4103cdbd67b09710e22829e127a0
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-03-11 14:16:09 -06:00
Kostiantyn Kalynovskyi
6207e2c24d Add multiple kubeconifg sources to ClusterMap
Change ClusterMap API object to support multiple kubeconfig sources
for a cluster. If one kubeconfig source fails, kubeconfig builder
will not fail and move on to the next one. This behaviour will allow
to support cases when ephemeral cluster is not accesible anymore or
when target cluster is not yet accessible.

For more information please read issue #460 in airshipctl github

Relates-To: #460
Related-To: #460

Change-Id: I7cd32f78cd7c4ad8814eac357424c24216f40d76
2021-03-10 18:22:30 +00:00
Zuul
ecb2a042dd Merge "Remove isogen executor and related code" 2021-03-09 19:21:45 +00:00
Zuul
749073228b Merge "Update capm3 to 0.4.0 to fix clusterctl move BMH bug" 2021-03-05 01:46:59 +00:00
Zuul
131bd990d6 Merge "Wait for CR tigerastatus to be available" 2021-03-04 22:49:13 +00:00
Sirajudeen
25ae719d12 Wait for CR tigerastatus to be available
* Wait for CRD's Established state.
* Wait for CR tigerastatus to show up in api to query
* Once CR is created, wait for its condition to be available.

Change-Id: Ibb83e16a15a7e0e351b6ae030e3e82ce22d41c70
Closes: #442
2021-03-03 00:49:36 +00:00
Ratnopam Chakrabarti
670658958b Update common provider script
Updated env variable TEST_SITE to SITE to remove
error with capd deployment
Updated scripts to use phase "initinfra-networking" for deploying
calico cni in target cluster

Change-Id: Ib372e8fe8d1124aa83c5e69a861c523a967c22c9
2021-03-02 16:47:30 +00:00
Sirisha Gopigiri
3bade9c0ed Update capm3 to 0.4.0 to fix clusterctl move BMH bug
This PS updates the capm3 version to 0.4.0, to fix the
clusterctl move BMH bug.

Closes: #466
Change-Id: If9369b6421bde628efee90f1a94681c13f9e749c
2021-03-02 10:06:10 +00:00
Vladimir Kozhukalov
f4001bcffa Remove isogen executor and related code
Isogen executor is not needed any more since there is
 iso build phase plan that runs two phases using generic
 containers.

Relates-To: #440

Change-Id: I3600e82fa1d8a92cdf103d93cd4536bf4a713cca
2021-03-02 08:14:57 +00:00
Zuul
e2af947337 Merge "Correct ephemeral image name in cleanup script" 2021-03-02 05:59:36 +00:00
Sreejith Punnapuzha
798bf4927c Correct ephemeral image name in cleanup script
Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I557c4dc8dfd25d2eee29b9dff1f7fe28e32229e7
2021-03-01 11:07:10 -06:00
Gage Hugo
8d76b7aeda Remove -x from 34_deploy_worker_node.sh
The deploy_worker_node script waits for the nodes to come up and
spams the logs as it runs. This change removes -x from the script
in order to remove a lot of unnecessary stdout since the script
already contains several echo statements to indicate progress.

Change-Id: I4c7465b6aa3538ea171f61387035e79c7d852088
2021-02-28 20:23:00 -06:00