Commit 7f2b4d3c authored by donkey-hotei's avatar donkey-hotei Committed by isaak yansane-sisk

remove dash shell script, comment out md5 hash for developement, and add new parts for practice.

parent 373747f3
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
parts = parts =
directory directory
publish-connection-parameter publish-connection-parameter
#
# Define egg directories to be the one from Software Release # Define egg directories to be the one from Software Release
# (/opt/slapgrid/...) # (/opt/slapgrid/...)
# Always the same. # Always the same.
...@@ -62,6 +62,17 @@ log = ${:var}/log ...@@ -62,6 +62,17 @@ log = ${:var}/log
# Create a simple web server that says "hello <configuration.name>" to the web. # Create a simple web server that says "hello <configuration.name>" to the web.
[helloweb] [helloweb]
# helloworld service is listening on: # helloworld service is listening on:
# Create a simple shell script that will output whatever string specified as an instance param.
[hello-world]
# Recipe will try to "exec" the command line after separating parameters
recipe = slapos.cookbook:wrapper
# notice there is only one $ at ${dash:location}, because comes from the SR buildout profile
command-line = ${dash:location}/bin/bash -c 'echo "Welcome to the $${instance-parameter:configuration.title}" < $${directory:log}/log.log; sleep 10000000;'
# place shell script in /etc/service directory. each executable in this repo will be started
# and monitored by supervisord. if program crashes it will trigger a "bang" & case run of slapgrid
# for the instance
wrapper-path = $${directory:service}/hello-world
# - global IPv6 address, and # - global IPv6 address, and
# - fixed port # - fixed port
# #
...@@ -86,17 +97,6 @@ command-line = ...@@ -86,17 +97,6 @@ command-line =
# exits/crashes, it will trigger a "bang" and cause a re-run of the instance. # exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
wrapper-path = ${directory:service}/helloweb-${:kind} wrapper-path = ${directory:service}/helloweb-${:kind}
# Create a simple shell script that will output whatever string specified as an instance param.
[hello-world]
# Recipe will try to "exec" the command line after separating parameters
recipe = slapos.cookbook:wrapper
# notice there is only one $ at ${dash:location}, because comes from the SR buildout profile
command-line = ${dash:location}/bin/bash -c 'echo "Welcome to the $${instance-parameter:configuration.title}" < $${directory:log}/log.log; sleep 10000000;'
# place shell script in /etc/service directory. each executable in this repo will be started
# and monitored by supervisord. if program crashes it will trigger a "bang" & case run of slapgrid
# for the instance
wrapper-path = $${directory:service}/hello-world
# promise, that checks that helloweb service is alive # promise, that checks that helloweb service is alive
[helloweb-promise] [helloweb-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
......
...@@ -11,7 +11,10 @@ extends = ...@@ -11,7 +11,10 @@ extends =
# ../../component/component2/buildout.cfg # ../../component/component2/buildout.cfg
../../component/helloweb/buildout.cfg ../../component/helloweb/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/dcron/software.cfg
../../component/logrotate/software.cfg
../../compontent/gzip/buildout.cfg
parts = parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed # Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# in 99,9% of Slapos Software Releases) # in 99,9% of Slapos Software Releases)
...@@ -19,11 +22,13 @@ parts = ...@@ -19,11 +22,13 @@ parts =
# Call creation of instance.cfg file that will be called for deployment of # Call creation of instance.cfg file that will be called for deployment of
# instance # instance
instance-profile instance-profile
# build helloweb programs # build helloweb programs
helloweb-python helloweb-python
helloweb-ruby helloweb-ruby
helloweb-go helloweb-go
# additional parts for practice
dcron
logrotate
# Download instance.cfg.in (buildout profile used to deployment of instance), # Download instance.cfg.in (buildout profile used to deployment of instance),
...@@ -34,7 +39,7 @@ recipe = slapos.recipe.template:jinja2 ...@@ -34,7 +39,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg rendered = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production # MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = 6567f8dedb5cdd93542dc29e96edb547 # md5sum = 6567f8dedb5cdd93542dc29e96edb547
mode = 0644 mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
......
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