diff options
author | 2017-02-15 12:07:07 -0700 | |
---|---|---|
committer | 2017-02-15 15:23:39 -0700 | |
commit | c5301a7a2e890fed97ffe04b40ccbe331e7f4a0b (patch) | |
tree | 72e5715cb7496d5826e6b0fea9652c969bf75f2b /examples/simple | |
parent | 57777f3df521553a06cd01a3861b415d2905ceca (diff) |
Converted existing markdown documentation to RST format.
Removed MD versions.
Moved examples directory up one under repo root
Moved RST files under docs/how-to-use
Change-Id: I4137b8591e4ae63e40674a7f5f8243d928efee0c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'examples/simple')
-rw-r--r-- | examples/simple/deploy-simple.yaml | 101 | ||||
-rw-r--r-- | examples/simple/files/motd | 8 | ||||
-rw-r--r-- | examples/simple/main.yml | 16 | ||||
-rw-r--r-- | examples/simple/playbooks/sample-playbook.yml | 23 |
4 files changed, 148 insertions, 0 deletions
diff --git a/examples/simple/deploy-simple.yaml b/examples/simple/deploy-simple.yaml new file mode 100644 index 0000000..ae946de --- /dev/null +++ b/examples/simple/deploy-simple.yaml @@ -0,0 +1,101 @@ +# Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs") +# and others. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +openstack: + connection: + # Note - when http_proxy is set, you must also configure ssh for proxy tunneling on your host. + username: admin + password: cable123 +# auth_url: http://10.197.103.50:5000/v2.0/ + auth_url: http://192.168.67.10:5000/v2.0 + project_name: admin + http_proxy: 10.197.123.27:3128 + ssh_proxy_cmd: '/usr/local/bin/corkscrew 10.197.123.27 3128 %h %p' + images: + - image: + name: Ubuntu14 + format: qcow2 + image_user: ubuntu + download_url: http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img + networks: + - network: + name: simple-net + subnets: + - subnet: + name: simple-subnet + cidr: 10.0.1.0/24 + dns_nameservers: [10.5.0.8, 8.8.8.8] + routers: + - router: + name: simple-router + external_gateway: external + internal_subnets: + - simple-subnet + keypairs: + - keypair: + name: simple + public_filepath: /tmp/simple.pub + private_filepath: /tmp/simple + instances: + - instance: + name: simple-1 + flavor: m1.small + imageName: Ubuntu14 + keypair_name: simple + userdata: "#cloud-config\npassword: cable123\nchpasswd: { expire: False }\nsshr_pwauth: True" + ports: + - port: + name: simple-net-port + network_name: simple-net + floating_ips: + - floating_ip: + name: fip1 + port_name: simple-net-port + router_name: simple-router + subnet_name: simple-subnet +ansible: + - playbook_location: main.yml + hosts: + - simple-1 + variables: + greeting_msg: + type: string + value: Greetings + os_user: + type: os_creds + value: username + os_pass: + type: os_creds + value: password + os_auth_url: + type: os_creds + value: auth_url + os_project: + type: os_creds + value: project_name + fip1: + type: vm-attr + vm_name: simple-1 + value: floating_ip + mac1: + type: port + vm_name: simple-1 + port_name: simple-net-port + port_value: mac_address + ip1: + type: port + vm_name: simple-1 + port_name: simple-net-port + port_value: ip_address
\ No newline at end of file diff --git a/examples/simple/files/motd b/examples/simple/files/motd new file mode 100644 index 0000000..cee5d06 --- /dev/null +++ b/examples/simple/files/motd @@ -0,0 +1,8 @@ +{{ greeting_msg }} +OS_USER - {{ os_user }} +OS_PASSWORD - {{ os_pass }} +AUTH_URL - {{ os_auth_url }} +PROJECT_NAME - {{ os_project }} +Floating IP - {{ fip1 }} +Port MAC = {{ mac1 }} +Port IP = {{ ip1 }} diff --git a/examples/simple/main.yml b/examples/simple/main.yml new file mode 100644 index 0000000..7f213ea --- /dev/null +++ b/examples/simple/main.yml @@ -0,0 +1,16 @@ +# Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs") +# and others. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +- include: playbooks/sample-playbook.yml
\ No newline at end of file diff --git a/examples/simple/playbooks/sample-playbook.yml b/examples/simple/playbooks/sample-playbook.yml new file mode 100644 index 0000000..84c46e4 --- /dev/null +++ b/examples/simple/playbooks/sample-playbook.yml @@ -0,0 +1,23 @@ +# Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs") +# and others. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +- hosts: all + become: yes + become_method: sudo + become_user: root + + tasks: + - name: Create MOTD + action: template owner=root group=root mode=666 src=../files/motd dest=/etc/motd |