From 1080e5e62d8bac77195b0d0a81c2141605d2f504 Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Tue, 6 Feb 2018 19:29:17 -0500 Subject: Fix anteater issue with use of /tmp JIRA: MODELS-2 Change-Id: Iddf2680308ca5bd45fab38157c5be4bf1c612ddd Signed-off-by: Bryan Sullivan --- tools/rancher/rancher-cluster.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/rancher/rancher-cluster.sh b/tools/rancher/rancher-cluster.sh index 555b9bd..b312982 100644 --- a/tools/rancher/rancher-cluster.sh +++ b/tools/rancher/rancher-cluster.sh @@ -117,10 +117,10 @@ function install_cli_tools() { export RANCHER_URL=http://$1:8080/v1 id=$(wget -qO- http://$1:8080/v2-beta/projects/ | jq -r '.data[0].id') export RANCHER_ENVIRONMENT=$id - curl -s -o /tmp/keys -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"accountId":"reference[account]", "description":"string", "name":"string", "publicValue":"string", "secretValue":"password"}' http://$1:8080/v2-beta/projects/$id/apikeys -# curl -s -o /tmp/keys -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d {"type":"apikey","accountId":"1a1","name":"admin","description":null,"created":null,"kind":null,"removed":null,"uuid":null} http://$1:8080/v2-beta/projects/$id/apikey - export RANCHER_ACCESS_KEY=$(jq -r '.publicValue' /tmp/keys) - export RANCHER_SECRET_KEY=$(jq -r '.secretValue' /tmp/keys) + curl -s -o ~/tmp/keys -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"accountId":"reference[account]", "description":"string", "name":"string", "publicValue":"string", "secretValue":"password"}' http://$1:8080/v2-beta/projects/$id/apikeys +# curl -s -o ~/tmp/keys -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d {"type":"apikey","accountId":"1a1","name":"admin","description":null,"created":null,"kind":null,"removed":null,"uuid":null} http://$1:8080/v2-beta/projects/$id/apikey + export RANCHER_ACCESS_KEY=$(jq -r '.publicValue' ~/tmp/keys) + export RANCHER_SECRET_KEY=$(jq -r '.secretValue' ~/tmp/keys) # create the env file ~/.rancher/cli.json rancher config <