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 config files for automated Jenkins setup #5

Merged
merged 9 commits into from
Jan 22, 2022
Merged

Conversation

brianherrera
Copy link
Contributor

Adding config files that will be used to automatically setup Jenkins and prevent users from having manually set configs after startup.

The changes in this PR are targeted for customers that will consume the pipeline. This adds a main jenkins.yaml file that stores the recommended default settings to run the pipeline and template files for optional settings. A follow up PR will have the O3DE specific settings that will be stored in another branch (e.g. o3de-prod).

Also added a relevant section to the README.

I tested the settings locally in docker to validate the config formats.

@brianherrera brianherrera requested review from amzn-changml and a team January 21, 2022 23:19
clouds:
- amazonEC2:
# Example: cloud setup in us-west-2
cloudName: "<name>"
Copy link
Contributor

Choose a reason for hiding this comment

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

These<value> entries are not pulled from environment, right? It's for the user to replace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, these can simply be replaced.

Copy link
Contributor

Choose a reason for hiding this comment

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

Might make it more clear to denote that in the comments, so that someone consuming this doesn't miss something

Choose a reason for hiding this comment

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

would be great if these end up later on being some wizard that asks for the values and replaces them (generating the files)
May need some more easier to identify format for them
Should be fine for the mean time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I can create a script that converts these templates to .yaml files and prompts the user for the required values.

Copy link
Contributor

@amzn-changml amzn-changml Jan 22, 2022

Choose a reason for hiding this comment

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

Yeah, agree, as a first pass, this is fine. End goal is to have a generator replace everything from a config file or pull from some secure parameter store (probably something like Jinja can do).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created this issue to track: #6

artifactManager:
artifactManagerFactories:
- jclouds:
provider: "s3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Newline at end of file. Couple other files are missing this as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, will fix.

globalNodeProperties:
- envVars:
env:
- key: "<key1>"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe put in some required parameters here? For instance, I see that JENKINS_URL and JENKINS_EMAIL_ADDRESS see to be values that are picked from envVars?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The url and email address are set in jenkins.yaml. I can look at our current env var set and see if there are values that are require to run the pipe.

- "Overall/Read:<user/group>"
- "View/Read:<user/group>"
# Example: grant additional admin permissions
- "Overall/Administer::<user/group>"
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't failing to set this properly cause the instance to be inaccessible? If so, probably want to at least set a default user

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These permissions are optional. The default admin is set in jenkins.yaml.

# Example: cloud setup in us-west-2
cloudName: "<name>"
instanceCapStr: "100" # A cap can also be set for each AMI config.
region: "us-west-2"
Copy link
Contributor

@amzn-changml amzn-changml Jan 22, 2022

Choose a reason for hiding this comment

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

Maybe turn region: into a variable, which can also be referenced in zone:?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add a default region env var. If multiple regions are required a user can just add them there.

@brianherrera brianherrera merged commit d4ca7d5 into main Jan 22, 2022
@brianherrera brianherrera deleted the add-config-files branch January 22, 2022 01:23
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