# -*- coding: utf-8 -*-
# vim: ft=sls
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_config_file = tplroot ~ '.config.file' %}
- env:
- ARVADOS_API_TOKEN: {{ api_token }}
- ARVADOS_API_HOST: {{ api_host }}
+ {%- if arvados.ruby.manage_ruby and arvados.ruby.use_rvm %}
+ - prepend_path: /usr/local/rvm/gems/{{ arvados.ruby.pkg }}/bin
+ {%- endif %}
- name: |
arv --format=uuid \
virtual_machine \
- require:
- pkg: arvados-controller-package-install-pkg-installed
- cmd: arvados-controller-service-running-service-ready-cmd-run
+ - gem: arvados-controller-package-install-gem-arvados-cli-installed
# We need to use the UUID generated in the previous command to see if there's a
# scoped token for it. There's no easy way to pass the value from a shellout
# the file content is a token uuid :|
arvados-controller-resources-virtual-machines-{{ vm }}-get-vm_uuid-cmd-run:
cmd.run:
+ {%- if arvados.ruby.manage_ruby and arvados.ruby.use_rvm %}
+ - prepend_path: /usr/local/rvm/gems/{{ arvados.ruby.pkg }}/bin
+ {%- endif %}
- name: {{ cmd_query_vm_uuid }} | head -1 | tee /tmp/{{ vm }}
- require:
- cmd: arvados-controller-resources-virtual-machines-{{ vm }}-record-cmd-run
+ - gem: arvados-controller-package-install-gem-arvados-cli-installed
- unless:
- /bin/grep -qE "[a-z0-9]{5}-2x53u-[a-z0-9]{15}" /tmp/{{ vm }}
- env:
- ARVADOS_API_TOKEN: {{ api_token }}
- ARVADOS_API_HOST: {{ api_host }}
+ {%- if arvados.ruby.manage_ruby and arvados.ruby.use_rvm %}
+ - prepend_path: /usr/local/rvm/gems/{{ arvados.ruby.pkg }}/bin
+ {%- endif %}
- name: |
VM_UUID=$(cat /tmp/{{ vm }}) &&
arv --format=uuid \
- pkg: arvados-controller-package-install-pkg-installed
- pkg: arvados-controller-resources-virtual-machines-jq-pkg-installed
- cmd: arvados-controller-resources-virtual-machines-{{ vm }}-get-vm_uuid-cmd-run
+ - gem: arvados-controller-package-install-gem-arvados-cli-installed
{%- endfor %}