Skip to content

Feature/update demo deployment #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Mathieudewet
Copy link
Contributor

WIP - Please do not merge it.

@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch 8 times, most recently from 4956a6b to 38ddcc1 Compare July 10, 2018 16:12
Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I missed something, but uploading the .enc file in the repository looks like a big security issue to me.

You should:

  • Remove it immediatly
  • Revoke the related account
  • Store the credentials as a Travis secret too

.travis.yml Outdated
sudo: required

# TODO: Verify this upgrade still works.
php:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need PHP at all?

.travis.yml Outdated
php:
- 7.2

# Specify which branches to build using a safelist:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis must still be execute for all branches. The deployment for master only.

.travis.yml Outdated

# clone repositories to a depth of 1 commit
# Warning: Travis CI won’t build commits that are in the queue when pushing a new commit and depth set to 1.
git:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

.travis.yml Outdated
services:
- docker
- redis-server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

.travis.yml Outdated

cache:
yarn: true
directories:
- admin/node_modules
- client/node_modules
- api/vendor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

.travis.yml Outdated

script:
- docker-compose up -d
- linux-amd64/helm lint api/helm/api/
- sleep 20
- sh -c "cd admin && PUBLIC_URL="/api-demo-admin-test" yarn install && yarn build"
- sh -c "cd client && PUBLIC_URL="/api-demo-client-test" yarn install && yarn build"
- sh -c "cd admin && PUBLIC_URL="/api-demo-admin-test" yarn install --pure-lockfile && yarn build"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be run in the Docker image (while not mandatory, it will probably be faster outside of the container)

.travis.yml Outdated
- gcloud config set project api-platform-demo-209807
- mkdir -p ${HOME}/.kube
- cp ./kubeConfig ${HOME}/.kube/config
- curl -O https://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already installed

.travis.yml Outdated
- sudo mv linux-amd64/helm /usr/local/bin/helm
- gcloud container clusters get-credentials "api-platform-demo"
- helm init
- APP_ENV=prod composer install --no-scripts --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction --prefer-dist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, must be done in the Docker image directly

.travis.yml Outdated
--set secret=${APP_SECRET} \
--set postgresUser=${DATABASE_USER},postgresPassword="${DATABASE_PASSWORD}",postgresDatabase=${DATABASE_NAME} \
--set postgresql.persistence.enabled=true \
--set corsAllowOrigin='^https?://localhost(:[0-9]*)?$'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* to make the API available publicly

@@ -16,7 +16,7 @@ services:
volumes:
- ./api:/srv/api:rw,cached
# If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead
# - ./api/var:/srv/api/var:rw
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be reverted (people will run this project file on Mac)

@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch 3 times, most recently from a5e1cec to 325f0a7 Compare July 11, 2018 05:55
@Mathieudewet
Copy link
Contributor Author

From https://docs.travis-ci.com/user/encrypting-files/#Automated-Encryption

Make sure to add super_secret.txt.enc to the git repository. Make sure not to add super_secret.txt to the git repository. Commit all changes to your .travis.yml.

@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch 17 times, most recently from 2e32cb3 to 7edfb4d Compare July 12, 2018 10:51
@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch 4 times, most recently from 7c5dea4 to 538a9b2 Compare July 13, 2018 20:07
@jewome62 jewome62 mentioned this pull request Jul 20, 2018
@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch 3 times, most recently from d5602d8 to 07da825 Compare July 20, 2018 12:32
@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch from 07da825 to bb2ef04 Compare September 18, 2018 08:17
@Mathieudewet Mathieudewet force-pushed the feature/update-demo-deployment branch from bb2ef04 to a01058a Compare September 18, 2018 08:26
@dunglas dunglas merged commit 588b868 into api-platform:master Sep 18, 2018
@Mathieudewet Mathieudewet deleted the feature/update-demo-deployment branch October 1, 2018 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants