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 support for Microshift in CI #759

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

vprashar2929
Copy link
Collaborator

@vprashar2929 vprashar2929 commented Jul 2, 2023

Since we have added support for having microshift as a cluster in the local-dev-cluster repo and updated the kepler-action as well This PR is in continuation to add support for running Kepler integration tests on microshift cluster.

Dependency:
There is an open PR in Kepler-action to update some recent changes done to local-dev-cluster repo.

CC: @SamYuan1990 @rootfs

@rootfs
Copy link
Contributor

rootfs commented Jul 3, 2023

@vprashar2929 new microshift integration test failed:

https://github.com/sustainable-computing-io/kepler/actions/runs/5437485041/jobs/9888072090?pr=759

+ for opt in ${DEPLOY_OPTIONS}
+ unset CI_DEPLOY
+ for opt in ${DEPLOY_OPTIONS}
+ unset OPENSHIFT_DEPLOY
+ echo 'Done ./hack/build-manifest.sh'
make[1]: Leaving directory '/home/runner/work/kepler/kepler'
Error response from daemon: No such container: microshift
make: *** [Makefile:263: cluster-sync] Error 1
Error: Process completed with exit code 2.

@vprashar2929
Copy link
Collaborator Author

Yes, currently it will fail as there is an open PR in Kepler-action for updating the logic. Once that is merged then CI will work fine

Copy link
Collaborator

@SamYuan1990 SamYuan1990 left a comment

Choose a reason for hiding this comment

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

I will suggestion as bump up version in another PR.
As split this PR into 2 parts.

  1. as adjust for logic, as add new verify.sh shell
  2. bump up version to add microshift support.

- name: use kepler action for kind cluster build
uses: sustainable-computing-io/kepler-action@v0.0.0
- name: use kepler action for cluster build
uses: sustainable-computing-io/kepler-action@main
Copy link
Collaborator

Choose a reason for hiding this comment

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

@rootfs, @vprashar2929 for dev branch, we should keep this to main, for release we should use a release branch. Hence before we bump up version for kepler-action and local-dev-cluster, we should keep it as v0.0.0 and keep this PR open for review.

Copy link
Collaborator

Choose a reason for hiding this comment

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

hence I will suggestion as bump up version in another PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure bumping up the version in another PR sounds good. Till that time I will keep it as v0.0.0

.github/workflows/integration_test.yml Show resolved Hide resolved
[ ! -d "${MANIFESTS_OUT_DIR}" ] && echo "Directory ${MANIFESTS_OUT_DIR} DOES NOT exists. Run make generate first."

if [ "$CLUSTER_PROVIDER" == "microshift" ]
then
kubectl label node --all sustainable-computing.io/kepler=''
Copy link
Collaborator

Choose a reason for hiding this comment

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

echo "download local-dev-cluster with version v0.0.0"
git clone -b v0.0.0 https://github.com/sustainable-computing-io/local-dev-cluster.git --depth=1
echo "download local-dev-cluster with latest version"
git clone https://github.com/sustainable-computing-io/local-dev-cluster.git --depth=1
Copy link
Collaborator

Choose a reason for hiding this comment

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

related with version bump up. Same comments here for version control.

@SamYuan1990
Copy link
Collaborator

to go with a new release or not for https://github.com/sustainable-computing-io/local-dev-cluster as k3s support
to go with a new release or not for sustainable-computing-io/kepler-action#50 as Prow support
@rootfs , @vprashar2929 , @jichenjc , @marceloamaral
I suppose we should have a vote as an agreement before we merge this PR.
and version bump up should also apply for helm and operator.
cc: @jiangphcn , @husky-parul

@vprashar2929
Copy link
Collaborator Author

One more thing I would like to add is when I was working on adding micro shift to CI I realized that building Kepler image takes more than 10GB of disk space(Dependent Images) on GH runner and we are using the same runner to create cluster, build image and deploy Kepler. Since the default disk size for GH runner is around 14GB. This make's difficult for the running cluster to run properly as I have seen the case where the cluster had to evict the running pods in order to reclaim the disk space because of NodeHasDiskPressure. To resolve this issue as of now I have added a step to stop the cluster build Kepler image push it to the local registry and then clean the images from the runner so that there is some disk space available and then restart the cluster. I am not a fan of this approach but I was thinking can we build the Kepler image on a separate runner upload it as an artifact and then download it on a different runner where we will launch our cluster and push it to the local registry. After that follow the normal process to deploy Kepler and trigger e2e tests?

@rootfs @SamYuan1990 @marceloamaral Any thoughts on this?

@rootfs
Copy link
Contributor

rootfs commented Jul 3, 2023

@vprashar2929 that sounds a good idea. Would you like to have multiple jobs, kind/microshift/and potentially k3s in different jobs? How about we divide the flow into image build and image test? The image build job builds and uploads kepler image artifacts and the image test steps download the image and run kind/microshift/k3s in their runners.

@vprashar2929
Copy link
Collaborator Author

Yes, @rootfs I am also thinking of the same flow to have a job that builds and uploads Kepler image artifacts and another which uses our Kepler-action to bring up kind/microshift/k3s clusters, deploy Kepler, and run e2e test's on it.

@rootfs
Copy link
Contributor

rootfs commented Jul 5, 2023

@SamYuan1990 is the request done?

@vprashar2929
Copy link
Collaborator Author

Incorporated review comments.🙂

@vprashar2929
Copy link
Collaborator Author

The current integration test will fail as I have reverted the bump up's in version for sustainable-computing-io/kepler-action. The v0.0.0 doesn't contain the functionality to launch microshift cluster.

@rootfs rootfs merged commit a94cee0 into sustainable-computing-io:main Jul 5, 2023
@rootfs
Copy link
Contributor

rootfs commented Jul 6, 2023

@vprashar2929 got a CI failure

image

@vprashar2929
Copy link
Collaborator Author

vprashar2929 commented Jul 6, 2023

Yes @rootfs the CI will fail as we using v0.0.0 version of sustainable-computing-io/kepler-action that don't contain Microshift deployment. Post bump up the CI failures will stop. I have a draft PR ready to bump up versions. Waiting for the new version bump on kepler-action.

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.

3 participants