Skip to content

Commit

Permalink
Enable Experimental Capabilities (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielscholl authored Oct 3, 2024
1 parent 3ea102c commit fafe7b7
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 24 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ For detailed instructions, view our online [Documentation](https://azure.github.

Supported services of OSDU are based on the release branch of OSDU as specified in the [OSDU Milestones](https://community.opengroup.org/osdu/platform/-/milestones). (ie: release/0.25 release/0.26, release/0.27, master etc.)


| **Core Services** | **Description** |
|-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| [Partition Service](https://community.opengroup.org/osdu/platform/system/partition) | Manages data partitions to ensure efficient data management and scalability. |
Expand All @@ -40,6 +39,15 @@ Supported services of OSDU are based on the release branch of OSDU as specified
| [Manifest Ingestion DAG](https://community.opengroup.org/osdu/platform/data-flow/ingestion/ingestion-dags) | Used for ingesting single or multiple metadata artifacts about datasets into OSDU. |
| [CSV Parser DAG:](https://community.opengroup.org/osdu/platform/data-flow/ingestion/csv-parser/csv-parser) | Helps in parsing CSV files into a format for ingestion and processing. |

## Experimental Software

OSDU offers different experimental capabilities that are very new or community contributions. These services are not yet fully mature but are available for early adopters to test and provide feedback. This solution supports the concepts of experimental software with opt in feature flags.

| **Experimental Services** | **Description** |
|-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| [Admin UI](https://community.opengroup.org/osdu/ui/admin-ui-group/admin-ui-totalenergies/admin-ui-totalenergies) | A community supported Angular Administration UI for OSDU. |


## Getting Started

> **IMPORTANT:** In order to deploy and run this example, you'll need an **Azure subscription** with [these namespaces](https://azure.github.io/osdu-developer/before_you_start/) registered.
Expand Down
11 changes: 9 additions & 2 deletions bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,18 @@ param clusterSoftware object = {
enable: true
osduCore: true
osduReference: true
adminUI: true
osduVersion: ''
repository: ''
branch: ''
tag: ''
}

@description('(Optional) Experimental Software Override - {enable/adminUI} --> true/false')
param experimentalSoftware object = {
enable: true
adminUI: true
}

// This would be a type but bugs exist for ARM Templates so is object instead.
@description('Cluster Network Overrides - {ingress} (Both/Internal/External), {serviceCidr}, {dnsServiceIP}')
param clusterNetwork object = {
Expand Down Expand Up @@ -403,7 +408,9 @@ module serviceBlade 'modules/blade_service.bicep' = {
enableSoftwareLoad: clusterSoftware.enable == 'false' ? false : true
enableOsduCore: clusterSoftware.osduCore == 'false' ? false : true
enableOsdureference: clusterSoftware.osduReference == 'false' ? false : true
enableAdminUI: clusterSoftware.adminUI == 'false' ? false : true

enableExperimental: experimentalSoftware.enable == 'true' ? true : false
enableAdminUI: experimentalSoftware.adminUI == 'true' ? true : false

emailAddress: emailAddress
applicationClientId: applicationClientId
Expand Down
7 changes: 6 additions & 1 deletion bicep/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,16 @@
"osduVersion": "${SOFTWARE_VERSION}",
"osduCore": "${ENABLE_OSDU_CORE}",
"osduReference": "${ENABLE_OSDU_REFERENCE}",
"adminUI": "${ENABLE_ADMIN_UI}",
"repository": "${SOFTWARE_REPOSITORY}",
"branch": "${SOFTWARE_BRANCH}",
"tag": "${SOFTWARE_TAG}"
}
},
"experimentalSoftware": {
"value": {
"enable": "${ENABLE_EXPERIMENTAL}",
"adminUI": "${ENABLE_ADMIN_UI}"
}
}
}
}
25 changes: 23 additions & 2 deletions bicep/modules/blade_service.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ param clusterIngress string = 'External'
@description('Feature Flag to Load Software.')
param enableSoftwareLoad bool = true

@description('Feature Flag to Load Experimental Software.')
param enableExperimental bool = true

@description('Feature Flag to Load OSDU Core.')
param enableOsduCore bool = true

Expand Down Expand Up @@ -733,7 +736,7 @@ module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-config
tag: serviceLayerConfig.gitops.tag
}
}
kustomizations: {
kustomizations: enableExperimental ? {
components: {
path: serviceLayerConfig.gitops.components
timeoutInSeconds: 300
Expand Down Expand Up @@ -761,7 +764,25 @@ module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-config
retryIntervalInSeconds: 300
prune: true
}
}
} : {
components: {
path: serviceLayerConfig.gitops.components
timeoutInSeconds: 300
syncIntervalInSeconds: 300
retryIntervalInSeconds: 300
prune: true
}
applications: {
path: serviceLayerConfig.gitops.applications
dependsOn: [
'components'
]
timeoutInSeconds: 300
syncIntervalInSeconds: 300
retryIntervalInSeconds: 300
prune: true
}
}
}
dependsOn: [
app_config
Expand Down
11 changes: 1 addition & 10 deletions charts/osdu-admin-ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,5 @@ app.kubernetes.io/name: {{ include "osdu-admin-ui.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Determine if the installation is enabled
*/}}
{{- define "osdu-admin-ui.isEnabled" -}}
{{- if .Values.enabled }}
{{- true -}}
{{- else -}}
{{- false -}}
{{- end -}}
{{- end }}


2 changes: 1 addition & 1 deletion charts/osdu-admin-ui/templates/code.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (include "osdu-admin-ui.isEnabled" .) }}
{{- if ne (.Values.adminUIEnabled | toString | lower) "false" }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
2 changes: 1 addition & 1 deletion charts/osdu-admin-ui/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (include "osdu-admin-ui.isEnabled" .) }}
{{- if ne (.Values.adminUIEnabled | toString | lower) "false" }}
---
apiVersion: batch/v1
kind: Job
Expand Down
2 changes: 1 addition & 1 deletion charts/osdu-admin-ui/templates/storage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (include "osdu-admin-ui.isEnabled" .) }}
{{- if ne (.Values.adminUIEnabled | toString | lower) "false" }}
---
apiVersion: v1
kind: PersistentVolumeClaim
Expand Down
2 changes: 1 addition & 1 deletion charts/osdu-admin-ui/templates/web-site.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if (include "osdu-admin-ui.isEnabled" .) }}
{{- if ne (.Values.adminUIEnabled | toString | lower) "false" }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
10 changes: 6 additions & 4 deletions docs/src/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@
This provides valuable insights into best practices and design
considerations of azure workloads.

#### Desired State Configuration
#### IaC: Declarative Resource Definition

Bicep is a domain-specific language (DSL) for deploying Azure resources declaratively. It simplifies authoring ARM templates and allows you to define the desired state of your Infrastructure as Code (IaC). Azure Resource Manager (ARM) processes the Bicep file to ensure the Azure environment matches the defined desired state, correcting any drift through redeployment.
Infrastructure as Code (IaC) uses declarative definitions to specify the desired state of cloud resources. Bicep is a domain-specific language (DSL) used for deploying Azure resources declaratively. It simplifies authoring ARM templates and allows you to define the desired state of your Infrastructure as Code (IaC). Azure Resource Manager (ARM) processes the Bicep file to ensure the Azure environment matches the defined desired state, correcting any drift through redeployment.

!!! Note
Microsoft recommends when developing with Bicep to use official [Azure Verified Modules](https://azure.github.io/Azure-Verified-Modules/).


#### Desired State Management
#### GitOps: Declarative Configuration Management

[GitOps](https://opengitops.dev) uses Git as a single source of truth for declarative components and applications. It ensures that the actual state of the components or application matches the desired state defined in the Git repository, automating updates through continuous monitoring and Git commits.
[GitOps](https://opengitops.dev) a term introduced by [WeaveWorks](https://www.weave.works/blog/the-history-of-gitops_) uses declarative configurations like Kustomize configs, Helm charts to manage software. Instead of scripting everything manually, GitOps uses a set of declarative configuration files that define a software desired state.

GitOps uses versioned CI/CD on top of a declarative infrastructure, allowing developers to "[stop scripting and start shipping](https://twitter.com/kelseyhightower/status/953638870888849408)," as Kelsey Hightower put it. This declarative configuration is helpful to define the entire softwarestack as code and continuously deliver changes with confidence to environments.


## Command Sequence
Expand Down
9 changes: 9 additions & 0 deletions docs/src/feature_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ Software customizations can be managed and modified using the following feature
| SOFTWARE_BRANCH | Customizes the branch used for software definition |


## Experimental Software

Experimental Software can be managed and modified using the following feature flags.

| Feature Flag | Description |
|---------------------------|-----------------------------------------------------------------------------|
| ENABLE_EXPERIMENTAL | Enables loading of experimental software (False by default) |
| ENABLE_ADMIN_UI | Enables loading of the Admin UI (False by default) |

## Storage Access

Control public access to Storage.
Expand Down

0 comments on commit fafe7b7

Please sign in to comment.