Commit ec8dd58e authored by Ekaterina's avatar Ekaterina

add: embulk

parent 698c3902
[buildout]
parts =
embulk-service
embulk-config
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
bin = ${buildout:directory}/bin
var = ${buildout:directory}/var
log = ${:var}/log
scripts = ${:etc}/run
services = ${:etc}/service
promise = ${:etc}/promise/
home = ${:etc}/home
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap_connection:computer_id}
partition = ${slap_connection:partition_id}
url = ${slap_connection:server_url}
key = ${slap_connection:key_file}
cert = ${slap_connection:cert_file}
[embulk-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/embulk-service
command-line = {{ java_location }}/bin/java -jar {{ embulk_location }}/embulk.jar
run ${embulk-config:rendered} -b {{ embulkPlugins_location }}/plugins
[embulk-config]
recipe = slapos.recipe.template:jinja2
context =
key slapparameter_dict instance-parameter:configuration
template = inline:{% raw -%}
{{ slapparameter_dict['conf_text'] }}
{%- endraw %}
rendered = ${directory:etc}/config.yml
mode = 0644
[buildout]
extends =
../../stack/slapos.cfg
../../component/java/buildout.cfg
../../component/embulk/buildout.cfg
parts =
slapos-cookbook
instance-profile
java
embulk
embulkPlugins
[jinja-template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
mode = 0644
[instance-profile]
recipe = slapos.recipe.template:jinja2
md5sum = aa74da73dd13095098a6f15e2184cc2b
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg
mode = 0644
extensions = jinja2.ext.do
context =
section buildout buildout
key embulk_location embulk:location
key java_location java:location
key embulkPlugins_location embulkPlugins:location
[java]
<= java-re-8
[embulkPlugins]
recipe = slapos.recipe.build
install =
import os
bin_dir = os.path.join(location, 'bin')
os.makedirs(bin_dir)
os.chdir("parts/embulkPlugins")
call(["${java:location}/bin/java", "-jar", "${embulk:location}/embulk.jar",
"mkbundle", "plugins"])
os.chdir("plugins")
f = open('Gemfile', 'w')
f.write("source 'https://rubygems.org/'\n")
f.write("gem 'embulk'\n")
f.write("gem 'embulk-input-filename'\n")
f.write("gem 'embulk-output-wendelin'\n")
f.write("gem 'embulk-parser-none-bin'\n")
f.close()
call(["${java:location}/bin/java", "-jar", "${embulk:location}/embulk.jar", "bundle"])
[versions]
slapos.recipe.template = 4.4
rubygemsrecipe = 0.2.2
java = 8
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment