Skip to content
Snippets Groups Projects
Commit c93e3462 authored by František Dvořák's avatar František Dvořák
Browse files

Move all deployments into subdirectory + support none deployment type

parent 3187eb4a
Branches
Tags v1.1
No related merge requests found
Pipeline #429 passed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Build Hadoop cluster in OpenStack with Terraform. Build Hadoop cluster in OpenStack with Terraform.
Primary goal of this project is to build Hadoop cluster. But the most part is generic - Hadoop deployment can be replaced by implementing different deployment type (providing user-data and optionally implementing plugin for orchestration). Primary goal of this project is to build Hadoop cluster. But the most part is generic - the Hadoop deployment can be skipped, or replaced by implementing different deployment type (see *deployments* directory).
# Requirements # Requirements
......
...@@ -12,7 +12,7 @@ data "template_file" "user_data_common" { ...@@ -12,7 +12,7 @@ data "template_file" "user_data_common" {
} }
data "template_file" "user_data" { data "template_file" "user_data" {
template = file("${var.type}/ctx.yaml") template = file("deployments/${var.type}/ctx.yaml")
} }
data "template_cloudinit_config" "user_data" { data "template_cloudinit_config" "user_data" {
......
File moved
File moved
File moved
File moved
...@@ -23,7 +23,7 @@ class ComponentHadoop: ...@@ -23,7 +23,7 @@ class ComponentHadoop:
if action == 'files': if action == 'files':
if not self.args.dry_run: if not self.args.dry_run:
template = None template = None
with open('%s/site.pp.tmpl' % self.config['type'], 'r') as f: with open('deployments/%s/site.pp.tmpl' % self.config['type'], 'r') as f:
template = string.Template(f.read()) template = string.Template(f.read())
if template: if template:
print('-> site.pp') print('-> site.pp')
......
File moved
#cloud-config
merge_type:
- name: list
settings: [append]
- name: dict
settings: [recurse_array]
...@@ -55,9 +55,9 @@ user = config['image_user'] ...@@ -55,9 +55,9 @@ user = config['image_user']
t = config.get('type', None) t = config.get('type', None)
print('== plugin ==') print('== plugin ==')
if t and os.path.exists('%s/plugin.py' % t): if t and os.path.exists('deployments/%s/plugin.py' % t):
print('-> %s/plugin.py' % t) print('-> deployments/%s/plugin.py' % t)
plugin = importlib.import_module('%s.plugin' % t) plugin = importlib.import_module('deployments.%s.plugin' % t)
Component = getattr(plugin, 'Component') Component = getattr(plugin, 'Component')
component = Component(args, config, hosts) component = Component(args, config, hosts)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment