935 Commits

Author SHA1 Message Date
bijayasharma
be03e9067c [#309] Removed unused constant
* This commit will remove unused constant.
* According to issue, we have one unused constant:
  pkg/document/constants.go

Change-Id: Ib93fa01dbd60bb48cf6b8b77298bd0ab4d5b82a4
2020-08-05 12:48:11 +00:00
Zuul
d5508aaa76 Merge "Refactor environment module" 2020-08-05 11:46:13 +00:00
Zuul
87dc0e386d Merge "Fix HTTP_PROXY variable not being set" 2020-08-04 21:19:52 +00:00
Stanislav Egorov
38634457f2 Fixed gate job
Fixed by adding boot mode for target host.
Default one is UEFI and not supported yet by Airship.

Change-Id: I58baa6e85050e1f4ea95b0e902f3593174762860
2020-08-04 11:42:41 -07:00
Ruslan Aliev
79555848f2 Fix document pull unit test in cmd
TestPull unit test should not perform functional verification. The purpose of
cmd unit tests should be testing proper cmd object creation, not actually run
the command. Moreover, we don't have possibility to mock and track all the
objects that created inside of called functions. We can only verify golden output
with help or when command performs basic stuff just inside of RunE interface. Actual
test of called methods performed in pkg module.

Change-Id: I2ad6b76f67cbf59d798c0f2b93752b3e3b3b053d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-08-03 23:29:10 -05:00
Michael Beaver
ec9ebaa3e0 Fix HTTP_PROXY variable not being set
In 21_systemwide_executable.sh and 22_test_configs.sh the HTTP_PROXY
variable is not being set while the HTTPS_PROXY variable is being set
twice.

Closes: #318

Change-Id: I84de84b79b76cef3967248f730f022f1b8f34987
2020-07-31 16:57:44 -05:00
Vladislav Kuzmin
d7101bcb2c Refactor environment module
Move code from environment module to util and document
modules to prevent circular dependencies.

Relates-To: #264

Change-Id: Ifec9ab3f1ada01cc662e655ff4a6f2cfebe4150a
2020-07-31 14:03:39 +04:00
Zuul
645aeeb293 Merge "Introduce KubeConfig API object" 2020-07-30 20:22:19 +00:00
Zuul
7d23d0b580 Merge "Remove standalone cert-manager function" 2020-07-30 19:51:50 +00:00
Zuul
94af5394b1 Merge "documentation changes" 2020-07-30 19:51:49 +00:00
Dmitry Ukov
5f1b93604e Introduce KubeConfig API object
Change-Id: I5894000377b1d22aac02c339ab1938ba35bcf651
2020-07-30 16:20:37 +00:00
Zuul
e609f5e685 Merge "Generate document CRD to different files" 2020-07-29 21:57:41 +00:00
muly
9d4347b0c1 documentation changes
1) modifications to exported functions/variables documentation
2) moved some methods into a different folder

Change-Id: I212442516424bde3284f75b326d152c290d20c80
2020-07-29 09:17:00 -04:00
Ruslan Aliev
71f7a8bc85 Improve document pull command
This patch refactors some code and adds useful debug/info log output.

Change-Id: I590f6e5c300e5c91443af0a8fdb1073229602a67
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #278
2020-07-28 22:01:20 +00:00
Stanislav Egorov
e20c8ae1fa Preparation for workers deployment
Added air-worker VM
Import kubeconfig and check cluster
Initinfra and capi for target cluster

