What’s confusing now:
start
does not load a service, butload
starts one…- historically,
start
orload
would also install a service, but this is no longer the case forstart
Possible alternatives, with an imaginary workflow:
$ hab search/provides
#!/bin/bash | |
# execute this script directly by piping to your shell from `curl` like this: | |
# curl --silent https://gist.githubusercontent.com/bixu/1033ed8954fafea48f2f7b3f32faf1fe/raw/banana-strap.sh | sudo bash | |
set -e | |
echo "Setting up $(hostname)..." | |
apt-get update |
The following code can be put in a file we source via a plan.sh
inside a directory representing
the module to be vendored, such as Cython
:
pkg_origin="bixu"
pkg_name="${PWD##*/}" # use the name of the directory containing our `plan.sh` to get the `pip` module name
pkg_bin_dirs=(bin)
pkg_lib_dirs=(lib)
# libs commonly needed during Python module installs:
#!/bin/bash | |
set -ex | |
# This assumes you have a Triton account | |
# (see http://lpage.joyent.com/Triton-Free-Trial.html) | |
# and that you have installed the Triton cli tools: | |
# `npm install -g triton` | |
triton instance create 7b5981c4 g4-highcpu-1G \ |
For macOS Sierra (10.12) and OS X El Capitan (10.11), you also need to boot into the Recovery OS (either the Recovery partition or bootable OS X install media for 10.11) and run
csrutil disable
or
csrutil enable --without kext
The latter will allow you to load your custom-built, unsigned kernel extensions, while keeping the rest of System Integrity Protection (SIP) in place. (Depending on your needs, other options you may want are --without fs, --without debug, --without dtrace, or --without nvram. If you specify all of them, that is equivalent to csrutil disable. The --without option takes a comma-delimited list or can be specified multiple times: --without kext,debug,dtrace is equivalent to --without kext --without debug --without dtrace). If you have any other implementation of ZFS installed, you must uninstall it and reboot before proceeding further. Similarly, if you have installed the O3X installer version, please follow the uninstallation directions before proceeding.
[Unit] | |
Description=postgresql94 managed by habitat | |
[Service] | |
Restart=always | |
ExecStart=/path/to/postgresql94.sh | |
[Install] | |
WantedBy=default.target |
standby_mode = "on" | |
primary_conninfo_host = "postgres.primary.tld" | |
primary_conninfo_port = 5432 | |
initdb_superuser_name = "postgres" | |
initdb_superuser_password = "password" | |
primary_conninfo_user = "postgres" | |
primary_conninfo_password = "password" | |
trigger_file = "/hab/svc/postgresql9.4/data/failover_trigger_file" | |
initdb_encoding = "en_US.UTF-8" |
#!/bin/sh | |
HAB_POSTGRESQL94=$(cat /path/to/custom.toml) /usr/bin/hab start --no-color bixu/postgresql94 |
HAB_POSTGRESQL='dynamic_shared_memory_type = "none"' hab start core/postgresql |
--- | |
driver: | |
name: joyent | |
driver_config: | |
joyent_version: '~7.0' | |
joyent_username: <account name> | |
joyent_keyfile: <path to private ssh key> | |
joyent_keyname: <ssh key "name" in your Joyent account> | |
joyent_url: https://us-east-1.api.joyent.com |