Skip to content

Instantly share code, notes, and snippets.

@jgmize jgmize/oregon-b.org
Created Jan 25, 2018

Embed
What would you like to do?
Oregon-b

bedrock

bedrock-dev

mkdir -p ~/tmp/bedrock-dev
cd ~/tmp/bedrock-dev
wget https://raw.githubusercontent.com/mozilla/bedrock/master/Procfile
DEIS_PROFILE=usw deis config:pull -a bedrock-dev
export DEIS_PROFILE=oregon-b
deis2 create bedrock-dev
deis2 config:push -a bedrock-dev
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=bedrock-dev-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a bedrock-dev

deis2 limits:set web=120M/300M -a bedrock-dev
deis2 limits:set web=250m/500m --cpu  -a bedrock-dev
deis2 limits:set clock=120M/300M -a bedrock-dev
deis2 limits:set clock=250m/500m --cpu  -a bedrock-dev
deis2 autoscale:set web --min=1 --max=3 --cpu-percent=80 -a bedrock-dev

deis2 pull mozorg/bedrock:master-f765106b1afd5963cccebaa8590be4d14bcee5b8 -a bedrock-dev
# TODO scale clock proc up *after* scaling down on usw
# deis2 scale clock=1 -a bedrock-dev

curl -I https://bedrock-dev.oregon-b.moz.works

bedrock-stage

mkdir -p ~/tmp/bedrock-stage
cd ~/tmp/bedrock-stage
wget https://raw.githubusercontent.com/mozilla/bedrock/master/Procfile
DEIS_PROFILE=usw deis config:pull -a bedrock-stage
export DEIS_PROFILE=oregon-b
deis2 create bedrock-stage
deis2 config:push -a bedrock-stage
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=bedrock-stage-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a bedrock-stage

deis2 limits:set web=300M/600M -a bedrock-stage
deis2 limits:set web=250m/1000m --cpu -a bedrock-stage
deis2 limits:set clock=300M/600M -a bedrock-stage
deis2 limits:set clock=250m/1000m --cpu -a bedrock-stage
deis2 autoscale:set web --min=5 --max=20 --cpu-percent=80 -a bedrock-stage

deis2 pull mozorg/bedrock:2018-01-22.1 -a bedrock-stage

curl -I https://bedrock-stage.oregon-b.moz.works

# TODO scale clock proc up *after* scaling down on usw
# deis2 scale clock=1 -a bedrock-stage

bedrock-prod

mkdir -p ~/tmp/bedrock-prod
cd ~/tmp/bedrock-prod
wget https://raw.githubusercontent.com/mozilla/bedrock/master/Procfile
DEIS_PROFILE=usw deis config:pull -a bedrock-prod
export DEIS_PROFILE=oregon-b
deis2 create bedrock-prod
deis2 config:push -a bedrock-prod
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=bedrock-prod-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a bedrock-prod

deis2 limits:set web=300M/600M -a bedrock-prod
deis2 limits:set web=250m/1000m --cpu -a bedrock-prod
deis2 limits:set clock=300M/600M -a bedrock-prod
deis2 limits:set clock=250m/1000m --cpu -a bedrock-prod
deis2 autoscale:set web --min=5 --max=20 --cpu-percent=80 -a bedrock-prod

deis2 pull mozorg/bedrock:2018-01-22.1 -a bedrock-prod

curl -I https://bedrock-prod.oregon-b.moz.works

# TODO scale clock proc up *after* scaling down on usw
# deis2 scale clock=1 -a bedrock-prod

bedrock-demo-1

copy commands to comment in infra#704

basket

basket-dev

mkdir -p ~/tmp/basket-dev
cd ~/tmp/basket-dev
wget https://raw.githubusercontent.com/mozmeao/basket/master/Procfile
DEIS_PROFILE=usw deis config:pull -a basket-dev
export DEIS_PROFILE=oregon-b
deis2 create basket-dev --no-remote
deis2 config:push -a basket-dev
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=basket-dev-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a basket-dev
deis2 limits:set web=150M/300M -a basket-dev
deis2 limits:set web=100m/200m --cpu -a basket-dev
deis2 autoscale:set web --min=1 --max=3 --cpu-percent=80 -a basket-dev
deis2 pull mozmeao/basket:fa6f1617bff28f2bb3464cf5d26415aab652ddbc -a basket-dev
curl -I https://basket-dev.oregon-b.moz.works/news/

basket-stage

