“Hey, I’m having some issues with saltstack packages from the distribution, an excuse to learn habitat, and it feels cleaner than running from virtualenv!”
Several hours later, I have following plan:
pkg_name=salt
pkg_version=2017.7.4
pkg_origin=viq
pkg_license=('Apache License, Version 2.0')
pkg_description="Software to automate the management and configuration of any infrastructure or application at scale."
pkg_upstream_url=https://saltstack.com/
pkg_source=https://github.com/saltstack/salt/releases/download/v${pkg_version}/salt-${pkg_version}.tar.gz
pkg_filename=salt-${pkg_version}.tar.gz
pkg_dirname=salt-${pkg_version}
pkg_shasum=1d573095776ba052eec7d7cae1472f4b1d4c15f16e1d79c2dc48db3129dbae97
pkg_build_deps=(
core/gcc
core/make
)
pkg_deps=(
core/gnupg
core/openssl
core/python2
core/zeromq
)
pkg_bin_dirs=(bin)
pkg_lib_dirs=(lib)
pkg_exports=(
[port]=serverport
)
pkg_svc_run="salt-master -c ${pkg_svc_config_path}"
#pkg_svc_user="salt"
do_build() {
pip install --upgrade pip
pip install --prefix="$pkg_prefix" -r requirements/base.txt
pip install --prefix="$pkg_prefix" -r requirements/zeromq.txt
pip install --prefix="$pkg_prefix" timelib python-gnupg cherrypy libnacl
pip install --prefix="$pkg_prefix" .
}
do_install() {
python setup.py install \
--prefix="$pkg_prefix"
}
do_setup_environment() {
push_runtime_env PYTHONPATH "$(pkg_path_for python2)/lib/python2.7/site-packages"
push_runtime_env PYTHONPATH "${pkg_prefix}/lib/python2.7/site-packages"
push_runtime_env LD_LIBRARY_PATH "$(pkg_path_for openssl)/lib"
}
Unfortunately, trying to run it fails, strangely enough on finding openssl libraries:
hab start viq/salt
sl
hab-launch(SV): Child for service 'salt.default' with PID 28016 exited with code exit code: 1
salt.default(SV): Starting service as user=hab, group=hab
salt.default(O): Traceback (most recent call last):
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/bin/salt-master", line 22, in <module>
salt.default(O): salt_master()
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/scripts.py", line 90, in salt_master
salt.default(O): import salt.cli.daemons
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/cli/daemons.py", line 47, in <module>
salt.default(O): from salt.utils import parsers, ip_bracket
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/parsers.py", line 28, in <module>
salt.default(O): import salt.config as config
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/config/__init__.py", line 100, in <module>
salt.default(O): _DFLT_IPC_WBUFFER = _gather_buffer_space() * .5
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/config/__init__.py", line 90, in _gather_buffer_space
salt.default(O): import salt.grains.core
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/grains/core.py", line 47, in <module>
salt.default(O): import salt.utils.dns
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/dns.py", line 28, in <module>
salt.default(O): import salt.modules.cmdmod
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 34, in <module>
salt.default(O): import salt.utils.templates
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/templates.py", line 31, in <module>
salt.default(O): import salt.utils.http
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/http.py", line 41, in <module>
salt.default(O): import salt.loader
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/loader.py", line 26, in <module>
salt.default(O): import salt.utils.event
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/event.py", line 74, in <module>
salt.default(O): import salt.payload
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/payload.py", line 17, in <module>
salt.default(O): import salt.crypt
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/crypt.py", line 54, in <module>
salt.default(O): import salt.utils.rsax931
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/rsax931.py", line 85, in <module>
salt.default(O): libcrypto = _init_libcrypto()
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/rsax931.py", line 56, in _init_libcrypto
salt.default(O): libcrypto = _load_libcrypto()
salt.default(O): File "/hab/pkgs/viq/salt/2017.7.4/20180324155051/lib/python2.7/site-packages/salt/utils/rsax931.py", line 49, in _load_libcrypto
salt.default(O): raise OSError('Cannot locate OpenSSL libcrypto')
salt.default(O): OSError: Cannot locate OpenSSL libcrypto
hab-launch(SV): Child for service 'salt.default' with PID 28028 exited with code exit code: 1
Where do I go from there?