Skip to content

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

Closed
@galenatjpl

Description

@galenatjpl

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions