Commit Graph

10 Commits

Author SHA1 Message Date
Dustin Specker 2d10945dd8 tools: fix execute typo
Change-Id: I41e45b236472d34eba2c434755373f7a6b706100
2019-02-25 19:16:21 +00:00
Anthony Lin 47e49b3b3b Add update_site script
We will make use of common functions across the deploy_site,
update_site and redeploy_server script.

This will help to reduce common and repetitive codes across
the scripts.

Note that the Shipyard CLI needs to be installed before we
can use these scripts.

Change-Id: I31e5c8723346666a592951f59856008ccb64128b
2018-02-05 05:43:33 +00:00
Anthony Lin 8b5770bbdf Add DeckHand Load YAML Script
We will make use of this script to load the required YAMLs
into Deckhand using Shipyard CLI.

We will move the Shipyard CLI installation steps and updating
of /etc/hosts from the 'deploy_site' script to 'deckhand_load_yaml'
script.

Note that we will need to execute the 'deckhand_load_yaml' script
first before running the 'deploy_site' script

Change-Id: If463f606c3c7e99763c0d8852f729a9a3e270425
2018-01-08 07:38:22 +00:00
Anthony Lin abfc9c1d74 Update Deploy Site Script
The Shipyard CLI is ready for consumption. We will make use
of the CLI instead of API to deploy the site.

Change-Id: Ie54e858ae87e692a40d0abad77b22e428744ee24
2017-12-20 02:57:08 -05:00
Anthony Lin 1ab35fbf68 Update deploy_site script
It is possible for the script to run for a prolonged period of
time. This can cause the keystone token to expire and we will
end up with `null` response from Shipyard when we query the
status of the task.

Note that we will retrieve a new token in the above scenario
and use the new token to query the status.

Note also that the 'deploy_time_out' variable should actually be
the number of loops rather than time out (in seconds). It will
take on the default value of 60 loops (based on 90 seconds back
off per cycle, i.e. 60 * 90 = 5400 seconds = 1.5 hrs) if value
was not provided by user during run time.

Change-Id: I83f503222899ace3d04aac303d2790e4b5d22d2d
2017-12-12 08:23:44 +00:00
Anthony Lin ae9a9aef2f Update deploy_site script
We are getting 'permission denied' while trying to retrieve
the keystone IP. This P.S. is meant to correct that behavior
by using `sudo`

Change-Id: I93d9d15a40b54dba1205202257d6384597d01247
2017-11-30 01:53:35 +00:00
Anthony Lin fe13c0a83f Update deploy_site script
It seems that there is a possibility for Airflow to respond
with 'unknown' state for some corner cases. This will cause
the deploy_site script to get into infinite loop. The codes
in Shipyard has been updated to return 'Unknown (*)' as the
state of the action lifecycle in such situations.

This P.S. is meant to update the script and to set a default time
out of 1.5 hr for the workflow. The time out can be changed by
setting a value for $2 (Note that we will need to set query_time,
i.e. $1 as well)

    $ ./deploy_site.sh 120 7200

Change-Id: Ic56ce85f55e9b5fa0c3f537c6158ddc3dc56fab2
2017-11-07 17:56:15 +00:00
Anthony Lin 986ae72349 Increase Query Time for deploy_site script
It takes about 31 minutes to execute the drydock
bare metal deployment in the CI/CD lab. There is
a need to make the query time a variable that can
be changed according to needs. This will help to
reduce the volume of query response in logs.

The default will be set to 90 seconds. User can
change it by specifying the value of $1, i.e.

$ tools/deploy_site.sh 180

There are some problems with the print outs of the
final json results which is corrected here as well

Change-Id: I7c6e2c5b3a23b4daf36cf78cec693899ba2cab5c
2017-11-01 15:55:42 +00:00
Anthony Lin 79f6584fa9 Update deploy_site.sh script with exit codes
It is noted during integration testing that we should
have an exit code for the script. This is needed in order
for us to know the final state of the workflow and to decide
whether it was successful or not.

Change-Id: I1f0b2a357d89fc3e898db68b930ada02b52ab398
2017-10-31 22:56:26 +00:00
Anthony Lin dbd51cadbf Deploy_Site Script
This simple bash script will retrieve the keystone token, kick off
the 'deploy_site' workflow and query the status of the deployment.

It can be used for testing or by Deployment Engineer in a lab or
production environment.

Change-Id: Idf0dbb15c5bd3ee25def419cd053e53816b099a0
2017-10-26 00:16:49 +00:00