Skip to content
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

Take into account proxies #19

Open
fvanderbiest opened this issue Oct 27, 2015 · 3 comments
Open

Take into account proxies #19

fvanderbiest opened this issue Oct 27, 2015 · 3 comments

Comments

@fvanderbiest
Copy link
Member

This can be a real blocker, as we experienced it recently with @jpklipfel and @gryckelynck ... but they told me they finally succeeded.

@fvanderbiest
Copy link
Member Author

@gryckelynck
Copy link

We managed to install georchestra with ansible (ouf!).
Landry, thanks a lot for ansible solution !
We work around the proxy problems (sometimes with a not very clean way).
Here is an excerpt of the error encountered and solution used (in French):

Pré-configuration
Les variables HTTP et HTTPS sont définies dans:

/etc/apt/apt.conf.d/proxy:
Acquire::http::Proxy "http://login:[email protected]:8080";
Acquire::ftp::Proxy "http://login:[email protected]:8080";

"/etc/wgetrc":
http_proxy = http://proxy.dom:8080/
https_proxy = http://proxy.dom:8080/
ftp_proxy = http://proxy.dom:8080/
proxy_user = login
proxy_password = motdepasse
use_proxy = on
wait = 15

"/etc/environment":
HTTP_PROXY="http://login:[email protected]:8080/";
HTTPS_PROXY="http://login:[email protected]:8080/";
FTP_PROXY="http://login:[email protected]:8080/";

Pour l'utilisateur root (cf. cidessous):
git config --global url."https://".insteadOf git://
git config --global http.sslverify false
git config --global http.proxy http://login:[email protected]:8080
git config --global https.proxy http://login:[email protected]:8080

Erreurs rencontrées

ERREUR: TASK: [openldap: installing dependencies]
L'erreur est visiblement liée au verrouillage du fichier APT. Pour contourner cette erreur, l'installation se passe avec l'utilisateur root.
L'utilisateur "georchestra" initialement utilisé dispose des droits sudo, mais ça ne suffit pas même avec déclaration d'un sudo_user: georchestra dans georchestra.yml.
Configuration des droits du user georchestra à étudier...

ERREUR: TASK: [postgresql: fetch db structure]
Erreur python. Port du proxy 8080 lu comme un str alors que integer attendu...
Désactiver momentanément le proxy dans /etc/environment et dans roles/postgresql/tasks/other_schemas.yml dans la partie 'fetch db structure' (line 1) forcer utilisation proxy en ajoutant:
environment:
http_proxy: http://login:[email protected]:8080
https_proxy: http://login:[email protected]:8080

ERREUR: TASK: [apache | clone htdocs dir]
msg: github.com has an unknown hostkey. Set accept_hostkey to True or manually add the hostkey prior to running the git module
Remplacer dans roles/apache/tasks/main.yml line 32: "git://" par "https://"
(l'option insteadOf de git ne passe pas ici???!!!).
L'utilisation de l'option accept_hostkey: yes ne sembla pas fonctionner (ou mal utilisée)

ERREUR: TASK: [georchestra | checkout geoserver datadir]
msg: fatal: unable to access 'https://github.com/georchestra/geoserver_minimal_datadir.git/': Failed to connect to github.com port 443: Connection refused
L'utilisateur tomcat8 ne passe pas le proxy pour se connecter à github. Nécessité de:

  • Permettre à tomcat8 de se logguer en modifiant dans /etc/passwd:

    tomcat8:x:108:114::/usr/share/tomcat8:/bin/false
    par
    tomcat8:x:108:114::/usr/share/tomcat8:/bin/bash

  • Modifier les droits sur le dossier du user tomcat8:

    chmod 777 /usr/share/tomcat8

  • Ajouter le proxy à github pour tomcat8:

    su tomcat8
    git config --global url."https://".insteadOf git://
    git config --global http.sslverify false
    git config --global http.proxy http://login:[email protected]:8080
    git config --global https.proxy http://login:[email protected]:8080

ERREUR: TASK: [georchestra | fetch libjpeg-turbo deb from sourceforge]
Problème pour passer le proxy lors du téléchargement de fichiers DEB.
nano roles/georchestra/tasks/nativelibs.yml
Ligne 26 ajouter:
environment:
http_proxy: http://login:[email protected]:8080
https_proxy: http://login:[email protected]:8080

@fvanderbiest
Copy link
Member Author

2 things IMO here:

  • proxies required at runtime (tomcat options) - medium priority (since one can always set them by hand a posteriori)
  • proxies required to run the playbook, fetch the packages, etc - low priority IMO

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

No branches or pull requests

2 participants