这是indexloc提供的服务,不要输入任何密码
Skip to content

This repo is part of the Hands-on preparation for the AWS Certified SysOps Administrator exam course at Cloud Academy

License

Notifications You must be signed in to change notification settings

jwsun-github/pizza-time

 
 

Repository files navigation

Certified SysOps Administrator for AWS

This repository is part of the SysOps Administrator — Associate Certification for AWS Learning Path

###Further material

Pizza Time!

###Run the dev environment (local)

You need to have Docker and docker compose installed and configured on your computer.

To download/clone the repo and in the project's folder type:

docker-compose build

That will build the container. Once it's done run the bellow command to start the DB container:

docker-compose up db -d

Now run these commands to configure the database and load the initial data:

docker-compose run web python manage.py migrate
docker-compose run web python manage.py loaddata initial_data

Now you are ready to run the app, to start the web server use this command:

docker-compose up

###Deploying to Elastic Beanstalk

Before starting you should have the AWS CLI and the EB CLI installed and configured in your machine:

pip install awscli
pip install awsebcli
aws configure
  • Create the RDS database
  • Create a new application on Elastic Beanstalk (EB)
  • Create a new environment inside the EB application, make sure that you will use Python 2.7
  • Download this repo
  • Change the Environment Variables in the django.config file
  • Open a terminal inside the the repo's folder
  • Type the bellow command to configure the EB environment in your repo and follow the wizard
eb init
  • Type the bellow commands to stage your changes and deploy the app to EB
git add .
eb deploy --staged

###Deploying API instances

Take a look at the install-pizza-time.sh script an make the needed changes in the Environment Variables to point to your database instance. Then use the script as the User Data script in your instances or Launch configuration.

###Angular app

The Angular files are available at the Frontend folder, make sure that you will change the variable called "$rootScope.APIURL" in the main.js file to point to your API endpoint.

About

This repo is part of the Hands-on preparation for the AWS Certified SysOps Administrator exam course at Cloud Academy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 43.7%
  • JavaScript 29.6%
  • Python 23.0%
  • Shell 2.5%
  • CSS 1.2%