748 Commits

Author SHA1 Message Date
Zuul
8c378d186d Merge "Fix ironic inspector database schema creation" 2020-05-18 21:58:56 +00:00
Zuul
7276dd68d8 Merge "RT: add error handling for missing target docs" 2020-05-18 15:54:18 +00:00
Zuul
fde808c068 Merge "Validate config before document pull" 2020-05-16 07:14:07 +00:00
Matt McEuen
4e64e74b6f Add a setting for kustomize plugins
This adds an env var-driven configuration for the filesystem path
in which kustomize should expect its plugins (including airshipctl)
to be.  The value defaults to a subfolder off the `.airshipit` folder.

The config is persisted as a singleton rather than a member of
AirshipCTLSettings (or the Config) because
1. the settings object would have had to have been passed around
   a couple dozen additional files/functions,
2. it's reasonable to expect the plugin location to be consistent
   across threads in a multi-threaded, airshipctl-as-library context.

Settings_test.go was moved in to an environment_test package to avoid
a circular import dependency.

Change-Id: Icdd21bd3687ef42492e388af982d7b490af3eff3
2020-05-15 15:06:32 -05:00
Yasin, Siraj (SY495P)
007e36281e Validate config before document pull
* invoke EnsureComplete before document pull to make sure
  all expected sections (cluster, context, authinfo, currentcontext)
  of config are present

Change-Id: If2ef4611cddc6ae96797dc26675551ef81ca8768
Closes: #215
2020-05-14 14:56:00 -05:00
Alexander Noskov
aab8325af5 Fix default checkout options in Airshipctl config
`airshipctl config init` command, generates default Airshipctl config
with mutually exclusive checkout options.
This CR fixing config generation by setting the only branch.
The `commitHash` and `tag` remain empty as an example in config file..

Change-Id: I12ec9b713e8f6769ddbd5301e000ab0242ea8ff4
Closes: #233
2020-05-14 04:35:19 +00:00
Drew Walters
0d7dc4de24 Add automated CLI documentation
This change creates a tool that generates CLI documentation each time
`make update-golden` is executed.

Change-Id: I4bcdf299cd424f4cff1ecf6503822d304e9a3947
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-05-13 19:43:10 +00:00
Zuul
392ff6a88e Merge "Fix default Airshipctl config parameters" 2020-05-13 18:29:54 +00:00
Dmitry Ukov
44b2ffb081 Fix ironic inspector database schema creation
Initial schema is created during container building by rpm scripts.
Since db file path has changed we need to create schema explicitly

Change-Id: I13ef02fac31ad8ca01549efa5b44394bbd8016e1
2020-05-13 19:06:54 +04:00
Zuul
88dddbf5f2 Merge "Update stale README and reformat docs" 2020-05-13 09:55:25 +00:00
Alexander Noskov
84f2bc60c9 Fix default Airshipctl config parameters
Problems description:
Once we execute airshipctl config init, the default config in
~/.airship/config doesn't contain default values for:
currentContext: ~
clusters:
  default:
    clusterType:
      target:
        bootstrapInfo: ~
        managementConfiguration: ~
---
This PS set default values for Airshipctl config to use it
out of the box.

Closes: #234

Change-Id: I57449e678f19ab1c0e2212c38b01ea195f62aa44
2020-05-12 16:02:05 -05:00
Zuul
fc0b53d2b3 Merge "Use create schema instead of upgrade for ironic" 2020-05-12 18:09:46 +00:00
Zuul
63a4237705 Merge "Move config init and load from root cmd level" 2020-05-12 17:49:45 +00:00
Zuul
60ece21b96 Merge "Fix system power regressions" 2020-05-12 16:42:31 +00:00
Dmitry Ukov
e6d2bf9ecb Use create schema instead of upgrade for ironic
Ironic uses SQLite as database. SQLite does not support ALTER which is used
in alembic migration.

Change-Id: I3495f7eae9a9e22175052005314e82ab280bfdf2
Closes: #235
2020-05-12 20:41:40 +04:00
Zuul
528407edc7 Merge "Add pod log collecting role" 2020-05-12 16:10:18 +00:00
Zuul
cb4406b7c4 Merge "Moving update-github-issues from post to promote" 2020-05-12 16:00:33 +00:00
Dmitry Ukov
ea79cd6a71 Add pod log collecting role
Closes: #220
Change-Id: I5a4b682f8f4b94fa6827e6d304d07d825811916b
2020-05-12 18:08:03 +04:00
Zuul
b5dfde37e0 Merge "Add a prefix to the logger" 2020-05-12 11:18:55 +00:00
Zuul
de6ae03839 Merge "Fix Lint warnings: Missing comments for functions" 2020-05-12 11:13:58 +00:00
Zuul
a6addc3873 Merge "Ironic: Move to use sqllite rather than mariadb" 2020-05-12 00:52:13 +00:00
Matt McEuen
2e7224a7bf RT: add error handling for missing target docs
The ReplacementTransformer already checks for the error condition where
a replacement source doesn't match any of the input documents.
This change adds similar error handling for missing replacement
target documents, and tweaks the naming/messages to make it clear
which situation is encountered.

