Consider these instructions temporary or as a template for creating a Travis or other CI script. Ultimately, when the repo is tagged for a release steps like these should execute the CI steps to deploy a new version of the app.
- Create an api key in your IN THE ACCOUNT THAT IS HOSTING THE APP, not your personal account UNLESS you are the owner and save it somewhere as json
{ "name": "some-name", "description": "some description", "createdAt": "2020-07-10T22:54+0000", "apikey": "-LYxYYxxYYxxYxxx9xxY9x9xY9xxYYY9xxYY_xYxYxxL" }
- Install ibmcloud cli https://cloud.ibm.com/docs/cli?topic=cli-getting-started
- Install cloud foundry plugin
ibmcloud cf install
- Update plugins
ibmcloud plugin update
- Login to ibmcloud
ibmcloud login --apikey @~/projects/ibmcloud-apikey.json
ibmcloud target -g cfc-team-fivefifths -o cfc-team-external-apps -s cfc-fivefifths-space --cf-api https://api.us-south.cf.cloud.ibm.com
cd services
yarn deploy
cd ../ui
yarn deploy
The current election for use with the Google Civic API is set as an environment variable on the services layer. Set the deployed app runtime for the current value.
NODE_CIVIC_ELECTION_ID=7000
It does not appear that user provided services can be edited in the cloud website UI. The user services are created like this:
ibmcloud cf cups five-fifths-twitter -p '{"apikey": "xyz123", "secretkey": "abc123", "access_token": "ABC999", "access_token_secret": "QWE888" }'
ibmcloud cf cups "Five Fifths Google Civic API" -p '{"apikey": "xyz123" }'
They can be edited from the command line with the ibmcloud cf uups
command this this
ibmcloud cf uups "Five Fifths Google Civic API" -p '{"apikey": "bbb000" }'
ic cf restart fivefifthsvoter-services
The google map API key is set at build time so there is not a user provide service yet for this. This key should be added to a CI workflow to automatically build the app.