Skip to content

Commit a69ed68

Browse files
committed
remove most references to chef -- we're using ansible
1 parent 8b0ea72 commit a69ed68

File tree

9 files changed

+39
-619
lines changed

9 files changed

+39
-619
lines changed

automationPending.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ uid Scala Project <scala-internals@googlegroups.com>
5050
sub 2048R/202D3646 2013-04-30 [expires: 2019-05-16]
5151
```
5252

53-
### How to automate
54-
Update chef vault "worker-publish" / "gnupg" items "pubring-base64", "secring-base64" with new content, as found on the worker.
5553

5654
## Alternate JDK installation
5755

doc/adding-nodes.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

doc/client-setup.md

Lines changed: 25 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,6 @@ instructions would work on Linux as well, with minor changes.)
99
One-time setup instructions for the CI infrastructure _as a whole_
1010
are in a separate document, [genesis.md](genesis.md).
1111

12-
## Install chef and knife clients
13-
14-
```
15-
brew cask install chefdk
16-
eval "$(chef shell-init zsh)" # set up gem environment
17-
gem install knife-ec2 knife-windows knife-github-cookbooks chef-vault
18-
```
19-
20-
tips/troubleshooting:
21-
22-
* you might choose to `gem install --user-install` instead so only your
23-
own `~/.gem` directory is affected (and so you don't need `sudo`)
24-
* if you're on Mac OS X 10.11, make sure you are using ChefDK 0.8.0
25-
or higher, so as not to run afoul of
26-
https://github.com/chef/chef-dk/issues/419
27-
* if `gem install` gives an error message about unsatisfiable
28-
constraints on the version of the chef-config gem, add `-f`
29-
to force-ignore the problem `¯\_(ツ)_/¯` and cross your fingers
30-
that nothing goes wrong as a result
31-
32-
## Get credentials for the typesafe-scala chef.io organization
33-
34-
Join chef.io (https://manage.chef.io/signup), and ask on Slack to be invited to the typesafe-scala org.
35-
36-
For the CLI to work, you need:
37-
```
38-
export CHEF_ORG="typesafe-scala"
39-
```
40-
41-
If your username on chef.io does not match the local username on your machine, you also need
42-
```
43-
export CHEF_USER="[username]"
44-
```
45-
46-
## Get your public key added
47-
48-
Open a pull request, modeled on https://github.com/scala/scala-jenkins-infra/pull/106,
49-
to add your own ssh public key (not an Amazon-provided key; a personal key of your
50-
own) to `attributes/pubkeys.rb`, so you can use your key to ssh to the various servers.
51-
52-
## Set up directories
53-
54-
```
55-
mkdir -p ~/git/cookbooks
56-
cd ~/git/cookbooks
57-
git init .
58-
git commit --allow-empty -m "Initial"
59-
git config core.autocrlf false
60-
hub clone scala/scala-jenkins-infra
61-
cd scala-jenkins-infra
62-
ln -sh ~/git/cookbooks $PWD/.chef/
63-
mkdir .chef/config
64-
```
65-
66-
(The `core.autocrlf` thing may be needed to prevent "fatal: CRLF would be replaced by LF" errors when cloning cookbook repos, depending on your global git config.)
67-
68-
You can then generate and download your private key on https://manage.chef.io/organizations/typesafe-scala/users. Put it in `~/git/cookbooks/scala-jenkins-infra/.chef/config/$CHEF_USER.pem`. Then you can use knife without further config. See `.chef/knife.rb` for key locations.
69-
70-
Test if knife works correctly by running `knife cookbook list`.
7112

7213
## Hosts and SSH config
7314

@@ -98,22 +39,40 @@ it's only ssh-able from jenkins-master itself; see below.)
9839
Add the following to your `~/.ssh/config`:
9940

10041
```
101-
Host jenkins-master
42+
Host jenkins-worker-publish
43+
IdentityFile /Users/adriaan/.ssh/ansible.pem
10244
User admin
10345
10446
Host jenkins-worker-behemoth-1
105-
User ubuntu
47+
IdentityFile /Users/adriaan/.ssh/ansible.pem
48+
User admin
10649
10750
Host jenkins-worker-behemoth-2
108-
User ubuntu
51+
IdentityFile /Users/adriaan/.ssh/ansible.pem
52+
User admin
10953
110-
Host jenkins-worker-ubuntu-publish
111-
User ubuntu
54+
Host jenkins-worker-behemoth-3
55+
IdentityFile /Users/adriaan/.ssh/ansible.pem
56+
User admin
57+
58+
Host jenkins-master
59+
IdentityFile /Users/adriaan/.ssh/ansible.pem
60+
User admin
11261
11362
Host scabot
11463
HostName jenkins-master
115-
IdentityFile $PWD/.chef/scabot.pem
11664
User scabot
65+
66+
Host jenkins-worker-windows-publish
67+
HostName 172.31.0.178
68+
IdentityFile ~/.ssh/scala-jenkins.pem
69+
User jenkins
70+
ProxyCommand ssh -q -W %h:%p jenkins-master
71+
72+
Host influxdb
73+
HostName 172.31.0.100
74+
User ubuntu
75+
ProxyCommand ssh -q -W %h:%p jenkins-master
11776
```
11877

11978
Verify that you can actually ssh to the various machines.
@@ -186,25 +145,7 @@ ssh'ing to jenkins-master first. From jenkins-master, do:
186145
which should get you to a Cygwin prompt. (If it doesn't work, maybe
187146
you forgot to bring the Windows node online first?)
188147

189-
Missing key? If you find that `~/.ssh/jenkins_id_rsa` isn't
190-
present on jenkins-master, you can recreate it as follows.
191-
The keypair is stored in our Chef vault (as provided by the chef-vault
192-
cookbook) as `scala-jenkins-keypair`. Here's how to retrieve it:
193-
194-
knife vault show --format json master scala-jenkins-keypair \
195-
| jq -r .private_key > jenkins_id_rsa
196-
knife vault show --format json master scala-jenkins-keypair \
197-
| jq -r .public_key > jenkins_id_rsa.pub
198-
199-
From there, you can `scp` it up to `~/.ssh` on jenkins-master.
200-
201-
If you get "master/scala-jenkins-keypair is not encrypted with your
202-
public key", that means you must ask one of the existing vault admins
203-
to do e.g.
204-
205-
knife vault update master scala-jenkins-keypair \
206-
-A adriaan,tisue,lrytz \
207-
--search 'name:jenkins-master
148+
Keys are stored using ansible vault.
208149

209150
### Remote access (graphical)
210151

doc/design.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ in overview.md. some pieces may be only historical now)
33

44
# Design for scala-ci.typesafe.com
55

6-
Jenkins on EC2, configured using chef
6+
Jenkins on EC2, configured using ansible (not documented since it happened in a rush when moving away from chef...)
77

88
* centered around GitHub & future move to Travis CI
99
* no nightly builds (not supported on Travis) -- run integration on every merge
@@ -16,11 +16,10 @@ Jenkins on EC2, configured using chef
1616
* job-specific params incorporated into job title
1717
* use jenkins strictly as a job scheduler/dashboard
1818
* archive logs, builds elsewhere
19-
* configuration is handled by chef
19+
* configuration is handled by ansible
2020
* the jenkins server/workers are considered stateless & opaque
21-
* infrastructure is fully defined by chef cookbook
21+
* infrastructure is fully defined in ansible config
2222
* worker nodes have home directory mounted on device that is wiped on reboot (ephemeral storage on EC2)
23-
* chef-client runs on boot, and every 30 minutes
2423
* as little information as possible in jenkins job config: standardize common stuff & extract logic to scripts
2524
* use maven to store and communicate compiled artifacts
2625
* every commit has artifacts on our artifactory, use them for running test suite downstream, git bisect,...

0 commit comments

Comments
 (0)