March 27th, 2017
ERRATA: Pushing config to origin may require the --force switch due to a bug in the crc check.
Nuke all ec2's except NAT and api-router.
Add dg-superkaiju tier, deployables, product and tenant:
dconf tier add DEVEAST --is-dev
dconf deployable register all --tier DEVEAST
dconf organization add directivegames dg
dconf product add dg-superkaiju
dconf tenant add dg-superkaiju-deveast dg-superkaiju
# call drift-admin deployable register. it's a work in progress...
drift-admin --tier DEVEAST --config dgnorth deployable register
driftconfig addtenant dgnorth -n dg-superkaiju-deveast -t DEVEAST -o directivegames -p dg-superkaiju -d drift-base
driftconfig push dgnorth
The config is missing the auto-filled entries for aws. This needs to be added manually until the provision logic is fully rigged.
domain.json:
"aws": {
"ami_baking_region": "eu-west-1"
},
...
tiers.json:
{
"tier_name": "DEVEAST",
"aws":
{
"region": "ap-southeast-1",
"ssh_key": "livenorth-key"
},
"celery_broker_url": "redis://redis.deveast.dg-api.com:6379/15",
"service_user":
{
"password": "SERVICE",
"username": "user+pass:$SERVICE$"
},
"resource_defaults": [
{
"parameters": {
"database": null,
"driver": "postgresql",
"password": "zzp_user",
"port": 5432,
"server": "postgres.deveast.dg-api.com",
"username": "zzp_user"
},
"resource_name": "postgres"
},
{
"parameters": {
"host": "redis.deveast.dg-api.com",
"port": 6379,
"socket_connect_timeout": 5,
"socket_timeout": 5
},
"resource_name": "redis"
},
{
"parameters": {
"build_bucket_url": ""
},
"resource_name": "gameserver"
},
{
"parameters": {
"allow_client_pin": false,
"repository": "",
"revision": ""
},
"resource_name": "staticdata"
}
],
...
}
authentication/public-keys.json:
...
{
"deployable_name": "drift-base",
"keys": [
{
"private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAu55QGUOfqE+3dc520TEBSvn99Hc/4V8qV7Q2zV2PU5PY0MtZ\nG6ly8mW/I6VRhLX7OH4QY9Cyn9rWwi7umhtqMh/Egjg4X+X0XphJxWNcOSNLKLxA\nvPoo1LsOJcBeNg1ZMU4PYKCmAbBODgkQvQM2wQ32MAWY8LJFwE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qS7zjWFxMCgYBT9Bdww/xJC6Jzz9Q9f4VZCHKPpXUHAY5KfTFW\nYWH1hNp3GzUgoQqSf4IQXXBnIMAfcvrO4adhEFgjZ4epIVHUlAdNwjvs1a5EnUoY\n94rqqTA5EvlcpL/Dnb8o+6I6M/Ry6xpRGjxf4JvEAJVr5IUEI1R8QLnUAv253yOB\nMCK3uQKBgQCQXl6GWEPTJccPfbsHTR8orHxDUoQ96AgaXyVVligKNdyxxmQGTfJL\nGCpdFZsutQmhjR8/x3hLyfgbFAJdhZYeLbRLCcv85LIpc9WZ+9oGbPepFlYsTWHI\n5XBWmUQGRs4PDqD+btKHsmM3Yi/W85gwGcO/YfjRUPQPfxGZG1m+WA==\n-----END RSA PRIVATE KEY-----",
"pub_rsa": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7nlAZQ5+oT7d1znbRMQFK+f30dz/hXypXtDbNXY9Tk9jQy1kbqXLyZb8jpVGEtfs4fhBj0LKf2tbCLu6aG2oyH8SCODhf5fRemEnFY1w5I0sovEC8+ijUuw4lwF42DVkxTg9goKYBsE4OCRC9AzbBDfYwBZjwskXAQ5h52mD6RqehDTaOPvh3lyeoB3KVsLiQU1M7lkJAvcddWajSPmWyqgLKJ00RqGlej7ZE6blpmXy2p8R5oP/5zi3GRwyzKWj+B0CWIU8tRlVTNtnPFg75FTgfp3aDD9vBSJv3afXOP3XNxzFnGW7L5byeH3gaMwaPHEMqm9qCaKooYMxmzMFT [email protected]"
}
],
"tier_name": "DEVEAST"
}
...
DUPLICATE ENTRY ABOVE FOR superkaiju-backend AS WELL!
deployables.json:
{
"deployable_name": "superkaiju-backend",
"is_active": true,
"jwt_trusted_issuers": [
{
"iss": "drift-base",
"pub_rsa": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7nlAZQ5+oT7d1znbRMQFK+f30dz/hXypXtDbNXY9Tk9jQy1kbqXLyZb8jpVGEtfs4fhBj0LKf2tbCLu6aG2oyH8SCODhf5fRemEnFY1w5I0sovEC8+ijUuw4lwF42DVkxTg9goKYBsE4OCRC9AzbBDfYwBZjwskXAQ5h52mD6RqehDTaOPvh3lyeoB3KVsLiQU1M7lkJAvcddWajSPmWyqgLKJ00RqGlej7ZE6blpmXy2p8R5oP/5zi3GRwyzKWj+B0CWIU8tRlVTNtnPFg75FTgfp3aDD9vBSJv3afXOP3XNxzFnGW7L5byeH3gaMwaPHEMqm9qCaKooYMxmzMFT [email protected]"
}
],
"tags": [
"core",
"product"
],
"tier_name": "DEVEAST"
},
Also had to make a new file in legacy auth config. See directive-tiers/tiers/DEVEAST/superkaiju-backend.json for more info.
Make a DNS entry for the tenant:
# In Route53 AWS console:
Name: dg-superkaiju-deveast.dg-api.com
Type: A record
Alias: dualstack.deveast-api-router-lb-auto2-625491317.ap-southeast-1.elb.amazonaws.com.
Run this on your local machine:
drift-admin --tier DEVEAST tenant dg-superkaiju-deveast create
In the drift-base folder:
drift-admin ami bake
drift-admin --tier DEVEAST ami run
All the files in drift-base/config copied over, renamed accordingly and the contents search-replaced for "drift-base" -> "superkaiju-backend".
Remember to copy and fix up ALL THE FILES!
The project was baked and run:
# Executed from superkaiju-backend root folder:
drift-admin --tier DEVEAST ami bake
drift-admin --tier DEVEAST ami run
The current api-router is using the old config mgmt. The json file in directive-tiers/tiers/DEVEAST.JSON was updated manually with this, and then published:
{
"name": "superkaiju-backend",
"api": "superkaiju",
"ssh_key": "deveast-key.pem"
},