mkdir -p ~/tmp/basket-stage
cd ~/tmp/basket-stage
wget https://raw.githubusercontent.com/mozmeao/basket/master/Procfile
DEIS_PROFILE=usw deis config:pull -a basket-stage
export DEIS_PROFILE=oregon-b
deis2 create basket-stage --no-remote
deis2 config:push -a basket-stage
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=basket-stage-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a basket-stage
deis2 config:unset SECURE_SSL_REDIRECT -a basket-dev
deis2 limits:set web=300M/600M -a basket-stage
deis2 limits:set web=250m/1000m --cpu -a basket-stage
deis2 autoscale:set web --min=3 --max=3 --cpu-percent=80 -a basket-stage
deis2 pull mozmeao/basket:fa6f1617bff28f2bb3464cf5d26415aab652ddbc -a basket-stage
curl -I https://basket-stage.oregon-b.moz.works/news/

basket-admin-stage

mkdir -p ~/tmp/basket-admin-stage
cd ~/tmp/basket-admin-stage
wget https://raw.githubusercontent.com/mozmeao/basket/master/Procfile
DEIS_PROFILE=usw deis config:pull -a basket-admin-stage
export DEIS_PROFILE=oregon-b
deis2 create basket-admin-stage --no-remote
deis2 config:push -a basket-admin-stage
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=basket-admin-stage-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a basket-admin-stage
deis2 config:unset SECURE_SSL_REDIRECT -a basket-dev
deis2 limits:set web=300M/600M -a basket-admin-stage
deis2 limits:set web=250m/1000m --cpu -a basket-admin-stage
deis2 autoscale:set web --min=3 --max=3 --cpu-percent=80 -a basket-admin-stage
deis2 pull mozmeao/basket:fa6f1617bff28f2bb3464cf5d26415aab652ddbc -a basket-admin-stage
curl -I https://basket-admin-stage.oregon-b.moz.works/admin/login/

update admin redirect url in this and all reagions

  • basket-stage-admin.oregon-b.moz.works

basket-prod

mkdir -p ~/tmp/basket-prod
cd ~/tmp/basket-prod
wget https://raw.githubusercontent.com/mozmeao/basket/master/Procfile
DEIS_PROFILE=usw deis config:pull -a basket-prod
export DEIS_PROFILE=oregon-b
deis2 create basket-prod --no-remote
deis2 config:push -a basket-prod
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=basket-prod-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a basket-prod
deis2 config:unset SECURE_SSL_REDIRECT -a basket-dev
deis2 limits:set web=300M/600M -a basket-prod
deis2 limits:set web=250m/1000m --cpu -a basket-prod
deis2 autoscale:set web --min=5 --max=20 --cpu-percent=80 -a basket-prod
deis2 pull mozmeao/basket:fa6f1617bff28f2bb3464cf5d26415aab652ddbc -a basket-prod
curl -I https://basket-prod.oregon-b.moz.works/news/

basket-admin

mkdir -p ~/tmp/basket-admin
cd ~/tmp/basket-admin
wget https://raw.githubusercontent.com/mozmeao/basket/master/Procfile
DEIS_PROFILE=usw deis config:pull -a basket-admin
export DEIS_PROFILE=oregon-b
deis2 create basket-admin --no-remote
deis2 config:push -a basket-admin
deis2 config:set HTTPS=on NEW_RELIC_APP_NAME=basket-admin-oregon-b DEIS_DOMAIN=oregon-b.moz.works -a basket-admin
deis2 config:unset SECURE_SSL_REDIRECT -a basket-dev
deis2 limits:set web=300M/600M -a basket-admin
deis2 limits:set web=250m/1000m --cpu -a basket-admin
deis2 autoscale:set web --min=3 --max=3 --cpu-percent=80 -a basket-admin
deis2 pull mozmeao/basket:fa6f1617bff28f2bb3464cf5d26415aab652ddbc -a basket-admin
curl -I https://basket-admin.oregon-b.moz.works/admin/login/

update admin redirect url in this and all reagions

  • basket-admin.oregon-b.moz.works

copy commands to comment in infra#?

lookup issue #

autoscaler

error repeated in log

Failed to update node registry: AccessDenied: User: arn:aws:sts::236517346949:assumed-role/nodes.oregon-b.moz.works/i-0f98ff2ab224d4a50 is not authorized to perform: autoscaling:DescribeAutoScalingGroups status code: 403, request id: 042cc248-0155-11e8-9ada-1f118339adb4*

fix IAM policy

careers

careers-stage

mkdir -p ~/tmp/careers-stage
cd ~/tmp/careers-stage
wget https://raw.githubusercontent.com/mozmeao/lumbergh/master/Procfile
DEIS_PROFILE=usw deis config:pull -a careers-stage
export DEIS_PROFILE=oregon-b
deis2 create careers-stage
deis2 config:push -a careers-stage
deis2 config:set SECURE_SSL_REDIRECT=False NEW_RELIC_APP_NAME=careers-stage-oregon-b DEIS_DOMAIN=oregon-b.moz.works ALLOWED_HOSTS=\* -a careers-stage
deis2 limits:set web=128M/150M -a careers-stage
deis2 limits:set web=100m/200m --cpu -a careers-stage
deis2 autoscale:set web --min=2 --max=5 --cpu-percent=80 -a careers-stage
deis2 pull mozorg/lumbergh:d5f655 -a careers-stage
curl -I https://careers-stage.oregon-b.moz.works

