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

EC2 Module - Review & Create "bare bones" option with minimum options. #5902

Closed
8 tasks
mikereiddigital opened this issue Jan 3, 2024 · 9 comments
Closed
8 tasks
Assignees

Comments

@mikereiddigital
Copy link
Contributor

User Story

As a platform engineer I need the ability to quickly spin up an ec2 instance with the minimum of options. The scope current ec2 module (https://github.com/ministryofjustice/modernisation-platform-terraform-ec2-instance) requires too much time to get up & running if all that is needed is an ec2, ebs, a security group and nothing else.

The output for this story would be:

  • A "bare bones" option added to the above module that can be extended easily by the module user.
  • Example code that can be reused easily.
  • A unit test that confirms the module works.

Value / Purpose

The current ec2 module's scope is too broad and so in the event that a basic ec2 is required, too much effort is needed to provide the locals with the potential for errors to occur that are unrelated to just the ec2 itself. Having this module option will allow member account uses to quickly spin up this infrastructure for prototyping and other proof-of-concept work.

Useful Contacts

mike.reid@digital.justice.gov.uk

Additional Information

No response

Proposal / Unknowns

Hypothesis If we... [do a thing] Then... [this will happ]

Proposal A proposal that is something testable, don't worry whether it works or not, it's a place for ideas.

Unknowns Potential pitfalls that could cause the story to expand beyond its original scope. Ideally this section will remain blank.

Definition of Done

  • New "bare bones" option for EC2 module added.
  • New example added.
  • Unit Test added
  • New module tested & confirmed as working.
  • README has been updated
  • User docs have been updated
  • Another team member has reviewed
  • Tests are green
@richgreen-moj
Copy link
Contributor

Could be worth considering this as part of it @mikereiddigital ministryofjustice/modernisation-platform-terraform-ec2-instance#44 ?

@mikereiddigital mikereiddigital moved this from To Do to In Progress in Modernisation Platform Feb 6, 2024
@davidkelliott
Copy link
Contributor

https://github.com/ministryofjustice/modernisation-platform-terraform-ec2-instance

@mikereiddigital
Copy link
Contributor Author

So just to confirm, the goal of this ticket is to create a bare-bones option of the above module which would make many of the necessary parameters optional, not create a new module that will require separate maintenance.

@mikereiddigital
Copy link
Contributor Author

Having spent some time reviewing the module, I've arrived at the view that what's needed is a complete example that contains just the bare minimum of input & change needed to build an ec2 using this module. That should achieve the original goal of making the module easier to use for testing & prototyping purposes.

@mikereiddigital
Copy link
Contributor Author

Cooker plan is clean with this PR - ministryofjustice/modernisation-platform-environments#5026

Branch is issue/5902.

Still further work required to tidy up, add documentation in comments & add better examples.

@mikereiddigital
Copy link
Contributor Author

mikereiddigital commented Feb 14, 2024

First build into cooker using works without error: https://github.com/ministryofjustice/modernisation-platform-environments/actions/runs/7902992992/job/21569914864

Further changes & additions:

  • Custom size for the root vol of the AMI.
  • Better userdata example - the current one uses ansible.
  • Delete-on-termination for non-root vols.
  • Tidy up labels & descriptions.
  • Another two test cycles.

@mikereiddigital
Copy link
Contributor Author

Latest update is now fully working & complete as an example. Have created PR to update the module's README - ministryofjustice/modernisation-platform-terraform-ec2-instance#311

@mikereiddigital
Copy link
Contributor Author

Latest PR now using example as the location to host the terraform. Note that an issue with the terraform provider using ModernisationPlatformSSOReadOnly which causes the plan to fail.

ministryofjustice/modernisation-platform-environments#5133

@mikereiddigital
Copy link
Contributor Author

PR approved & merged. Moving the ticket to done.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Modernisation Platform Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants