Skip to content

Conversation

@abhimanyu003
Copy link
Contributor

@abhimanyu003 abhimanyu003 commented Apr 15, 2025

This is moved from
https://github.com/RSS-Engineering/undercloud-deploy-cli

All the steps on how to run are README as well.

How to run

  1. Export all these env
export UC_DEPLOY="<full_local_path_to_undercloud_deploy_repo>"
export DEPLOY_NAME="<cluster_name>"
export UC_DEPLOY_GIT_URL=git@github.com:RSS-Engineering/undercloud-deploy.git
export UC_DEPLOY_SSH_FILE=<path_to_ssh_private_key_file>
export DNS_ZONE=<cluster_name>.dev.undercloud.rackspace.net
export UC_DEPLOY_EMAIL="<your_email>"
export UC_AIO=yes
  1. go run *.go all
  2. go run *.go help

Note: go run *.go is only used during dev if you don't have binary locally, or like to test changes.

Copy link
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

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

Overall I think it covers what we've got and really shows the gaps of how we want to improve. Looking at this and the diff tool makes me think about some k8s integration for that and bringing it to this as another sub command.

@cardoe
Copy link
Contributor

cardoe commented Apr 16, 2025

Maybe a "goal" flow of this is...

# install understack

understack deploy init $DEPLOY_NAME # where it makes `pwd/$DEPLOY_NAME` and populates a directory structure?

A lot of those environment variables are a one time thing or not even needed if you're using a separate ArgoCD without baking it into your combined cluster.

Copy link
Collaborator

@skrobul skrobul left a comment

Choose a reason for hiding this comment

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

what do you think about removing the dependency on the kubeseal binary and using the package directly?

@cardoe
Copy link
Contributor

cardoe commented Apr 17, 2025

what do you think about removing the dependency on the kubeseal binary and using the package directly?

I honestly don't even want to have kubeseal a requirement but some step that prior to committing your secrets you do something with them.

@abhimanyu003
Copy link
Contributor Author

what do you think about removing the dependency on the kubeseal binary and using the package directly?

That is what I was thinking as well, I have to check how it's working as it's having lots of parameter.

@abhimanyu003 abhimanyu003 changed the title add: deploy-cli initial commit feat: deploy-cli initial commit Apr 22, 2025
@abhimanyu003 abhimanyu003 changed the title feat: deploy-cli initial commit feat: deploy-cli for scaffolding Apr 22, 2025
Copy link
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

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

These were still there from my prior review.

@cardoe
Copy link
Contributor

cardoe commented Apr 23, 2025

❯ go run *.go help
2025/04/23 10:00:13 WARN DNS_ZONE env not set for shell
exit status 1

I cannot see the help without having DNS_ZONE as an environment variable.

@cardoe
Copy link
Contributor

cardoe commented Apr 23, 2025

Maybe a "goal" flow of this is...

# install understack

understack deploy init $DEPLOY_NAME # where it makes `pwd/$DEPLOY_NAME` and populates a directory structure?

A lot of those environment variables are a one time thing or not even needed if you're using a separate ArgoCD without baking it into your combined cluster.

So I see the name is still the same. Not that understack is a good binary name but were you planning on changing that in a follow on?

Further I think requiring the env vars all the time (and the DNS_ZONE to even see help) isn't where we want to go. As I've played with this further I think we save some of these values.

understack deploy [--deploy-path $UC_DEPLOY] init $DEPLOY_NAME

Where --deploy-path defaults to the value of $UC_DEPLOY and lastly current working directory if unset entirely? It then creates a $DEPLOY_NAME directory and inside that directory we can create config.yaml with the contents...

---
name: $DEPLOY_NAME

Then we can have further operations to set dns_zone in that file. Then it can be used for all other commands?

This is an initial implementation of a tool to help create and manage
the life cycle of the deployment repository and the various deployment
environments. The documentation will be updated in the future to utilize
this tool.
@cardoe
Copy link
Contributor

cardoe commented Apr 28, 2025

So biggest review comment would be to have a more descriptive commit messages in the end.

Copy link
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

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

We'll iterate further in tree.

@cardoe cardoe added this pull request to the merge queue Apr 28, 2025
Merged via the queue into main with commit 8a6fe03 Apr 28, 2025
14 checks passed
@cardoe cardoe deleted the deploy-cli branch April 28, 2025 17:39
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.

4 participants