diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-02-20 12:19:07 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-02-22 16:05:38 +0000 |
commit | 53153e114017d193cdf9b88f21f4eac31bad72b7 (patch) | |
tree | 6cbe624d67ec51733928ea4a54a50d613b4b94c5 /resources/tools/testbed-setup/ansible/roles/virl/tasks/03-virl-post-install.yaml | |
parent | 138c1b1f56a2b59afeafb92379e955b9baf95e7a (diff) |
CSIT-1437 Create portable host-setup document
- Ansible simplified and optimalized
- Porting global variables into single file
- Rework the README.md
- Tested outside LF environemnt
Change-Id: I124cffa5c4510edf365e8b558da0c8c498f55d50
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/virl/tasks/03-virl-post-install.yaml')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/virl/tasks/03-virl-post-install.yaml | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/virl/tasks/03-virl-post-install.yaml b/resources/tools/testbed-setup/ansible/roles/virl/tasks/03-virl-post-install.yaml deleted file mode 100644 index 58b70c9173..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/virl/tasks/03-virl-post-install.yaml +++ /dev/null @@ -1,92 +0,0 @@ ---- - - name: Add jenkins-in user - user: name=jenkins-in shell=/bin/bash comment="Jenkins user" - - name: Add jenkins-in user to sudoers - copy: src=files/sudoers_jenkins-in dest=/etc/sudoers.d/jenkins-in owner=root group=root mode=660 - - name: Set Jenkins user authorized key - authorized_key: user=jenkins-in key="{{ lookup('file', '/home/testuser/.ssh/id_rsa.pub') }}" - - name: copy salt states for dnsmasq and nfs - synchronize: src=files/salt/ dest=/ - - name: install NFS salt - shell: salt-call --local state.sls ckoester.nfs-server - - name: NFS symlink - shell: ln -s /nfs/scratch /scratch - args: - creates: /scratch - - name: Upate Nova CPU mode - ini_file: dest=/etc/nova/nova.conf section=libvirt option=cpu_mode value=host-passthrough - - name: Restart nova-compute service - service: name=nova-compute state=restarted - - name: Change listen interface in NTP settings - lineinfile: dest=/etc/ntp.conf state=present regexp='^interface listen 172.16.*' line='interface listen {{ ansible_default_ipv4["address"] }}' - - name: Restart NTP service - service: name=ntp state=restarted - - name: Permit SSH user environment - lineinfile: dest=/etc/ssh/sshd_config state=present regexp='PermitUserEnvironment.*' line='PermitUserEnvironment yes' - - name: Restart SSH daemon - service: name=ssh state=restarted - - name: clone csit git repository - git: repo=https://gerrit.fd.io/r/csit - dest=/home/jenkins-in/git/csit - become: jenkins-in - - name: Link testcase-infra directory - command: ln -sf /home/jenkins-in/git/csit/resources/tools/virl /home/jenkins-in/testcase-infra - args: - creates: /home/jenkins-in/testcase-infra - become: jenkins-in - - name: Create bin directory - file: path=/home/jenkins-in/bin state=directory mode=0755 - become: jenkins-in - - name: Link start-testcase executable - command: ln -sf /home/jenkins-in/testcase-infra/bin/start-testcase /home/jenkins-in/bin/start-testcase - args: - creates: /home/jenkins-in/bin/start-testcase - become: jenkins-in - - name: Link stop-testcase executable - command: ln -sf /home/jenkins-in/testcase-infra/bin/stop-testcase /home/jenkins-in/bin/stop-testcase - args: - creates: /home/jenkins-in/bin/stop-testcase - become: jenkins-in - - name: Link start-testcase-DMM executable - command: ln -sf /home/jenkins-in/testcase-infra/bin/start-testcase-DMM /home/jenkins-in/bin/start-testcase-DMM - args: - creates: /home/jenkins-in/bin/start-testcase-DMM - become: jenkins-in - - name: Link kill-idle-testcases executable - command: ln -sf /home/jenkins-in/testcase-infra/bin/kill-idle-testcases /home/jenkins-in/bin/kill-idle-testcases - args: - creates: /home/jenkins-in/bin/kill-idle-testcases - become: jenkins-in - - name: Copy SSH private key - copy: src=files/virl/id_rsa_virl dest=/home/jenkins-in/.ssh/id_rsa_virl mode=600 - become: jenkins-in - - name: Copy SSH public key - copy: src=files/virl/id_rsa_virl.pub dest=/home/jenkins-in/.ssh/id_rsa_virl.pub mode=644 - become: jenkins-in - - name: Copy SSH environment - copy: src=files/virl/ssh_environment dest=/home/jenkins-in/.ssh/environment mode=644 - become: jenkins-in - - name: Add ~/bin to path - lineinfile: dest=/home/jenkins-in/.bashrc state=present line='PATH=${HOME}/bin:$PATH' - become: jenkins-in - - name: Update own IP address in start script - shell: sed -i /home/jenkins-in/testcase-infra/bin/start-testcase -e 's/10.30.51.28/{{ ansible_default_ipv4["address"] }}/' - become: jenkins-in - - name: Add authorized key - lineinfile: dest=/home/jenkins-in/.ssh/authorized_keys line='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD4gderzsZyoxHULjuvPHoJuKnkaGrykqtuoqs/k1/jUdxitPoY5eX2cVYqww7MiUif7zLsiXbt5mHtyxAYCluDxAuIcy1xgSZY3MpmmSqDie4A/FdVfCUqCcpf3TZKsRP0an1MNrKIe0JFZV+uU889IDRQRdboGMs3+4cn5b9fOutpv71qwFVrTm9PZbqfQonrrN8Jp4Mz3XaZDpK22xwDAWhYOZ0eV6CJWquUgbYAHE6/HHMvd0zeJKaWZCXO/1tOGOj6cjgoViHqbnCtmYCjmv/ir0IglzbUdWdOqQY5YkhnPonveV48lVKrmBipqgbDezAUQD8wOQ7HttpYpKgt jenkins-in@tb4-virl' - become: jenkins-in -# All of the below will fail if VIRL user/project already exist - - name: Create VIRL project - shell: virl_uwm_client project-edit --name tb4-virl --enabled True -i 400 -r 1024000 -c 500 - ignore_errors: true - become: virl -# - name: Delete VIRL project user -# shell: virl_uwm_client user-delete --name tb4-virl -# ignore_errors: true -# - name: Recreate VIRL project user -# shell: virl_uwm_client user-create --name tb4-virl --role admin --project tb4-virl --set-password Cisco1234 -# ignore_errors: true - - name: Create VPP flavor - shell: virl_uwm_client flavor-create --name vPP --ram 4096 --vcpus 2 --disk 0 - ignore_errors: true - become: virl |