This will make it easier for manifest engineers to catch typos
in their RT rules, or documents that have failed to be kustomized in
or authored.

Change-Id: I0efbcfbc2952afae05e48b9ff8e0b3c67df7e7df
2020-05-11 17:45:34 -05:00
Yasin, Siraj (SY495P)
b93728ecf9 Moving update-github-issues from post to promote
* Moving update-github-issues from post pipeline to
   promote pipeline

 * post pipeline config has a modified trigger to use updated refset.
   Due to this the ref-url is opendev instead of review.opendev

 * When job is triggered using ref from opendev the zuul.message is not available.
   Even if we make zuul.message available for post jobs, it does not make sense to
   read the commit message from a merge commit.

Change-Id: I5b4385e3d784f8b6bd514450eb05db273f68a083
Relates-To: #196
2020-05-11 16:30:28 -05:00
Drew Walters
4017e9c221 Fix system power regressions
A change [0] recently merged that makes additional remote parameters
configurable; however, it changed the default wait value to two seconds
and made the wait value a duration in time between two nanoseconds.

This change restores the default wait value of thirty seconds and makes
the wait value representative of seconds again.

[0] https://review.opendev.org/717812

Change-Id: I9fad30d479419efe95fca7dc78154bfc3ca66697
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-05-11 20:33:50 +00:00
Zuul
320a0918f0 Merge "Write cli errors to stderr" 2020-05-11 20:07:10 +00:00
Zuul
8ea7b17212 Merge "Fix pull documents for non-master branch" 2020-05-11 20:02:14 +00:00
Matt McEuen
86f3b9ffc7 Write cli errors to stderr
This explicitly writes errors to stderr, for the benefit of the
document plugin subcommand.  This is needed so that errors are displayed
to end users of kustomize, and can be used to debug manifest issues.
When sent to stdout, the error message gets swallowed/hidden by kustomize.

Change-Id: I49b668e5e71fbe4662fe3aec7bad4ebccadebd64
2020-05-11 14:02:33 -05:00
Zuul
936b5639f5 Merge "Fix image push zuul job" 2020-05-11 16:14:11 +00:00
Drew Walters
771536304a Update stale README and reformat docs
This change updates the stale README and makes it the landing page of
our new documentation. This change also makes several formatting changes
to make our documentation fit the new docs.airshipit.org framework.

Lastly, some items from the original README have been updated for
accuracy and moved to a separate page of the documentation.

Change-Id: Iae898b36034640df4d35a430eb28fbda028f10dd
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-05-11 15:49:32 +00:00
Zuul
0802ff1470 Merge "Add pluralized aliases to config get commands" 2020-05-11 15:39:31 +00:00
Zuul
3fb7c774e7 Merge "Reusing apache-server instead of httpd" 2020-05-11 15:39:30 +00:00
Ruslan Aliev
bc90c4f39e Move config init and load from root cmd level
There are several commands which do not require to load config:
completion, help, secret, version. Hovewer, PersistentPreRun call
at root level forces airshipctl to load config anyway. Therefore,
we can observe unnecessary config load errors instead of actual result.
This patch moves config load to subcommand level where it is necessary.

Change-Id: I774a7d038c408e71688f7bf04f1cb87a2132a342
2020-05-09 01:51:09 -05:00
Alexander Noskov
753d8a456c Fix pull documents for non-master branch
By specifying any other branch rather than master in airshipctl config,
`airshipctl document pull` command failing with `reference not found`
error.
The resulted target dir, after execution, still pointing to master.
The idea of this change is to use checkout options during the clone
stage, so we will be clonning the specific branch.
Added debug log about cloning default(master) branch in case of
missing checkout options.
Enabled validation for incompatible parameters in checkout options.
Aligned unit tests with code changes.

Closes: #197
Change-Id: I50ac18289a8f02997d5b90c82f1688083cff8bf3
2020-05-09 01:22:54 -05:00
Sreejith Punnapuzha
ad71f4704b Fix image push zuul job
This commit changes airshipctl-publish-images role to upload images
to quay.io

