Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Deployment and Operations
infra-azure-provisioning
Commits
327919d3
Commit
327919d3
authored
Oct 26, 2020
by
Daniel Scholl
Browse files
Variable Script updates
parent
0e936798
Changes
8
Hide whitespace changes
Inline
Side-by-side
tools/variables/README.md
View file @
327919d3
...
...
@@ -6,10 +6,26 @@ __PreRequisites__
Requires the use of
[
direnv
](
https://direnv.net/
)
.
__Log with environment ServicePrincipal__
### Environment Variables
The application created for OSDU by default does not have a Client Secret and one must be manually created.
Copy the .envrc_sample file to .envrc and fill in the appropriate values.
```
bash
# This logs your local Azure CLI in using the configured service principal.
az login
--service-principal
-u
$ARM_CLIENT_ID
-p
$ARM_CLIENT_SECRET
--tenant
$ARM_TENANT_ID
Generate the environment yaml files
`{service}/generate.sh`
compatable with intelliJ
[
envfile
](
https://plugins.jetbrains.com/plugin/7861-envfile
)
plugin.
export
DNS_HOST
=
<your_fqdn>
export
COMMON_VAULT
=
<your_common_vault>
```
__Create Service Environment Variables__
Generate the environment .envrc and yaml files compatable with intelliJ
[
envfile
](
https://plugins.jetbrains.com/plugin/7861-envfile
)
plugin.
```
bash
for
SERVICE
in
partition entitlements-azure legal storage indexer-queue indexer-service search-service
;
do
./
$SERVICE
.sh
done
```
tools/variables/entitlements.sh
→
tools/variables/entitlements
-azure
.sh
View file @
327919d3
...
...
@@ -7,7 +7,7 @@
###############################
## ARGUMENT INPUT ##
###############################
usage
()
{
echo
"Usage: DNS_HOST=<your_host> INVALID_JWT=<your_token> entitlements.sh "
1>&2
;
exit
1
;
}
usage
()
{
echo
"Usage: DNS_HOST=<your_host> INVALID_JWT=<your_token> entitlements
-azure
.sh "
1>&2
;
exit
1
;
}
SERVICE
=
"entitlements"
...
...
@@ -21,6 +21,11 @@ if [ -z $DNS_HOST ]; then
usage
;
fi
if
[
-z
$COMMON_VAULT
]
;
then
tput setaf 1
;
echo
'ERROR: COMMON_VAULT not provided'
;
tput sgr0
usage
;
fi
if
[
-z
$INVALID_JWT
]
;
then
tput setaf 1
;
echo
'ERROR: INVALID_JWT not provided'
;
tput sgr0
usage
;
...
...
tools/variables/indexer.sh
→
tools/variables/indexer
-service
.sh
View file @
327919d3
...
...
@@ -7,7 +7,7 @@
###############################
## ARGUMENT INPUT ##
###############################
usage
()
{
echo
"Usage: DNS_HOST=<your_host> INVALID_JWT=<your_token> indexer.sh "
1>&2
;
exit
1
;
}
usage
()
{
echo
"Usage: DNS_HOST=<your_host> INVALID_JWT=<your_token> indexer
-service
.sh "
1>&2
;
exit
1
;
}
SERVICE
=
"indexer"
...
...
@@ -21,6 +21,11 @@ if [ -z $DNS_HOST ]; then
usage
;
fi
if
[
-z
$COMMON_VAULT
]
;
then
tput setaf 1
;
echo
'ERROR: COMMON_VAULT not provided'
;
tput sgr0
usage
;
fi
if
[
-z
$INVALID_JWT
]
;
then
tput setaf 1
;
echo
'ERROR: INVALID_JWT not provided'
;
tput sgr0
usage
;
...
...
tools/variables/legal.sh
View file @
327919d3
...
...
@@ -21,6 +21,11 @@ if [ -z $DNS_HOST ]; then
usage
;
fi
if
[
-z
$COMMON_VAULT
]
;
then
tput setaf 1
;
echo
'ERROR: COMMON_VAULT not provided'
;
tput sgr0
usage
;
fi
if
[
-z
$INVALID_JWT
]
;
then
tput setaf 1
;
echo
'ERROR: INVALID_JWT not provided'
;
tput sgr0
usage
;
...
...
tools/variables/partition.sh
View file @
327919d3
...
...
@@ -21,17 +21,24 @@ if [ -z $DNS_HOST ]; then
usage
;
fi
if
[
-z
$COMMON_VAULT
]
;
then
tput setaf 1
;
echo
'ERROR: COMMON_VAULT not provided'
;
tput sgr0
usage
;
fi
if
[
-z
$INVALID_JWT
]
;
then
tput setaf 1
;
echo
'ERROR: INVALID_JWT not provided'
;
tput sgr0
usage
;
fi
if
[
-f
./settings_common.env
]
;
then
source
./settings_common.env
;
else
tput setaf 1
;
echo
'ERROR: common.env not found'
;
tput sgr0
fi
if
[
-f
./settings_environment.env
]
;
then
source
./settings_environment.env
;
else
...
...
tools/variables/search.sh
→
tools/variables/search
-service
.sh
View file @
327919d3
...
...
@@ -7,7 +7,7 @@
###############################
## ARGUMENT INPUT ##
###############################
usage
()
{
echo
"Usage: DNS_HOST=<your_host> INVALID_JWT=<your_token> search.sh "
1>&2
;
exit
1
;
}
usage
()
{
echo
"Usage: DNS_HOST=<your_host> INVALID_JWT=<your_token> search
-service
.sh "
1>&2
;
exit
1
;
}
SERVICE
=
"search"
...
...
@@ -21,6 +21,11 @@ if [ -z $DNS_HOST ]; then
usage
;
fi
if
[
-z
$COMMON_VAULT
]
;
then
tput setaf 1
;
echo
'ERROR: COMMON_VAULT not provided'
;
tput sgr0
usage
;
fi
if
[
-z
$INVALID_JWT
]
;
then
tput setaf 1
;
echo
'ERROR: INVALID_JWT not provided'
;
tput sgr0
usage
;
...
...
tools/variables/settings_common.env
View file @
327919d3
...
...
@@ -13,10 +13,10 @@ TENANT_ID="$(az account show --query tenantId -otsv)"
INVALID_JWT=$INVALID_JWT
# common-resources
NO_ACCESS_ID="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
demo
-noaccess-clientid --query value -otsv)"
NO_ACCESS_SECRET="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
demo
-noaccess-secret --query value -otsv)"
OTHER_APP_ID="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
demo
-application-clientid --query value -otsv)"
OTHER_APP_OID="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
demo
-application-oid --query value -otsv)"
NO_ACCESS_ID="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
$UNIQUE
-noaccess-clientid --query value -otsv)"
NO_ACCESS_SECRET="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
$UNIQUE
-noaccess-secret --query value -otsv)"
OTHER_APP_ID="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
$UNIQUE
-application-clientid --query value -otsv)"
OTHER_APP_OID="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/osdu-mvp-
$UNIQUE
-application-oid --query value -otsv)"
## These values have to be setup in the Azure Tenant for testing MS Graph Items
AD_USER_EMAIL="$(az keyvault secret show --id https://$COMMON_VAULT.vault.azure.net/secrets/ad-user-email --query value -otsv)"
...
...
tools/variables/storage.sh
View file @
327919d3
...
...
@@ -21,6 +21,11 @@ if [ -z $DNS_HOST ]; then
usage
;
fi
if
[
-z
$COMMON_VAULT
]
;
then
tput setaf 1
;
echo
'ERROR: COMMON_VAULT not provided'
;
tput sgr0
usage
;
fi
if
[
-z
$INVALID_JWT
]
;
then
tput setaf 1
;
echo
'ERROR: INVALID_JWT not provided'
;
tput sgr0
usage
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment