generated from AgnostiqHQ/covalent-executor-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require no variables to covalent deploy gcpbatch (#32)
* use `templatefile` for darwin compatibility * fall back to vars if google_client_config is null * stop requiring vars key_path and prefix * stop requiring var access_token * remove var context * clean up, use locals, docker push working * fix paths for normal vs editable install * move requirements and exec file to build args * create docker folder in non-editable installs * update changelog * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * copy files directly, fix build context * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * revert setup.py * move docker image files * include docker image files * modify dockerfile for new paths * remove normal vs. editable distinction * update exec test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update changelog * move iam stuff into own file * update config output --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7a5bcf0
commit c362062
Showing
11 changed files
with
182 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include VERSION | ||
include requirements.txt | ||
include covalent_gcpbatch_plugin/assets/infra/* | ||
include covalent_gcpbatch_plugin/assets/docker/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
covalent_gcpbatch_plugin/assets/docker/requirements-image.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 Agnostiq Inc. | ||
# | ||
# This file is part of Covalent. | ||
# | ||
# Licensed under the Apache License 2.0 (the "License"). A copy of the | ||
# License may be obtained with this software package or at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Use of this file is prohibited except in compliance with the License. | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Mirror plugin dependencies. | ||
|
||
covalent>=0.218.0,<1 | ||
google-cloud-batch==0.9.0 | ||
google-cloud-storage==2.7.0 | ||
|
||
# This file is copied into the docker image during `covalent deploy up` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
[gcpbatch] | ||
region = ${region} | ||
key_path = ${key_path} | ||
project_id = ${project_id} | ||
bucket_name = ${bucket_name} | ||
container_image_uri = ${container_image_uri} | ||
covalent_package_version = ${covalent_package_version} | ||
key_path = ${key_path} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 2023 Agnostiq Inc. | ||
# | ||
# This file is part of Covalent. | ||
# | ||
# Licensed under the Apache License 2.0 (the "License"). A copy of the | ||
# License may be obtained with this software package or at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Use of this file is prohibited except in compliance with the License. | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
resource "google_service_account" "covalent" { | ||
account_id = join("-", ["covalent", "sa", local.prefix]) | ||
display_name = "CovalentBatchExecutorServiceAccount" | ||
description = "Service account created by Covalent deployment" | ||
project = local.project_id | ||
} | ||
|
||
resource "google_project_iam_member" "agent_reporter" { | ||
project = local.project_id | ||
role = "roles/batch.agentReporter" | ||
member = google_service_account.covalent.member | ||
} | ||
|
||
resource "google_project_iam_member" "log_writer" { | ||
project = local.project_id | ||
role = "roles/logging.logWriter" | ||
member = google_service_account.covalent.member | ||
} | ||
|
||
resource "google_project_iam_member" "log_viewer" { | ||
project = local.project_id | ||
role = "roles/logging.viewer" | ||
member = google_service_account.covalent.member | ||
} | ||
|
||
resource "google_project_iam_member" "registry_writer" { | ||
project = local.project_id | ||
role = "roles/artifactregistry.writer" | ||
member = google_service_account.covalent.member | ||
} | ||
|
||
resource "google_project_iam_member" "storage_object_creator" { | ||
project = local.project_id | ||
role = "roles/storage.objectCreator" | ||
member = google_service_account.covalent.member | ||
} | ||
|
||
resource "google_project_iam_member" "storage_object_reader" { | ||
project = local.project_id | ||
role = "roles/storage.objectViewer" | ||
member = google_service_account.covalent.member | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.