Change-Id: Ib05f805b428a1eab20d62df67ac97670714eebd0
2020-07-28 18:35:19 +00:00
Zuul
6696ac35fc Merge "Removed duplicate YAML keys" 2020-07-28 16:06:49 +00:00
Zuul
6825641882 Merge "Re-enable doc validation gate" 2020-07-28 13:42:18 +00:00
Zuul
8045109c64 Merge "[#308] Removed code style issue on Error string" 2020-07-27 15:32:15 +00:00
Zuul
fbbd21f392 Merge "Allow to use variable substitution for cluster-api components" 2020-07-27 14:49:41 +00:00
Zuul
a85165e99b Merge "Added unit test for missing config functions" 2020-07-27 13:58:01 +00:00
bijayasharma
241714d042 [#308] Removed code style issue on Error string
* This commit will remove code style issue on Error string

Change-Id: Ib2344de75768362a88c077354193878366ce4b0c
2020-07-24 14:19:57 -04:00
niharikab
c73d527824 Removed duplicate YAML keys
As mentioned in the issue there is only one duplicate key:
cmd/cluster/testdata/statusmap/legacy-crd.yaml:metadata

Change-Id: I2c82595c44645f3a104b45db52c2a3943877d9f1
Relates-To: #311
2020-07-24 20:19:10 +05:30
Sreejith Punnapuzha
53cf713a08 Generate document CRD to different files
This commit adds generating CRD into different files for each phase

Change-Id: I574b27d737f946415e64eaf5b1d5bf962d6c2cc1
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
2020-07-24 09:44:44 -05:00
Matt McEuen
2dbd13c644 Re-enable doc validation gate
This sets the validation gate to be voting again; it had been turned
off while some work was in flight.  However, the check is passing again
and re-enabling it will help ensure document goodness.

A couple of tweaks were made based on issues seen during multi-cluster
testing:

1. The kind cluster is now torn down between each cluster (eph and target).
   We'd been reusing the cluster for the sake of speed, but deleting
   everything out of it still left some unexplained cruft behind,
   which broke validation of the second (target) cluster.

2. This reverts back to a simple approach to phase selection and sequencing,
   away from a fancier technique which was failing the only phase
   was "initinfra".

Note: once `airshipctl phase validate` and a queryable phase map are
in place, the gate should be reworked to leverage them instead.

Change-Id: I37c51e859e2df880981e2e138a67c23e17eabd93
2020-07-23 18:55:09 -05:00
Kostiantyn Kalynovskyi
a4107e7f1d Allow to use variable substitution for cluster-api components
There are 2 ways to define variables for substitution:

1) Define them as Environment variables and set EnvVars: true
in clusterctl object

2) Define them in additional-vars map in clusterctl object

Also adds possibility not to substitute variables if they are not defined in
in additional-vars or in environment for specific provider. But be aware,
if these variables are defined they will be substituted even if
variable-substitution: true

Change-Id: I0c92b3c37ac7b2e7c48c1033c074baef48f752a7
Relates-To: #284
2020-07-22 19:09:22 -05:00
Zuul
bf3017c12f Merge "Add an m3 host generator function" 2020-07-22 16:30:18 +00:00
Sirajudeen
404a09356b Added unit test for missing config functions
* Added more unit tests to increase test coverage

Change-Id: I30592465cc08528145a8f309fe9b8c403824ccf1
2020-07-22 15:02:56 +00:00
Sirajudeen
5368f24c86 Remove standalone cert-manager function
* capi, capbk, cacpk, cacpm. all have cert-manager functionality included,
  so the standalone function can be removed.

Closes: #301
Change-Id: I8628a113a66e1b74af3356dfa95e979e9fc987f7
2020-07-22 15:02:46 +00:00
Ruslan Aliev
d21c02c87b Fix airshipctl-roles-test gate job
Due to incorrect processing IP:port pairs using 'regex_replace' filter,
roles-test gate job fails. This patches fixes all the related errors and
CI gate check itself.

Change-Id: Ifd7f890166195df0af9b34e1ccff59b7abd2d9ab
Relates-To: #305
Closes: #305
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-07-21 20:51:53 -05:00
Zuul
83a7fbc2d1 Merge "Integrate ManifestMetadata with phase executors" 2020-07-20 19:32:09 +00:00
Zuul
e12c15a4c8 Merge "Fix metadata loading by config module" 2020-07-20 19:29:32 +00:00
Zuul
faae70ca15 Merge "Integrate cli-utils applier with phases." 2020-07-20 19:29:31 +00:00
Matt McEuen
0324993d60 Add an m3 host generator function
This PS has a function which constructs a collection of Metal3 BareMetalHost
resources, along with associated configuration Secrets.
It solves for a couple of things:

1. pulling the nitty gritty details for generating BMH into one reusable place,
2. allowing the site-specific details to be filled in via catalogues of values

This function leverages a couple of different plugins in sequence:
The airshipctl Replacement plugin, which pulls the site-specific data from
the catalogue documents into a Templater plugin configuration; and then
the airshipctl Templater plugin, which generates a variable number of
BMHs in a data-driven fashion.

More details can be found in the README.md in this patchset.

Closes: #245

Change-Id: I3ddbd36dc53ea6afbd633098c985f4b28bcbb793
2020-07-17 15:30:26 -05:00
Sirajudeen
1d34132b87 Added unit test for missing document functions
* Added more unit tests to increase test coverage

