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

Infrastructure as code #19

Closed
prince-chrismc opened this issue Oct 9, 2020 · 7 comments · Fixed by #70
Closed

Infrastructure as code #19

prince-chrismc opened this issue Oct 9, 2020 · 7 comments · Fixed by #70
Assignees
Labels
deployment This issue or pull request pertains to the means by which the application is published
Milestone

Comments

@prince-chrismc
Copy link
Owner

Automate the deployment process to AWS EC2 (or other) service

Perhaps a service like pulumi or codefresh could be beneficial

@prince-chrismc prince-chrismc added the enhancement Issue that adds a new feature label Oct 9, 2020
@prince-chrismc prince-chrismc added deployment This issue or pull request pertains to the means by which the application is published and removed enhancement Issue that adds a new feature labels Dec 11, 2020
@prince-chrismc
Copy link
Owner Author

Required #21

@prince-chrismc prince-chrismc self-assigned this Dec 12, 2020
@prince-chrismc
Copy link
Owner Author

prince-chrismc commented Dec 13, 2020

I really like pulumi in turns of it's flexibility and real code as infrastructure.

All three options are closely packed, the biggest difference is the capabilities of the DSL (codefresh and terraform) and width of the feature set (codefresh)

CodeFresh

is more than just deployments, it supports the entire CI/CD pipeline which is great for new projects but my intention is to sink or swim with GitHub Actions. The second strike was it's restricted to YAML which is limit in the extensibility (no example of security group permissions for AWS).

Terraform

Super competitive, it was first to really take off for a reason, the example and documentation made it very easy to understand it structure... but it was all costume DSL pseudo-JSON like. It does support "variables" but they were an afterthought and it's entirely static config. The strike ❌ was that everything needed to be exact for one instance, In order to have a second instance category would take a second nearly duplicated *.tf (I am sure there's a better way I just did not find it)

Pulumi

Code should be code not mark-up. The programmatic approach truly free the DevOps. There seem to be the hefty community which drives each of the six languages supported. Most interestingly TypeScript and Go. There are a ton of examples and the documentation is a delight.

@prince-chrismc
Copy link
Owner Author

prince-chrismc commented Dec 13, 2020

Getting starting with Pulumi/Go totalled ~3.5hrs which blows my mind this use to take teams days to do. Times have changed.

There's POC prove that it's possible to meet the needs of this project

  • deploy pre-built image for a non-default docker registry!

https://github.com/prince-chrismc/Hello-Go
https://github.com/prince-chrismc/Hello-Pulumi

@prince-chrismc
Copy link
Owner Author

prince-chrismc commented Jan 20, 2021

Revisiting this now that the image size has been greatly reduced... https://www.pulumi.com/docs/tutorials/aws/ec2-webserver/

Most likely opting for the TypeScript since the code will be much lighter and the support is better!

❓ how can I reuse an existing EC2 instance

https://www.pulumi.com/docs/reference/pkg/aws/ec2/instance/#look-up

https://www.pulumi.com/docs/reference/pkg/aws/ec2/instance/#import

https://www.pulumi.com/docs/guides/adopting/import/#pulumi-import-resource-operation

@prince-chrismc
Copy link
Owner Author

https://github.com/pulumi/examples/blob/76cdb38ad9c1e6b632910eaadb38263f80f9015b/aws-ts-voting-app/index.ts

The challenge is the the backend is using self-signed certificate which the ELB complains about

prince-chrismc added a commit that referenced this issue Jan 29, 2021
This is to make #19 easier on a public cloud where TLS requires proper certificates

Noted prince-chrismc/Hello-Pulumi#2 (comment)
prince-chrismc added a commit that referenced this issue Jan 29, 2021
This is to make #19 easier on a public cloud where TLS requires proper certificates

Noted prince-chrismc/Hello-Pulumi#2 (comment)

* add missing docker kill between tests

* split command and entrypoint

* follow syntax for bcp

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment This issue or pull request pertains to the means by which the application is published
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant