├── .gitignore ├── .gitreview ├── CODE_OF_CONDUCT.md ├── LICENSE.txt ├── README.md ├── ansible.cfg ├── bootstrap-dev-env.yml ├── collect-diag-playbook.yml ├── compute-node-enable-playbook.yml ├── compute-node-refresh-playbook.yml ├── copy-cord-playbook.yml ├── copy-profile-playbook.yml ├── cord-automation-playbook.yml ├── cord-config-playbook.yml ├── cord-fabric-pingtest.yml ├── cord-refresh-fabric.yml ├── credentials ├── .gitignore └── README.md ├── deploy-computenode-playbook.yml ├── deploy-elasticstack-playbook.yml ├── deploy-mavenrepo-playbook.yml ├── deploy-onos-playbook.yml ├── deploy-openstack-playbook.yml ├── devel-tools-playbook.yml ├── docs ├── PLATFORM_INSTALL_INTERNALS.md ├── bootstrap_models_in_xos.md └── install_opencloud_site.md ├── filter_plugins ├── format_string.py └── unbound_revdns.py ├── glance-images-playbook.yml ├── install-kubernetes-tools-playbook.yml ├── inventory ├── api-test ├── ecord ├── ecord-global ├── frontend ├── head-localhost ├── legacy │ ├── arizona │ ├── aztest │ ├── cloudlab │ ├── cloudlab-openstack │ ├── cord │ ├── cord-test │ ├── hawaii │ ├── multi-localhost │ ├── princeton │ ├── singapore │ ├── single-localhost │ ├── stanford │ └── unc ├── localhost ├── mcord ├── opencloud ├── rcord └── templates │ └── single-prod ├── library ├── juju_facts.py └── xostosca.py ├── onboard-exampleservice-playbook.yml ├── onboard-openstack-playbook.yml ├── onboard-profile-playbook.yml ├── onos-debug-playbook.yml ├── pod-test-playbook.yml ├── prep-buildnode-playbook.yml ├── prep-computenode-playbook.yml ├── prep-headnode-playbook.yml ├── prereqs-check-playbook.yml ├── publish-images-playbook.yml ├── roles ├── ansible-install │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── ansible.cfg │ └── tasks │ │ └── main.yml ├── apache-proxy │ ├── files │ │ └── cord-http.conf │ ├── handlers │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── apt-cacher-ng │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── 02broken-repos.j2 │ │ └── 03apt-cacher-ng.j2 ├── automation-integration │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── do-enlist-compute-node.j2 ├── cloudlab-prep │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── common-prep │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── tmux.conf │ ├── handlers │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── compute-diag │ └── tasks │ │ └── main.yml ├── compute-node-config │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── openstack-compute-vtn.yaml.j2 │ │ └── openstack-compute.yaml.j2 ├── compute-node-enable │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── compute-prep │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── copy-cord │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── copy-credentials │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── copy-profile │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── cord-profile │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── fixtures.yaml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── Dockerfile.xos.j2 │ │ ├── admin-openrc.sh.j2 │ │ ├── app.config.js.j2 │ │ ├── deployment.yaml.j2 │ │ ├── docker-compose.yml.j2 │ │ ├── gateway-config.yml.j2 │ │ ├── initial_data.yaml.j2 │ │ ├── openstack.yaml.j2 │ │ ├── style.config.js.j2 │ │ ├── template-service.yaml.j2 │ │ ├── xos-tosca.config.yaml.j2 │ │ ├── xos_config.yaml.j2 │ │ └── xos_config_synchronizer.yaml.j2 ├── create-configdirs-become │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── create-lxd │ ├── defaults │ │ └── main.yml │ ├── library │ │ └── host_dns_check.py │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── ansible_hosts.j2 ├── dell-virt │ ├── files │ │ └── dell_app_key.gpg │ └── tasks │ │ └── main.yml ├── dev-env │ ├── handlers │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── dhcpd │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── dhcpd.conf.j2 │ │ └── isc-dhcp-server.j2 ├── dns-configure │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── base.j2 │ │ ├── head.j2 │ │ └── resolv.conf.j2 ├── dns-nsd │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── nsd.conf.j2 │ │ ├── zone.forward.j2 │ │ └── zone.reverse.j2 ├── dns-unbound │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── unbound.conf.j2 ├── docker-install │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── docker_apt_key.gpg │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── default_docker.j2 ├── docker-registry-client │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── docker-registry │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── docker-compose.yml.j2 ├── elasticstack │ ├── files │ │ ├── 10-udp-input.conf │ │ ├── 11-log4j-input.conf │ │ ├── 12-syslog-input.conf │ │ ├── 30-elasticsearch-output.conf │ │ └── elastic.asc │ ├── handlers │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── exampleservice-config │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── test-exampleservice.yaml.j2 ├── fabric-compute-prep │ └── tasks │ │ └── main.yml ├── fabric-head-prep │ └── tasks │ │ └── main.yml ├── fabric-pingtest │ └── tasks │ │ └── main.yml ├── fabric-refresh │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── glance-images │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── head-diag │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── head-prep │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── ansible.cfg │ └── tasks │ │ └── main.yml ├── helm │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── imagebuilder-publish │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── interface-config │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── fabric.cfg.j2 │ │ └── management.cfg.j2 ├── java-oracle │ └── tasks │ │ └── main.yml ├── juju-compute-setup │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── juju-finish │ └── tasks │ │ └── main.yml ├── juju-setup │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── environments.yaml.j2 │ │ └── juju_config.yml.j2 ├── kubectl │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── lxd-finish │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── mavenrepo-install │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── docker-compose.yml.j2 ├── onos-cord-install │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── Dockerfile.j2 │ │ ├── docker-compose.yml.j2 │ │ └── org.ops4j.pax.logging.cfg.j2 ├── onos-debug │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── onos-fabric-install │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── docker-compose.yml.j2 ├── pki-cert │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ ├── client.cnf.j2 │ │ └── server.cnf.j2 ├── pki-install │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── pki-intermediate-ca │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── openssl_im.cnf.j2 ├── pki-root-ca │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── openssl_root.cnf.j2 ├── prereqs-common │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── pull-xos-docker-images │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── repo │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── setup-nova-dpdk │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── ssh-install-maas │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── ssh-install │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── ssh-pki │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── start-xos-helm │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── sysctl │ └── tasks │ │ └── main.yml ├── teardown-onos │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── teardown-openstack │ └── tasks │ │ └── main.yml ├── teardown-xos │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── test-client-install │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── test-exampleservice │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── test-subscriber-config │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ │ └── test-subscriber.yaml.j2 ├── test-subscriber-enable │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── test-vsg │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── vtn-refresh │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── xos-config │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── xos-onboard-test-hosts │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── xos-ready │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── xos-rest-api-test │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── xos-services-config │ ├── defaults │ │ └── main.yml │ └── tasks │ │ └── main.yml ├── xos-services-list │ ├── deafults │ │ └── main.yml │ └── tasks │ │ └── main.yml └── xos-up │ ├── defaults │ └── main.yml │ └── tasks │ └── main.yml ├── scripts ├── clean_openstack.sh ├── lintcheck.sh └── run_tosca.py ├── ssh_pki ├── .gitignore └── README.md ├── start-xos-helm-playbook.yml ├── start-xos-playbook.yml ├── teardown-onos-playbook.yml ├── teardown-openstack-playbook.yml ├── teardown-xos-playbook.yml ├── vtn-refresh-playbook.yml ├── xos-api-test-playbook.yml ├── xos-service-config.yml └── xos-services-up.yml /.gitignore: -------------------------------------------------------------------------------- 1 | credentials/* 2 | cord_profile/ 3 | *.retry 4 | *.swp 5 | *.log 6 | 7 | # Java 8 | *.class 9 | *.jar 10 | *.war 11 | *.oar 12 | 13 | # Python 14 | *.pyc 15 | 16 | # Eclipse 17 | .project 18 | .classpath 19 | .settings 20 | 21 | # Idea 22 | .idea 23 | *.iml 24 | *.iws 25 | *.ipr 26 | 27 | # OS 28 | Thumbs.db 29 | .DS_Store 30 | 31 | # Vagrant 32 | .vagrant 33 | 34 | # Docker registry 35 | /registry 36 | 37 | # Build 38 | build 39 | 40 | # Ansible 41 | ansible/*.retry 42 | *.retry 43 | 44 | # Backup files 45 | *.bak 46 | 47 | # PKI dir 48 | pki/ 49 | 50 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=gerrit.opencord.org 3 | port=29418 4 | project=platform-install.git 5 | defaultremote=origin 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | We expect all ONF employees, member companies, and participants to abide by our [Code of Conduct](https://www.opennetworking.org/wp-content/themes/onf/img/onf-code-of-conduct.pdf). 2 | 3 | If you are being harassed, notice that someone else is being harassed, or have any other concerns involving someone’s welfare, please notify a member of the ONF team or email [conduct@opennetworking.org](conduct@opennetworking.org). 4 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | callback_whitelist = profile_tasks 3 | host_key_checking = false 4 | forks=20 5 | timeout=30 6 | 7 | [ssh_connection] 8 | ssh_args = -o ControlMaster=auto -o ControlPersist=15s -o ConnectionAttempts=20 9 | retries=5 10 | 11 | -------------------------------------------------------------------------------- /bootstrap-dev-env.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | - name: Bootstrap dev env 18 | hosts: all 19 | roles: 20 | - dev-env 21 | -------------------------------------------------------------------------------- /collect-diag-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # collect-diag-playbook.yml 17 | # Collects diagnostic information for the currently running POD 18 | 19 | - name: Create diag_dir fact 20 | hosts: head 21 | tasks: 22 | - name: Set diag_dir name to diag-rfc3339_datetime 23 | set_fact: 24 | diag_dir: "diag-{{ ansible_date_time.iso8601_basic_short }}" 25 | 26 | - name: Diagnostics on head node 27 | hosts: head 28 | roles: 29 | - head-diag 30 | 31 | - name: Diagnostics on compute nodes 32 | hosts: compute 33 | roles: 34 | - compute-diag 35 | 36 | - name: Collect compute node diagnostics on head node 37 | hosts: head 38 | tasks: 39 | - name: rsync diag_dir from compute nodes to head node 40 | when: groups['compute'] | length > 0 41 | command: > 42 | rsync -a 43 | "ubuntu@{{ item }}:/tmp/{{ hostvars[groups['head'][0]]['diag_dir'] }}/{{ item }}" 44 | "~/{{ hostvars[groups['head'][0]]['diag_dir'] }}/" 45 | with_items: "{{ groups['compute'] }}" 46 | tags: 47 | - skip_ansible_lint # the synchronize module can't set the remote username with delegate_to 48 | 49 | -------------------------------------------------------------------------------- /compute-node-enable-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # compute-node-enable-playbook.yml 17 | # Installs and configures compute nodes 18 | 19 | - include: prep-computenode-playbook.yml 20 | - include: deploy-computenode-playbook.yml 21 | 22 | - name: Enable Compute Node 23 | hosts: head 24 | roles: 25 | - compute-node-enable 26 | 27 | -------------------------------------------------------------------------------- /compute-node-refresh-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | # compute-node-refresh-playbook.yml 18 | # Re-adds compute nodes to a XOS after a teardown cycle 19 | # This analogous to the legacy `make vtn` command in service-profile 20 | # On physical/CiaB w/MaaS: 21 | # ansible-playbook -i /etc/maas/ansible/pod-inventory --extra-vars=@/opt/cord/build/genconfig/config.yml compute-node-refresh-playbook.yml 22 | 23 | - name: Get setup information from compute nodes 24 | hosts: compute 25 | tasks: 26 | - name: run setup on compute nodes 27 | setup: 28 | 29 | - name: Recreate compute node configuration 30 | hosts: head 31 | roles: 32 | - compute-node-config 33 | 34 | - name: Enable compute nodes in XOS 35 | hosts: head 36 | roles: 37 | - compute-node-enable 38 | 39 | -------------------------------------------------------------------------------- /copy-cord-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Copyright 2017-present Open Networking Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # copy-cord-playbook.yml 18 | # Copy the cord directory from config node to head node 19 | 20 | - name: Copy cord directory structure to head node 21 | hosts: head 22 | roles: 23 | - copy-cord 24 | 25 | -------------------------------------------------------------------------------- /copy-profile-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # copy-profile-playbook.yml 17 | # Copies the profile to the head node 18 | 19 | - name: Copy cord_profile to head node from config node 20 | hosts: head 21 | roles: 22 | - { role: copy-profile, become: yes } 23 | - { role: ssh-install, become: yes } 24 | - { role: glance-images, become: yes, when: ( use_openstack | default(True) ) } 25 | - { role: copy-credentials, become: yes, when: not ( frontend_only | default(False) ) } 26 | 27 | - name: Install ssh keys when using MaaS 28 | hosts: build 29 | roles: 30 | - { role: ssh-install-maas, become: yes, when: use_maas } 31 | 32 | -------------------------------------------------------------------------------- /cord-automation-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # cord-automation-playbook.yml 19 | # Installs the automation scripts used by MaaS to provision nodes. 20 | 21 | - name: Set up Automated Compute Node Provisioning 22 | hosts: head 23 | roles: 24 | - { role: automation-integration, when: use_maas } 25 | 26 | -------------------------------------------------------------------------------- /cord-config-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # cord-config-playbook.yml 17 | # Creates all configuration for a CORD pod 18 | 19 | - name: Create SSL Root CA, Intermediate CA, Server certs, SSH CA and keypairs 20 | hosts: config 21 | roles: 22 | - { role: create-configdirs-become, when: create_configdirs_become | default(True) } 23 | - pki-root-ca 24 | - pki-intermediate-ca 25 | - pki-cert 26 | - ssh-pki 27 | 28 | - name: Create CORD profile, Helm charts, and dynamic services config 29 | hosts: config 30 | roles: 31 | - cord-profile 32 | - xos-services-config 33 | 34 | -------------------------------------------------------------------------------- /cord-fabric-pingtest.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # Send some pings from compute nodes to head node over the fabri 19 | # Mainly useful for CiaB right now 20 | 21 | - name: Fabric ping test to gateway 22 | hosts: compute 23 | remote_user: ubuntu 24 | roles: 25 | - fabric-pingtest 26 | -------------------------------------------------------------------------------- /cord-refresh-fabric.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # Creates a fabric configuration using 'cord generate' 19 | 20 | - name: Refresh fabric config 21 | hosts: head 22 | roles: 23 | - fabric-refresh 24 | -------------------------------------------------------------------------------- /credentials/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /credentials/README.md: -------------------------------------------------------------------------------- 1 | # Credentials 2 | 3 | Credentials generated by ansible during runs will be stored here, if not 4 | defined elsewhere. 5 | 6 | -------------------------------------------------------------------------------- /deploy-computenode-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # deploy-computenode-playbook.yml 17 | # deploys compute nodes with Juju, creates config 18 | 19 | - name: Get setup information from compute nodes 20 | hosts: compute 21 | tasks: 22 | - name: run setup on compute nodes 23 | setup: 24 | 25 | - name: Deploy compute nodes, create configuration 26 | hosts: head 27 | roles: 28 | - juju-compute-setup 29 | - compute-node-config 30 | 31 | -------------------------------------------------------------------------------- /deploy-elasticstack-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # deploy-elasticstack-playbook.yml 19 | # installs elasticstack on the CORD head node 20 | 21 | - name: Install elasticstack and apache proxy 22 | become: yes 23 | hosts: head 24 | roles: 25 | - java-oracle 26 | - elasticstack 27 | - apache-proxy 28 | 29 | -------------------------------------------------------------------------------- /deploy-mavenrepo-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # deploy-mavenrepo-playbook.yml 19 | # Deploys mavenrepo in Docker container on the CORD head node 20 | 21 | - name: Deploy and start mavenrepo 22 | hosts: head 23 | roles: 24 | - mavenrepo-install 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /deploy-onos-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # deploy-onos-playbook.yml 19 | # Deploys ONOS in Docker containers on the CORD head node 20 | 21 | - name: Deploy and start ONOS containers 22 | hosts: head 23 | roles: 24 | - onos-cord-install 25 | - { role: onos-fabric-install, when: use_fabric | default(False) } 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /deploy-openstack-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # deploy-openstack-playbook.yml 19 | # Deploys OpenStack in LXD containers on the CORD head node 20 | 21 | - name: Create LXD containers 22 | hosts: head 23 | become: yes 24 | roles: 25 | - create-lxd 26 | 27 | - name: Finish container configuration 28 | hosts: head 29 | roles: 30 | - lxd-finish 31 | 32 | - name: Juju OpenStack install 33 | hosts: head 34 | roles: 35 | - juju-setup 36 | - juju-finish 37 | 38 | - name: Configure Nova with DPDK-enabled flavors 39 | hosts: head 40 | roles: 41 | - { role: setup-nova-dpdk, when: use_dpdk | default(False) } 42 | -------------------------------------------------------------------------------- /devel-tools-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # devel-tools-playbook.yml 19 | 20 | - name: Install developer tools 21 | hosts: head 22 | roles: 23 | - docker-install 24 | 25 | -------------------------------------------------------------------------------- /filter_plugins/format_string.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | from jinja2.utils import soft_unicode 18 | 19 | def format_string(string, pattern): 20 | """ 21 | formats the string with the value passed to it 22 | basicaly the reverse order of standard "format()" 23 | """ 24 | return soft_unicode(pattern) % (string) 25 | 26 | class FilterModule(object): 27 | 28 | def filters(self): 29 | return { 30 | 'format_string': format_string, 31 | } 32 | 33 | -------------------------------------------------------------------------------- /glance-images-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # glance-images-playbook.yml 19 | # Downloads glance images required by profile 20 | 21 | - name: Download images for Glance 22 | hosts: head 23 | roles: 24 | - glance-images 25 | -------------------------------------------------------------------------------- /install-kubernetes-tools-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # install-kubernetes-tools-playbook.yml 17 | # Installs kubernetes on the config node 18 | 19 | - name: Install kubernetes tools 20 | hosts: config 21 | roles: 22 | - kubectl 23 | - helm 24 | 25 | -------------------------------------------------------------------------------- /inventory/api-test: -------------------------------------------------------------------------------- 1 | ; api-test configuration 2 | 3 | [all:vars] 4 | cord_profile=api-test 5 | 6 | [head] 7 | localhost ansible_connection=local 8 | 9 | -------------------------------------------------------------------------------- /inventory/ecord: -------------------------------------------------------------------------------- 1 | ; ecord configuration 2 | 3 | [all:vars] 4 | cord_profile=ecord 5 | 6 | [head] 7 | localhost ansible_connection=local 8 | 9 | -------------------------------------------------------------------------------- /inventory/ecord-global: -------------------------------------------------------------------------------- 1 | ; ecord-global configuration 2 | 3 | [all:vars] 4 | cord_profile=ecord-global 5 | 6 | [config] 7 | localhost ansible_connection=local 8 | 9 | [head] 10 | localhost ansible_connection=local 11 | 12 | [build] 13 | localhost ansible_connection=local 14 | 15 | [compute] 16 | 17 | -------------------------------------------------------------------------------- /inventory/frontend: -------------------------------------------------------------------------------- 1 | ; frontend configuration 2 | 3 | [all:vars] 4 | cord_profile=frontend 5 | 6 | [config] 7 | localhost ansible_connection=local 8 | 9 | [head] 10 | localhost ansible_connection=local 11 | 12 | [build] 13 | localhost ansible_connection=local 14 | 15 | [compute] 16 | 17 | -------------------------------------------------------------------------------- /inventory/head-localhost: -------------------------------------------------------------------------------- 1 | ; used to bootstrap CiaB configs 2 | 3 | [config] 4 | localhost ansible_connection=local 5 | 6 | [head] 7 | localhost ansible_connection=local 8 | 9 | [build] 10 | localhost ansible_connection=local 11 | 12 | [compute] 13 | ; empty, but needed to avoid template issues 14 | -------------------------------------------------------------------------------- /inventory/legacy/arizona: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=ubuntu 3 | 4 | [head] 5 | node1.cs.arizona.edu 6 | 7 | [compute] 8 | node2.cs.arizona.edu 9 | node3.cs.arizona.edu 10 | node4.cs.arizona.edu 11 | node5.cs.arizona.edu 12 | node6.cs.arizona.edu 13 | -------------------------------------------------------------------------------- /inventory/legacy/aztest: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=ubuntu 3 | 4 | [head] 5 | node09.opencloud.cs.arizona.edu 6 | 7 | [compute] 8 | node10.opencloud.cs.arizona.edu 9 | node11.opencloud.cs.arizona.edu 10 | node12.opencloud.cs.arizona.edu 11 | -------------------------------------------------------------------------------- /inventory/legacy/cloudlab: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=ubuntu 3 | 4 | [head] 5 | ctl.install.xos-pg0.clemson.cloudlab.us 6 | 7 | [compute] 8 | cp-1.install.xos-pg0.clemson.cloudlab.us 9 | -------------------------------------------------------------------------------- /inventory/legacy/cloudlab-openstack: -------------------------------------------------------------------------------- 1 | # inventory file for Clouldlab's OpenStack Profile 2 | 3 | [cloudlab] 4 | ctl ansible_ssh_host=hostname_goes_here.cloudlab.us ansible_ssh_user=cloudlab_username 5 | 6 | -------------------------------------------------------------------------------- /inventory/legacy/cord: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=cord 3 | 4 | [head] 5 | localhost connection=local 6 | 7 | [compute] 8 | node1 9 | node2 10 | node3 11 | 12 | [openstack] 13 | mysql 14 | rabbitmq-server 15 | keystone 16 | glance 17 | nova-cloud-controller 18 | openstack-dashboard 19 | ceilometer 20 | nagios 21 | neutron-api 22 | 23 | [openstack:vars] 24 | ansible_ssh_user=ubuntu 25 | 26 | -------------------------------------------------------------------------------- /inventory/legacy/cord-test: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=ubuntu 3 | test_setup=true 4 | 5 | [head] 6 | localhost connection=local 7 | 8 | [compute] 9 | nova-compute 10 | 11 | [openstack] 12 | mysql 13 | rabbitmq-server 14 | keystone 15 | glance 16 | nova-cloud-controller 17 | openstack-dashboard 18 | ceilometer 19 | nagios 20 | neutron-api 21 | 22 | [openstack:vars] 23 | ansible_ssh_user=ubuntu 24 | 25 | -------------------------------------------------------------------------------- /inventory/legacy/hawaii: -------------------------------------------------------------------------------- 1 | head ansible_ssh_host=node13-syn.its.hawaii.edu 2 | 3 | [compute] 4 | node14-syn.its.hawaii.edu 5 | node15-syn.its.hawaii.edu 6 | node16-syn.its.hawaii.edu 7 | node17-syn.its.hawaii.edu 8 | node18-syn.its.hawaii.edu 9 | 10 | [all:vars] 11 | cloudlab=false 12 | -------------------------------------------------------------------------------- /inventory/legacy/multi-localhost: -------------------------------------------------------------------------------- 1 | [head] 2 | localhost 3 | 4 | [head:vars] 5 | ansible_ssh_user=admin 6 | 7 | # Add compute nodes here as they are provisioned 8 | [compute] 9 | 10 | [compute:vars] 11 | ansible_ssh_user=ubuntu 12 | -------------------------------------------------------------------------------- /inventory/legacy/princeton: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=ubuntu 3 | 4 | [head] 5 | node70.princeton.vicci.org 6 | 7 | [compute] 8 | node37.princeton.vicci.org 9 | node39.princeton.vicci.org 10 | node41.princeton.vicci.org 11 | node43.princeton.vicci.org 12 | node45.princeton.vicci.org 13 | node49.princeton.vicci.org 14 | node51.princeton.vicci.org 15 | node52.princeton.vicci.org 16 | node54.princeton.vicci.org 17 | node55.princeton.vicci.org 18 | node57.princeton.vicci.org 19 | node59.princeton.vicci.org 20 | node65.princeton.vicci.org 21 | node66.princeton.vicci.org 22 | node67.princeton.vicci.org 23 | node68.princeton.vicci.org 24 | node69.princeton.vicci.org 25 | -------------------------------------------------------------------------------- /inventory/legacy/singapore: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=ubuntu 3 | 4 | [head] 5 | opencloud0.sing.internet2.edu 6 | 7 | [compute] 8 | opencloud1.sing.internet2.edu 9 | opencloud2.sing.internet2.edu 10 | opencloud3.sing.internet2.edu 11 | 12 | -------------------------------------------------------------------------------- /inventory/legacy/single-localhost: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_ssh_user=replaceme 3 | 4 | [head] 5 | localhost 6 | 7 | [cloudlab] 8 | localhost 9 | 10 | [compute] 11 | nova-compute-1 ansible_ssh_user=ubuntu 12 | 13 | -------------------------------------------------------------------------------- /inventory/legacy/unc: -------------------------------------------------------------------------------- 1 | head ansible_ssh_host=rc-tsdn-01.its.unc.edu 2 | 3 | [compute] 4 | rc-tsdn-02.its.unc.edu 5 | rc-tsdn-03.its.unc.edu 6 | rc-tsdn-04.its.unc.edu 7 | rc-tsdn-05.its.unc.edu 8 | rc-tsdn-06.its.unc.edu 9 | 10 | [all:vars] 11 | cloudlab=false 12 | -------------------------------------------------------------------------------- /inventory/localhost: -------------------------------------------------------------------------------- 1 | ; localhost inventory 2 | ; used for installing prereqs with cord-bootstrap.sh script 3 | 4 | [head] 5 | localhost ansible_connection=local 6 | 7 | -------------------------------------------------------------------------------- /inventory/mcord: -------------------------------------------------------------------------------- 1 | ; mcord configuration 2 | 3 | [all:vars] 4 | cord_profile=mcord 5 | 6 | [config] 7 | localhost ansible_connection=local 8 | 9 | [head] 10 | localhost ansible_connection=local 11 | 12 | [build] 13 | localhost ansible_connection=local 14 | 15 | [compute] 16 | 17 | -------------------------------------------------------------------------------- /inventory/opencloud: -------------------------------------------------------------------------------- 1 | ; opencloud-in-a-box inventory 2 | 3 | [all:vars] 4 | cord_profile=opencloud 5 | virtual_install=True 6 | 7 | [config] 8 | localhost ansible_connection=local 9 | 10 | [head] 11 | head1 12 | 13 | [compute] 14 | compute1 15 | compute2 16 | 17 | [build] 18 | localhost connection=local 19 | 20 | -------------------------------------------------------------------------------- /inventory/rcord: -------------------------------------------------------------------------------- 1 | ; rcord configuration 2 | 3 | [all:vars] 4 | cord_profile=rcord 5 | 6 | [config] 7 | localhost ansible_connection=local 8 | 9 | [head] 10 | localhost ansible_connection=local 11 | 12 | [build] 13 | localhost ansible_connection=local 14 | 15 | [compute] 16 | 17 | -------------------------------------------------------------------------------- /inventory/templates/single-prod: -------------------------------------------------------------------------------- 1 | [head] 2 | ${prod} 3 | 4 | [compute] 5 | 6 | 7 | -------------------------------------------------------------------------------- /onboard-exampleservice-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onboard-exampleservice.yml 19 | # Adds the exampleservice to the currently running pod 20 | 21 | - name: Create exampleservice configuration 22 | hosts: head 23 | roles: 24 | - exampleservice-config 25 | -------------------------------------------------------------------------------- /onboard-openstack-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # onboard-openstack-playbook.yml 17 | # Onboard Openstack into XOS 18 | 19 | - name: Check to see if XOS is ready 20 | hosts: head 21 | roles: 22 | - xos-ready 23 | 24 | - name: Enable Compute Node 25 | hosts: head 26 | roles: 27 | - compute-node-enable 28 | 29 | -------------------------------------------------------------------------------- /onboard-profile-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # onboard-profile-playbook.yml 17 | # Configure XOS with profile-specific config 18 | 19 | - name: Check XOS Ready 20 | hosts: head 21 | roles: 22 | - xos-ready 23 | 24 | - name: Apply profile config 25 | hosts: head 26 | roles: 27 | - xos-config 28 | -------------------------------------------------------------------------------- /onos-debug-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onos-debug-playbook.yml 19 | # Enables app-specific debugging settings in ONOS 20 | 21 | - name: Enable debugging for onos apps 22 | hosts: head 23 | roles: 24 | - onos-debug 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /pod-test-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # pod-test-playbook.yml 17 | # Tests rcord XOS configuration 18 | 19 | - name: Create test client 20 | hosts: head 21 | become: yes 22 | roles: 23 | - test-client-install 24 | 25 | - name: Create test subscriber 26 | hosts: head 27 | roles: 28 | - test-subscriber-config 29 | 30 | - name: Enable the test subscriber 31 | hosts: head 32 | roles: 33 | - test-subscriber-enable 34 | 35 | - name: Test VSG 36 | hosts: head 37 | become: no 38 | roles: 39 | - test-vsg 40 | 41 | - import_playbook: onboard-exampleservice-playbook.yml 42 | 43 | - name: Test ExampleService 44 | hosts: head 45 | become: no 46 | roles: 47 | - test-exampleservice 48 | 49 | -------------------------------------------------------------------------------- /prep-buildnode-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # prep-buildnode-playbook.yml 19 | # Prep build node to create artifacts 20 | 21 | - name: Install ansible on build node 22 | hosts: build 23 | roles: 24 | - { role: ansible-install, become: yes } 25 | 26 | - name: Install docker on buildnode, configure 27 | hosts: build 28 | roles: 29 | - docker-install 30 | 31 | -------------------------------------------------------------------------------- /prep-computenode-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # prep-computenode-playbook.yml 17 | # Prepares a compute node on a CORD pod 18 | 19 | - name: Common prep, install SSL certificates 20 | hosts: compute 21 | become: yes 22 | roles: 23 | - common-prep 24 | - { role: pki-install, when: not use_maas } 25 | 26 | - name: Configure network interfaces 27 | hosts: compute 28 | become: yes 29 | roles: 30 | - { role: interface-config, when: not use_maas } 31 | 32 | - name: Use headnode DNS server 33 | hosts: compute 34 | become: yes 35 | roles: 36 | - { role: dns-configure, when: not use_maas } 37 | 38 | - name: Install docker and configure it 39 | hosts: compute 40 | roles: 41 | - { role: docker-install, when: use_secure_docker_registry | default(True) } 42 | 43 | - name: Configure docker to use head docker registry 44 | hosts: compute 45 | become: yes 46 | roles: 47 | - { role: docker-registry-client, when: use_secure_docker_registry | default(True) } 48 | 49 | - name: Finish prep of compute node 50 | hosts: compute 51 | become: yes 52 | roles: 53 | - compute-prep 54 | 55 | -------------------------------------------------------------------------------- /prereqs-check-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # prereqs-check-playbook.yml 19 | # Checks that virtual machine host is suitable 20 | 21 | - name: Check Prereqs 22 | hosts: localhost 23 | connection: local 24 | roles: 25 | - prereqs-common 26 | 27 | -------------------------------------------------------------------------------- /publish-images-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # publish-platform-install-playbook.yml 19 | 20 | - name: Include vars 21 | hosts: build 22 | tasks: 23 | - name: Include variables 24 | include_vars: "{{ item }}" 25 | with_items: 26 | - ../ib_actions.yml 27 | 28 | - name: Publish Docker images to registry 29 | hosts: build 30 | roles: 31 | - imagebuilder-publish 32 | -------------------------------------------------------------------------------- /roles/ansible-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # ansible-install/defaults/main.yml 19 | 20 | use_maas: false 21 | 22 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 23 | ssh_keytype: rsa 24 | pod_sshkey_name: "headnode" 25 | 26 | -------------------------------------------------------------------------------- /roles/ansible-install/files/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = false 3 | forks=20 4 | 5 | -------------------------------------------------------------------------------- /roles/ansible-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # file: ansible-install/tasks/main.yml 17 | 18 | - name: Install prerequisites for using PPA repos 19 | apt: 20 | name: "{{ item }}" 21 | update_cache: yes 22 | cache_valid_time: 3600 23 | with_items: 24 | - python-pycurl 25 | - software-properties-common 26 | - python-netaddr 27 | 28 | - name: Add Ansible PPA 29 | apt_repository: 30 | repo={{ item }} 31 | with_items: 32 | - "{{ ansible_apt_repo | default('ppa:ansible/ansible') }}" 33 | register: result 34 | until: result is success 35 | retries: 3 36 | delay: 10 37 | 38 | - name: Make sure Ansible is newest version 39 | apt: 40 | name: "ansible" 41 | state: latest 42 | update_cache: yes 43 | cache_valid_time: 3600 44 | tags: 45 | - skip_ansible_lint # ansible-lint complains about latest, need this as distro provided 1.5.x version may be used if already installed. 46 | -------------------------------------------------------------------------------- /roles/apache-proxy/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # apache-proxy/handlers/main.yml 19 | 20 | - name: reload apache2 21 | become: yes 22 | service: 23 | name: apache2 24 | state: reloaded 25 | -------------------------------------------------------------------------------- /roles/apache-proxy/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # apache-proxy/tasks/main.yml 19 | 20 | - name: Install Apache 21 | apt: 22 | name: "{{ item }}" 23 | update_cache: yes 24 | cache_valid_time: 3600 25 | with_items: 26 | - apache2 27 | - apache2-utils 28 | 29 | - name: Enable Apache2 Modules 30 | apache2_module: 31 | name: "{{ item }}" 32 | notify: reload apache2 33 | with_items: 34 | - proxy 35 | - proxy_http 36 | - proxy_wstunnel 37 | - rewrite 38 | - headers 39 | 40 | - name: Apache configuration for CORD sites 41 | copy: 42 | src: files/cord-http.conf 43 | dest: /etc/apache2/conf-available/cord-http.conf 44 | owner: root 45 | group: root 46 | mode: 0644 47 | notify: reload apache2 48 | 49 | - name: Enable CORD Apache Configuration 50 | command: a2enconf cord-http 51 | register: en_cord_http 52 | changed_when: en_cord_http.stdout.find('already enabled') == -1 53 | notify: reload apache2 54 | 55 | -------------------------------------------------------------------------------- /roles/apt-cacher-ng/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # apt-cacher-ng/defaults/main.yml 19 | 20 | apt_cacher_name: apt-cache 21 | apt_cacher_port: 3142 22 | 23 | apt_ssl_sites: 24 | - apt.dockerproject.org 25 | - download.docker.com 26 | - butler.opencloud.cs.arizona.edu 27 | - deb.nodesource.com 28 | - artifacts.elastic.co 29 | 30 | -------------------------------------------------------------------------------- /roles/apt-cacher-ng/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # apt-cacher-ng/handlers/main.yml 19 | 20 | - name: restart apt-cacher-ng 21 | service: 22 | name=apt-cacher-ng 23 | state=restarted 24 | -------------------------------------------------------------------------------- /roles/apt-cacher-ng/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # roles/apt-cacher-ng/tasks 19 | 20 | - name: Install apt-cacher-ng with apt 21 | apt: 22 | name: "{{ item }}" 23 | update_cache: yes 24 | cache_valid_time: 3600 25 | with_items: 26 | - apt-cacher-ng 27 | 28 | - name: Configure apt-cacher-ng to pass through ssl repos 29 | when: apt_ssl_sites is defined 30 | lineinfile: 31 | 'dest=/etc/apt-cacher-ng/acng.conf 32 | insertafter="^# PassThroughPattern" 33 | regexp="^PassThroughPattern" 34 | line="PassThroughPattern: ({{ apt_ssl_sites | join(\"|\")}}):443$"' 35 | notify: 36 | restart apt-cacher-ng 37 | 38 | - name: Configure local system to use apt-cacher-ng 39 | template: 40 | src: "{{ item }}.j2" 41 | dest: "/etc/apt/apt.conf.d/{{ item }}" 42 | owner: root 43 | group: root 44 | mode: "0644" 45 | with_items: 46 | - 02broken-repos 47 | - 03apt-cacher-ng 48 | 49 | -------------------------------------------------------------------------------- /roles/apt-cacher-ng/templates/02broken-repos.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | Acquire::http::Proxy { download.oracle.com DIRECT; }; 20 | -------------------------------------------------------------------------------- /roles/apt-cacher-ng/templates/03apt-cacher-ng.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | Acquire::http { Proxy "http://{{ apt_cacher_name }}:{{ apt_cacher_port }}"; }; 20 | -------------------------------------------------------------------------------- /roles/automation-integration/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # automation-integration/defaults/main.yml 19 | 20 | # paths 21 | head_cord_dir: "/opt/cord" 22 | 23 | cord_in_a_box: False 24 | -------------------------------------------------------------------------------- /roles/automation-integration/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # automation-integration/tasks/main.yml 19 | 20 | - name: Template do-enlist-compute-node script to /etc/maas/ansible/do-enlist-compute-node 21 | become: yes 22 | template: 23 | src=do-enlist-compute-node.j2 24 | dest=/etc/maas/ansible/do-enlist-compute-node 25 | owner=maas 26 | group=maas 27 | mode=0755 28 | 29 | - name: Have MAAS do-ansible script run do-enlist-compute-node script 30 | become: yes 31 | lineinfile: 32 | dest=/etc/maas/ansible/do-ansible 33 | line='/etc/maas/ansible/do-enlist-compute-node $ID $HOSTNAME || exit $?' 34 | 35 | -------------------------------------------------------------------------------- /roles/automation-integration/templates/do-enlist-compute-node.j2: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | 3 | {# 4 | Copyright 2017-present Open Networking Foundation 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | #} 18 | 19 | ID=$1 20 | HOSTNAME=$2 21 | LOG=/etc/maas/ansible/logs/$ID.log 22 | COMPUTE_USER=ubuntu 23 | 24 | INV=$(mktemp) 25 | cat >$INV <> $LOG 34 | cat $INV >> $LOG 35 | echo "END INVENTORY_FILE" >> $LOG 36 | 37 | echo "cd /opt/cord/build/platform-install; ansible-playbook --private-key=/etc/maas/ansible/id_rsa -u $COMPUTE_USER --extra-vars '@{{ head_cord_dir }}/build/genconfig/config.yml' -i $INV compute-node-enable-playbook.yml" >> $LOG 38 | 39 | cd /opt/cord/build/platform-install 40 | ansible-playbook --private-key=/etc/maas/ansible/id_rsa -u $COMPUTE_USER --extra-vars '@{{ head_cord_dir }}/build/genconfig/config.yml' -i $INV compute-node-enable-playbook.yml >> $LOG 41 | 42 | RESULT=$? 43 | rm $INV 44 | 45 | exit $RESULT 46 | -------------------------------------------------------------------------------- /roles/cloudlab-prep/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # roles/cloudlab-prep/defaults/main.yml 19 | 20 | cloudlab_extrafs: 21 | - { mount: /mnt/extra, dev: /dev/sdb } 22 | 23 | cloudlab_links: 24 | - { src: /mnt/extra/lxc, dest: /var/lib/lxc } 25 | - { src: /mnt/extra/lxd, dest: /var/lib/lxd } 26 | - { src: /mnt/extra/nova, dest: /var/lib/nova } 27 | - { src: /mnt/extra/juju, dest: /var/lib/juju } 28 | -------------------------------------------------------------------------------- /roles/cloudlab-prep/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # roles/cloudlab-prep/tasks/main.yml 17 | 18 | - name: create directories to mount extra filesystems 19 | file: 20 | dest={{ item.mount }} 21 | state=directory 22 | with_items: "{{ cloudlab_extrafs }}" 23 | 24 | # FIXME: does not create lost+found, -q makes it fail without error... 25 | - name: Set up extra disk space 26 | command: /usr/testbed/bin/mkextrafs -r {{ item.dev }} -qf {{ item.mount }} 27 | creates={{ item.mount }}/lost+found 28 | with_items: "{{ cloudlab_extrafs }}" 29 | register: result 30 | until: result is success 31 | retries: 3 32 | delay: 5 33 | 34 | - name: Set up symlink targets 35 | file: 36 | path: "{{ item.src }}" 37 | state: directory 38 | with_items: "{{ cloudlab_links }}" 39 | 40 | - name: Create symlinks 41 | file: 42 | src: "{{ item.src }}" 43 | dest: "{{ item.dest }}" 44 | state: link 45 | with_items: "{{ cloudlab_links }}" 46 | -------------------------------------------------------------------------------- /roles/common-prep/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # file: common-prep/defaults/main.yml 19 | 20 | run_dist_upgrade: False 21 | -------------------------------------------------------------------------------- /roles/common-prep/files/tmux.conf: -------------------------------------------------------------------------------- 1 | set-option -g history-limit 10000 2 | set-window-option -g mode-keys vi 3 | 4 | -------------------------------------------------------------------------------- /roles/common-prep/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # file: common-prep/handlers/main.yml 19 | 20 | # from https://support.ansible.com/hc/en-us/articles/201958037-Reboot-a-server-and-wait-for-it-to-come-back 21 | - name: restart host 22 | shell: > 23 | sleep 2 && shutdown -r now "Ansible updates triggered" 24 | async: 1 25 | poll: 0 26 | ignore_errors: true 27 | 28 | # wait 1m, then try to contact machine for 10m 29 | - name: wait for host 30 | become: false 31 | local_action: 32 | wait_for 33 | host={{ inventory_hostname }} 34 | port=22 35 | search_regex=OpenSSH 36 | delay=60 37 | timeout=600 38 | 39 | -------------------------------------------------------------------------------- /roles/compute-node-config/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # compute-node-config/defaults/main.yml 17 | 18 | # default site/deployment placeholder names 19 | site_name: placeholder-sitename 20 | deployment_type: placeholder-deploymenttype 21 | 22 | # location of cord_profile on head node 23 | head_cord_profile_dir: /opt/cord_profile 24 | 25 | # service configs referenced here are likely located in cord-profile/templates 26 | 27 | # used in openstack-compute-vtn.yaml.j2, referencing service in fabric.yaml.j2 28 | use_fabric: False 29 | 30 | # name of the fabric interface on compute nodes, 31 | # VTN adds it to `br-int`, when provided as the `dataPlaneIntf` 32 | # default values: 33 | # - `fabric` is default when using MaaS 34 | # - `fabricbond` is default for all other configs (created with interface-config role) 35 | 36 | vtn_integration_bridge_interface: fabricbond 37 | 38 | computenode_fabric_interfaces: 39 | - "{{ vtn_integration_bridge_interface }}" 40 | - br-int 41 | 42 | # used in openstack-compute-vtn.yaml.j2, referencing network in management-net.yaml.j2 43 | use_vtn_net_management_host: False 44 | vtn_net_management_host_interface: vethmgmt1 45 | 46 | -------------------------------------------------------------------------------- /roles/compute-node-config/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # compute-node-config/tasks/main.yml 19 | # 20 | # Build TOSCA to tell XOS that a new OpenStack compute node has been added 21 | 22 | - name: Create OpenStack compute node TOSCA 23 | template: 24 | src: "{{ item }}.j2" 25 | dest: "{{ head_cord_profile_dir }}/{{ item }}" 26 | owner: "{{ ansible_user_id }}" 27 | mode: 0644 28 | with_items: 29 | - openstack-compute.yaml 30 | - openstack-compute-vtn.yaml 31 | 32 | -------------------------------------------------------------------------------- /roles/compute-node-enable/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | # compute-node-enable/defaults/main.yml 18 | 19 | xos_tosca_url: "http://xos-tosca/xos-tosca" 20 | 21 | head_credentials_dir: "/opt/credentials" 22 | 23 | head_cord_profile_dir: "/opt/cord_profile" 24 | 25 | xos_admin_user: "xosadmin@opencord.org" 26 | head_xos_admin_pass: "{{ lookup('file', head_credentials_dir ~ '/' ~ xos_admin_user) }}" 27 | 28 | -------------------------------------------------------------------------------- /roles/compute-prep/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # compute-prep/defaults/main.yml 19 | 20 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 21 | 22 | pod_sshkey_name: "headnode" 23 | 24 | use_maas: False 25 | 26 | -------------------------------------------------------------------------------- /roles/compute-prep/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # file: roles/compute-prep/handlers/main.yml 19 | 20 | - name: update-ca-certificates 21 | command: update-ca-certificates 22 | -------------------------------------------------------------------------------- /roles/copy-cord/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # copy-cord/defaults/main.yml 19 | 20 | config_cord_dir: "/opt/cord" 21 | head_cord_dir: "/opt/cord" 22 | -------------------------------------------------------------------------------- /roles/copy-cord/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Copyright 2017-present Open Networking Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # copy-cord/tasks/main.yml 18 | 19 | - name: Copy (sync) the cord directory to head node 20 | become: yes 21 | synchronize: 22 | src: "{{ config_cord_dir }}/" 23 | dest: "{{ head_cord_dir }}/" 24 | 25 | - name: Set ownership on CORD dir on head node 26 | become: yes 27 | file: 28 | dest: "{{ head_cord_dir }}" 29 | state: directory 30 | recurse: true 31 | follow: false 32 | owner: "{{ ansible_user_id }}" 33 | group: "{{ ansible_user_gid }}" 34 | 35 | -------------------------------------------------------------------------------- /roles/copy-credentials/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # copy-credentials/defaults/main.yml 19 | 20 | credentials_dir: "{{ playbook_dir }}/credentials" 21 | 22 | head_credentials_dir: "/opt/credentials" 23 | -------------------------------------------------------------------------------- /roles/copy-credentials/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # copy-credentials/tasks/main.yml 19 | 20 | - name: Copy (sync) the credentials directory to head node, for MaaS provisioner 21 | become: yes 22 | synchronize: 23 | src: "{{ credentials_dir }}/" 24 | dest: "{{ head_credentials_dir }}/" 25 | 26 | - name: Set ownership on credentials dir on head node, for MaaS provisioner 27 | become: yes 28 | file: 29 | dest: "{{ head_credentials_dir }}" 30 | state: directory 31 | recurse: yes 32 | owner: "{{ ansible_user_id }}" 33 | group: "{{ ansible_user_gid }}" 34 | 35 | -------------------------------------------------------------------------------- /roles/copy-profile/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # copy-profile/defaults/main.yml 19 | 20 | config_cord_profile_dir: "/opt/cord_profile" 21 | head_cord_profile_dir: "/opt/cord_profile" 22 | -------------------------------------------------------------------------------- /roles/copy-profile/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # copy-profile/tasks/main.yml 19 | 20 | - name: Copy (sync) the cord_profile directory structure to head node 21 | synchronize: 22 | src: "{{ config_cord_profile_dir }}/" 23 | dest: "{{ head_cord_profile_dir }}/" 24 | delete: yes 25 | 26 | - name: Set ownership on cord_profile dir on head node 27 | file: 28 | dest: "{{ head_cord_profile_dir }}" 29 | state: directory 30 | recurse: yes 31 | owner: "{{ ansible_user_id }}" 32 | group: "{{ ansible_user_gid }}" 33 | 34 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/Dockerfile.xos.j2: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | FROM {{ pull_docker_registry }}xosproject/xos:{{ pull_docker_tag }} 18 | 19 | ARG XOS_GIT_COMMIT_HASH=unknown 20 | ARG XOS_GIT_COMMIT_DATE=unknown 21 | 22 | LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH 23 | LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE 24 | 25 | # Include local certificates for onboarding 26 | ADD im_cert_chain.pem /usr/local/share/ca-certificates/local_certs.crt 27 | RUN update-ca-certificates 28 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/admin-openrc.sh.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | export OS_USERNAME=admin 20 | export OS_PASSWORD={{ keystone_admin_password }} 21 | export OS_TENANT_NAME=admin 22 | export OS_AUTH_URL=https://keystone.{{ site_suffix }}:5000/v2.0 23 | export OS_REGION_NAME=RegionOne 24 | export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt 25 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/app.config.js.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | angular.module('app') 20 | .constant('AppConfig', { 21 | apiEndpoint: '{{ gui_api_endpoint }}', 22 | websocketClient: '{{ gui_websocket }}' 23 | }); 24 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/deployment.yaml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 20 | 21 | imports: 22 | - custom_types/deployment.yaml 23 | - custom_types/flavor.yaml 24 | 25 | description: deployment config, generated by platform-install 26 | 27 | topology_template: 28 | node_templates: 29 | 30 | # Flavors 31 | 32 | {% for flavor in deployment_flavors %} 33 | {{ flavor }}: 34 | type: tosca.nodes.Flavor 35 | properties: 36 | name: {{ flavor }} 37 | must-exist: true 38 | {% endfor %} 39 | 40 | # Deployment 41 | {{ deployment_type }}: 42 | type: tosca.nodes.Deployment 43 | properties: 44 | name: {{ deployment_type }} 45 | # NOTE look that this are outdated and not used anymore 46 | # requirements: 47 | # {% for flavor in deployment_flavors %} 48 | # - {{ flavor }}: 49 | # node: {{ flavor }} 50 | # relationship: tosca.relationships.SupportsFlavor 51 | 52 | # {% endfor %} 53 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/gateway-config.yml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | default: 20 | redis: 21 | host: redis 22 | port: 6379 23 | gateway: 24 | port: {{ gw_port }} -------------------------------------------------------------------------------- /roles/cord-profile/templates/initial_data.yaml.j2: -------------------------------------------------------------------------------- 1 | {# 2 | Copyright 2017-present Open Networking Foundation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | #} 16 | 17 | # Site 18 | - model: core.Site 19 | fields: 20 | name: "{{ site_name }}" 21 | abbreviated_name: "{{ site_name }}" 22 | login_base: "{{ site_name }}" 23 | site_url: "http://{{ site_name }}.opencloud.us/" 24 | hosts_nodes: true 25 | 26 | # User 27 | - model: core.User 28 | fields: 29 | email: "{{ xos_admin_user }}" 30 | password: "{{ xos_admin_pass }}" 31 | firstname: "{{ xos_admin_first }}" 32 | lastname: "{{ xos_admin_last }}" 33 | is_admin: True 34 | relations: 35 | site: 36 | fields: 37 | name: "{{ site_name }}" 38 | model: core.Site 39 | 40 | # All other users 41 | {% for user in xos_users %} 42 | - model: core.User 43 | fields: 44 | email: "{{ user.email }}" 45 | password: "{{ user.password }}" 46 | firstname: "{{ user.first | default(user.email) }}" 47 | lastname: "{{ user.last | default("unknown") }}" 48 | is_admin: "{{ user.admin | default("false") }}" 49 | relations: 50 | site: 51 | fields: 52 | name: "{{ site_name }}" 53 | model: core.Site 54 | 55 | {% endfor %} 56 | 57 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/style.config.js.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | angular.module('app') 20 | .constant('StyleConfig', { 21 | projectName: '{{ gui_project_name }}', 22 | favicon: '{{ gui_favicon }}', 23 | background: '{{ gui_background }}', 24 | payoff: '{{ gui_payoff }}', 25 | logo: '{{ gui_logo }}', 26 | routes: [ 27 | {% for route in gui_routes %} 28 | { 29 | label: '{{ route.label }}', 30 | state: '{{ route.state }}', 31 | {% if route.parent is defined %} 32 | parent: '{{ route.parent }}' 33 | {% endif %} 34 | }, 35 | {% endfor %} 36 | ] 37 | }); -------------------------------------------------------------------------------- /roles/cord-profile/templates/xos-tosca.config.yaml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | name: xos-tosca 20 | gprc_endpoint: "xos-core" 21 | local_cert: /usr/local/share/ca-certificates/local_certs.crt 22 | logging: 23 | version: 1 24 | handlers: 25 | console: 26 | class: logging.StreamHandler 27 | file: 28 | class: logging.handlers.RotatingFileHandler 29 | filename: /var/log/xos.log 30 | maxBytes: 10485760 31 | backupCount: 5 32 | loggers: 33 | '': 34 | handlers: 35 | - console 36 | - file 37 | level: DEBUG 38 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/xos_config.yaml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | name: xos-core 20 | database: 21 | name: {{ xos_db_name }} 22 | username: {{ xos_db_username }} 23 | password: {{ xos_db_password }} 24 | logging: 25 | version: 1 26 | handlers: 27 | console: 28 | class: logging.StreamHandler 29 | file: 30 | class: logging.handlers.RotatingFileHandler 31 | filename: /var/log/xos.log 32 | maxBytes: 10485760 33 | backupCount: 5 34 | loggers: 35 | 'multistructlog': 36 | handlers: 37 | - console 38 | - file 39 | level: DEBUG 40 | xos_dir: {{ xos_dir }} 41 | -------------------------------------------------------------------------------- /roles/cord-profile/templates/xos_config_synchronizer.yaml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | --- 20 | # generated by cord-profile from xos_config_synchronizer.yaml.j2 21 | 22 | accessor: 23 | {# endpoint: "xos-core.{{ site_suffix }}:50051" #} 24 | endpoint: "xos-core:50051" 25 | 26 | logging: 27 | version: 1 28 | handlers: 29 | console: 30 | class: logging.StreamHandler 31 | file: 32 | class: logging.handlers.RotatingFileHandler 33 | filename: /var/log/xos.log 34 | maxBytes: 10485760 35 | backupCount: 5 36 | loggers: 37 | 'multistructlog': 38 | handlers: 39 | - console 40 | - file 41 | level: DEBUG 42 | -------------------------------------------------------------------------------- /roles/create-configdirs-become/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # create-configdirs-privileged/defaults/main.yml 19 | 20 | # where the cord_profile directory is on the config node 21 | config_cord_profile_dir: "/opt/cord_profile" 22 | 23 | pki_dir: "{{ playbook_dir }}/pki" 24 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 25 | credentials_dir: "{{ playbook_dir }}/credentials" 26 | 27 | site_name: placeholder-sitename 28 | 29 | -------------------------------------------------------------------------------- /roles/create-lxd/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # create-lxd/defaults/main.yml 17 | 18 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 19 | pod_sshkey_name: "headnode" 20 | 21 | head_lxd_list: [] 22 | 23 | # For programatic generation of MAC addresses for LXD containers 24 | management_net_cidr: "10.1.0.0/24" 25 | management_net_bridge: "mgmtbridge" 26 | 27 | vtn_net_management_host_hwaddr_prefix: "06A6" 28 | vtn_net_management_host_cidr: "{{ management_net_cidr }}" 29 | 30 | use_maas: False 31 | -------------------------------------------------------------------------------- /roles/create-lxd/templates/ansible_hosts.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | [localhost] 20 | 127.0.0.1 hostname={{ ansible_fqdn }} 21 | 22 | [containers] 23 | {% if head_lxd_list is defined -%} 24 | {% for lxd in head_lxd_list -%} 25 | {{ lxd.name }} 26 | {% endfor -%} 27 | {% endif -%} 28 | 29 | [services:children] 30 | containers 31 | 32 | -------------------------------------------------------------------------------- /roles/dell-virt/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # file: roles/dell-virt/prep/tasks/main.yml 19 | 20 | - name: Trust the Dell apt repository 21 | apt_key: 22 | data: "{{ lookup('file', 'dell_apt_key.gpg') }}" 23 | 24 | - name: Add Dell apt repo 25 | apt_repository: 26 | repo="{{ dell_apt_repo | default('deb http://linux.dell.com/repo/community/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} openmanage') }}" 27 | 28 | - name: Install BIOS configuration scripts 29 | apt: 30 | update_cache=yes 31 | cache_valid_time=3600 32 | name=dtk-scripts 33 | 34 | # KVM virtualization is either "kvm_intel" or "kvm_amd" on amd64 35 | - name: Check to see if processor KVM virtualization module loaded in kernel 36 | shell: lsmod | grep kvm_ 37 | ignore_errors: true 38 | register: virtualization_enabled 39 | tags: 40 | - skip_ansible_lint # just used to register result 41 | 42 | - name: Enable virtualization in BIOS 43 | command: /opt/dell/toolkit/bin/syscfg --virtualization=enable 44 | when: virtualization_enabled|failed 45 | 46 | -------------------------------------------------------------------------------- /roles/dev-env/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # dev-env/handlers/main.yml 17 | 18 | - name: reload apache2 19 | become: yes 20 | service: 21 | name: apache2 22 | state: reloaded 23 | -------------------------------------------------------------------------------- /roles/dhcpd/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # dhcpd/handlers/main.yml 19 | 20 | - name: restart-dhcpd 21 | service: 22 | name: isc-dhcp-server 23 | state: restarted 24 | 25 | -------------------------------------------------------------------------------- /roles/dhcpd/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # dhcpd/tasks/main.yml 19 | 20 | - name: Install dhcpd 21 | apt: 22 | name: "{{ item }}" 23 | update_cache: yes 24 | cache_valid_time: 3600 25 | with_items: 26 | - isc-dhcp-server 27 | 28 | - name: Create /etc/dhcp/dhcpd.conf from template 29 | template: 30 | src: dhcpd.conf.j2 31 | dest: /etc/dhcp/dhcpd.conf 32 | mode: "0644" 33 | owner: root 34 | group: root 35 | # validate: 'dhcpd -t -cf %s' 36 | notify: 37 | - restart-dhcpd 38 | 39 | - name: Set interfaces for dhcpd to listen on 40 | template: 41 | src: isc-dhcp-server.j2 42 | dest: /etc/default/isc-dhcp-server 43 | mode: "0644" 44 | owner: root 45 | group: root 46 | notify: 47 | - restart-dhcpd 48 | 49 | -------------------------------------------------------------------------------- /roles/dhcpd/templates/isc-dhcp-server.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | # Defaults for isc-dhcp-server initscript 20 | # sourced by /etc/init.d/isc-dhcp-server 21 | # installed at /etc/default/isc-dhcp-server by the maintainer scripts 22 | 23 | # 24 | # This is a POSIX shell fragment 25 | # 26 | 27 | # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf). 28 | #DHCPD_CONF=/etc/dhcp/dhcpd.conf 29 | 30 | # Path to dhcpd's PID file (default: /var/run/dhcpd.pid). 31 | #DHCPD_PID=/var/run/dhcpd.pid 32 | 33 | # Additional options to start dhcpd with. 34 | # Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead 35 | #OPTIONS="" 36 | 37 | # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? 38 | # Separate multiple interfaces with spaces, e.g. "eth0 eth1". 39 | INTERFACES="{{ dhcpd_subnets | map(attribute='interface') | join(' ') }}" 40 | 41 | -------------------------------------------------------------------------------- /roles/dns-configure/templates/base.j2: -------------------------------------------------------------------------------- 1 | {# 2 | Copyright 2017-present Open Networking Foundation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | #} 16 | # Created by dns-configure/templates/base.j2 17 | {% if dns_search is defined %} 18 | search{% for searchdom in dns_search %} {{ searchdom }}{% endfor %} 19 | {% endif %} 20 | -------------------------------------------------------------------------------- /roles/dns-configure/templates/head.j2: -------------------------------------------------------------------------------- 1 | {# 2 | Copyright 2017-present Open Networking Foundation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | #} 16 | 17 | # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 18 | # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 19 | # Make changes to /etc/resolvconf/resolv.conf.d instead 20 | # Created by dns-configure/templates/head.j2 21 | {% if unbound_listen_on_default %} 22 | {% for host in groups['head'] %} 23 | nameserver {{ hostvars[host].ansible_default_ipv4.address }} 24 | {% endfor %} 25 | {% endif %} 26 | {% if dns_servers is defined %} 27 | {% for ns in dns_servers %} 28 | nameserver {{ ns }} 29 | {% endfor %} 30 | {% endif %} 31 | -------------------------------------------------------------------------------- /roles/dns-configure/templates/resolv.conf.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | # resolv.conf (ansible managed) 20 | {% if unbound_listen_on_default %} 21 | {% for host in groups['head'] %} 22 | nameserver {{ hostvars[host].ansible_default_ipv4.address }} 23 | {% endfor %} 24 | {% endif %} 25 | {% if dns_servers is defined %} 26 | {% for ns in dns_servers %} 27 | nameserver {{ ns }} 28 | {% endfor %} 29 | {% endif %} 30 | {% if dns_search is defined %} 31 | search{% for searchdom in dns_search %} {{ searchdom }}{% endfor %} 32 | {% endif %} 33 | -------------------------------------------------------------------------------- /roles/dns-nsd/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # dns-nsd/handlers/main.yml 17 | 18 | - name: reload-nsd 19 | service: 20 | name: nsd 21 | enabled: yes 22 | state: reloaded 23 | 24 | - name: restart-nsd 25 | service: 26 | name: nsd 27 | enabled: yes 28 | state: restarted 29 | 30 | -------------------------------------------------------------------------------- /roles/dns-nsd/templates/nsd.conf.j2: -------------------------------------------------------------------------------- 1 | {# 2 | Copyright 2017-present Open Networking Foundation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | #} 16 | 17 | # nsd.conf 18 | # created by dns-nsd/templates/nsd.conf.j2 19 | 20 | server: 21 | hide-version: yes 22 | ## bind to a specific address/port 23 | ip-address: {{ nsd_ip }} 24 | ## port number 25 | port: {{ nsd_port }} 26 | server-count: 1 27 | ip4-only: yes 28 | zonesdir: {{ nsd_zonesdir }} 29 | 30 | remote-control: 31 | control-enable: yes 32 | 33 | # zonefiles to load 34 | {% for zone in nsd_zones %} 35 | zone: 36 | name: {{ zone.name }} 37 | zonefile: {{ zone.name }}.forward 38 | 39 | zone: 40 | name: {{ zone.cidr | unbound_revdns }} 41 | zonefile: {{ zone.name }}.reverse 42 | 43 | {% endfor %} 44 | 45 | -------------------------------------------------------------------------------- /roles/dns-nsd/templates/zone.reverse.j2: -------------------------------------------------------------------------------- 1 | {# 2 | Copyright 2017-present Open Networking Foundation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | #} 16 | 17 | ;## NSD authoritative only DNS 18 | ;## REVERSE Zone for {{ item.name }} 19 | ;# created by ansible 20 | 21 | $ORIGIN {{ item.name }}. ; default zone domain 22 | $TTL {{ item.ttl | default(dns_ttl) }} ; default time to live 23 | 24 | {{ item.cidr | unbound_revdns }} IN SOA {{ item.soa }}.{{ item.name }}. admin.{{ item.name }}. ( 25 | {{ item.serial | default(ansible_date_time.epoch) }} ; Serial, must be incremented every time you change this file 26 | 3600 ; Refresh [1hr] 27 | 600 ; Retry [10m] 28 | 3600 ; Expire [1hr] 29 | 60 ; Min TTL [1m] 30 | ) 31 | 32 | ; -- PTR records -- 33 | 34 | {% for nodelist in item.nodelists %} 35 | ; Created from nodelist: {{ nodelist }} 36 | {% set nodes = vars[nodelist] %} 37 | {% for node in nodes %} 38 | {{ item.cidr | ipaddr(node.ipv4_last_octet) | ipaddr('revdns') }} IN PTR {{ node.name }} 39 | {% endfor %} 40 | {% endfor %} 41 | 42 | -------------------------------------------------------------------------------- /roles/dns-unbound/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # dns-unbound/handlers/main.yml 17 | 18 | - name: start-unbound 19 | service: 20 | name: unbound 21 | enabled: yes 22 | state: started 23 | 24 | - name: reload-unbound 25 | service: 26 | name: unbound 27 | enabled: yes 28 | state: reloaded 29 | 30 | -------------------------------------------------------------------------------- /roles/dns-unbound/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # dns-unbound/tasks/main.yml 17 | 18 | - name: Install unbound 19 | apt: 20 | name: "{{ item }}" 21 | state: present 22 | update_cache: yes 23 | cache_valid_time: 3600 24 | with_items: 25 | - unbound 26 | register: unbound_install 27 | 28 | - name: Stop unbound until configured 29 | when: unbound_install.changed 30 | service: 31 | name: unbound 32 | enabled: no 33 | state: stopped 34 | tags: 35 | - skip_ansible_lint # need to down service before configured 36 | 37 | - name: create unbound.conf from template 38 | template: 39 | src: unbound.conf.j2 40 | dest: "{{ unbound_conf }}" 41 | mode: 0644 42 | owner: root 43 | group: "{{ unbound_group }}" 44 | # validate='unbound-checkconf %s' - can't use, checks path, not just config. 45 | notify: 46 | - reload-unbound 47 | 48 | - name: flush unbound handlers 49 | meta: flush_handlers 50 | 51 | -------------------------------------------------------------------------------- /roles/docker-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # docker-install/defaults/main.yml 19 | 20 | docker_apt_repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" 21 | docker_opts: "" 22 | -------------------------------------------------------------------------------- /roles/docker-install/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # apache-proxy/handlers/main.yml 19 | 20 | - name: restart docker 21 | become: yes 22 | service: 23 | name: docker 24 | state: restarted 25 | -------------------------------------------------------------------------------- /roles/docker-install/templates/default_docker.j2: -------------------------------------------------------------------------------- 1 | {# 2 | Copyright 2017-present Open Networking Foundation 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | #} 16 | 17 | # Docker Upstart and SysVinit configuration file 18 | 19 | # Use DOCKER_OPTS to modify the daemon startup options. 20 | {% if docker_opts is defined %} 21 | DOCKER_OPTS="{{ docker_opts }}" 22 | {% endif %} 23 | 24 | -------------------------------------------------------------------------------- /roles/docker-registry-client/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # docker-registry-client/defaults/main.yml 17 | 18 | pki_dir: "{{ playbook_dir }}/pki" 19 | 20 | # site name 21 | site_name: placeholder-sitename 22 | site_suffix: "{{ site_name }}.test" 23 | 24 | # docker registry 25 | docker_registry_ext_port: "5000" 26 | docker_registry: "docker-registry.{{ site_suffix }}:{{ docker_registry_ext_port }}" 27 | 28 | -------------------------------------------------------------------------------- /roles/docker-registry-client/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # docker-registry-client/tasks/main.yml 17 | # Configure a node to be able to access the docker registry 18 | 19 | - name: Create directories for registry access client SSL keys 20 | file: 21 | state: directory 22 | dest: "{{ item }}" 23 | owner: root 24 | group: docker 25 | mode: 0755 26 | with_items: 27 | - "/etc/docker/certs.d/" 28 | - "/etc/docker/certs.d/{{ docker_registry }}" 29 | 30 | - name: Copy over registry access client SSL keys 31 | copy: 32 | src: "{{ item.src }}" 33 | dest: "/etc/docker/certs.d/{{ docker_registry }}/{{ item.dest }}" 34 | mode: "{{ item.mode }}" 35 | owner: root 36 | group: docker 37 | with_items: 38 | - src: "{{ pki_dir }}/root_ca/certs/ca_cert.pem" 39 | dest: "ca.crt" 40 | mode: "0444" 41 | - src: "{{ pki_dir }}/{{ site_name }}_im_ca/certs/dockerclient_cert_chain.pem" 42 | dest: "client.cert" 43 | mode: "0444" 44 | - src: "{{ pki_dir }}/{{ site_name }}_im_ca/private/dockerclient_key.pem" 45 | dest: "client.key" 46 | mode: "0400" 47 | 48 | -------------------------------------------------------------------------------- /roles/docker-registry/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # docker-registry/defaults/main.yml 17 | 18 | pki_dir: "{{ playbook_dir }}/pki" 19 | credentials_dir: "{{ playbook_dir }}/credentials" 20 | 21 | # docker registry settings 22 | docker_registry_dir: "/var/lib/docker_registry" 23 | 24 | docker_registry_image: "registry:2" 25 | docker_registry_ext_port: "5000" 26 | 27 | docker_registry_http_secret: "{{ lookup('password', credentials_dir ~ '/docker_registry_http_secret chars=ascii_letters,digits,length=32') }}" 28 | 29 | -------------------------------------------------------------------------------- /roles/docker-registry/templates/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | version: '2' 3 | 4 | services: 5 | registry: 6 | restart: always 7 | image: {{ docker_registry_image }} 8 | ports: 9 | - {{ docker_registry_ext_port }}:5000 10 | environment: 11 | REGISTRY_HTTP_TLS_CERTIFICATE: /certs/docker_registry.pem 12 | REGISTRY_HTTP_TLS_KEY: /certs/docker_registry_key.pem 13 | REGISTRY_HTTP_TLS_CLIENTCAS: "[ '/certs/ca_cert.pem' ]" 14 | REGISTRY_HTTP_SECRET: {{ docker_registry_http_secret }} 15 | volumes: 16 | - {{ docker_registry_dir }}/data:/var/lib/registry 17 | - {{ docker_registry_dir }}/certs:/certs 18 | 19 | -------------------------------------------------------------------------------- /roles/elasticstack/files/10-udp-input.conf: -------------------------------------------------------------------------------- 1 | input { 2 | udp { 3 | port => 5617 4 | codec => json 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /roles/elasticstack/files/11-log4j-input.conf: -------------------------------------------------------------------------------- 1 | input { 2 | log4j { 3 | port => 4560 4 | type => "log4j" 5 | } 6 | } 7 | 8 | filter { 9 | mutate { 10 | rename => {"priority" => "level"} 11 | rename => {"bundle.id" => "bundle_id"} 12 | rename => {"bundle.name" => "bundle_name"} 13 | rename => {"bundle.version" => "bundle_version"} 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /roles/elasticstack/files/12-syslog-input.conf: -------------------------------------------------------------------------------- 1 | input { 2 | syslog { 3 | port => 2514 4 | type => "syslog" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /roles/elasticstack/files/30-elasticsearch-output.conf: -------------------------------------------------------------------------------- 1 | output { 2 | elasticsearch { hosts => ["localhost:9200"] } 3 | } 4 | -------------------------------------------------------------------------------- /roles/elasticstack/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # elasticstack/handlers/main.yml 19 | 20 | - name: restart logstash 21 | service: 22 | name: logstash 23 | state: restarted 24 | 25 | - name: restart elasticsearch 26 | service: 27 | name: elasticsearch 28 | state: restarted 29 | 30 | - name: restart kibana 31 | service: 32 | name: kibana 33 | state: restarted 34 | 35 | -------------------------------------------------------------------------------- /roles/exampleservice-config/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # exampleservice-config/defaults/main.yml 19 | 20 | # As a test, this is assumed to entirely run on the head node 21 | head_cord_dir: "/opt/cord" 22 | head_cord_profile_dir: "/opt/cord_profile" 23 | -------------------------------------------------------------------------------- /roles/exampleservice-config/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # exampleservice-config/tasks/main.yml 19 | 20 | - name: Create fake/empty ssh keys if profile hasn't created them 21 | copy: 22 | remote_src: True # file is local to the remote machine 23 | force: False # only copy if destination file doesn't exist 24 | src: "/dev/null" 25 | dest: "{{ head_cord_profile_dir }}/key_import/{{ item }}" 26 | mode: 0600 27 | with_items: 28 | - exampleservice_rsa 29 | - exampleservice_rsa.pub 30 | 31 | - name: TOSCA to create exampleservice test config 32 | template: 33 | src: "test-exampleservice.yaml.j2" 34 | dest: "{{ head_cord_profile_dir }}/test-exampleservice.yaml" 35 | 36 | -------------------------------------------------------------------------------- /roles/fabric-compute-prep/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | - name: Ensure no host entry for fabric interface 18 | uri: 19 | url: http://10.1.0.1:8181/onos/v1/hosts/{{ ansible_fabric.macaddress | replace(":", "%3A") }}/None 20 | method: DELETE 21 | user: onos 22 | password: rocks 23 | ignore_errors: true 24 | 25 | - name: Check that br-int exists 26 | command: ifconfig br-int 27 | changed_when: false 28 | tags: 29 | - skip_ansible_lint # running a sub job 30 | 31 | # Needed for CPqD switch 32 | - name: Turn off TCP checksum offload on fabric interface 33 | become: yes 34 | command: ethtool -K fabric tx off 35 | changed_when: false 36 | tags: 37 | - skip_ansible_lint # running a sub job 38 | 39 | - name: Send ping on fabric, expected to fail b/c fabric not set up 40 | command: ping -I br-int -c 3 10.6.1.254 41 | ignore_errors: true 42 | changed_when: false 43 | tags: 44 | - skip_ansible_lint # running a sub job 45 | -------------------------------------------------------------------------------- /roles/fabric-head-prep/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | - name: Check that fabric exists 18 | command: ifconfig fabric 19 | changed_when: false 20 | tags: 21 | - skip_ansible_lint # running a sub job 22 | 23 | # Needed for CPqD switch 24 | - name: Turn off TCP checksum offload on fabric interface 25 | become: yes 26 | command: ethtool -K fabric tx off 27 | changed_when: false 28 | tags: 29 | - skip_ansible_lint # running a sub job 30 | 31 | - name: Send ping on fabric, expected to fail b/c fabric not set up 32 | command: ping -I fabric -c 3 10.6.1.254 33 | ignore_errors: true 34 | changed_when: false 35 | tags: 36 | - skip_ansible_lint # running a sub job 37 | -------------------------------------------------------------------------------- /roles/fabric-pingtest/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | - name: Ping gateway IP addresses 18 | command: ping -c 20 {{ item }} 19 | with_items: 20 | - 10.6.1.1 21 | - 10.7.1.1 22 | - 10.8.1.1 23 | changed_when: false 24 | tags: 25 | - skip_ansible_lint # running a sub job 26 | -------------------------------------------------------------------------------- /roles/fabric-refresh/defaults/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2017-present Open Networking Foundation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | head_cord_profile_dir: "/opt/cord_profile" 16 | cord_use_case: rcord 17 | 18 | config_credentials_dir: "{{ playbook_dir }}/credentials" 19 | 20 | xos_admin_user: "xosadmin@opencord.org" 21 | xos_admin_pass: "{{ lookup('file', config_credentials_dir ~ '/' ~ xos_admin_user) }}" 22 | 23 | xos_tosca_url: "http://xos-tosca/xos-tosca" 24 | -------------------------------------------------------------------------------- /roles/glance-images/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # glance-images/defaults/main.yml 19 | 20 | use_openstack: True 21 | 22 | image_dir: /opt/images 23 | 24 | xos_images: [] 25 | 26 | -------------------------------------------------------------------------------- /roles/glance-images/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # glance-images/tasks/main.yml 17 | 18 | - name: Make images directory 19 | when: use_openstack 20 | become: yes 21 | file: 22 | path: "{{ image_dir }}" 23 | state: directory 24 | mode: 0755 25 | owner: "{{ ansible_user_id }}" 26 | group: "{{ ansible_user_gid }}" 27 | 28 | - name: Download Glance VM images 29 | when: use_openstack 30 | get_url: 31 | url: "{{ item.url }}" 32 | checksum: "{{ item.checksum }}" 33 | dest: "{{ image_dir }}/{{ item.name }}.qcow2" 34 | with_items: "{{ xos_images }}" 35 | register: glance_vm_result 36 | until: glance_vm_result is success 37 | retries: 5 38 | delay: 10 39 | 40 | - name: Copy Glance VM images to profile directory 41 | when: use_openstack 42 | copy: 43 | remote_src: yes 44 | src: "{{ image_dir }}/{{ item.name }}.qcow2" 45 | dest: "/opt/cord_profile/images/{{ item.name }}.qcow2" 46 | with_items: "{{ xos_images }}" 47 | 48 | -------------------------------------------------------------------------------- /roles/head-diag/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | 19 | -------------------------------------------------------------------------------- /roles/head-prep/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # head-prep/defaults/main.yml 17 | 18 | use_maas: False 19 | use_openstack: True 20 | 21 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 22 | ssh_keytype: rsa 23 | pod_sshkey_name: "headnode" 24 | 25 | -------------------------------------------------------------------------------- /roles/head-prep/files/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = false 3 | forks=20 4 | 5 | -------------------------------------------------------------------------------- /roles/helm/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # helm/defaults/main.yml 17 | 18 | # These vars need to be determined on a per-OS/arch basis 19 | cpu_arch: "amd64" 20 | helm_version: "v2.8.0" 21 | helm_dl_checksum: "sha256:6e1f5957f9c7cec8463f38cf658bea0cf225fc324236617b23fe9044e9dd4ba7" 22 | 23 | helm_dl_url: "https://storage.googleapis.com/kubernetes-helm/helm-{{ helm_version }}-{{ ansible_system | lower }}-{{ cpu_arch }}.tar.gz" 24 | 25 | helm_bin_path: "/usr/local/bin/helm" 26 | 27 | -------------------------------------------------------------------------------- /roles/imagebuilder-publish/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # imagebuilder-publish/defaults/main.yml 17 | 18 | deploy_docker_registry: "" 19 | deploy_docker_tag: "candidate" 20 | 21 | build_docker_tag: "candidate" 22 | -------------------------------------------------------------------------------- /roles/imagebuilder-publish/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | - name: Remove old local images 19 | docker_image: 20 | name: "{{ deploy_docker_registry }}/{{ item.base }}:{{ deploy_docker_tag }}" 21 | state: absent 22 | with_flattened: 23 | - "{{ ib_built }}" 24 | - "{{ ib_pulled }}" 25 | - "{{ ib_preexisting_images }}" 26 | 27 | - name: Tag and push the images managed by ImageBuilder 28 | docker_image: 29 | name: "{{ item.base }}:{{ build_docker_tag }}" 30 | repository: "{{ deploy_docker_registry }}/{{ item.base }}:{{ deploy_docker_tag }}" 31 | push: True 32 | with_flattened: 33 | - "{{ ib_built }}" 34 | - "{{ ib_pulled }}" 35 | - "{{ ib_preexisting_images }}" 36 | -------------------------------------------------------------------------------- /roles/interface-config/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # interface-config/handlers/main.yml 3 | 4 | # the next handler may need to change in 16.04 as iptables-persistent was split 5 | # and may need 'netfilter-persistent' installed as well 6 | - name: iptables-save 7 | shell: iptables-save | grep -vi docker > /etc/iptables/rules.v4 8 | tags: 9 | - skip_ansible_lint 10 | 11 | -------------------------------------------------------------------------------- /roles/java-oracle/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # java-oracle/tasks/main 17 | 18 | - name: Install add-apt-repository 19 | become: yes 20 | apt: 21 | name: "{{ item }}" 22 | update_cache: yes 23 | cache_valid_time: 3600 24 | with_items: 25 | - apt-transport-https 26 | - software-properties-common 27 | - ca-certificates 28 | 29 | - name: Add Oracle Java repository 30 | become: yes 31 | apt_repository: 32 | repo: 'ppa:webupd8team/java' 33 | register: result 34 | until: result is success 35 | retries: 3 36 | delay: 10 37 | 38 | - name: Accept Java 8 license 39 | become: yes 40 | debconf: 41 | name: 'oracle-java8-installer' 42 | question: 'shared/accepted-oracle-license-v1-1' 43 | value: 'true' 44 | vtype: 'select' 45 | 46 | - name: Install Oracle Java 8 47 | become: yes 48 | apt: 49 | name: "{{ item }}" 50 | update_cache: yes 51 | cache_valid_time: 3600 52 | with_items: 53 | - oracle-java8-installer 54 | - oracle-java8-set-default 55 | 56 | -------------------------------------------------------------------------------- /roles/juju-compute-setup/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # juju-compute-setup/defaults/main.yml 19 | 20 | # note: juju_config_path and charm_versions are also set in 21 | # `juju-setup/defaults/main.yml`. Keep these in sync. 22 | 23 | juju_config_path: /usr/local/src/juju_config.yml 24 | charm_versions: {} 25 | 26 | -------------------------------------------------------------------------------- /roles/juju-finish/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # juju-finish/tasks/main.yml 17 | 18 | # run another time, so services will be in juju_services list 19 | - name: Obtain Juju Facts after service creation 20 | juju_facts: 21 | register: result 22 | until: result is success 23 | retries: 3 24 | delay: 15 25 | 26 | # 1800s = 30m. Usually takes 10-12m on cloudlab for relations to come up 27 | # Only checks for first port in list 28 | - name: Wait for juju services to have open ports 29 | wait_for: 30 | host={{ item.name }} 31 | port={{ item.forwarded_ports[0].int }} 32 | timeout=1800 33 | with_items: "{{ head_lxd_list | selectattr('forwarded_ports', 'defined') | list }}" 34 | 35 | # secondary wait, as waiting on ports isn't enough. Probably only need one of these... 36 | # 160*15s = 2400s = 40m max wait 37 | - name: Wait for juju services to start 38 | command: juju status --format=summary 39 | register: juju_summary 40 | until: juju_summary.stdout.find("pending:") == -1 41 | retries: 160 42 | delay: 15 43 | tags: 44 | - skip_ansible_lint # checking/waiting on a system to be up 45 | 46 | -------------------------------------------------------------------------------- /roles/juju-setup/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Copyright 2017-present Open Networking Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # juju-setup/defaults/main.yml 18 | # 19 | # note: juju_config_path and charm_versions are also set in 20 | # `juju-compute-setup/defaults/main.yml`. Keep these in sync. 21 | 22 | juju_config_path: /usr/local/src/juju_config.yml 23 | charm_versions: {} 24 | 25 | pki_dir: "{{ playbook_dir }}/pki" 26 | credentials_dir: "{{ playbook_dir }}/credentials" 27 | 28 | site_name: placeholder-sitename 29 | site_suffix: "{{ site_name }}.test" 30 | 31 | keystone_admin_password: "{{ lookup('password', credentials_dir ~ '/cord_keystone_admin chars=ascii_letters,digits') }}" 32 | 33 | use_dpdk: False 34 | vcpu_pin_set: "^0,^2" 35 | hugepages: "60%" 36 | dpdk_socket_memory: "1024,0" 37 | dpdk_lcore_mask: "0x1" 38 | fabric_interfaces: "eth2" 39 | pmd_cpu_mask: "0x2" 40 | -------------------------------------------------------------------------------- /roles/juju-setup/templates/environments.yaml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | default: manual 20 | environments: 21 | manual: 22 | type: manual 23 | bootstrap-host: juju.{{ site_suffix }} 24 | bootstrap-user: ubuntu 25 | default-series: {{ ansible_distribution_release }} 26 | bootstrap-timeout: 900 # 15 minutes 27 | -------------------------------------------------------------------------------- /roles/kubectl/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # kubeadm/defaults/main.yml 17 | 18 | kubernetes_version: "1.9.5" 19 | 20 | # These vars need to be determined on a per-OS/arch/dl basis 21 | cpu_arch: "amd64" 22 | kubectl_dl_checksum: "sha256:9c67b6e80e9dd3880511c7d912c5a01399c1d74aaf4d71989c7d5a4f2534bcd5" 23 | 24 | kubectl_dl_url: "https://storage.googleapis.com/kubernetes-release/release/v{{ kubernetes_version }}/bin/{{ ansible_system | lower }}/{{ cpu_arch }}/kubectl" 25 | 26 | kubectl_bin_path: "/usr/local/bin/kubectl" 27 | 28 | -------------------------------------------------------------------------------- /roles/kubectl/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # kubectl/tasks/main.yml 17 | # Installs Kubectl for kubernetes 18 | 19 | - name: Download and install kubectl 20 | become: yes 21 | get_url: 22 | url: "{{ kubectl_dl_url }}" 23 | checksum: "{{ kubectl_dl_checksum }}" 24 | dest: "{{ kubectl_bin_path }}" 25 | owner: root 26 | group: root 27 | mode: 0755 28 | 29 | -------------------------------------------------------------------------------- /roles/lxd-finish/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # lxd-finish/defaults/main.yml 19 | 20 | use_apt_cache: True 21 | 22 | apt_cacher_name: apt-cache 23 | 24 | run_dist_upgrade: False 25 | 26 | -------------------------------------------------------------------------------- /roles/mavenrepo-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # mavenrepo-install/tasks/main.yml 19 | 20 | head_mavenrepo_dir: /opt/mavenrepo 21 | 22 | # Docker related settings 23 | pull_docker_registry: "" 24 | pull_docker_tag: "candidate" 25 | 26 | -------------------------------------------------------------------------------- /roles/mavenrepo-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # mavenrepo-install/tasks/main.yml 19 | 20 | - name: Create mavenrepo directory 21 | become: yes 22 | file: 23 | path: "{{ head_mavenrepo_dir }}" 24 | state: directory 25 | owner: "{{ ansible_user_id }}" 26 | group: "{{ ansible_user_gid }}" 27 | mode: 0755 28 | 29 | - name: Create docker-compose file for mavenrepo 30 | template: 31 | src: docker-compose.yml.j2 32 | dest: "{{ head_mavenrepo_dir }}/docker-compose.yml" 33 | owner: "{{ ansible_user_id }}" 34 | group: "{{ ansible_user_gid }}" 35 | mode: 0644 36 | 37 | - name: Start mavenrepo for onos-apps 38 | docker_service: 39 | project_name: "mavenrepo" 40 | project_src: "{{ head_mavenrepo_dir }}" 41 | 42 | -------------------------------------------------------------------------------- /roles/mavenrepo-install/templates/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | # docker-compose.yml for onos-apps mavenrepo 20 | version: '2' 21 | 22 | services: 23 | 24 | mavenrepo: 25 | image: {{ pull_docker_registry }}opencord/mavenrepo:{{ pull_docker_tag }} 26 | container_name: mavenrepo 27 | ports: 28 | - "8080:80" 29 | restart: unless-stopped 30 | 31 | 32 | -------------------------------------------------------------------------------- /roles/onos-cord-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onos-cord-install/defaults/main.yml 19 | 20 | # paths 21 | pki_dir: "{{ playbook_dir }}/pki" 22 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 23 | head_onos_cord_dir: "/opt/onos_cord" 24 | 25 | # ONOS docker image to use 26 | pull_docker_registry: "" 27 | pull_docker_tag: "candidate" 28 | onos_docker_image: "{{ pull_docker_registry }}onosproject/onos:{{ pull_docker_tag }}" 29 | 30 | # log level for ONOS 31 | onos_log_level: "INFO" 32 | 33 | # name of master ssh key for this pod 34 | pod_sshkey_name: "headnode" 35 | 36 | # used for Java KeyStore within ONOS image 37 | trust_store_pw: "changeit" 38 | 39 | # logging_host should be set to DNS or IP addr of logstash host 40 | logging_host: "cordloghost" 41 | log4j_port: 4560 42 | 43 | -------------------------------------------------------------------------------- /roles/onos-cord-install/templates/Dockerfile.j2: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | # ONOS dockerfile with XOS/CORD additions 18 | 19 | FROM {{ onos_docker_image }} 20 | MAINTAINER Zack Williams 21 | 22 | RUN apk update && apk add java-cacerts 23 | 24 | # Add SSL certs 25 | COPY cord_root_ca.crt /usr/local/share/ca-certificates/cord_root_ca.crt 26 | COPY cord_{{ site_name }}_im_ca.crt /usr/local/share/ca-certificates/cord_{{ site_name }}_im_ca.crt 27 | RUN update-ca-certificates 28 | 29 | # Let ONOS know where the keystore is 30 | ENV JAVA_OPTS="-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStorePassword={{ trust_store_pw }}" 31 | 32 | # Configure ONOS to log with log4j to ElasticStack 33 | COPY org.ops4j.pax.logging.cfg /root/onos/apache-karaf-3.0.5/etc/org.ops4j.pax.logging.cfg 34 | -------------------------------------------------------------------------------- /roles/onos-cord-install/templates/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | # ONOS with XOS features for docker-compose 20 | version: '2' 21 | 22 | services: 23 | 24 | xos-onos: 25 | image: xos/onos:{{ pull_docker_tag }} 26 | ports: 27 | - "6654:6653" 28 | - "8102:8101" 29 | - "8182:8181" 30 | - "9877:9876" 31 | volumes: 32 | - ./node_key:/root/node_key:ro 33 | restart: unless-stopped 34 | 35 | -------------------------------------------------------------------------------- /roles/onos-debug/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onos-debug/defaults/main.yml 19 | 20 | onos_cord_port: 8102 21 | 22 | onos_debug_level: "TRACE" 23 | 24 | onos_debug_appnames: 25 | - org.opencord.vtn 26 | 27 | -------------------------------------------------------------------------------- /roles/onos-debug/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onos-debug/tasks/main.yml 19 | 20 | - name: Wait for apps to load via profle, and onos-cord container to be accessible via SSH 21 | wait_for: 22 | host: localhost 23 | port: "{{ onos_cord_port }}" 24 | search_regex: "SSHD-CORE" 25 | delay: 30 26 | timeout: 180 27 | 28 | - name: Enable ONOS debugging for specific apps 29 | shell: "sshpass -p 'karaf' ssh -p {{ onos_cord_port }} karaf@localhost log:set {{ onos_debug_level }} {{ item }}" 30 | ignore_errors: yes 31 | with_items: "{{ onos_debug_appnames }}" 32 | tags: 33 | - skip_ansible_lint # collecting docker container names 34 | 35 | -------------------------------------------------------------------------------- /roles/onos-fabric-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onos-fabric-install/defaults/main.yml 19 | 20 | # paths 21 | head_onos_fabric_dir: "/opt/onos_fabric" 22 | 23 | # ONOS docker image to use 24 | pull_docker_registry: "" 25 | pull_docker_tag: "candidate" 26 | onos_docker_image: "{{ pull_docker_registry }}onosproject/onos:{{ pull_docker_tag }}" 27 | 28 | -------------------------------------------------------------------------------- /roles/onos-fabric-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # onos-fabric-install/tasks/main.yml 19 | 20 | - name: Pull base docker image for ONOS 21 | docker_image: 22 | name: "{{ onos_docker_image }}" 23 | 24 | - name: Create onos-fabric dest directory 25 | become: yes 26 | file: 27 | path: "{{ head_onos_fabric_dir }}" 28 | state: directory 29 | owner: "{{ ansible_user_id }}" 30 | group: "{{ ansible_user_gid }}" 31 | mode: 0755 32 | 33 | - name: Create templated ONOS files 34 | template: 35 | src: "{{ item }}.j2" 36 | dest: "{{ head_onos_fabric_dir }}/{{ item }}" 37 | with_items: 38 | - docker-compose.yml 39 | 40 | # Note: we do not rebuild onos container for the fabric 41 | 42 | - name: Start ONOS for fabric 43 | docker_service: 44 | project_name: "onosfabric" 45 | project_src: "{{ head_onos_fabric_dir }}" 46 | 47 | -------------------------------------------------------------------------------- /roles/onos-fabric-install/templates/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | Copyright 2017-present Open Networking Foundation 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | #} 17 | 18 | 19 | # ONOS with XOS features for docker-compose 20 | version: '2' 21 | 22 | services: 23 | 24 | xos-onos: 25 | image: {{ onos_docker_image }} 26 | ports: 27 | - "6653:6653" # OpenFlow 28 | - "8101:8101" # ONOS SSH 29 | - "8181:8181" # ONOS UI/API 30 | - "9876:9876" # ONOS Clustering 31 | - "2620:2620" # vRouter 32 | restart: unless-stopped 33 | 34 | -------------------------------------------------------------------------------- /roles/pki-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | # pki-install/defaults/main.yml 18 | 19 | pki_dir: "{{ playbook_dir }}/pki" 20 | use_openstack: True 21 | -------------------------------------------------------------------------------- /roles/pki-install/handlers/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # pki-install/handlers/main.yml 19 | 20 | - name: update-ca-certificates 21 | command: update-ca-certificates 22 | -------------------------------------------------------------------------------- /roles/pki-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # pki-install/tasks/main.yml 19 | 20 | - name: Copy CA certificates 21 | copy: 22 | src: "{{ pki_dir }}/{{ item.src }}" 23 | dest: "/usr/local/share/ca-certificates/{{ item.dest }}" 24 | with_items: 25 | - src: "root_ca/certs/ca_cert.pem" 26 | dest: "cord_root_ca.crt" 27 | - src: "{{ site_name }}_im_ca/certs/im_cert.pem" 28 | dest: "cord_intermediate_ca.crt" 29 | notify: 30 | - update-ca-certificates 31 | 32 | -------------------------------------------------------------------------------- /roles/pki-intermediate-ca/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # pki-intermediate-ca/defaults/main.yml 19 | 20 | pki_dir: "{{ playbook_dir }}/pki" 21 | credentials_dir: "{{ playbook_dir }}/credentials" 22 | 23 | # used to name the intermediate CA 24 | site_name: placeholder-sitename 25 | site_humanname: "Placeholder Site HumanName" 26 | site_suffix: "{{ site_name }}.test" 27 | 28 | # crypto parameters 29 | ca_digest: "sha256" 30 | ca_size: 4096 31 | ca_im_days: 730 32 | 33 | # passphrases for the certificate 34 | ca_im_phrase: "{{ lookup('password', credentials_dir ~ '/ca_im_phrase length=64') }}" 35 | 36 | # noninteractive csr subject 37 | ca_im_subj: "/C=US/ST=California/L=Menlo Park/O=ON.Lab/OU=Test Deployment/CN={{ site_humanname }} Intermediate CA" 38 | -------------------------------------------------------------------------------- /roles/pki-root-ca/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # pki-root-ca/defaults/main.yml 19 | 20 | pki_dir: "{{ playbook_dir }}/pki" 21 | credentials_dir: "{{ playbook_dir }}/credentials" 22 | 23 | # ca cert parameters 24 | ca_digest: "sha256" 25 | ca_size: 4096 26 | ca_root_days: 3650 27 | 28 | # passphrases for the key 29 | ca_root_phrase: "{{ lookup('password', credentials_dir ~ '/ca_root_phrase length=64') }}" 30 | 31 | # noninteractive csr subject 32 | ca_root_subj: "/C=US/ST=California/L=Menlo Park/O=ON.Lab/OU=Test Deployment/CN=CORD Test Deployment Root CA" 33 | -------------------------------------------------------------------------------- /roles/prereqs-common/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # prereqs-common/defaults/main.yml 17 | 18 | min_memtotal_mb: 48000 19 | min_processor_vcpus: 12 20 | 21 | kvm_check: true 22 | 23 | dns_check_domain: corddnscheck.opencord.org 24 | 25 | # CNAME record for corddnscheck.opencord.org 26 | dns_check_record: "wiki.opencord.org." 27 | 28 | -------------------------------------------------------------------------------- /roles/pull-xos-docker-images/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # pull-xos-docker-images/defaults/main.yml 19 | 20 | deploy_docker_tag: "candidate" 21 | -------------------------------------------------------------------------------- /roles/pull-xos-docker-images/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # pull-xos-docker-images/tasks/main.yml 19 | 20 | - name: Pull latest versions of images if not present 21 | docker_image: 22 | name: "{{ item }}:latest" 23 | repository: "{{ item }}:{{ deploy_docker_tag }}" 24 | with_items: 25 | - xosproject/vsg 26 | - redis 27 | 28 | -------------------------------------------------------------------------------- /roles/repo/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # repo/defaults/main.yml 19 | 20 | config_cord_dir: "/opt/cord" 21 | repo_dl_url: "https://storage.googleapis.com/git-repo-downloads/repo" 22 | 23 | # This is for repo v1.23, and will change, as repo_dl_url unfortunately lacks a version... 24 | repo_checksum: "sha256:e147f0392686c40cfd7d5e6f332c6ee74c4eab4d24e2694b3b0a0c037bf51dc5" 25 | 26 | repo_manifest_url: "https://gerrit.opencord.org/manifest" 27 | 28 | # Used to download specific gerrit changesets. Syntax is: 29 | # 30 | # gerrit_changsets: 31 | # - path: build/platform-install 32 | # revision: 2934/19 33 | # - path: .... 34 | # revision: #/# 35 | # 36 | gerrit_changesets: [] 37 | 38 | -------------------------------------------------------------------------------- /roles/setup-nova-dpdk/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # setup-nova-dpdk/defaults/main.yml 19 | 20 | site_name: placeholder-sitename 21 | site_suffix: "{{ site_name }}.test" 22 | 23 | requests_ca_bundle: "/etc/ssl/certs/ca-certificates.crt" 24 | keystone_admin_password: "{{ lookup('password', credentials_dir ~ '/cord_keystone_admin chars=ascii_letters,digits') }}" 25 | -------------------------------------------------------------------------------- /roles/ssh-install-maas/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # ssh-install-maas/defaults/main.yml 19 | 20 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 21 | 22 | ssh_keytype: rsa 23 | 24 | # name of master ssh key for this pod 25 | pod_sshkey_name: "headnode" 26 | 27 | use_maas: False 28 | -------------------------------------------------------------------------------- /roles/ssh-install-maas/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # ssh-install-maas/tasks/main.yml 19 | 20 | # the following replicates the functionality of the maas repo `prep` role 21 | # users/perms may seem off, but is identical to that role 22 | 23 | - name: Create ssh key directory for MaaS 24 | when: use_maas 25 | file: 26 | dest: "/etc/maas/.ssh/" 27 | mode: 0755 28 | owner: "root" 29 | group: "root" 30 | state: directory 31 | 32 | - name: Copy ssh private key for MaaS 33 | when: use_maas 34 | copy: 35 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey" 36 | dest: "/etc/maas/.ssh/cord_rsa" 37 | mode: 0644 38 | owner: "root" 39 | group: "root" 40 | backup: true 41 | 42 | - name: Copy ssh public key for MaaS 43 | when: use_maas 44 | copy: 45 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey.pub" 46 | dest: "/etc/maas/.ssh/cord_rsa.pub" 47 | mode: 0644 48 | owner: "root" 49 | group: "root" 50 | backup: true 51 | 52 | -------------------------------------------------------------------------------- /roles/ssh-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # ssh-install/defaults/main.yml 19 | 20 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 21 | 22 | ssh_keytype: rsa 23 | 24 | # name of master ssh key for this pod 25 | pod_sshkey_name: "headnode" 26 | 27 | use_maas: False 28 | -------------------------------------------------------------------------------- /roles/ssh-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # ssh-install/tasks/main.yml 19 | 20 | - name: Create ~/.ssh directory 21 | file: 22 | dest: "{{ ansible_user_dir }}/.ssh/" 23 | mode: 0700 24 | owner: "{{ ansible_user_id }}" 25 | group: "{{ ansible_user_gid }}" 26 | state: directory 27 | 28 | - name: Install ssh private key 29 | copy: 30 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey" 31 | dest: "{{ ansible_user_dir }}/.ssh/id_{{ ssh_keytype }}" 32 | mode: 0600 33 | owner: "{{ ansible_user_id }}" 34 | group: "{{ ansible_user_gid }}" 35 | backup: true 36 | 37 | - name: Install ssh public key 38 | copy: 39 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey.pub" 40 | dest: "{{ ansible_user_dir }}/.ssh/id_{{ ssh_keytype }}.pub" 41 | mode: 0600 42 | owner: "{{ ansible_user_id }}" 43 | group: "{{ ansible_user_gid }}" 44 | backup: true 45 | 46 | -------------------------------------------------------------------------------- /roles/ssh-pki/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # ssh-pki/tasks/main.yml 19 | 20 | ssh_pki_dir: "{{ playbook_dir }}/ssh_pki" 21 | credentials_dir: "{{ playbook_dir }}/credentials" 22 | 23 | # password on SSH CA 24 | ssh_ca_phrase: "{{ lookup('password', credentials_dir ~ '/ssh_ca_phrase length=64') }}" 25 | 26 | # ssh-keygen parameters 27 | ssh_keytype: rsa 28 | ssh_keysize: 4096 29 | 30 | # name of master ssh key for this pod 31 | pod_sshkey_name: "headnode" 32 | 33 | # lists of keys to generate 34 | ssh_client_genkeys: 35 | - name: "{{ pod_sshkey_name }}" 36 | 37 | ssh_host_genkeys: [] 38 | 39 | -------------------------------------------------------------------------------- /roles/start-xos-helm/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # start-xos-helm/defaults/main.yml 17 | 18 | build_cord_dir: "{{ playbook_dir ~ '/../..' }}" 19 | 20 | config_cord_profile_dir: "/opt/cord_profile" 21 | config_cord_helm_dir: "{{ config_cord_profile_dir }}/helm" 22 | 23 | -------------------------------------------------------------------------------- /roles/start-xos-helm/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # start-xos-helm/tasks/main.yml 17 | 18 | - name: Start XOS via Helm 19 | command: "helm install --wait xos-core" 20 | args: 21 | chdir: "{{ config_cord_helm_dir }}" 22 | tags: 23 | - skip_ansible_lint # running a command, ansible helm module isn't mature 24 | 25 | -------------------------------------------------------------------------------- /roles/sysctl/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # sysctl/tasks/main.yml 19 | 20 | - name: ElasticSearch mmap limit 21 | sysctl: 22 | name: vm.max_map_count 23 | value: 262144 24 | state: present 25 | reload: yes 26 | -------------------------------------------------------------------------------- /roles/teardown-onos/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # teardown-onos/defaults/main.yml 17 | 18 | head_onos_cord_dir: "/opt/onos_cord" 19 | head_onos_fabric_dir: "/opt/onos_fabric" 20 | 21 | -------------------------------------------------------------------------------- /roles/teardown-onos/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # teardown-onos/tasks/main.yml 17 | # 18 | # Destroys the ONOS containers 19 | # NOTE: ignoring errors so that incomplete builds can be removed 20 | 21 | - name: Stop and remove onos-cord containers 22 | docker_service: 23 | project_name: "onoscord" 24 | project_src: "{{ head_onos_cord_dir }}" 25 | state: absent 26 | remove_images: local 27 | ignore_errors: yes 28 | 29 | - name: Stop and remove onos-fabric containers 30 | when: use_fabric 31 | docker_service: 32 | project_name: "onosfabric" 33 | project_src: "{{ head_onos_fabric_dir }}" 34 | state: absent 35 | remove_images: local 36 | ignore_errors: yes 37 | 38 | -------------------------------------------------------------------------------- /roles/teardown-openstack/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # teardown-openstack/tasks/main.yml 19 | 20 | - name: Remove Juju directory 21 | file: 22 | path: "{{ ansible_user_dir }}/.juju" 23 | state: absent 24 | 25 | - name: Remove containers for the OpenStack services 26 | become: yes 27 | lxd_container: 28 | name: "{{ item.name }}" 29 | state: absent 30 | with_items: "{{ head_lxd_list }}" 31 | 32 | -------------------------------------------------------------------------------- /roles/teardown-xos/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Copyright 2017-present Open Networking Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # teardown-xos/defaults/main.yml 18 | 19 | head_cord_profile_dir: "/opt/cord_profile" 20 | 21 | xos_docker_networks: 22 | - "xos" 23 | 24 | delete_cord_profile_dir: False 25 | -------------------------------------------------------------------------------- /roles/teardown-xos/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Copyright 2017-present Open Networking Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | # teardown-xos/tasks/main.yml 19 | # Removes XOS Docker containers 20 | # NOTE: ignoring errors so that incomplete builds can be removed 21 | 22 | - name: List xos services 23 | include_role: 24 | name: xos-services-list 25 | 26 | - name: Stop and remove XOS containers 27 | docker_service: 28 | files: "{{ onboarding_recipes }}" 29 | project_name: "{{ cord_profile | regex_replace('\\W','') }}" 30 | project_src: "{{ head_cord_profile_dir }}" 31 | state: absent 32 | remove_images: local 33 | ignore_errors: yes 34 | 35 | # need to remove images using docker_images here? 36 | 37 | - name: Remove docker networks 38 | docker_network: 39 | name: "{{ item }}" 40 | state: absent 41 | with_items: "{{ xos_docker_networks }}" 42 | ignore_errors: yes 43 | 44 | - name: Remove the cord_profile directory 45 | file: 46 | path: "{{ head_cord_profile_dir }}" 47 | state: absent 48 | ignore_errors: yes 49 | when: delete_cord_profile_dir 50 | -------------------------------------------------------------------------------- /roles/test-client-install/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # test-client-install/defaults/main.yml 17 | 18 | headnode_fabric_bridge: fabricbridge 19 | 20 | -------------------------------------------------------------------------------- /roles/test-exampleservice/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # test-exampleservice/defaults/main.yml 17 | 18 | xos_tosca_url: "http://xos-tosca/xos-tosca" 19 | 20 | head_credentials_dir: "/opt/credentials" 21 | 22 | head_cord_profile_dir: "/opt/cord_profile" 23 | 24 | xos_admin_user: "xosadmin@opencord.org" 25 | head_xos_admin_pass: "{{ lookup('file', head_credentials_dir ~ '/' ~ xos_admin_user) }}" 26 | 27 | -------------------------------------------------------------------------------- /roles/test-subscriber-config/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # test-subscriber-config/defaults/main.yml 19 | 20 | head_cord_profile_dir: "/opt/cord_profile" 21 | -------------------------------------------------------------------------------- /roles/test-subscriber-config/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # test-subscriber-config/tasks/main.yml 17 | 18 | - name: Create test-subscriber.yaml TOSCA config 19 | template: 20 | src: test-subscriber.yaml.j2 21 | dest: "{{ head_cord_profile_dir }}/test-subscriber.yaml" 22 | owner: "{{ ansible_user_id }}" 23 | mode: 0644 24 | 25 | -------------------------------------------------------------------------------- /roles/test-subscriber-enable/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # test-subscriber-enable/defaults/main.yml 17 | 18 | xos_tosca_url: "http://xos-tosca/xos-tosca" 19 | 20 | head_credentials_dir: "/opt/credentials" 21 | 22 | head_cord_profile_dir: "/opt/cord_profile" 23 | 24 | xos_admin_user: "xosadmin@opencord.org" 25 | head_xos_admin_pass: "{{ lookup('file', head_credentials_dir ~ '/' ~ xos_admin_user) }}" 26 | 27 | -------------------------------------------------------------------------------- /roles/test-subscriber-enable/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # test-subscriber-enable/tasks/main.yml 17 | 18 | - name: Run TOSCA to add test-subscriber 19 | uri: 20 | url: "{{ xos_tosca_url }}/run" 21 | method: POST 22 | headers: 23 | xos-username: "{{ xos_admin_user }}" 24 | xos-password: "{{ head_xos_admin_pass }}" 25 | body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}" 26 | status_code: 200 27 | register: result 28 | until: result is success 29 | retries: 50 30 | delay: 5 31 | with_items: 32 | - "test-subscriber.yaml" 33 | tags: 34 | - skip_ansible_lint # TOSCA loading should be idempotent 35 | -------------------------------------------------------------------------------- /roles/test-vsg/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # test-vsg/defaults/main.yml 17 | 18 | vsg_test_ping_target: opennetworking.org. 19 | 20 | -------------------------------------------------------------------------------- /roles/vtn-refresh/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # vtn-refresh/defaults/main.yml 19 | 20 | credentials_dir: "{{ playbook_dir }}/credentials" 21 | 22 | xos_admin_user: "xosadmin@opencord.org" 23 | xos_admin_pass: "{{ lookup('password', credentials_dir ~ '/xosadmin@opencord.org chars=ascii_letters,digits') }}" 24 | 25 | keystone_admin_password: "{{ lookup('password', credentials_dir ~ '/cord_keystone_admin chars=ascii_letters,digits') }}" 26 | 27 | -------------------------------------------------------------------------------- /roles/vtn-refresh/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # vtn-refresh/defaults/main.yml 19 | 20 | - name: Refresh VTN state 21 | shell: "sshpass -p 'karaf' ssh -p 8102 karaf@onos-cord {{ item }}" 22 | ignore_errors: yes 23 | with_items: 24 | - "cordvtn-sync-neutron-states https://keystone.cord.lab:5000/v2.0 admin {{ keystone_admin_pass }}" 25 | - "cordvtn-sync-xos-states http://xos:{{ xos_ui_port }} {{ xos_admin_user }} {{ xos_admin_pass }}" 26 | - "cordvtn-purge-rules" 27 | tags: 28 | - skip_ansible_lint # running commands on ONOS 29 | 30 | - name: Reload compute nodes in VTN 31 | shell: "sshpass -p 'karaf' ssh -p 8102 karaf@onos-cord cordvtn-node-init {{ hostvars[item]['ansible_hostname'] }}" 32 | ignore_errors: yes 33 | with_items: "{{ groups['compute'] }}" 34 | tags: 35 | - skip_ansible_lint # running commands on ONOS 36 | 37 | -------------------------------------------------------------------------------- /roles/xos-config/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # xos-config/defaults/main.yml 17 | 18 | xos_tosca_url: "http://xos-tosca/xos-tosca" 19 | 20 | head_credentials_dir: "/opt/credentials" 21 | 22 | head_cord_profile_dir: "/opt/cord_profile" 23 | 24 | xos_admin_user: "xosadmin@opencord.org" 25 | head_xos_admin_pass: "{{ lookup('file', head_credentials_dir ~ '/' ~ xos_admin_user) }}" 26 | 27 | xos_tosca_config_templates: [] 28 | xos_new_tosca_config_templates: [] # Deprecated 29 | 30 | use_openstack: True 31 | -------------------------------------------------------------------------------- /roles/xos-onboard-test-hosts/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # xos-onboard-hosts/defaults/main.yml 19 | 20 | head_cord_profile_dir: "/opt/cord_profile" 21 | -------------------------------------------------------------------------------- /roles/xos-onboard-test-hosts/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # xos-onboard-hosts/tasks/main.yml 19 | 20 | - name: Get the Docker container names for onboarded containers 21 | docker_service: 22 | project_name: "{{ cord_profile | regex_replace('\\W','') }}" 23 | project_src: "{{ head_cord_profile_dir }}/onboarding-docker-compose/" 24 | recreate: never 25 | register: xos_onboard_out 26 | 27 | - name: Add the containers to Ansible groups on a per-container type basis 28 | add_host: 29 | name: "{{ xos_onboard_out.ansible_facts[item].keys() | first }}" 30 | groups: "{{ item }}" 31 | ansible_connection: "docker" 32 | cord_profile: "{{ cord_profile }}" 33 | ansible_ssh_user: "root" 34 | with_items: "{{ xos_onboard_out.ansible_facts.keys() | list }}" 35 | when: 36 | - "'gui-extensions' not in '{{ xos_onboard_out.ansible_facts[item].keys() | first }}'" 37 | -------------------------------------------------------------------------------- /roles/xos-ready/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # xos-ready/defaults/main.yml 17 | 18 | site_name: placeholder-sitename 19 | site_suffix: "{{ site_name }}.test" 20 | 21 | xos_chameleon_port: 9101 22 | 23 | xos_tosca_url: "http://xos-tosca/xos-tosca" 24 | 25 | -------------------------------------------------------------------------------- /roles/xos-ready/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # xos-ready/tasks/main.yml 17 | 18 | - name: Wait for XOS Chameleon to be ready after service onboarding 19 | uri: 20 | url: "http://localhost:{{ xos_chameleon_port }}/xosapi/v1/modeldefs" 21 | method: GET 22 | status_code: 200 23 | return_content: yes 24 | register: xosready_chameleon 25 | until: xosready_chameleon.content.find("items") != -1 26 | retries: 40 27 | delay: 15 28 | 29 | - name: Wait for XOS TOSCA engine to be ready after service onboarding 30 | uri: 31 | url: "{{ xos_tosca_url }}" 32 | method: GET 33 | status_code: 200 34 | return_content: yes 35 | register: xosready_tosca 36 | until: xosready_tosca.status == 200 37 | retries: 40 38 | delay: 15 39 | -------------------------------------------------------------------------------- /roles/xos-rest-api-test/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | credentials_dir: "{{ playbook_dir }}/credentials" 17 | config_cord_dir: "{{ ( playbook_dir ~ '/../..' ) | realpath }}" 18 | cord_test_dir: "{{ config_cord_dir }}/test/cord-tester/src/test/cord-api" 19 | 20 | xos_admin_user: "xosadmin@opencord.org" 21 | xos_admin_pass: "{{ lookup('password', credentials_dir ~ '/xosadmin@opencord.org chars=ascii_letters,digits') }}" 22 | 23 | api_test_server_ip: "0.0.0.0" 24 | api_test_server_port: "9101" 25 | -------------------------------------------------------------------------------- /roles/xos-services-config/defaults/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2017-present Open Networking Foundation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | build_cord_dir: '{{ playbook_dir ~ ''/../..'' }}' 16 | head_cord_profile_dir: '/opt/cord_profile' 17 | head_credentials_dir: '/opt/credentials' 18 | pull_docker_registry: '' 19 | pull_docker_tag: candidate 20 | xos_dynamic_services: [] 21 | xos_docker_networks: 22 | - xos 23 | -------------------------------------------------------------------------------- /roles/xos-services-config/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2017-present Open Networking Foundation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | - name: Create to host services docker-compose.yml 16 | file: 17 | path: "{{ config_cord_profile_dir }}/dynamic_load/" 18 | state: directory 19 | 20 | - name: Copy docker-compose.yaml from the service repo 21 | template: 22 | src: "{{ config_cord_dir }}/{{ item.path }}/docker-compose.yml.j2" 23 | dest: "{{ config_cord_profile_dir }}/dynamic_load/{{ item.name }}-docker-compose.yml" 24 | mode: 0644 25 | with_items: "{{ xos_dynamic_services }}" -------------------------------------------------------------------------------- /roles/xos-services-list/deafults/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2017-present Open Networking Foundation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | head_cord_profile_dir: '/opt/cord_profile' 16 | -------------------------------------------------------------------------------- /roles/xos-services-list/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2017-present Open Networking Foundation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | - name: Inizialize docker-compose.yml list 16 | set_fact: 17 | onboarding_recipes: ['docker-compose.yml'] 18 | - name: Read docker-compose.yml files for services 19 | find: 20 | paths: "{{ head_cord_profile_dir }}/dynamic_load/" 21 | patterns: '*docker-compose.yml' 22 | register: onboarding_recipes_files 23 | - name: Add docker-compose.yml files for services to the list 24 | set_fact: 25 | onboarding_recipes: "{{ onboarding_recipes }} + ['{{ item.path }}']" 26 | with_items: "{{ onboarding_recipes_files.files }}" 27 | - debug: 28 | var: onboarding_recipes 29 | -------------------------------------------------------------------------------- /roles/xos-up/defaults/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # xos-up/defaults/main.yml 19 | 20 | head_cord_profile_dir: "/opt/cord_profile" 21 | 22 | xos_docker_networks: 23 | - "xos" 24 | -------------------------------------------------------------------------------- /roles/xos-up/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # xos-up/tasks/main.yml 19 | 20 | - name: Create docker networks 21 | docker_network: 22 | name: "{{ item }}" 23 | with_items: "{{ xos_docker_networks }}" 24 | 25 | - name: List xos services 26 | include_role: 27 | name: xos-services-list 28 | 29 | - name: Bring up XOS services 30 | docker_service: 31 | files: "{{ onboarding_recipes }}" 32 | project_name: "{{ cord_profile | regex_replace('\\W','') }}" 33 | project_src: "{{ head_cord_profile_dir }}" 34 | pull: "{{ always_pull_xos_images | default('false') }}" 35 | -------------------------------------------------------------------------------- /scripts/clean_openstack.sh: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | #!/bin/bash 18 | 19 | function cleanup_network { 20 | NETWORK=$1 21 | SUBNETS=`neutron net-show $NETWORK | grep -i subnets | awk '{print $4}'` 22 | if [[ $SUBNETS != "" ]]; then 23 | PORTS=`neutron port-list | grep -i $SUBNETS | awk '{print $2}'` 24 | for PORT in $PORTS; do 25 | echo "Deleting port $PORT" 26 | neutron port-delete $PORT 27 | done 28 | fi 29 | neutron net-delete $NETWORK 30 | } 31 | 32 | source /opt/cord_profile/admin-openrc.sh 33 | 34 | echo "Deleting VMs" 35 | # Delete all VMs 36 | VMS=$( nova list --all-tenants|grep mysite|awk '{print $2}' ) 37 | for VM in $VMS 38 | do 39 | nova delete $VM 40 | done 41 | 42 | echo "Waiting 5 seconds..." 43 | sleep 5 44 | 45 | echo "Deleting networks" 46 | NETS=$( neutron net-list|awk '{print $2}'|grep '^[0-9a-fA-F]' ) 47 | for NET in $NETS 48 | do 49 | cleanup_network $NET 50 | done 51 | -------------------------------------------------------------------------------- /scripts/lintcheck.sh: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | #!/usr/bin/env bash 18 | set +e 19 | fail_ansible=0 20 | 21 | # verify that we have ansible-lint installed 22 | command -v ansible-lint >/dev/null 2>&1 || { echo "ansible-lint not found, please install it" >&2; exit 1; } 23 | 24 | # when not running under Jenkins, use current dir as workspace 25 | WORKSPACE=${WORKSPACE:-.} 26 | 27 | echo "=> Linting Ansible Code with" `ansible-lint --version` 28 | for f in `find $WORKSPACE -name "*.yml"`; do 29 | echo "==> CHECKING: $f" 30 | ansible-lint -p $f 31 | rc=$? 32 | if [[ $rc != 0 ]]; then 33 | echo "==> LINTING FAIL: $f" 34 | fail_ansible=1 35 | fi 36 | done 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /ssh_pki/.gitignore: -------------------------------------------------------------------------------- 1 | ca 2 | client_certs 3 | host_certs 4 | 5 | -------------------------------------------------------------------------------- /ssh_pki/README.md: -------------------------------------------------------------------------------- 1 | # ssh_pki 2 | 3 | This folder contains files uses to manage SSH certificate authority (CA), so 4 | handle with care. 5 | 6 | -------------------------------------------------------------------------------- /start-xos-helm-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # start-xos-helm-playbook.yml 17 | # Start and XOS containers with helm 18 | 19 | - name: Start XOS containers with helm 20 | hosts: config 21 | roles: 22 | - start-xos-helm 23 | 24 | -------------------------------------------------------------------------------- /start-xos-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # start-xos-playbook.yml 19 | # Start and configure XOS docker containers 20 | 21 | - name: Start XOS containers with docker-compose 22 | hosts: head 23 | roles: 24 | - xos-up 25 | 26 | -------------------------------------------------------------------------------- /teardown-onos-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Copyright 2017-present Open Networking Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # teardown-onos-playbook.yml 18 | 19 | - name: Teardown ONOS docker containers 20 | hosts: head 21 | roles: 22 | - teardown-onos 23 | -------------------------------------------------------------------------------- /teardown-openstack-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # teardown-openstack-playbook.yml 19 | 20 | - name: Teardown CORD profile 21 | hosts: head 22 | roles: 23 | - teardown-openstack 24 | -------------------------------------------------------------------------------- /teardown-xos-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # teardown-playbook.yml 17 | 18 | - name: Teardown XOS containers 19 | hosts: head 20 | roles: 21 | - teardown-xos 22 | -------------------------------------------------------------------------------- /vtn-refresh-playbook.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # vtn-refresh-playbook.yml 19 | # Refreshes the VTN state, via the ONOS commandline 20 | 21 | - name: Refresh VTN config 22 | hosts: head 23 | roles: 24 | - vtn-refresh 25 | -------------------------------------------------------------------------------- /xos-api-test-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # xos-api-test-playbook.yml 17 | 18 | - name: Execute api tests 19 | hosts: all 20 | roles: 21 | - xos-rest-api-test 22 | 23 | -------------------------------------------------------------------------------- /xos-service-config.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | --- 17 | # start-xos-playbook.yml 18 | # Start and configure XOS docker containers 19 | 20 | - name: Include vars 21 | hosts: all 22 | tasks: 23 | - name: Include variables 24 | include_vars: "{{ item }}" 25 | with_items: 26 | - "profile_manifests/{{ cord_profile }}.yml" 27 | - profile_manifests/local_vars.yml 28 | - name: Store service name 29 | set_fact: 30 | service_name: "{{ service_name }}" 31 | service_dir: "{{ service_dir }}" 32 | - debug: 33 | msg: "The service name is: {{ service_name }} and the service directory is {{ service_dir }}" 34 | 35 | - name: Generate docker-compose.yml for service 36 | hosts: head 37 | roles: 38 | - xos-services-config 39 | 40 | -------------------------------------------------------------------------------- /xos-services-up.yml: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2017-present Open Networking Foundation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | --- 18 | # start-xos-playbook.yml 19 | # Start and configure XOS docker containers 20 | 21 | - name: Include vars 22 | hosts: all 23 | tasks: 24 | - name: Include variables 25 | include_vars: "{{ item }}" 26 | with_items: 27 | - "profile_manifests/{{ cord_profile }}.yml" 28 | - profile_manifests/local_vars.yml 29 | 30 | - name: Start XOS synchronizers containers with docker-compose 31 | hosts: head 32 | roles: 33 | - xos-services-up 34 | --------------------------------------------------------------------------------