712 Commits

Author SHA1 Message Date
Kostiantyn Kalynovskyi
d9f54b4171 Extend kubeconfig builder
Change-Id: I6724112826a4cc59815b7524bd05af01a9a1d01b
2021-02-10 14:52:39 +00:00
Zuul
77268cd1d0 Merge "Implement cluster list command" 2021-02-10 07:11:37 +00:00
Zuul
d0a9adc752 Merge "Implement render method for clusterctl executor" 2021-02-10 04:28:14 +00:00
Zuul
bc919145ac Merge "Fix typos in baremetal executor" 2021-02-10 01:58:51 +00:00
Zuul
5647f5381e Merge "Add ability to create bundle from bytes" 2021-02-09 22:46:15 +00:00
Ruslan Aliev
7bf93ba699 Implement cluster list command
Required for document validation script.

Change-Id: I555173a445278b31ef51ebf831a79e63446a19bc
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-02-08 23:54:57 -06:00
Ruslan Aliev
0f44ad9a7c Implement render method for clusterctl executor
Change-Id: If3d66baa8eec27f51705c813f17854ad7ef23a26
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-02-08 23:53:37 -06:00
Ruslan Aliev
cc25bcf52e Add ability to create bundle from bytes
This patch implements new constructor of document.Bundle type
using raw bytes as source.

Change-Id: Ie7742bcf245083ac988541aa9987448f5827fec3
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-02-08 23:32:06 -06:00
Zuul
9ab2ed96b7 Merge "Implement airship container type" 2021-02-09 02:50:33 +00:00
Zuul
92cfc8c03f Merge "Extend Generic Container interface" 2021-02-09 02:33:23 +00:00
Zuul
8b19ced1b8 Merge "Extend container interface with mounts get log opts" 2021-02-09 01:11:37 +00:00
Zuul
a435109673 Merge "Add cluster name filter for phase list cmd" 2021-02-09 01:02:37 +00:00
Kostiantyn Kalynovskyi
769e164b59 Implement airship container type
This will enable airship to run containers in privileged mode
as well and to specify commands to be executed.

Change-Id: I663eb55547bb821f26a9071c24d08166a3b3d56b
2021-02-08 17:59:11 +00:00
Kostiantyn Kalynovskyi
d78cbe96a1 Extend Generic Container interface
This also moves KRM related logic from executors package to
container package, and creates ClientV1Alpha1 interface that
would allow us to have versioned clients for generic container
executor.

Change-Id: I4b32fd8dd089b9ccea2ed64a805702e6a8705706
2021-02-08 15:50:20 +00:00
Kostiantyn Kalynovskyi
971c81acdb Extend container interface with mounts get log opts
This commit allows to specify options to get container logs, such
as stderr, stdout and if logs should be followed.

Also extends RunCommandOptions with ability to add mounts in addtion
to binds

Relates-To: #458
Change-Id: I83507f2f7ca6ea596f52f5d3e9f868467458b6a3
2021-02-08 00:11:29 +00:00
Ruslan Aliev
d1c7913ed3 Add cluster name filter for phase list cmd
This patch implements ability to filter phase by given
cluster name.

Change-Id: I4eb95f9f75c57eff4ae8eb41c608c6f6d7fa009c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-02-05 17:09:44 -06:00
Kostiantyn Kalynovskyi
4671ea7f74 Allow privileged mode in docker interface
Change-Id: I12e7a895c5ccd228a3bb1a2ef3588be96893ae36
2021-02-05 04:25:06 +00:00
Kostiantyn Kalynovskyi
3ae387e9f2 Change container RunMethod to allow extending
This will make sure that when we add new features to how the
docker container is run, we don't need to change interface
method signature everywhere we use it.

Relates-To: #458

Change-Id: I12273264c1a8061300017246a1a4a17125ca8ae2
2021-02-05 04:25:06 +00:00
Zuul
bc7d253586 Merge "Add ability to render different document sets" 2021-02-04 21:21:40 +00:00
Kostiantyn Kalynovskyi
6807547ab2 Add ability to render different document sets
Now we would be able to render phase bundle, executor bundle
and config bundle. Config bundle will contain documents such as
phases and executors.

