Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rpurdel
Copy link
Contributor

@rpurdel rpurdel commented Dec 11, 2024

No description provided.

}
}
}

Copy link
Member

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"
Copy link
Member

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]')"
Copy link
Member

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"
Copy link
Member

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.

Copy link
Member

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"] } }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example utilization:

data "oci_core_network_security_groups" "nomad_network_security_groups" {

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
Copy link
Member

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\"]")
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants