Commit Graph

164 Commits

Author SHA1 Message Date
Itxaka f00780b43d Push index directly to update gh-pages
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-31 11:11:30 +02:00
Itxaka 54847a76ce
Merge pull request #9 from rancher-sandbox/kind_improvements 2022-03-30 15:19:04 +02:00
Itxaka cdadf5439a
Merge branch 'main' into kind_improvements 2022-03-30 15:10:26 +02:00
Ettore Di Giacinto aeccc4588a
Merge pull request #8 from rancher-sandbox/e2e-enhancements
Allow to reuse the same cluster
2022-03-30 15:08:19 +02:00
David Cassany ec9f1a778e
Re-deploy operator with new provided ROS_CHART
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-30 14:55:57 +02:00
Ettore Di Giacinto 8578a8a0c4
Allow to reuse the same cluster
This is particularly useful for local iteration

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-30 13:55:11 +02:00
Itxaka e50a2ea933 Only run e2e tests on PR or merged to master
Otherwise it duplicates on PR

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-30 12:33:39 +02:00
Itxaka d5288fcc17 Some kind improvements
- Allow setting different image versions for kubernetes
 - Set a matrix for kubernetes version on CI
 - Use kubectl wait to wait for control panel to be ready
 - Set default kubernetes version to latest rancher ready (v1.22.7)

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-30 12:33:39 +02:00
Ettore Di Giacinto 1714830cc1
Merge pull request #7 from rancher-sandbox/e2e
Drop integration tests, add e2e tests with kind
2022-03-29 18:07:19 +02:00
Ettore Di Giacinto 0832fc3823
Move helpers to standalone lib
- Also add nginx as ingress as is more compliant to kind
- Move out some common code pieces
- Address points from review

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-29 17:58:57 +02:00
Ettore Di Giacinto c6fb200f8c
Drop integration tests, add e2e tests with kind
Fixes: https://github.com/rancher-sandbox/rancheros-operator/issues/2
Fixes: https://github.com/rancher-sandbox/rancheros-operator/issues/6

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-28 18:29:06 +02:00
Itxaka f99b5a703b
Merge pull request #5 from rancher-sandbox/helm-repo 2022-03-25 11:07:47 +01:00
Itxaka 1445636695 Remove the v prefix from the chart versions
Its not semver 2

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-25 09:16:32 +01:00
Itxaka b733f9f24a Auto push chart to gh-pages
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-25 09:16:32 +01:00
Itxaka 6441fa1a8a
Merge pull request #4 from rancher-sandbox/fix_release 2022-03-24 15:25:29 +01:00
Itxaka c60c1c6207 set the helm chart to a proper version
- also uses the--version and --appversion flags for helm
 - Sets the ROS_CHART properly

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 14:48:45 +01:00
Itxaka 6ef2ee06b8 Pass the chart name from one job to the other
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 14:48:44 +01:00
Itxaka bcbe339e38 Use the same binary name across
There was a mix of ros-operator and rancheros-operator.

