Use quickstart.sh to manage venv in all ci-scripts
We currently have a step to activate the venv in the collect-logs, get-node, and return-node scripts. The collect-logs script does not need it at all anymore, and the {get,return}-node scripts can instead pull in python-cicoclient via a requirements file. Change-Id: I9754eae93942d9a89f77c0a2d8cc9839c537c39d
This commit is contained in:
parent
7e455fd54a
commit
b1535bf279
1
ci-scripts/ci-base-requirements.txt
Normal file
1
ci-scripts/ci-base-requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
python-cicoclient
|
@ -7,11 +7,6 @@ export ANSIBLE_INVENTORY=$WORKSPACE/hosts
|
||||
export ANSIBLE_CONFIG=$WORKSPACE/tripleo-quickstart/ansible.cfg
|
||||
export SSH_CONFIG=$WORKSPACE/ssh.config.ansible
|
||||
export ANSIBLE_SSH_ARGS="-F ${SSH_CONFIG}"
|
||||
# (trown) I don't totally understand why this is needed here, but activating
|
||||
# the venv is failing otherwise.
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
|
||||
source $WORKSPACE/bin/activate
|
||||
|
||||
# (trown) This is so that we ensure separate ssh sockets for
|
||||
# concurrent jobs. Without this, two jobs running in parallel
|
||||
|
@ -10,25 +10,19 @@ bash quickstart.sh \
|
||||
--working-dir $WORKSPACE/ \
|
||||
--no-clone \
|
||||
--bootstrap \
|
||||
--requirements ci-scripts/ci-base-requirements.txt \
|
||||
--playbook noop.yml \
|
||||
localhost
|
||||
popd
|
||||
|
||||
# (trown) I don't totally understand why this is needed here, but activating
|
||||
# the venv is failing otherwise.
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
source $WORKSPACE/bin/activate
|
||||
|
||||
pip install python-cicoclient
|
||||
|
||||
cico node get --arch x86_64 \
|
||||
$WORKSPACE/bin/cico node get --arch x86_64 \
|
||||
--release 7 \
|
||||
--count 1 \
|
||||
--retry-count 2 \
|
||||
--retry-interval 30 \
|
||||
-f csv > $WORKSPACE/provisioned.csv
|
||||
|
||||
cico inventory
|
||||
$WORKSPACE/bin/cico inventory
|
||||
cat $WORKSPACE/provisioned.csv
|
||||
|
||||
export VIRTHOST=`cat provisioned.csv | tail -1 | cut -d "," -f 3| sed -e 's/"//g'`
|
||||
|
@ -3,11 +3,6 @@
|
||||
|
||||
set -eux
|
||||
|
||||
# (trown) I don't totally understand why this is needed here, but activating
|
||||
# the venv is failing otherwise.
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
source $WORKSPACE/bin/activate
|
||||
|
||||
VIRTHOST_KEY=$(head -n1 $WORKSPACE/cico_key.txt)
|
||||
cico node done $VIRTHOST_KEY
|
||||
cico inventory
|
||||
$WORKSPACE/bin/cico node done $VIRTHOST_KEY
|
||||
$WORKSPACE/bin/cico inventory
|
||||
|
Loading…
Reference in New Issue
Block a user