Commit 85e6a1da authored by Kirill Smelkov's avatar Kirill Smelkov

helloworld: Listening on partition IPv4 address makes sense only for internal services

Because partition IPv4 address(es) are not global ones - i.e. 10.0.12.57
- so we cannot expose a service through them to the world without
additional frontent proxy.

So let's leave only IPv6 listening address in the example.

Cc: Jérome Perrin <jerome@nexedi.com>
parent 05bfbb9d
...@@ -65,7 +65,7 @@ log = $${:var}/log ...@@ -65,7 +65,7 @@ log = $${:var}/log
# This recipe will try to "exec" the command-line after separating parameters. # This recipe will try to "exec" the command-line after separating parameters.
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile. # Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile.
command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}, it is $(date). If I were a TCP server, I would be listening on [$${instance-parameter:ipv6-random}] or $${instance-parameter:ipv4-random}" > $${directory:log}/log.log; sleep 1000000;' command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}, it is $(date). If I were a TCP server, I would be listening on [$${instance-parameter:ipv6-random}]" > $${directory:log}/log.log; sleep 1000000;'
# Put this shell script in the "etc/service" directory. Each executable of this # Put this shell script in the "etc/service" directory. Each executable of this
# repository will be started and monitored by supervisord. If a service # repository will be started and monitored by supervisord. If a service
# 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.
......
...@@ -26,5 +26,5 @@ recipe = slapos.recipe.template ...@@ -26,5 +26,5 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${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 = 532d13c3aee4f0252181da39765317f0 md5sum = bf5b6e4e16fc47bf959fa7db4e93aac7
mode = 0644 mode = 0644
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