Skip to content

Commit

Permalink
Merge pull request Gluejar#782 from Gluejar/add-travis
Browse files Browse the repository at this point in the history
re-add travis
  • Loading branch information
eshellman committed Jun 9, 2018
2 parents 8fac19d + ee954b7 commit 20b8a29
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 174 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -2,7 +2,7 @@
*.pyc
*.log
settings/me.*
settings/keys/
settings/keys/*
*.dot
reports
ENV
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -15,6 +15,8 @@ env:
before_install:
- sudo mkdir /var/log/django
- sudo chmod 777 /var/log/django
- mkdir ~/build/Gluejar/regluit/settings/keys/
- cp ~/build/Gluejar/regluit/settings/dummy/__init__.py ~/build/Gluejar/regluit/settings/keys/__init__.py
- openssl aes-256-cbc -K $encrypted_56eb2b7cc527_key -iv $encrypted_56eb2b7cc527_iv -in ~/build/Gluejar/regluit/test/travis-host.py.enc -out ~/build/Gluejar/regluit/settings/keys/host.py -d

install:
Expand Down
24 changes: 0 additions & 24 deletions deploy/update-just

This file was deleted.

22 changes: 0 additions & 22 deletions deploy/update-regluit

This file was deleted.

56 changes: 0 additions & 56 deletions settings/jenkins.py

This file was deleted.

1 change: 0 additions & 1 deletion sysadmin/playbooks/hosts
Expand Up @@ -2,5 +2,4 @@
just ansible_ssh_port=22 ansible_ssh_host=just.unglue.it ansible_ssh_user=ubuntu
web1 ansible_ssh_port=22 ansible_ssh_host=unglue.it ansible_ssh_user=ubuntu
gluejar ansible_ssh_port=22 ansible_ssh_host=gluejar.com ansible_ssh_user=ubuntu
jenkins ansible_ssh_port=22 ansible_ssh_host=jenkins.unglueit.com ansible_ssh_user=ubuntu

4 changes: 2 additions & 2 deletions vagrant/Vagrantfile
Expand Up @@ -114,7 +114,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# ansible.inventory_path = '.vagrant/provisioners/ansible/inventory/'
ansible.raw_arguments = [
"--inventory-file=.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory",
"--limit=just,127.0.0.1,jenkins",
"--limit=just,127.0.0.1",
"-e vname=just",
"-e class=just",
"-e hostname=just.unglue.it",
Expand Down Expand Up @@ -186,7 +186,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# ansible.inventory_path = '.vagrant/provisioners/ansible/inventory/'
ansible.raw_arguments = [
"--inventory-file=.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory",
"--limit=just2,127.0.0.1,jenkins",
"--limit=just2,127.0.0.1",
"-e vname=just2",
"-e class=just",
"-e hostname=just2.unglue.it",
Expand Down
32 changes: 0 additions & 32 deletions vagrant/dev.yml
Expand Up @@ -499,13 +499,6 @@
- https://github.com/eshellman.keys
sudo: no

- name: add public key from jenkins
authorized_key: >
user={{user}}
key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYSiXESHXEdugNLGxFABXpVSawDCU/BK05Ef2qUa7oxxhU7fXNqWaSTqowevVruF7kfzMQ7epIxN5XFFjbXf/tsSn1995H9BEhmHLXLuEB5VaPU2HTLqu0DscyPtRbk/WjqPj3jWXs2yHgKcJIXwd5EfSwJuCe1Ut6pMe9E/NUq9QztnydRTt0sGywXpkIpKeBkiQl4SWlPTHcoU6PDbEuMVii8GzRAQlpEQTJwzWJTToR1SZ7o1uusDSxIDfJSvAa5IiuII8CdKbqa/JSx1+4LqlT0yf+2yb67MR5q6+XFM4TeCf5z+4SW+IT/wd2tpbd0DjAdXJlAgBULwhd1L7r"
state=present
when: class in ['just']

- name: set up script file to load environment for interactive use
command: cp "/opt/regluit/deploy/setup-{{class}}.sh" /home/{{user}}/setup.sh
sudo: no
Expand Down Expand Up @@ -549,29 +542,4 @@
service: name=apache2 state=restarted


- name: fix known_hosts on jenkins to match new just
hosts: jenkins
sudo: yes
sudo_user: jenkins

# to run the part of the playbook for jenkins
# PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/Users/raymondyee/.ssh/id_rsa --user=ubuntu --connection=ssh --inventory-file=/Users/raymondyee/C/src/Gluejar/regluit/vagrant/.vagrant/provisioners/ansible/inventory --limit='jenkins' just.yml

tasks:

#equivalent to
#
#ssh -tt jenkins << EOF
# sudo -i -u jenkins
# ssh-keyscan -t rsa just.unglue.it > /var/lib/jenkins/.ssh/known_hosts
# exit
#exit
#EOF

- name: make new known_hosts with key from just.unglue.it
raw: ssh-keyscan -t rsa just.unglue.it > /var/lib/jenkins/.ssh/known_hosts
when: class in ['just']

- name: add key from github
raw: ssh-keyscan -t rsa github.com >> /var/lib/jenkins/.ssh/known_hosts
when: class in ['just']
31 changes: 1 addition & 30 deletions vagrant/just.yml
Expand Up @@ -384,41 +384,12 @@
- https://github.com/eshellman.keys
sudo: yes

- name: add public key from jenkins
authorized_key: >
user={{user}}
key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYSiXESHXEdugNLGxFABXpVSawDCU/BK05Ef2qUa7oxxhU7fXNqWaSTqowevVruF7kfzMQ7epIxN5XFFjbXf/tsSn1995H9BEhmHLXLuEB5VaPU2HTLqu0DscyPtRbk/WjqPj3jWXs2yHgKcJIXwd5EfSwJuCe1Ut6pMe9E/NUq9QztnydRTt0sGywXpkIpKeBkiQl4SWlPTHcoU6PDbEuMVii8GzRAQlpEQTJwzWJTToR1SZ7o1uusDSxIDfJSvAa5IiuII8CdKbqa/JSx1+4LqlT0yf+2yb67MR5q6+XFM4TeCf5z+4SW+IT/wd2tpbd0DjAdXJlAgBULwhd1L7r"
state=present
sudo: no



handlers:
- name: restart apache2
service: name=apache2 state=restarted

- name: fix known_hosts on jenkins to match new just
hosts: jenkins
sudo: yes
sudo_user: jenkins

# to run the part of the playbook for jenkins
# PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/Users/raymondyee/.ssh/id_rsa --user=ubuntu --connection=ssh --inventory-file=/Users/raymondyee/C/src/Gluejar/regluit/vagrant/.vagrant/provisioners/ansible/inventory --limit='jenkins' just.yml

tasks:

#equivalent to
#
#ssh -tt jenkins << EOF
# sudo -i -u jenkins
# ssh-keyscan -t rsa just.unglue.it > /var/lib/jenkins/.ssh/known_hosts
# exit
#exit
#EOF

- name: make new known_hosts with key from just.unglue.it
raw: ssh-keyscan -t rsa just.unglue.it > /var/lib/jenkins/.ssh/known_hosts

- name: add key from github
raw: ssh-keyscan -t rsa github.com >> /var/lib/jenkins/.ssh/known_hosts


6 changes: 0 additions & 6 deletions vagrant/please.yml
Expand Up @@ -412,12 +412,6 @@
- https://github.com/eshellman.keys
sudo: yes

- name: add public key from jenkins
authorized_key: >
user={{user}}
key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYSiXESHXEdugNLGxFABXpVSawDCU/BK05Ef2qUa7oxxhU7fXNqWaSTqowevVruF7kfzMQ7epIxN5XFFjbXf/tsSn1995H9BEhmHLXLuEB5VaPU2HTLqu0DscyPtRbk/WjqPj3jWXs2yHgKcJIXwd5EfSwJuCe1Ut6pMe9E/NUq9QztnydRTt0sGywXpkIpKeBkiQl4SWlPTHcoU6PDbEuMVii8GzRAQlpEQTJwzWJTToR1SZ7o1uusDSxIDfJSvAa5IiuII8CdKbqa/JSx1+4LqlT0yf+2yb67MR5q6+XFM4TeCf5z+4SW+IT/wd2tpbd0DjAdXJlAgBULwhd1L7r"
state=present

handlers:
- name: restart apache2
Expand Down

0 comments on commit 20b8a29

Please sign in to comment.