-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.yaml
45 lines (37 loc) · 1.14 KB
/
server.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
heat_template_version: 2015-10-15
description: Launch a basic instance with Ubuntu Xenial image using the
``2048-10-1-1`` flavor and associate it with a pool member.
parameters:
pool:
type: string
description: The pool id.
resources:
server:
type: OS::Nova::Server
properties:
image: xenial-server-cloudimg-amd64-disk1
flavor: 2048-10-1-1
networks:
- network: switch1-nat
user_data: |
#!/bin/bash
echo "Starting boot script"
sudo -i
apt-get update
apt-get --assume-yes --fix-missing install python
wget https://raw.githubusercontent.com/houssemmh/INF8480-TP3/master/server.py
python server.py &
poolMember:
type: OS::Neutron::LBaaS::PoolMember
properties:
address: {get_attr: [server, first_address]}
protocol_port: 8080
subnet: "4ba321db-9247-454b-9274-faad8ec76461"
pool: {get_param: pool}
outputs:
instance_name:
description: Name of the server.
value: { get_attr: [ server, name ] }
instance_ip:
description: IP address of the instance.
value: { get_attr: [ server, first_address ] }