Relates-To: #459
Closes: #459

Change-Id: Ia6b9196dfb3d8fb3264fef676c975ccc32883fee
2021-02-04 17:40:35 +00:00
Kostiantyn Kalynovskyi
0a5f1e2ca4 Reuse RemoteDirect function for redfish dell client
Change-Id: I17726cae6f4d1f99e1cec4fa7a29c1a9e1dee3d5
2021-02-04 01:11:09 +00:00
Kostiantyn Kalynovskyi
0d13002f9a Fix typos in baremetal executor
Change-Id: I3b9ace228722a357b277927ef2e80a9427f7f687
2021-02-02 19:30:52 +00:00
Kostiantyn Kalynovskyi
f0e80cfdc5 Add BaremetalManager executor
This will allow to peform remote BMH operations as a phase

Change-Id: I8e99285e0407d1922312a08ad4f766363f8855d2
2021-02-02 16:42:09 +00:00
Zuul
3984e81095 Merge "Add BMH manager executor api object" 2021-02-01 22:54:41 +00:00
Zuul
e77bac1571 Merge "Implement genCAEx and genSignedCertEx with Subj support" 2021-02-01 20:22:53 +00:00
Zuul
621b7758e0 Merge "Link cluster get-kubeconfig cmd with appropriate functionality" 2021-02-01 19:19:06 +00:00
Kostiantyn Kalynovskyi
3f9e56ecef Add BMH manager executor api object
Also this commit extends helper interface with inventory

Change-Id: I8df785f1c095a2e9502f23e1c83c5fcfe6f811fd
2021-02-01 19:10:31 +00:00
Alexey Odinokov
47df361761 Implement genCAEx and genSignedCertEx with Subj support
The original sprig-library implementation of
genCA and genSignedCert may accept only CN parameter
which isn't enough for K8s admin certificate.
That certification must have O=system:masters, e.g.
/CN=admin/O=system:masters

This PR introduces the set of functions that
insted of cn accept subj argument that may have
a form compatible with openssl -subj parameter.
If the first symbol isn't '/' subj behaves as
cn argument.

The set of new functions that accept subj arg is:
genCAEx
genCAWithKeyEx
genSignedCertEx
genSignedCertWithKeyEx

Since the implementaion required to copy some
non-exported helper functions from sprig,
the decision was made to separate all go-template
extension functions into a separate package:
extlib. This package can be reused in other
go-applications, it's just necessary to use
GenericFuncMap function to get function-map.

Change-Id: I0ffddee2e597323803bf5f1b54f315ded424b7be
2021-01-29 16:43:32 +00:00
Zuul
34ff5e88bc Merge "Implement basic validation for plan and phase" 2021-01-29 01:33:38 +00:00
Zuul
897faf2d51 Merge "Implement plan run command" 2021-01-28 21:32:27 +00:00
Zuul
71e038a5c5 Merge "Removed capitalization in Error string message" 2021-01-28 15:25:33 +00:00
Zuul
aacaefc820 Merge "Cleanup ClusterMap interface" 2021-01-28 08:10:20 +00:00
Zuul
4ea1b0e2f0 Merge "Add InventoryRepoName field to config" 2021-01-28 06:13:58 +00:00
Dmitry Ukov
f0e276bb7b Implement basic validation for plan and phase
Plan validation:
1. Each phase must be defined within phase document bundle.
2. Each phase does not return error for Validate method

Phase validation:
1. Document bundle associated with the phase can be rendered without an
error.
2. Associated executor must not return an error.

