Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Add documentation about schema validation #978

Merged
merged 3 commits into from
Feb 28, 2023
Merged

Conversation

mauromorales
Copy link
Member

@mauromorales mauromorales commented Feb 28, 2023

This PR adds documentation about how to validate a cloud-config using the command line or web ui

sorry, there should have been a ticket for it, my bad

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
@netlify
Copy link

netlify bot commented Feb 28, 2023

Deploy Preview for kairos-io ready!

Name Link
🔨 Latest commit 69d6a7a
🔍 Latest deploy log https://app.netlify.com/sites/kairos-io/deploys/63fdcbb0f09a6500084e4792
😎 Deploy Preview https://deploy-preview-978--kairos-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@mauromorales mauromorales requested a review from a team February 28, 2023 08:58

{{% alert title="Note" %}}

Validation of configuration is available on Kairos [v1.6.0-rc1](https://github.com/kairos-io/kairos/releases/tag/v1.6.0-rc1) and later. If you're interested in the validation rules or want to build a tool based on it, you can access them online via `https://kairos.io/RELEASE/cloud-config.json` e.g. [v1.6.0 cloud-config.json](https://kairos.io/v1.6.0/cloud-config.json)
Copy link
Member Author

@mauromorales mauromorales Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link is waiting for #977 to be merged already merged, waiting for deployment to be finished

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Copy link
Member

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic! nice!

@mudler mudler merged commit cb2e7c0 into master Feb 28, 2023
@mudler mudler deleted the add-docs-on-validation branch February 28, 2023 09:43
jimmykarily pushed a commit that referenced this pull request Feb 28, 2023
📖 Add cloud-config.json for v1.6.0 (#977)

:docs: Add cloud-config.json for v1.6.0

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

:book: Add documentation about schema validation (#978)

* 📖 Add documentation for cloud config validation

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add image

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Move image to static dir

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

🐛 Backport dracut patch for ubuntu 20 iscsi (#979)

🔧 Use random free port for Spice display and SSH

When running the install test with qemu, the second test will
fail because the 2nd machine will fail to start.
The failure is cause because the port of the previous machine is
still not freed.
Hence, let the install-test use a differnet random port if not
specified.
`GetFreePorts` copied from `kairos-io/kcrypt-challenger`.
Credits @jimmykarily.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Update peg and use new VM interface

This enables creating mulitple VMs in parallel
as done in kairos-io/kcrypt-challenger.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Handle possible collision of spice and SSH ports

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Migrate all tests to new PEG API

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Remove one more reference to old API.

Replace Machine.SendFile with vm.Scp

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Try and fix bundle_tests

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Temporarily disable many flavours

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Bump peg and fix code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Remove unecessary output and fix test issues

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Make sure we install before we start checking things.

It seems that we were relying on previous tests to do the installation
because we only had one "Machine".

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bump peg to better handle "Sudo", dedup tests

and make sure installation has happened before every check

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait until systemd service becomes active

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge multiple similar tests into one

because the big overhead comes from the BeforeEach block which is the
same in all tests. The tests themselves are just checking differnet
things on similar VMs. By merging them we same a lot of time in
preparing the same env again and again.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten "Machine"

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bring all flavors back

This partly reverts commit aa029c2.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge similar tests an uncomment code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix fogotten global Machine function

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait for systemd-sysext to do its thing

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten global Sudo and remove gatherLogs

which wasn't working anyway

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fixes after rebase

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix `source` not present in ubuntu/debian `/bin/sh`

and add debug output to failed test

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
jimmykarily pushed a commit that referenced this pull request Mar 1, 2023
📖 Add cloud-config.json for v1.6.0 (#977)

:docs: Add cloud-config.json for v1.6.0

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

:book: Add documentation about schema validation (#978)

* 📖 Add documentation for cloud config validation

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add image

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Move image to static dir

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

🐛 Backport dracut patch for ubuntu 20 iscsi (#979)

🔧 Use random free port for Spice display and SSH

When running the install test with qemu, the second test will
fail because the 2nd machine will fail to start.
The failure is cause because the port of the previous machine is
still not freed.
Hence, let the install-test use a differnet random port if not
specified.
`GetFreePorts` copied from `kairos-io/kcrypt-challenger`.
Credits @jimmykarily.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Update peg and use new VM interface

This enables creating mulitple VMs in parallel
as done in kairos-io/kcrypt-challenger.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Handle possible collision of spice and SSH ports

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Migrate all tests to new PEG API

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Remove one more reference to old API.

Replace Machine.SendFile with vm.Scp

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Try and fix bundle_tests

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Temporarily disable many flavours

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Bump peg and fix code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Remove unecessary output and fix test issues

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Make sure we install before we start checking things.

It seems that we were relying on previous tests to do the installation
because we only had one "Machine".

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bump peg to better handle "Sudo", dedup tests

and make sure installation has happened before every check

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait until systemd service becomes active

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge multiple similar tests into one

because the big overhead comes from the BeforeEach block which is the
same in all tests. The tests themselves are just checking differnet
things on similar VMs. By merging them we same a lot of time in
preparing the same env again and again.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten "Machine"

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bring all flavors back

This partly reverts commit aa029c2.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge similar tests an uncomment code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix fogotten global Machine function

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait for systemd-sysext to do its thing

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten global Sudo and remove gatherLogs

which wasn't working anyway

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fixes after rebase

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix `source` not present in ubuntu/debian `/bin/sh`

and add debug output to failed test

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
jimmykarily pushed a commit that referenced this pull request Mar 1, 2023
📖 Add cloud-config.json for v1.6.0 (#977)

:docs: Add cloud-config.json for v1.6.0

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

:book: Add documentation about schema validation (#978)

* 📖 Add documentation for cloud config validation

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add image

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Move image to static dir

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

🐛 Backport dracut patch for ubuntu 20 iscsi (#979)

🔧 Use random free port for Spice display and SSH

When running the install test with qemu, the second test will
fail because the 2nd machine will fail to start.
The failure is cause because the port of the previous machine is
still not freed.
Hence, let the install-test use a differnet random port if not
specified.
`GetFreePorts` copied from `kairos-io/kcrypt-challenger`.
Credits @jimmykarily.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Update peg and use new VM interface

This enables creating mulitple VMs in parallel
as done in kairos-io/kcrypt-challenger.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Handle possible collision of spice and SSH ports

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Migrate all tests to new PEG API

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Remove one more reference to old API.

Replace Machine.SendFile with vm.Scp

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Try and fix bundle_tests

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Temporarily disable many flavours

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Bump peg and fix code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Remove unecessary output and fix test issues

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Make sure we install before we start checking things.

It seems that we were relying on previous tests to do the installation
because we only had one "Machine".

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bump peg to better handle "Sudo", dedup tests

and make sure installation has happened before every check

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait until systemd service becomes active

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge multiple similar tests into one

because the big overhead comes from the BeforeEach block which is the
same in all tests. The tests themselves are just checking differnet
things on similar VMs. By merging them we same a lot of time in
preparing the same env again and again.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten "Machine"

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bring all flavors back

This partly reverts commit aa029c2.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge similar tests an uncomment code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix fogotten global Machine function

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait for systemd-sysext to do its thing

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten global Sudo and remove gatherLogs

which wasn't working anyway

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fixes after rebase

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix `source` not present in ubuntu/debian `/bin/sh`

and add debug output to failed test

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
mudler pushed a commit that referenced this pull request Mar 1, 2023
* Refactor tests to use the "VM" construct from peg

:book: Add cloud-config.json for v1.6.0 (#977)

:docs: Add cloud-config.json for v1.6.0

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

:book: Add documentation about schema validation (#978)

* 📖 Add documentation for cloud config validation

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add image

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Move image to static dir

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

🐛 Backport dracut patch for ubuntu 20 iscsi (#979)

🔧 Use random free port for Spice display and SSH

When running the install test with qemu, the second test will
fail because the 2nd machine will fail to start.
The failure is cause because the port of the previous machine is
still not freed.
Hence, let the install-test use a differnet random port if not
specified.
`GetFreePorts` copied from `kairos-io/kcrypt-challenger`.
Credits @jimmykarily.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Update peg and use new VM interface

This enables creating mulitple VMs in parallel
as done in kairos-io/kcrypt-challenger.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Handle possible collision of spice and SSH ports

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Migrate all tests to new PEG API

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Remove one more reference to old API.

Replace Machine.SendFile with vm.Scp

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Try and fix bundle_tests

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Temporarily disable many flavours

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Bump peg and fix code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Remove unecessary output and fix test issues

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Make sure we install before we start checking things.

It seems that we were relying on previous tests to do the installation
because we only had one "Machine".

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bump peg to better handle "Sudo", dedup tests

and make sure installation has happened before every check

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait until systemd service becomes active

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge multiple similar tests into one

because the big overhead comes from the BeforeEach block which is the
same in all tests. The tests themselves are just checking differnet
things on similar VMs. By merging them we same a lot of time in
preparing the same env again and again.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten "Machine"

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Bring all flavors back

This partly reverts commit aa029c2.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Merge similar tests an uncomment code

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix fogotten global Machine function

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Wait for systemd-sysext to do its thing

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix forgotten global Sudo and remove gatherLogs

which wasn't working anyway

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fixes after rebase

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Fix `source` not present in ubuntu/debian `/bin/sh`

and add debug output to failed test

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Bump peg to fix "read only filesystem" error in tests

spectrocloud/peg@50b63c0

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Use "." instead of "source" in vm's "/bin/sh"

because "source" is not recognised in debian based flavors

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Bump peg to fix vm.Sudo problems

and remove redundant check.

Now peg just pipes the ssh command without creating tmp scripts

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants