Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
schottsfired committed Sep 22, 2016
2 parents 72bb1f8 + ebc74b3 commit 5086b67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,21 @@ Important directories like Nginx logs, Jenkins home directories, etc. are volume

cd /var/jenkins_home/.ssh

cat id_rsa

cat id_rsa.pub

4. In CJOC, click "Credentials" and add your SSH private key
4. In CJOC, click "Credentials", select ``SSH Username with private key``. Enter ``jenkins`` as the username and select ``From the Jenkins master ~/.ssh`` for the Private key option.

5. In ``docker-compose.yml``, add your public key to the ``command:`` and restart the container:
5. In ``docker-compose.yml``, , under the ``ssh-slave `` service, replace the public key in the ``command:`` section with the one that was just generated and restart the container:

docker-compose restart ssh-slave

6. Create a Shared Slave item in CJOC (named e.g. ``shared-ssh-agent``), using the credentials above, host: ``ssh-slave``, and a Remote FS root of ``/home/jenkins``. Give it some labels, like ``shared``, ``ssh``, ``docker``, ``docker-cloud``

## Connect JNLP Shared Agent

1. Add a Shared Cloud item in CJOC (named e.g. `` shared-cloud ``). Remote FS root is ``/home/jenkins``. Give it some labels, like ``shared``, ``jnlp``, ``java-build-tools``, ``docker``, ``docker-cloud``
1. Add a Shared Cloud item in CJOC (named e.g. `` shared-cloud ``). Remote FS root is ``/home/jenkins``. Give it some labels, like ``shared``, ``jnlp``, ``java-build-tools``, ``docker``, ``docker-cloud`` and click Save. You should now be taken to a screen that displays the slave command to run.

2. In your `` docker-compose.yml `` file, under the `` jnlp-slave `` service, update `` command: `` with the on-screen instructions.
2. In your `` docker-compose.yml `` file, under the `` jnlp-slave `` service, update `` command: `` with the secret that is displayed in the slave command.

3. Start the JNLP agent (and watch it add itself to the shared-cloud):

Expand Down
17 changes: 0 additions & 17 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,6 @@ http {
proxy_temp_file_write_size 64k;
}
}

server {
listen 80;

server_name gameoflife.cjp.local www.gameoflife.cjp.local;

access_log /var/log/nginx/gameoflife_example_com_access.log;
error_log /var/log/nginx/gameoflife_example_com_error.log;

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;

location / {
proxy_pass http://gameoflife:8080;
}
}
}

stream {
Expand Down

0 comments on commit 5086b67

Please sign in to comment.