7febd72cce
Previously there are a lot of warning messages of setuptools in the log files of tox jobs. This is mainly caused by test samples because these are in python codes directories. This patch moves test samples from under {heat-translator_root}/translator/tests to under {heat-translator_root}/samples/tests. This patch also contains the following changes: - Remove "skipsdist = True" from tox.ini - Fixed usage.rst command example Change-Id: Ibde711a4778e238076de328641da7b0edd1d4f4b Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com> Co-Authored-By: Yoshiro Watanabe <fj3838ct@fujitsu.com>
552 lines
12 KiB
YAML
552 lines
12 KiB
YAML
heat_template_version: 2013-05-23
|
|
|
|
description: >
|
|
This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and
|
|
kibana each on a separate server with monitoring enabled for nodejs server where
|
|
a sample nodejs application is running. The rsyslog and collectd are installed
|
|
on a nodejs server.
|
|
|
|
parameters:
|
|
github_url:
|
|
type: string
|
|
description: The URL to download nodejs.
|
|
default: http://github.com/paypal/rest-api-sample-app-nodejs.git
|
|
|
|
my_cpus:
|
|
type: number
|
|
description: Number of CPUs for the server.
|
|
default: 4
|
|
constraints:
|
|
- allowed_values:
|
|
- 1
|
|
- 2
|
|
- 4
|
|
- 8
|
|
|
|
resources:
|
|
|
|
nodejs_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: nodejs_create_config
|
|
server:
|
|
get_resource: app_server
|
|
|
|
nodejs_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: nodejs/create.sh
|
|
group: script
|
|
|
|
paypal_pizzastore_configure_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: paypal_pizzastore_configure_config
|
|
input_values:
|
|
github_url:
|
|
get_param: github_url
|
|
mongodb_ip:
|
|
get_attr:
|
|
- mongo_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- nodejs_create_deploy
|
|
- mongo_db_create_deploy
|
|
|
|
paypal_pizzastore_configure_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: nodejs/config.sh
|
|
group: script
|
|
|
|
paypal_pizzastore_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: paypal_pizzastore_start_config
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- paypal_pizzastore_configure_deploy
|
|
|
|
paypal_pizzastore_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: nodejs/start.sh
|
|
group: script
|
|
|
|
|
|
mongo_dbms_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: mongo_dbms_create_config
|
|
server:
|
|
get_resource: mongo_server
|
|
|
|
mongo_dbms_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: mongodb/create.sh
|
|
group: script
|
|
|
|
mongo_dbms_configure_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: mongo_dbms_configure_config
|
|
input_values:
|
|
mongodb_ip:
|
|
get_attr:
|
|
- mongo_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
server:
|
|
get_resource: mongo_server
|
|
depends_on:
|
|
- mongo_dbms_create_deploy
|
|
|
|
mongo_dbms_configure_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: mongodb/config.sh
|
|
group: script
|
|
|
|
mongo_dbms_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: mongo_dbms_start_config
|
|
server:
|
|
get_resource: mongo_server
|
|
depends_on:
|
|
- mongo_dbms_configure_deploy
|
|
|
|
mongo_dbms_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: mongodb/start.sh
|
|
group: script
|
|
|
|
mongo_db_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: mongo_db_create_config
|
|
server:
|
|
get_resource: mongo_server
|
|
depends_on:
|
|
- mongo_dbms_start_deploy
|
|
|
|
mongo_db_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: mongodb/create_database.sh
|
|
group: script
|
|
|
|
|
|
app_collectd_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_collectd_create_config
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- logstash_start_deploy
|
|
|
|
app_collectd_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: collectd/create.sh
|
|
group: script
|
|
|
|
app_collectd_configure_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_collectd_configure_config
|
|
input_values:
|
|
logstash_ip:
|
|
get_attr:
|
|
- logstash_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- app_collectd_create_deploy
|
|
|
|
app_collectd_configure_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: collectd/config.py
|
|
group: script
|
|
|
|
app_collectd_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_collectd_start_config
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- app_collectd_configure_deploy
|
|
|
|
app_collectd_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: collectd/start.sh
|
|
group: script
|
|
|
|
app_collectd_logstash_connect_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_collectd_logstash_connect_config
|
|
server:
|
|
get_resource: logstash_server
|
|
depends_on:
|
|
- logstash_create_deploy
|
|
|
|
app_collectd_logstash_connect_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: logstash/configure_collectd.py
|
|
group: script
|
|
|
|
|
|
app_rsyslog_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_rsyslog_create_config
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- logstash_start_deploy
|
|
|
|
app_rsyslog_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: rsyslog/create.sh
|
|
group: script
|
|
|
|
app_rsyslog_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_rsyslog_start_config
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- app_rsyslog_configure_deploy
|
|
|
|
app_rsyslog_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: rsyslog/start.sh
|
|
group: script
|
|
|
|
app_rsyslog_configure_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_rsyslog_configure_config
|
|
input_values:
|
|
logstash_ip:
|
|
get_attr:
|
|
- logstash_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
server:
|
|
get_resource: app_server
|
|
depends_on:
|
|
- app_rsyslog_create_deploy
|
|
|
|
app_rsyslog_configure_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: rsyslog/config.sh
|
|
group: script
|
|
|
|
app_rsyslog_logstash_connect_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: app_rsyslog_logstash_connect_config
|
|
server:
|
|
get_resource: logstash_server
|
|
depends_on:
|
|
- logstash_create_deploy
|
|
|
|
app_rsyslog_logstash_connect_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: logstash/configure_rsyslog.py
|
|
group: script
|
|
|
|
|
|
logstash_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: logstash_create_config
|
|
server:
|
|
get_resource: logstash_server
|
|
depends_on:
|
|
- elasticsearch_start_deploy
|
|
|
|
logstash_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: logstash/create.sh
|
|
group: script
|
|
|
|
logstash_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: logstash_start_config
|
|
server:
|
|
get_resource: logstash_server
|
|
depends_on:
|
|
- logstash_create_deploy
|
|
|
|
logstash_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: logstash/start.sh
|
|
group: script
|
|
|
|
logstash_elasticsearch_connect_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: logstash_elasticsearch_connect_config
|
|
input_values:
|
|
elasticsearch_ip:
|
|
get_attr:
|
|
- elasticsearch_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
server:
|
|
get_resource: logstash_server
|
|
depends_on:
|
|
- logstash_create_deploy
|
|
|
|
logstash_elasticsearch_connect_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: logstash/configure_elasticsearch.py
|
|
group: script
|
|
|
|
|
|
elasticsearch_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: elasticsearch_create_config
|
|
server:
|
|
get_resource: elasticsearch_server
|
|
|
|
elasticsearch_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: elasticsearch/create.sh
|
|
group: script
|
|
|
|
elasticsearch_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: elasticsearch_start_config
|
|
server:
|
|
get_resource: elasticsearch_server
|
|
depends_on:
|
|
- elasticsearch_create_deploy
|
|
|
|
elasticsearch_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: elasticsearch/start.sh
|
|
group: script
|
|
|
|
|
|
kibana_create_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: kibana_create_config
|
|
server:
|
|
get_resource: kibana_server
|
|
depends_on:
|
|
- elasticsearch_start_deploy
|
|
|
|
kibana_create_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: kibana/create.sh
|
|
group: script
|
|
|
|
kibana_configure_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: kibana_configure_config
|
|
input_values:
|
|
elasticsearch_ip:
|
|
get_attr:
|
|
- elasticsearch_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
kibana_ip:
|
|
get_attr:
|
|
- kibana_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
server:
|
|
get_resource: kibana_server
|
|
depends_on:
|
|
- kibana_create_deploy
|
|
|
|
kibana_configure_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: kibana/config.sh
|
|
group: script
|
|
|
|
kibana_start_deploy:
|
|
type: OS::Heat::SoftwareDeployment
|
|
properties:
|
|
config:
|
|
get_resource: kibana_start_config
|
|
server:
|
|
get_resource: kibana_server
|
|
depends_on:
|
|
- kibana_configure_deploy
|
|
|
|
kibana_start_config:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
config:
|
|
get_file: kibana/start.sh
|
|
group: script
|
|
|
|
|
|
app_server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
flavor: m1.large
|
|
image: ubuntu-software-config-os-init
|
|
user_data_format: SOFTWARE_CONFIG
|
|
|
|
mongo_server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
flavor: m1.large
|
|
image: ubuntu-software-config-os-init
|
|
user_data_format: SOFTWARE_CONFIG
|
|
|
|
logstash_server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
flavor: m1.large
|
|
image: ubuntu-software-config-os-init
|
|
user_data_format: SOFTWARE_CONFIG
|
|
|
|
elasticsearch_server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
flavor: m1.large
|
|
image: ubuntu-software-config-os-init
|
|
user_data_format: SOFTWARE_CONFIG
|
|
|
|
kibana_server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
flavor: m1.large
|
|
image: ubuntu-software-config-os-init
|
|
user_data_format: SOFTWARE_CONFIG
|
|
|
|
outputs:
|
|
nodejs_url:
|
|
description: URL for the nodejs server, http://<IP>:3000
|
|
value:
|
|
get_attr:
|
|
- app_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
|
|
mongodb_url:
|
|
description: URL for the mongodb server.
|
|
value:
|
|
get_attr:
|
|
- mongo_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
|
|
logstash_url:
|
|
description: URL for the logstash server.
|
|
value:
|
|
get_attr:
|
|
- logstash_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
|
|
elasticsearch_url:
|
|
description: URL for the elasticsearch server.
|
|
value:
|
|
get_attr:
|
|
- elasticsearch_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
|
|
kibana_url:
|
|
description: URL for the kibana server.
|
|
value:
|
|
get_attr:
|
|
- kibana_server
|
|
- networks
|
|
- private
|
|
- 0
|
|
|