Skip to content

Commit

Permalink
Setting up environments and automated deployment (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
encarvlucas authored Feb 26, 2024
1 parent f82488e commit 6fe1c4d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 26 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/deploy-bootstrap-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: deploy-bootstrap-cli
on:
push:
branches:
#- main
- none
- main
# - none
paths:
- config/bootstrap/**
- .github/workflows/deploy-bootstrap-cli.yaml
Expand All @@ -16,22 +16,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
environment: [test, prod]
environment: [dev, prod]
include:
- environment: test
# CDF cluster, like bluefield, greenfield or westeurope-1
CDF_CLUSTER: [CDF cluster]
# CDF Project name
CDF_PROJECT: [CDF project]
# Azure AD tenant id
IDP_TENANT: [AAD tenant id]
- environment: dev
CDF_CLUSTER: westeurope-1
CDF_PROJECT: cdf-bootcamp-16-test
IDP_TENANT: 16e3985b-ebe8-4e24-9da4-933e21a9fc81
- environment: prod
# CDF cluster, like bluefield, greenfield or westeurope-1
CDF_CLUSTER: [CDF cluster]
# CDF Project name
CDF_PROJECT: [CDF project]
# Azure AD tenant id
IDP_TENANT: [AAD tenant id]
CDF_CLUSTER: westeurope-1
CDF_PROJECT: cdf-bootcamp-16-prod
IDP_TENANT: 16e3985b-ebe8-4e24-9da4-933e21a9fc81

environment: ${{ matrix.environment}}
env:
Expand Down
44 changes: 34 additions & 10 deletions config/bootstrap/bootstrap-cli-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,53 @@ bootstrap:
# Mapping between IDP (Azure Active Directory) groups and CDF groups.
idp-cdf-mappings:
# Support multiple CDF Projects, like dev/test/prod in one config.
- cdf-project: <CDF project name> # i.e. bootcamp-01-test
- cdf-project: cdf-bootcamp-16-test # i.e. bootcamp-01-test
mappings:
- cdf-group: cdf:root
idp-source-id: <AAD Group Object id>
idp-source-name: <AAD Group name>
idp-source-id: e88586a1-347a-489e-a69a-8e197a3100eb
idp-source-name: bootcamp-16-test-admin
- cdf-group: cdf:all:owner
idp-source-id: <AAD Group Object Id> # for the AAD Group to be matched to cdf-group
idp-source-name: <AAD Group name> # i.e. bootcamp-01-test-all-owner
idp-source-id: d24cde17-4903-48d8-ab0d-fa5c6f591e3a # for the AAD Group to be matched to cdf-group
idp-source-name: bootcamp-16-test-all-owner # i.e. bootcamp-01-test-all-owner
- cdf-group: cdf:all:read
idp-source-id: <AAD Group Object Id> # for the AAD Group to be matched to cdf-group
idp-source-name: <AAD Group name> # i.e. bootcamp-01-test-all-read
idp-source-id: 3ca42f5f-fb17-478d-b6a1-fbc225dbfbff # for the AAD Group to be matched to cdf-group
idp-source-name: bootcamp-16-test-all-read # i.e. bootcamp-01-test-all-read

- cdf-project: cdf-bootcamp-16-prod # i.e. bootcamp-01-prod
mappings:
- cdf-group: cdf:root
idp-source-id: 7dcf3317-baa5-44ef-945a-1313be25232f
idp-source-name: bootcamp-16-prod-admin
- cdf-group: cdf:all:owner
idp-source-id: 34d094f1-8a1c-4b29-8027-f80f4a325953 # for the AAD Group to be matched to cdf-group
idp-source-name: bootcamp-16-prod-all-owner # i.e. bootcamp-01-prod-all-owner
- cdf-group: cdf:all:read
idp-source-id: c7c7ddcc-b4ac-4424-877b-2f78603bcb28 # for the AAD Group to be matched to cdf-group
idp-source-name: bootcamp-16-prod-all-read # i.e. bootcamp-01-prod-all-read


namespaces:
# Typical config will have a namespace for data sources ("src") and a namespace for use cases ("uc")
- ns-name: <Namespace name>
- ns-name: src
description: Data sources for the Ice Cream Factory # HINT

# Node names will normally follow src:001:srcname or uc:001:usecasename naming convention
ns-nodes:
- node-name: <Node name>
description: Data from SAP # HINT
- node-name: src:001:sap
description: Source 01 data from SAP
- node-name: src:002:opcua
description: Source 02 data from opcua
# HINT: Add another namespace below
- ns-name: uc
description: Use cases representing the data/products

ns-nodes:
- node-name: uc:001:oee
description: Use case 001 Over all Equipment effectiveness
shared-access:
read:
- node-name: src:001:sap
- node-name: src:002:opcua


# de-facto standards for CDF CogniteClient and logger configuration.
Expand Down

0 comments on commit 6fe1c4d

Please sign in to comment.