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

Setup procedure for Jenkins #15

Open
2 tasks
timlinux opened this issue Jul 15, 2015 · 0 comments
Open
2 tasks

Setup procedure for Jenkins #15

timlinux opened this issue Jul 15, 2015 · 0 comments

Comments

@timlinux
Copy link
Contributor

This is the log of what I did:

# cat jenkins.inasafe.org-1.7.tar | docker import - jenkins.inasafe.org:1.7 
# vim /etc/nginx/sites-enabled/jenkins.inasafe.org.nginx.conf
mkdir /data/jenkins.inasafe.org
chgrp docker /data/jenkins.inasafe.org
chmod g+rwX /data/jenkins.inasafe.org
mkdir /data/jenkins.inasafe.org/logs
docker run -d --name=jenkins -u jenkins --restart=always -p 8080:8080 -e USER=jenkins -e JENKINS_HOME="/var/lib/jenkins" -v /data/jenkins.inasafe.org/logs:/var/log/jenkins -v /data/jenkins.inasafe.org/tmp:/tmp jenkins.inasafe.org:1.7 /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1 --logfile=/var/log/jenkins/jenkins.log

This is a functional nginx config (stored as /etc/nginx/sites-enabled/jenkins.inasafe.org.nginx.conf)

upstream inasafe-jenkins {
    server 127.0.0.1:8080;
}

server {

    # OTF gzip compression
    gzip on;
    gzip_min_length 860;
    gzip_comp_level 5;
    gzip_proxied expired no-cache no-store private auth;
    gzip_types text/plain application/xml application/x-javascript text/xml text/css application/json;
    gzip_disable "MSIE [1-6].(?!.*SV1)";

    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name jenkins.inasafe.org
    charset     utf-8;


    # This gives equivalent of proxypreservehost in apache
    proxy_set_header Host $host;
    # max upload size, adjust to taste
    client_max_body_size 15M;

    location / {
        proxy_pass http://inasafe-jenkins;
    }
}

There are two issues to resolve:

  • How to get the container image onto the server (a private repo on hub would be good)
  • When I spin up the container, it all loads fine etc, but jobs do not actually run
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

1 participant