-
-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #542 from dulajra/feature/aws
Feature/aws
- Loading branch information
Showing
5 changed files
with
761 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#Deploy Bass with AWS | ||
|
||
Bassa can be deployed completely on AWS using theses scripts. | ||
Can be used for both deployment and production. | ||
|
||
##Prerequisite | ||
AWS CLI is needed for CloudFormation Templates deployment. | ||
Install AWS CLI with following scipt. | ||
|
||
```bash | ||
bash scripts/aws/scripts/install_aws_linux.sh | ||
``` | ||
|
||
##Infrastructure | ||
Create required resources for deployment. | ||
|
||
###Create a ECS cluster | ||
Export following environment variables with appropriate values. | ||
`PROJECT_ROOT` should be the root path of your Bassa project folder. | ||
|
||
```bash | ||
export PROJECT_ROOT=. | ||
export STACK_NAME=ScoreLab-ECS-Cluster-NonProd | ||
``` | ||
|
||
Then run the following scripts. | ||
|
||
```bash | ||
bash ${PROJECT_ROOT}/scripts/aws/scripts/deploy_ecs.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash | ||
aws cloudformation create-stack --stack-name ${STACK_NAME} --template-body file://${PROJECT_ROOT}/scripts/aws/stacks/ecs_cluster/template.json --parameters file://${PROJECT_ROOT}/scripts/aws/stacks/ecs_cluster/environments/ecs-cluster-dev.json --capabilities CAPABILITY_IAM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
curl -O https://bootstrap.pypa.io/get-pip.py | ||
python get-pip.py --user | ||
export PATH=~/.local/bin:$PATH | ||
pip install awscli --upgrade --user | ||
aws --version |
18 changes: 18 additions & 0 deletions
18
scripts/aws/stacks/ecs_cluster/environments/ecs-cluster-dev.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"ParameterKey": "KeyName", | ||
"ParameterValue": "ScoreLab-KeyPair-NonProd" | ||
}, | ||
{ | ||
"ParameterKey": "InstanceType", | ||
"ParameterValue": "t2.micro" | ||
}, | ||
{ | ||
"ParameterKey": "VpcId", | ||
"ParameterValue": "vpc-83ced0f8" | ||
}, | ||
{ | ||
"ParameterKey": "SubnetId", | ||
"ParameterValue": "subnet-9d65b8fa,subnet-3a8ee870,subnet-829c058d" | ||
} | ||
] |
Oops, something went wrong.