When I was first introduced to AWS in Fall of 2019, I was determined to setup some basic infrastructure. To better keep track of all the infrastructure I began brainstorming a potential application or namespace that I could use to label everything. I settled on PPVMIO which you can break down into three parts
- PP - my initials
- VM - virtual machine; I was initially worried about labeling EC2 instances
- IO - input/ouput, also a comain top level domain for tech companies
Eventually the set of characters become a moniker that I use frequently across the internet and across all of my various projects. I combine both my passions for art/design/music with my software engineer skills. From a creative perspective, my projects fall under the category of digital brutalism. From an engineering perspective, I build modern applications and use various tools to help me deploy and manage my projects in the cloud.
Below you'll find the true README instructions for my personal website ppvm.io
I hope you enjoy!
Note: this app uses dep
which has been deprecated.
- Clone the project into
$GOPATH/src
. Then run
dep ensure
- Then run the following command and it should magically work!
go run app.go
- To build the container
docker build -t <name of container> .
- You'll need to mount the aws folder into the container and pass an environment variable to load from the default aws config directory.
docker run -p 3000:3000 -v $HOME/.aws:/root/.aws -e AWS_SDK_LOAD_CONFIG=1 <name of container>
Link to docker image
Note: dockerhub no longer supports automated docker builds on pushes to github. To build a new image
docker build -t ppdocx/ppvmio:<VERSION TAG> .
and to push
docker push ppdocx/ppvmio:<VERSION TAG>
To deploy the new tag to the fargate cluster
- Navigate to the UI and create a new task revision.
- Scroll down to where the image name is and click on it
- Edit the image to have the proper tag and click
Update
- Click
Create
- Go back to the cluster and Update the service to have the new revision.
Note: you may have to stop the previous task before the new one will be allowed to run.
To refresh the cloudfront catche run
aws cloudfront create-invalidation --distribution-id E20PNAIG7SWPHU --paths "/*"
- Refactor to be a static frontend web application, too expensive to run as fargate
- Maybe use something like github actions to automate builds
- Figure out easy way to deploy new task to service