1 # -*- coding: utf-8 -*-
4 {#- Get the `tplroot` from `tpldir` #}
5 {%- set tplroot = tpldir.split('/')[0] %}
6 {%- set sls_config_file = tplroot ~ '.config.file' %}
7 {%- from tplroot ~ "/map.jinja" import arvados with context %}
11 - {{ sls_config_file }}
13 arvados-controller-service-running-service-running:
15 - name: {{ arvados.controller.service.name }}
18 - sls: {{ sls_config_file }}
20 - pkg: arvados-controller-package-install-pkg-installed
22 # Before being able to create resources, we need API to be up. When running the formula for
23 # the first time, it might be still being configured, so we add this workaround, as suggested at
24 # https://github.com/saltstack/salt/issues/19084#issuecomment-70317884
25 arvados-controller-service-running-service-ready-cmd-run:
28 while ! (curl -s {{ arvados.cluster.Services.Controller.ExternalURL }} | \
29 grep -qE "req-[a-z0-9]{20}.{5}error_token") do
30 echo 'waiting for API to be ready...'
35 curl -s {{ arvados.cluster.Services.Controller.ExternalURL }} | \
36 grep -qE "req-[a-z0-9]{20}.{5}error_token"
38 - service: arvados-controller-service-running-service-running