National-Parks Habitat Demo
Build a map of all the United States national parks using Habitat! Build, deploy, and manage the application to any cloud, virtual machine, or container.
With this demo, you'll discover the magical space-cats living inside of Habitat, and learn the power of packaging, shipping, and updating applications in one atomic format.
You can build the application by simply installing Habitat on your workstation and using the Habitat Studio.
- Clone the repo.
hab studio enter
Watch as the application builds! It should take a few minutes.
If you're showing this as a demo to others, this is a good time to talk about the plan.sh and show how it relates to the build process.
Export to Docker
Ready to see what the app looks like on your local workstation with Docker?
Inside the Studio, run:
- hab pkg export docker path/to/build.hart
Now you'll have a Docker container on your local workstation.
- Modify national-parks/docker-compose.yml to match your origin.
national-parks: image: myorigin/national-parks
Browse to http://localhost:8081/national-parks to see the app.
Let's show the app in AWS using Terraform!
national-parks/terraform/awsdirectory. An example is provided for you at
terraform apply -auto-approve
Browse to the URL output by Terraform for you.
Update the app
Let's update the appliation with some brand new colors to make a new version.
src/main/webapp/index.htmlby replacing it with the contents of
index.html.new. You can revert and show a rollback too, by using
Rebuild the app in the Habitat Studio.
Re-export the container, or upload the new package to builder.