Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

More explanation about Travis and GCE configuration. #8

Open
woprrr opened this issue Jun 26, 2018 · 10 comments
Open

More explanation about Travis and GCE configuration. #8

woprrr opened this issue Jun 26, 2018 · 10 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@woprrr
Copy link

woprrr commented Jun 26, 2018

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 👍
`

  1. Install and login to the Travis CLI:
    $ gem install travis
    $ travis login
  2. Move your json private key to client_secrets.json
  3. Run:
    $ travis encrypt-file client_secrets.json --add
  4. 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 !

@tulik
Copy link
Owner

tulik commented Jul 18, 2018

@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 tulik mentioned this issue Jul 18, 2018
@woprrr
Copy link
Author

woprrr commented Jul 19, 2018

@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 !!

@tulik
Copy link
Owner

tulik commented Jul 19, 2018

Do you have encrypted_xxxxxxxxxxxx_iv and encrypted_xxxxxxxxxxxx_key set?
You need to set them and GCLOUD_PROJECT in

Travis > Settings > Environment Variables

@woprrr
Copy link
Author

woprrr commented Jul 19, 2018

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?

@tulik
Copy link
Owner

tulik commented Jul 19, 2018

Go to the Google Cloud Console Dashboard:

  1. Enable Google App Engine Admin API,
  2. Go to Credentials, click Add Credential and Service account key, click JSON.
  3. Save your JSON file into your GitHub project directory as client_secrets.json

Install Travis and encrypt JSON file:

  1. gem install travis
  2. travis login
  3. travis encrypt-file client_secrets.json --add

Then go to Travis website, select your project and:

  1. Click More options and look for Environment Variables,
  2. Add GCLOUD_PROJECT variable - it is your GCE project ID,
  3. Grab your variables names like - encrypted_xxxxxxxxxxx_key and encrypted_xxxxxxxxxxx_iv,
  4. 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.

@woprrr
Copy link
Author

woprrr commented Jul 20, 2018

@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 !!!

@tulik
Copy link
Owner

tulik commented Jul 20, 2018

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.

@woprrr
Copy link
Author

woprrr commented Jul 20, 2018

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

@tulik
Copy link
Owner

tulik commented Jul 28, 2018

@woprrr It's not super straightforward but you can see it works with your changes :)

@tulik
Copy link
Owner

tulik commented Aug 17, 2018

Ping @woprrr

@tulik tulik added the enhancement New feature or request label Oct 6, 2018
@tulik tulik added the question Further information is requested label Nov 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants