All the image commands was refactored for usage with new config
factory. Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.
Change-Id: I3c51f201ec70b194ce1f127ff43a28292cf691f3
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
All the baremetal commands was refactored for usage with new config
factory. Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.
Change-Id: If75cd3f1a8bc22fc47ea132188bd9fec989ee434
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
This extracts the container, disk image, and Kubernetes versions that
are defined in airshipctl functions, into an `versions-airshipctl`
catalogue in the `airshipctl-catalogues` function. The default version
values have been left in-place in their resources as well, and will
be used if the user decides not to apply the catalogue via a
transformer at the site level (it's not currently required to actually
use the catalogue or associate replacment rules).
Please see the READMEs in this change for more information.
Note: replacement of CAPI component container versions must be done
through a slightly different mechanism and will be in a
follow-on changeset.
Note that this also incorporates a fix to pin the Ironic images, which
are currently not compatible at the :latest tag.
Co-Authored-By: Alexander Noskov <anoskov@mirantis.com>
Change-Id: Iafe1d185a7e7d3932576055eda819d2270b02482
Relates-To: https://github.com/airshipit/airshipctl/issues/316
This command was refactored for usage with new config factory.
Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.
Change-Id: Iff75eb66db2fee922e6db1bf2930892c02c3b601
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
The new approach of config loading allows us to combine and move all
the config loading and verifications actions from cmd to pkg module;
it will be executed on demand only and save us from non expected
runtime errors. The examples of usage will be introduced in further
changes.
Change-Id: I1b4c29f9c5b1de3e46a1faf5c28fea5c7b3eb4e1
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
As part of config refactoring process, we should remove debug field
from AirshipCTLSettings structure since debug variable is stored in
log module.
Change-Id: I02f3c7160ed0301605de32e0d0267be8524ccc12
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
Kubeconfig builder will be a single source of kubeconfig, allowing
to make a decision how to build kubeconfig based on different
parameters, such as path to kubeconfig, dynamic kubeconfig
options, or kubeconfig based on document bundle.
Change-Id: Ia63e11a6f0b327e283d3e7fce169a35d54684dfb
This removes an assumption in the ephemeral cloud-init that
vda should be used to hold ironic images and container bindmounts.
Cloud-init will now use the ram-backed FS if there's enough
memory, and otherwise will default to vda or sda as appropriate.
Change-Id: If2a05348df7fae99598ff76e171b0e88fc2e6f88
AirshipCTLSettings are not used here, so it was removed.
Change-Id: If4bf64b9991b4ac05898632c79bacbacd7872635
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
* Use just the major part for the calico version for folder naming.
* For any minor uprades, it will be just reference updates within manifests.
* When moving to major version, then we will add a new folder with
that version naming (v4)
Change-Id: I1ee30af26c3030531ef719a3cb649fb999d0244c
The size of the metal3.io image has increased, and timeouts sometimes
occur within the 1000s range. This change enables overriding the wait
timeout for the initinfra phase on the ephemeral node and increases the
timeout to 2000s by default.
Change-Id: I11d7cdcfa0f7982c68cc7223f52ab20007bca69d
Signed-off-by: Drew Walters <andrew.walters@att.com>
In the case of using cloud VM for testing purposes,
the `apt update` command is missed in the gate script.
Change-Id: If6960c70aa98680f5362a13456eff05814140f40
* Substring replacement failing in ReplacementTranformer when
target substring contains periods (.)
* This is temporary fix till the kpt-function way of replacement
transformer is implemented
* In this fix it is assumed that the substring condition can only occur at
the end of the path.
example:
expected: replace the nginx version from 1.7.9 to 1.17.0 for container named
`nginx-tagged`
target condition:
spec.template.spec.containers[name=nginx-tagged].image%1.7.9%
Change-Id: I76fb65f69a6eedf3cbdd692d3bc1835a214dc8fa
Relates-To: #336
Closes: #336
This is a part of two activities
* Refactor config and store all parameters to document model
* Implement everything as phases (which are supposed to be purely document driven)
This patch removes bootstrapInfo section from the airshipctl config and
makes these to commands
* airshipctl baremetal isogen
* airthipctl baremetal remotedirect
to take necessary parameters from documents
We introduce two airship API kinds ImageGenerator and RemoteDirect.
Instead of storing config parameters in cm/secrets we use these two
API objects.
Relates-To: #246
Closes: #254
Change-Id: I42903c45dce1c73da184c07277fec76fd88c700f
This will help on debugging and / or error messages which
will show what package and what line a message came from
This is pared down from what is currently being proposed for the UI
https://review.opendev.org/#/c/747473/
Change-Id: I68eb8b0141a8d56d5ea14aa623a25f9287ff1e75
This change adds a more informative error message in case of using airshipctl
with a Sushy emulator.
In the current implementation, by executing `airshipctl baremetal powerstatus`
command with invalid BMH configuration for example, returns:
redfish client encountered an error: BMC responded '500 INTERNAL SERVER ERROR'.
After this change the output looks like this:
redfish client encountered an error: BMC responded '500 INTERNAL SERVER ERROR'.
BMC responded: 'Error finding domain by name/UUID "air-ephemeral1" at libvirt
URI qemu:///system": Domain not found: no domain with matching name 'air-ephemeral1''
In case of using airshipctl with baremetal BMC, extendedInfo contains a valid
error message, so there are no issues.
Relates-To: #320
Change-Id: I437f50d5df4b0561f352804f269b0319badcc755
As part of config refactoring process, we have to prepare root
level command to future changes, optimize function signatures
and its logic.
Change-Id: I563a7556ce1cca795a74cf2c6a26380467a15a5d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
As part of config refactoring process, it makes sense to
remove Debug field of AirshipCTLSettings and use log module
method as source of truth about current log level.
Change-Id: I42e3a9fd3b4e2778c71278f98a0d168421dfd2fb
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
* Deploy Calico to ephemeral and target via function
* Removed the condition to check node ready status in
25_deploy_ephemeral_node.sh and 30_deploy_controlplane.sh.
As calico is applied at a later stage, relaxed the dependency to wait
for node ready status.
* updated compoiste/infra for calico manifest
Change-Id: Id582aec3ca402eac02d9baa2305b562c410c1bea
Relates-To: #303
Relates-To: #304
Add new function to extract kubeconfig from a document bundle.
This is a small step to start using kubeconfig from the document bundle.
Closes: #264
Change-Id: Ib601c2212b901da76a2df14e73058cd3a77d1f98
Kubernetes was uplifted to v1.18.6 uplifting kubectl to the same
version.
Change-Id: Id80a4ee169c06c1957c575ef98f87f6ad56c7947
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>