Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos
Commits
f1a96d96
Commit
f1a96d96
authored
Mar 02, 2016
by
donkey-hotei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove dash shell script, comment out md5 hash for developement, and add new parts for practice.
parent
ffcc210b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
software/helloworld/instance.cfg.in
software/helloworld/instance.cfg.in
+12
-12
software/helloworld/software.cfg
software/helloworld/software.cfg
+8
-3
No files found.
software/helloworld/instance.cfg.in
View file @
f1a96d96
...
...
@@ -7,7 +7,7 @@
parts =
directory
publish-connection-parameter
#
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
# Always the same.
...
...
@@ -62,6 +62,17 @@ log = ${:var}/log
# Create a simple web server that says "hello <configuration.name>" to the web.
[helloweb]
# 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
# - fixed port
#
...
...
@@ -86,17 +97,6 @@ command-line =
# exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
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
[helloweb-promise]
recipe = slapos.cookbook:check_port_listening
...
...
software/helloworld/software.cfg
View file @
f1a96d96
...
...
@@ -11,6 +11,9 @@ extends =
# ../../component/component2/buildout.cfg
../../component/helloweb/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/software.cfg
../../component/logrotate/software.cfg
../../compontent/gzip/buildout.cfg
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
...
...
@@ -19,11 +22,13 @@ parts =
# Call creation of instance.cfg file that will be called for deployment of
# instance
instance-profile
# build helloweb programs
helloweb-python
helloweb-ruby
helloweb-go
# additional parts for practice
dcron
logrotate
# Download instance.cfg.in (buildout profile used to deployment of instance),
...
...
@@ -34,7 +39,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = 6567f8dedb5cdd93542dc29e96edb547
#
md5sum = 6567f8dedb5cdd93542dc29e96edb547
mode = 0644
extensions = jinja2.ext.do
context =
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment