The use of __main__.py
to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py
:
print("Hello")
#printf | |
RUN printf '#!/bin/bash\n\ | |
echo hello world from line 1\n\ | |
echo hello world from line 2'\ | |
>> /tmp/hello | |
#echo | |
RUN echo -e '#!/bin/bash\n\ | |
echo hello world from line 1\n\ | |
echo hello world from line 2'\ |
The use of __main__.py
to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py
:
print("Hello")
Our delivery-sugar
cookbook exposes some libraries and a LWRP that we can use to
publish a cookbook (or multiple) to multiple Chef Servers or Organizations.
The only prerequisite we have before start coding is the generation of the knife.rb
and the client_key
on the build-nodes that we will use in the build-cookbook. This can
be done manually by loging in to the build-nodes and laying down the file, or in an
# /opt/retropie/configs/n64/InputAutoCfg.ini | |
# See: https://github.com/mupen64plus/mupen64plus-input-sdl/blob/master/data/InputAutoCfg.ini | |
[PLAYSTATION(R)3 Controller] | |
[Sony PLAYSTATION(R)3 Controller] | |
[SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller] | |
plugged = True | |
plugin = 2 | |
mouse = False | |
AnalogDeadzone = 4096,4096 |
This has been moved into the official Chef docs:
https://docs.chef.io/custom_resources_notes.html
This is by far the most recommended way of writing resources for all users. There are two gotchas which we're working through:
action_class do ... end
block.#!/bin/bash | |
# | |
# terraform-app | |
# | |
# This to terraform the servers for the Galleon App | |
# By storing the date now, we can calculate the duration of provisioning at the | |
# end of this script. | |
start_seconds="$(date +%s)" |