careers-prod

mkdir -p ~/tmp/careers-prod
cd ~/tmp/careers-prod
wget https://raw.githubusercontent.com/mozmeao/lumbergh/master/Procfile
DEIS_PROFILE=usw deis config:pull -a careers-prod
export DEIS_PROFILE=oregon-b
deis2 create careers-prod
deis2 config:push -a careers-prod
deis2 config:set SECURE_SSL_REDIRECT=False NEW_RELIC_APP_NAME=careers-prod-oregon-b DEIS_DOMAIN=oregon-b.moz.works ALLOWED_HOSTS=\* -a careers-prod
deis2 limits:set web=128M/150M -a careers-prod
deis2 limits:set web=100m/200m --cpu -a careers-prod
deis2 autoscale:set web --min=2 --max=5 --cpu-percent=80 -a careers-prod
deis2 pull mozorg/lumbergh:d5f655 -a careers-prod
curl -I https://careers-prod.oregon-b.moz.works

snippets

snippets-stage

mkdir -p ~/tmp/snippets-stage
cd ~/tmp/snippets-stage
wget https://raw.githubusercontent.com/mozmeao/snippets-service/master/Procfile
DEIS_PROFILE=usw deis config:pull -a snippets-stage
export DEIS_PROFILE=oregon-b
deis2 create snippets-stage
deis2 config:push -a snippets-stage
deis2 config:set SECURE_SSL_REDIRECT=False NEW_RELIC_APP_NAME=snippets-stage-oregon-b DEIS_DOMAIN=oregon-b.moz.works ALLOWED_HOSTS=\* -a snippets-stage
deis2 limits:set web=300M/600M  -a snippets-stage
deis2 limits:set web=250m/1000m --cpu -a snippets-stage
deis2 autoscale:set web --min=3 --max=10 --cpu-percent=80 -a snippets-stage
deis2 pull mozorg/snippets:9d065e -a snippets-stage
curl -I https://snippets-stage.oregon-b.moz.works

snippets-prod

mkdir -p ~/tmp/snippets-prod
cd ~/tmp/snippets-prod
wget https://raw.githubusercontent.com/mozmeao/snippets-service/master/Procfile
DEIS_PROFILE=usw deis config:pull -a snippets-prod
export DEIS_PROFILE=oregon-b
deis2 create snippets-prod --no-remote
deis2 config:push -a snippets-prod
deis2 config:set SECURE_SSL_REDIRECT=False NEW_RELIC_APP_NAME=snippets-prod-oregon-b DEIS_DOMAIN=oregon-b.moz.works ALLOWED_HOSTS=\* -a snippets-prod
deis2 limits:set web=300M/600M  -a snippets-prod
deis2 limits:set web=250m/1000m --cpu -a snippets-prod
deis2 autoscale:set web --min=3 --max=10 --cpu-percent=80 -a snippets-prod
deis2 pull mozorg/snippets:9d065e -a snippets-prod
curl -I https://snippets-prod.oregon-b.moz.works

snippets-admin

mkdir -p ~/tmp/snippets-admin
cd ~/tmp/snippets-admin
wget https://raw.githubusercontent.com/mozmeao/snippets-service/master/Procfile
DEIS_PROFILE=usw deis config:pull -a snippets-admin
export DEIS_PROFILE=oregon-b
deis2 create snippets-admin --no-remote
deis2 config:push -a snippets-admin
deis2 config:set SECURE_SSL_REDIRECT=False NEW_RELIC_APP_NAME=snippets-admin-oregon-b DEIS_DOMAIN=oregon-b.moz.works ALLOWED_HOSTS=\* -a snippets-admin
deis2 limits:set web=300M/600M  -a snippets-admin
deis2 limits:set web=250m/1000m --cpu -a snippets-admin
deis2 autoscale:set web --min=3 --max=10 --cpu-percent=80 -a snippets-admin
deis2 pull mozorg/snippets:9d065e -a snippets-admin
curl -I https://snippets-admin.oregon-b.moz.works/admin/login/

snippets-stats

mkdir -p ~/tmp/snippets-stats
cd ~/tmp/snippets-stats
DEIS_PROFILE=usw deis config:pull -a snippets-stats
export DEIS_PROFILE=oregon-b
deis2 create snippets-stats --no-remote
deis2 config:push -a snippets-stats
deis2 limits:set cmd=128M/300M -a snippets-stats
deis2 limits:set cmd=50m/100m --cpu -a snippets-stats
deis2 autoscale:set cmd --min=3 --max=10 --cpu-percent=80 -a snippets-stats
deis2 pull mozmeao/snippets-stats:c8d9ab -a snippets-stats
curl -I https://snippets-stats.oregon-b.moz.works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.