-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: create nomad-whisper state #746
base: main
Are you sure you want to change the base?
Conversation
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need anything past this line.
[ -e "$LOCAL_PATH/../../clouds/${ORACLE_CLOUD_NAME}.sh" ] && . $LOCAL_PATH/../../clouds/${ORACLE_CLOUD_NAME}.sh | ||
|
||
[ -z "$SHAPE" ] && SHAPE="$DEFAULT_NOMAD_POOL_SHAPE" | ||
[ -z "$SHAPE" ] && SHAPE="$SHAPE_A_1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should default to the A10 GPU shape, not A_1
[ -z "$VAULT_PASSWORD_FILE" ] && VAULT_PASSWORD_FILE="$LOCAL_PATH/../../.vault-password.txt" | ||
|
||
# look up instance pool. If it exists, find its curent size and set INSTANCE_POOL_SIZE appropriately | ||
INSTANCE_POOL_DETAILS="$(oci compute-management instance-pool list --region "$ORACLE_REGION" -c "$COMPARTMENT_OCID" --all --display-name "$INSTANCE_POOL_NAME" | jq '.data[0]')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no instance pool, so instead we need to look up the equivalent autoscale group
|
||
# first find or create the nomad security group | ||
[ -z "$S3_STATE_KEY_NOMAD_SG" ] && S3_STATE_KEY_NOMAD_SG="$ENVIRONMENT/nomad-whisper/$POOL_TYPE/terraform-nomad-sg.tfstate" | ||
LOCAL_NOMAD_SG_KEY="terraform-nomad-sg.tfstate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you are creating a new sg we don't need this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead we should use the nomad shared security group
data "oci_core_network_security_groups" "nomad_network_security_groups" { compartment_id = var.compartment_ocid filter { name = "display_name" values = ["${var.environment}-${var.oracle_region}-nomad-pool-shared-SecurityGroup"] } }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example utilization:
infra-provisioning/terraform/jibri-instance-configuration/create-jibri-instance-configuration.tf
Line 93 in 05ff7a8
data "oci_core_network_security_groups" "nomad_network_security_groups" { |
@@ -0,0 +1,13 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should script be the whole thing, no need to have two create scripts. The other directory had two because the lower script was called by multiple higher level scripts (nomad, whisper, general and x86) whereas this one should be all one script, no need for 2.
. /usr/local/bin/oracle_cache.sh | ||
[ -z "$CACHE_PATH" ] && CACHE_PATH=$(ls /tmp/oracle_cache-*) | ||
export POOL_TYPE_TAG="pool_type" | ||
export POOL_TYPE=$(cat $CACHE_PATH | jq -r --arg POOL_TYPE_TAG "$POOL_TYPE_TAG" ".[\"$POOL_TYPE_TAG\"]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just hardcode the pool type to whisper here, since we won't ever run anything else with this postinstall runner.
No description provided.