Closes: #217
Change-Id: I67b3e07ddc170da6df7c34dce929356449863c10
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
2020-05-08 18:54:39 -05:00
Zuul
f334b45638 Merge "Make remote parameters configurable" 2020-05-08 22:01:18 +00:00
Zuul
93025dfadd Merge "Encoding secret data in airshipctl config files" 2020-05-08 21:05:28 +00:00
Zuul
6559b441fa Merge "Refactor error messages to look more pretty and consistent." 2020-05-08 20:47:49 +00:00
Zuul
4e0af74f46 Merge "Fixed document pull issue in gate script 21" 2020-05-08 20:47:48 +00:00
James Gu
301de51467 Fixed document pull issue in gate script 21
Changed systemwide-executable to run in local_src_dir because the script needs
to build airshipctl binary first, before doc pull command can be invoked and populate
the remote_work_dir. Changed the order of the roles to allow systemwide-executable
to run before test-config and pull-docs.

Change-Id: Ia47423d91cdfb2dbbf0259344daab1c7b8cd47f5
Signed-off-by: James Gu <james.gu@att.com>
2020-05-08 18:30:51 +00:00
Albin Vass
ee2b91efed Use in repo docker-install instead of install-docker from zuul-jobs
Change-Id: Id94ef7f5a0327aff5c184a85d11f457e0436630f
2020-05-08 18:59:00 +02:00
Zuul
cb1833c3b3 Merge "Replace venv with tox for documentation builds" 2020-05-08 16:50:03 +00:00
Drew Walters
f729fdd1a1 Replace venv with tox for documentation builds
OpenStack infra has created Zuul project templates that will enable us
to push our documentation to Read the Docs and the Airship website.
While adding a tox file to this project is not ideal, it appears to be
the only way to leverage these jobs at the moment.

This change adds a tox.ini file to airshipctl to build our documentation
and removes the venv solution. The Airship Working Committee will work
with the OpenStack infra team, if possible, to make the publish jobs
more flexible in the future and remove the tox.ini file.

Change-Id: I274cf69a7c79e0aad1d4c9b1decfaf5630f0b18f
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-05-08 15:47:41 +00:00
Sreejith Punnapuzha
0e3cd80edf Update credentials for publishing docker images
This Commit updated credentials for accessing quay.io to publish
docker images. Encrypted Secret was received from working committee.

Change-Id: Ibd503a8464a3abaf3c9e3e777b403c6731bffa0c
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
2020-05-08 10:28:09 -05:00
Yasin, Siraj (SY495P)
318895d89d Encoding secret data in airshipctl config files
* encoding while saving credentials in authInfo
* decoding while fethcing credentials from authInfo
* Credentials are found only in ~/.airship/kubeconfig, so did not find
  anything in ~/.airship/config to be encoded.

Change-Id: I13f3d49b2ad7ccd1388cabd015fe5a93be2c7b96
Closes: #155
2020-05-08 15:09:17 +00:00
Zuul
31b8b11f0f Merge "Add missing Zuul variables for doc promotion" 2020-05-08 14:22:59 +00:00
Vladislav Kuzmin
9c1724f6d8 Make remote parameters configurable
Remove constants and define these parameteres
in config file for remote configuration.

Closes: #138

Change-Id: Ib9250b8d39c01ef43a1262b62e4d37215481bc43
2020-05-08 17:23:59 +04:00
Drew Walters
671251de20 Add missing Zuul variables for doc promotion
A job our documentation promotion job inherits from is missing two
variables [0]. This change adds them.

[0] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/download-artifact/defaults/main.yaml#L2

Change-Id: Ice5cb9c0298c32dd873a1a153c9a4c201efcaa84
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-05-07 21:58:15 +00:00
Ruslan Aliev
90f80d55b9 Ensure map is initialized before assignment
Attempts to write to a nil map will cause a runtime panic,
since we don't have explicit checks whether the map is nil
or not - they were added with proper initialization using make.
Appropriate test configuration was added.

Change-Id: Ib50686de44b782fdc881bd4608dd74588fce93bd
Relates-To: #190
Closes: #190
2020-05-07 16:22:52 -05:00
Zuul
7d18489bc9 Merge "Add mutual exclusivity to manager host selectors" 2020-05-07 09:11:52 +00:00
Zuul
faf6ad8350 Merge "Skip variables substitution in clusterctl integration" 2020-05-07 07:40:02 +00:00