symfony-4-docker-env
symfony-4-docker-env copied to clipboard
More explanation about Travis and GCE configuration.
Hi tulik,
I continue to use this part of helm/ and .travis files in my own project for API rest with DDD layers. But I really not understand how I do configure travis file and what variables we need to add ?
@see https://travis-ci.org/woprrr/SF4-Rest-API/jobs/396913196 an example of openssl error.
to generate my own client_secrets.json I have dowloaded from GCE project and encoded with travis encrypt-file client_secrets.json --add
command. The .travis file was updated with correct values (I think :D) but IV error ...
Can you add some docs or explain me how that works ?
I purpose to add anything like 👍 `
- Install and login to the Travis CLI: $ gem install travis $ travis login
- Move your json private key to client_secrets.json
- Run: $ travis encrypt-file client_secrets.json --add
- Commit changes: $ git add client_secrets.json.enc $ git commit client_secrets.json.enc .travis.yml `
But this seems not suffisent ... Thank a lot for your work !
@woprrr Have you manage to solve your issue already? Currently, I have little time to create a step by step instruction, but it's definitely in my todos.
If you already found a solution could you please contribute it? Both main and helm README files need an update.
@tulik Unfortunately, I tried many things without having a satisfactory result and that's why I came here to find more resources and explanation on how to do it?
I have for the moment let down and I deploy by hand but it is definitely in my todos to try to propose a doc on this subject too. If it is possible I want you to provide me with a resource to see how to proceed and I formalize it here for you with great pleasure !!
Do you have encrypted_xxxxxxxxxxxx_iv
and encrypted_xxxxxxxxxxxx_key
set?
You need to set them and GCLOUD_PROJECT
in
Travis > Settings > Environment Variables
No, I do follow this to generate it? https://github.com/alrra/travis-scripts/blob/master/docs/github-deploy-keys.md#26-set-up-ssh-connection-for-travis-ci
the GCLOUD_PROJECT that the name of GCE side right?
Go to the Google Cloud Console Dashboard:
- Enable Google App Engine Admin API,
- Go to Credentials, click Add Credential and Service account key, click JSON.
- Save your JSON file into your GitHub project directory as
client_secrets.json
Install Travis and encrypt JSON file:
-
gem install travis
-
travis login
-
travis encrypt-file client_secrets.json --add
Then go to Travis website, select your project and:
- Click More options and look for Environment Variables,
- Add
GCLOUD_PROJECT
variable - it is your GCE project ID, - Grab your variables names like -
encrypted_xxxxxxxxxxx_key
andencrypted_xxxxxxxxxxx_iv
, - In .travis.yml replace in
$encrypted_6797df738197_key
and$encrypted_6797df738197_iv
with your variables names.
Remove or move your client_secrets.json
(to be sure won't add to the git repository)
Hope it will help.
@tulik Oh wonderfull !!!! That works now !
will purpose the PR to add more doc in readme of how configure travis and GCE :) Thanks !! I'm a little curious about same thing on AWS now :D ?
In my test Fork for my projects (https://travis-ci.org/woprrr/symfony-4-skeleton-docker/jobs/406286386#L3165) the Travis failed in varnish step have you an idea of problems by the way :) ?
Thank you a lot !!!
Following command is failing:
The commnd "linux-amd64/helm del --purge $GCLOUD_PROJECT" exited with 1.
It errors because build script is missing check if release exists To make it work you can to create release manually or remove this line on a very first build.
It needs improvement. Sorry about that.
Oh ! I add this in my PR too.
Now it's equal as my local tests ...
https://travis-ci.org/woprrr/symfony-4-skeleton-docker/jobs/406336336#L3165
what's get pods errors during helm install
@woprrr It's not super straightforward but you can see it works with your changes :)
Ping @woprrr