Welcome to Hotwing! This Express/Node js app hosts a REST API. We're going to deploy hotwing to an Amazon EKS Cluster using terraform automation.
- Terraform
- AWS Account
- AWS CLI
- Docker for local deployment using docker
Want to run hotwing locally in a docker container? This is espescially useful for rapid development.
docker build . -f ops/docker/dockerfile -t hotwing:dev
docker run -p 80:80 hotwing:dev
helm upgrade --install hotwing ops/helm/hotwing
kubectl port-forward services/hotwing 8080:80 -n default
- localhost:8080
If you're running Terraform from a windows host, there will be some edits to the module files required.
-
Modify the interpreter location
Example mod to
terraform\.terraform\modules\eks\variables.tf
:variable "wait_for_cluster_interpreter" { description = "Custom local-exec command line interpreter for the command to determining if the eks cluster is healthy." type = list(string) default = ["C:\\WINDOWS\\system32\\cmd.exe", "-c"] }
-
Modify Volume Type
Example mod to
terraform\.terraform\modules\eks\local.tf
root_volume_type = "gp2"
If you're ready to cleanup your environment, run this command. Terraform will destroy all the resources it's managing.
terraform destroy
//TODO
The easiest way to test hotwing is to naviate to the external-ip.You should see something like this:
But suppose you had many API endpoints to test, or you wanted to test API performance; manually testing in the browser isn't optimal. The easiest automated testing could be accomplished with cURL.
Example:
curl af5177e41ef1f4b42841138742cebce8-1348202060.us-east-1.elb.amazonaws.com