This patch fixes it so its always rancheros-operator, even
changing the repos to have the full name so everything matches

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 13:41:54 +01:00
Itxaka 8a7aee326c Add .goreleaser.yaml config file
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 13:37:43 +01:00
Itxaka 2d80aeb3bd Keep the raw version on docker push
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 13:35:12 +01:00
Itxaka a24090235d
Merge pull request #3 from rancher-sandbox/test_PR_docker 2022-03-24 13:28:33 +01:00
Itxaka 005df2f7f2 Add labels to pushed images
Seems to fix an obscure bug that can happen when pushing:
https://github.com/docker/build-push-action/issues/452

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:32:44 +01:00
Itxaka 50372f60a0 Trigger integration tests on main branch
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:21:43 +01:00
Itxaka beabcc90ae Only push to cos-operator from a tagged release
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:12:37 +01:00
Itxaka a5275b3629 Fix unit-tests so they run and get coverage
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:09:01 +01:00
Itxaka ac71ea0222 Rename the jobs for easy identification
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:39:43 +01:00
Itxaka 115c6669a1 Use the docker actions for pushing
- Easier to set
 - Gets the tags correctly
 - Cleans up afterwards
 - USes gha cache for building

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:35:12 +01:00
Itxaka db3fc6d951 Fix sut test
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:24:25 +01:00
Itxaka 9f93860d4b Fix integration test
- Run it only under PRs for testing
 - The docker job is the one that pushes the images tot he proper repo
 - Integration will only push to the ros-operator-ci registry

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:04:26 +01:00
Itxaka 26684d1888 Drop everything not needed for ros-operator
- Drops everything not needed for ros-operator
 - New simple Dockerfile
 - New jobs based on ros-operator only
 - Remove uneeded tests
 - Remove dependency on os2 images for integration tests
 - Use gorelease to release ros-operator binaries
 - Use docker to push ci images to ros-operator-ci registry on PR
 - Use docker to push master/tag images to ros-operator registry
 - Build chart indepently
 - Have a null test CI job for future integration tests

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 09:47:18 +01:00
Ettore Di Giacinto b1331abb2a
Add upgradeContainerSpec to ManagedOS and update wrangler (#66)
* Allow to specify a upgradeContainerSpec on ManagedOS

https://github.com/rancher-sandbox/os2/issues/59

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Run go generate and update wrangler

Also pin golang.org/x/tools to latest, to workaround
https://github.com/golang/go/issues/37617

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Update docs

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Adapt to new wrangler signal context

9460166aed

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Fixup license headers

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-23 18:27:39 +01:00
Ettore Di Giacinto 3a40edec50
Add mtools to ros-image-build image (#65)
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-22 18:44:24 +01:00
Loic Devulder 933b58971e
CI: bootstrapping nodes with MachineRegistration (#56)
* ci: add installation test with Rancher
* ci: add auto-provisioning of the VM
* ci: install Rancher on GH runner
* ci: move rancher installation+configuration in scripts
* ci: define our own MachineRegistration
* ci: install generated RancherOS Operator chart
* ci: don't use default namespace for test cluster
* ci: add TPM device to VM
* ci: refactoring + add OS installation and config
* ci: use iPXE to install the OS
* ci: keep artifacts and cleanup at the end
* ci: use 'script -e -c` to simulate a TTY
* ci: add check on cluster creation
* ci: fix SERVER_ID
* ci: specify that RKE2 can be installed too
* ci: use container image on self-hosted runner
* ci: add missing packages in container
* ci: upload needed logs
* fix/ci: use quays.io and official repos
* fix/ci: '\n' is not needed when assigned to a var
* ci: move bootstrapping node test in tests folder
* ci: add 'make' package

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2022-03-21 17:13:30 +01:00
Ettore Di Giacinto f38d2ef0c7
ci: Split upload of testing artifacts (#57)
Upload iso, qcow, box and chart images individually so they can be
downloaded easier during development.

Fixes: #37

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-18 16:01:41 +01:00
Ettore Di Giacinto 018c029761
Drop cos-* references (#53)
* Drop cos-* references

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Bump cOS

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-17 12:01:39 +01:00
Ettore Di Giacinto 5bb91d21f7
Disable verify (#50)
* Disable mtree

Fixes: https://github.com/rancher-sandbox/os2/issues/49
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Add installation test suite

Move the installation setup for tests to leverage ros-installer and
reworks it to be run as a suite.

At the moment only covers installation with container images, but is a
setup that would work as well for other scenarios.

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Bump cOS

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Disable mirror override

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* fix: Set 0 size for max autogrow

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-14 14:11:51 +01:00
Ettore Di Giacinto 33c464f078
Do not require a container image or isoURL (#48)
* Do not require a container image or isoURL

During automated installation it was previously required to specify
either a containerImage or a isoUrl, but this is something we impose
ourselves, as elemental otherwise would install from the booting source.

Fixes: https://github.com/rancher-sandbox/cOS-toolkit/issues/1166

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Add simple unit test

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-10 18:51:43 +01:00
Itxaka 63eb85435a
Add reboot flag (#46) 2022-03-10 13:30:01 +01:00
Loic Devulder 1d2377b69a
docs: fix installation (#47)
`config_url` should be used instead of `configurl`.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2022-03-10 11:30:37 +01:00
Itxaka 649ad79a9d
Use ros-operator image for the ros-operator chart (#40) 2022-03-08 14:18:07 +01:00
Itxaka a7caaf1f87
Reduce framework image by copying only needed files (#39) 2022-03-04 21:07:44 +01:00
Itxaka 74bb3c5722
Do not nullify the extra data from the config (#36)
For some reason the installer was assuming that if you dont do an
automatic installation, your "extra data" from the config file should be
gone.

I do not understand why as automatic is not the same as providing a
config file with values which may have nothing to do with the
installation.

This patch removes the nulling of the extra data

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-04 15:30:01 +01:00
Ettore Di Giacinto b171993e27
Consume upstream cloud-init configs (#33)
* Consume upstream cloud-init configs

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Bump cOS

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* tests: Adapt to elemental-cli output changes

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-03 13:39:13 +01:00
Itxaka 9fed2edefc
Rework golangci-lint config and github CI (#34) 2022-03-03 09:16:03 +01:00
Itxaka e4da670f0c
Add containerImages as source (#32) 2022-03-02 13:26:42 +01:00
Ettore Di Giacinto db052a94a6
Merge pull request #27 from rancher-sandbox/get_cacert
Attach rancher ca-cert to sample cloud-init from ros-operator
2022-03-01 19:07:28 +01:00
Ettore Di Giacinto 20f07ba9db Attach rancher ca-cert to sample cloud-init from ros-operator
Fixes: https://github.com/rancher-sandbox/os2/issues/1
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-01 17:15:48 +01:00
Ettore Di Giacinto 7741733950
Merge pull request #23 from rancher-sandbox/emulated_tpm
Enable TPM emulation
2022-02-25 18:50:49 +01:00
Ettore Di Giacinto d496d96a02
Add openssl-devel
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-02-25 16:07:17 +01:00
Ettore Di Giacinto f830f7d19b
ci: run on GHA
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-02-25 16:07:17 +01:00