Relates-to: #330
Change-Id: I08c5e8e42570f2cafdced5a02481b033414ffae0
2021-01-28 10:13:05 +04:00
Dmitry Ukov
178b0eff3e Implement plan run command
Change-Id: Ie627ce670cd2b19d6999dc7c7a7a6dc12b25cace
Closes: #395
2021-01-28 10:13:05 +04:00
Zuul
0b9f5fd197 Merge "Cleanup unused remote pkg code" 2021-01-28 03:01:16 +00:00
Dmitry Ukov
069e4069ce Implement plan list subcommand
Change-Id: Ibcd7dbf6dc8cd9d0b018c148017244526651d8ba
Closes: #385
2021-01-27 10:19:54 +00:00
Dmitry Ukov
c36a8ea022 Introduce generic table printer
* Table printer is based on cli-utils approach
* Rename 'phase plan' command to 'phase list' and print all Phase
documents from model instead of just printing PhasePlan object

Relates-To: #358
Change-Id: If3c5e2463e32f6794af4c82c12955a45583fce80
2021-01-27 14:10:31 +04:00
Kostiantyn Kalynovskyi
c6d6516200 Cleanup ClusterMap interface
This commit deletes a left over method that was used to get
namespace of the cluster. Instead ClusterAPIRef should be
used to get both name and namespace of the cluster in
terms of cluster-api.

Change-Id: I770cd11094257df29e1cac2c63ed3edecd62e54f
2021-01-26 20:25:52 +00:00
bijayasharma
661ae70fd0 Removed capitalization in Error string message
* This commit will removed capitalizaion in Error message
  and follow the Golang code rule.
* Golang errors should not begin with capitalization:
  https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Signed-off-by: bijayasharma <vetbijaya@gmail.com>
Change-Id: I053cfa9e21ad56b0f30e476ec36320cb7cea4da4
2021-01-26 19:42:08 +00:00
Ruslan Aliev
899bbdbe07 Link cluster get-kubeconfig cmd with appropriate functionality
This patch links cluster get-kubeconfig command call with
appropriate clusterctl functionality, and also replaces old
callbacks and removes outdated implementation.

Change-Id: Ibd0d981985f94497db250c8df3f5675fdec1d2ca
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #374
2021-01-26 11:03:59 -06:00
Zuul
63421c8fcc Merge "Add general inventory interface implementation" 2021-01-25 18:08:44 +00:00
Kostiantyn Kalynovskyi
7bb4ac288d Remove unsed functions and increase test coverage
Change-Id: I2601700a477006946e1d759a8b8d849bf30e8afd
2021-01-22 23:31:22 +00:00
Kostiantyn Kalynovskyi
fe8c86feb8 Add InventoryRepoName field to config
If inventory repo name is not specified, phaseRepoDir will be used

Change-Id: Iea3eca5d7ca14c549696b7214c8d4b07ef3e5bf4
2021-01-22 22:26:37 +00:00
Zuul
6acf6b99b3 Merge "Move remotedirect method to remote interface" 2021-01-22 21:31:47 +00:00
Kostiantyn Kalynovskyi
129fd7ffa6 Cleanup unused remote pkg code
Change-Id: Ie879b6c8947148ae15b1c7cb5e15a46e998ec05c
2021-01-22 20:23:08 +00:00
Kostiantyn Kalynovskyi
8958d7093c Add general inventory interface implementation
This commit also adds function to be used with command line pkg

Change-Id: Ifdebfd62817b071f06cad90a14897fda63808a7a
2021-01-21 23:18:55 +00:00
Kostiantyn Kalynovskyi
decc12b0a9 Move remotedirect method to remote interface
Please note that this is first commit in series and in next commits
remote/remote_direct* files will be remove completely, so if you
have any comments that address issues in these files, keep in mind
that they will be remove in next patchsets.

Change-Id: I52e9b8438a4f8e1a2395cbe90238b9cb654772d4
2021-01-21 23:09:54 +00:00
Zuul
fa04ecc548 Merge "Fix pulling docs from remote branch" 2021-01-15 19:49:33 +00:00
Zuul
6c7a6b0dfd Merge "Changed the return statements to go idiomatic way" 2021-01-14 22:03:56 +00:00