Updating a DataOps Runner for Snowpark Container Services
Updating a Runner
To update a runner, you need to update the runner service's image. You can do this by updating the runner image and, subsequently, the runner service.
Update the Runner Image
To update the runner image, you need to update the image in the repository that the runner service is pointing at.
Do this by pulling the latest version of the dataops-spcs-runner
image and pushing it to the repository.
You can follow the same steps for this from when you first set up your runner/s available here:
DataOps Runner for Snowpark Container Services Setup.
Once you have updated the image, you can update the runner service.
Update the Runner Service
First, ensure the required SQL session variables are set. The installation guide provides more details on these session variables.
SET runner_role_name='DATAOPS_RUNNER_TEAM_A_ROLE';
SET runner_schema_name='TEAM_A';
SET runner_service_name='DATAOPS_RUNNER_TEAM_A_SERVICE';
SET runner_registration_token='"<registration-token>"';
SET runner_agent_name='"DATAOPS_RUNNER_TEAM_A"';
SET runner_agent_tag='"DATAOPS_RUNNER_TEAM_A"';
SET account_name='"<orgname>-<account-name>"';
Now run the following ALTER
statement to update the runner service. It will update the image that the runner service is using.
Ensure the remaining configuration is correct based on how you originally set up the runner.
USE ROLE IDENTIFIER($runner_role_name);
USE DATABASE DATAOPS_RUNNER_DB;
USE SCHEMA IDENTIFIER($runner_schema_name);
ALTER SERVICE IDENTIFIER($runner_service_name)
FROM SPECIFICATION_TEMPLATE $$
spec:
containers:
- name: runner
image: "/DATAOPS_RUNNER_DB/IMAGES/RUNNER_REPOSITORY/dataops-spcs-runner:latest"
env:
SNOWFLAKE_ACCOUNT_NAME: {{account_name}}
SNOWFLAKE_WAREHOUSE: "DATAOPS_RUNNER_WAREHOUSE"
SNOWFLAKE_COMPUTE_POOL: "DATAOPS_RUNNER_COMPUTE_POOL"
SNOWFLAKE_EXTERNAL_ACCESS_INTEGRATION: "DATAOPS_ALLOW_ALL_INTEGRATION"
DATAOPS_URL: "https://app.dataops.live/"
REGISTRATION_TOKEN: {{registration_token}}
AGENT_NAME: {{agent_name}}
AGENT_TAG: {{agent_tag}}
IMAGE_REPOSITORY_PATH: "DATAOPS_RUNNER_DB/IMAGES/RUNNER_REPOSITORY"
LOG_LEVEL: "INFO"
ALLOWED_IMAGES: ""
SKIP_STARTUP_IMAGE_SYNC: "1"
secrets:
- snowflakeSecret: "IMAGES.DATAOPS_RUNNER_USER_SECRET"
secretKeyRef: "username"
envVarName: "SNOWFLAKE_USER"
- snowflakeSecret: "IMAGES.DATAOPS_RUNNER_USER_SECRET"
secretKeyRef: "password"
envVarName: "SNOWFLAKE_PASSWORD"
volumeMounts:
- name: orchestratorvolumes
mountPath: /orchestrator_volumes/
volumes:
- name: orchestratorvolumes
source: "@ORCHESTRATOR_VOLUMES"
$$
USING (
account_name=>$account_name,
registration_token=>$runner_registration_token,
agent_name=>$runner_agent_name,
agent_tag=>$runner_agent_tag
);