Skip to content

Commit

Permalink
Merge pull request #27 from WorldBank-Transport/fix/fixes
Browse files Browse the repository at this point in the history
Fix/fixes
  • Loading branch information
olafveerman authored Jan 8, 2019
2 parents c0b8c2c + d7413c5 commit 51d561d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .kes/cloudformation.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,14 @@ Resources:
{{/if}}
{{#unless this.envs.API}}
{{#if this.apiMachine}}
- Name: API
Value:
Fn::Join:
- ""
- - "http://"
- Fn::GetAtt:
- {{this.apiMachine}}EC2Instance
- PublicIp
- Name: API
Value:
Fn::Join:
- ""
- - "http://"
- Fn::GetAtt:
- {{this.apiMachine}}EC2Instance
- PublicIp
{{/if}}
{{/unless}}
{{# each this.envs}}
Expand Down
11 changes: 8 additions & 3 deletions .kes/kes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ class UpdatedKes extends Kes {
let apiAddress = output.find(o => o.OutputKey === 'apiIpAddress')['OutputValue']
let dbConnection = output.find(o => o.OutputKey === 'dbConnectionString')['OutputValue']

return console.log(
`The stack ${r.Stacks[0].StackName} is deployed or updated. The main components are available through:
return console.log(`
The stack ${r.Stacks[0].StackName} is deployed or updated. The main components are available through:
- frontend: ${frontendAddress}
- backend: ${apiAddress}
- db connection string: ${dbConnection}`
- db connection string: ${dbConnection}
Is this the first time setting up this stack? Run the following command to set up the database:
$ yarn setup ${dbConnection}
`
)
})
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ram-deployment",
"version": "1.0.1",
"version": "1.0.2",
"description": "RAM deployment with the CloudFormation",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion setup/structure.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function createWbCatalogResources (db) {
});
}

exports.setupStructure = function (db) {
function setupStructure (db) {
return dropScenariosFiles(db)
.then(() => dropProjectsFiles(db))
.then(() => dropResultsPoi(db))
Expand Down Expand Up @@ -346,3 +346,7 @@ exports.setupStructure = function (db) {
.then(() => createProjectsSourceData(db))
.then(() => createWbCatalogResources(db));
}

module.exports = {
setupStructure
};

0 comments on commit 51d561d

Please sign in to comment.