Change-Id: I292ddcd1c98ae49b37032a7d6111e063be397de3
2020-07-16 15:36:04 -05:00
Kostiantyn Kalynovskyi
dfb74fb878 Integrate ManifestMetadata with phase executors
With this commit executors will not rely on hardcoded path to build
bundle with phase information

Change-Id: I6b8826929cb5a4b95a5c4d30f23fad3a3af52555
Relates-To: #259
2020-07-16 00:19:00 +00:00
Kostiantyn Kalynovskyi
66fc562667 Fix metadata loading by config module
In this fix, we make sure that targetPath is taken into the account
when forming path to metadata file

Change-Id: Ie94c3508161b8c3b9254db08f4bf809348ff54f0
Relates-To: #295
Closes: #295
2020-07-15 19:18:35 -05:00
Zuul
f4f107ac53 Merge "Fixed docs validation build" 2020-07-15 21:45:49 +00:00
Zuul
6185098420 Merge "Added unit test for dochelper, config" 2020-07-15 18:14:39 +00:00
Kostiantyn Kalynovskyi
e4adce2bcf Integrate cli-utils applier with phases.
This will also enable us to wait for kubernetes resources to reach
required state

Relates-To: #238

Change-Id: Ia2c9cebd94ca2ef5bfd9ed5830ae469e6aa6b167
2020-07-15 11:10:37 -05:00
Zuul
b53db4a639 Merge "Ignore errors from test coverage" 2020-07-15 16:07:53 +00:00
Sirajudeen
35d119d3d1 Added unit test for dochelper, config
* added more negative test cases to dochelper, config to
  increase the test coverage

Change-Id: I3179823f9196157e72009ff998cfb8dd348fee1f
2020-07-14 16:48:03 -05:00
Nikolay Fedorov
17f2575421 Add 3 nodes control plane composite
Relates-To: #150

Change-Id: I90b810606980eb0fa33b92f835107e7dd0aed1f3
2020-07-14 19:46:14 +00:00
Zuul
87735984cd Merge "Add applier from cli-utils package" 2020-07-14 19:06:28 +00:00
Stanislav Egorov
9fddcbdf3b Fixed docs validation build
Phases should be ordered when rendering to prevent error like:
'... no matches for kind "Cluster" ...'

Change-Id: I830c36b5959ae3970b261f96ff6d23bf467f5ff6
2020-07-14 16:15:10 +00:00
Ruslan Aliev
37c044a5b7 Fix config init command
airshipctl config init command currently fails with "no such file or directory"
error, this patch fixes it.

Change-Id: I78cff26ed71bdb400ce897630102350e72dc495d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-07-14 15:50:29 +00:00
Kostiantyn Kalynovskyi
f5cf2d379a Add applier from cli-utils package
The commit adds applier object from cli-utils which would allow us
to wait for kubernetes objects to reach required states and support
pruning.

Integration is very similar to the one with kubectl, because backend
mechanism for reading manifests is the same. We need to write them to
temporary directory in $HOME/.airship directory, and point cli-utils
to it. It will then take care of storing what was applied to k8s cluster
for prunning and also will be capable of waiting for core resources to
reach required state by constantly polling them.

To integrate we need to create a namespace in which we will store
configmap that keeps track of what objects were applied before and enable
prunning

Relates-To: #238

Change-Id: I4c0123cc57b78bd13dbe320e0ab9f28bbed2301d
2020-07-13 19:17:18 -05:00
Kostiantyn Kalynovskyi
1cafd674df Add manifestreader interface implementation
This implementation would allow to use bundle as source of manifests
for cli-utils applier, and will also eliminate the need to dump manifests
to the filesystem

Change-Id: I37f21beaaf4cb2800b50d4ccb18596a4c09ea19b
2020-07-13 15:48:38 -05:00
Zuul
821d02eba4 Merge "Cleaning for gate scripts" 2020-07-13 17:32:09 +00:00
Zuul
9892e5ea81 Merge "Add repository metadata" 2020-07-10 21:57:50 +00:00
Sirajudeen
8091c98566 Ignore errors from test coverage
*) Most the errors.go has 0% coverage due to usage of
Fatal.
*) so ignoring errors from coverage till we cleanup the references to Fatal
   and use custom errors/warnings.

Change-Id: I56f838ec33336ccca3c14226e791842d159a95fb
2020-07-10 10:43:28 -05:00