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

Create command-line arguments that control what things get installed in the Management Console #468

Closed
galenatjpl opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels

Comments

@galenatjpl
Copy link
Collaborator

galenatjpl commented Aug 28, 2024

The Management Console, get launched, starting from a chain of events, originating from the execution of this script:
https://github.com/unity-sds/unity-cs-infra/blob/main/nightly_tests/run.sh

See step 11 here, for context:
https://unity-sds.gitbook.io/docs/mdps-overview/project-onboarding-procedure

That run.sh script in turns calls
deploy.sh which in turn launches the CloudFormation stack.
The CloudFormation stack contains an EC2 instance (the Management Console EC2 server).
When the MC EC2 comes up, it results in bootstrap.go getting invoked:
backend/internal/processes/bootstrap.go

You will notice that a series of things are installed in there. For example:

	err = provisionS3(appconf)
	err = storeDefaultSSMParameters(appconf, store)
	err = initTerraform(store, appconf)
	err = installGateway(store, appconf)
	err = installHealthStatusLambda(store, appconf)
	err = installBasicAPIGateway(store, appconf)
	err = store.AddToAudit(application.Bootstrap_Successful, "test")

NOTE: Please coordinate with the implementor of this ticket:
#464
as the naming of the above functions might change slightly due to that ticket.

Some of these, but not all of them, are needed by end users.

So the goal of this ticket is to parameterize the run.sh script so that it can control what gets installed or not.

For example:

--project-name <PROJECT> --venue-name <VENUE> \
--installGateway true
--installHealthStatusLambda false
--installBasicAPIGateway false

There would be implicit defaults, so that if the user didn't specify something like --installGateway true, it would still install it. I think basically the default to all current things in the go code that get installed should be true.

The parameters need to be passed to the go code, of course, so that conditional if/else can be used to control what code gets run (or not). To do this, these params should probably be passed in the same area/way that some other params are. For example this is how we pass project_id:
https://github.com/unity-sds/unity-cs-infra/blob/main/nightly_tests/deploy.sh#L80

@galenatjpl galenatjpl converted this from a draft issue Aug 28, 2024
@galenatjpl
Copy link
Collaborator Author

We decided on a different approach to this ticket (#470), and I will close this ticket as this will be worked in #470 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants