Commit d625b2a0 authored by garciadeblas's avatar garciadeblas
Browse files

Merge branch 'feature_11033_Publication_of_OSM_helm_chart' into 'master'

Feature 11033: Publication of OSM helm chart externally in Gitlab

See merge request !154
parents 20ab4d53 e22a4b36
Loading
Loading
Loading
Loading
Loading
+39 −26
Original line number Diff line number Diff line
@@ -393,6 +393,45 @@ helm install cert-manager --create-namespace --namespace cert-manager jetstack/c
```
### Deploy OSM helm chart

#### Deploy OSM helm chart directly from Gitlab OCI repo

```bash
helm install -n osm osm oci://osm.etsi.org:5050/osm/devops/osm --version 16.0.0
# Optionally pull, then install
# helm pull osm oci://osm.etsi.org:5050/osm/devops/osm --version 16.0.0
# helm install -n osm --repo osm osm-16.0.0.tgz
```

#### Deploy OSM helm chart from devops repo

```bash
# Make sure you are in devops directory
cd devops
# Optionally check out a specific version
# DESIRED_OSM_VERSION="15.0.0"
# git checkout $DESIRED_OSM_VERSION

# Check default values
helm -n osm show values installers/helm/osm

# Specify the repository base and the version that you want for the docker images
OSM_HELM_OPTS=""
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.repositoryBase=opensourcemano"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.tag=\"16\""

# Build the helm chart dependencies 
helm dependency build installers/helm/osm

# Check that there are no errors
helm -n osm template osm installers/helm/osm -f osm-values.yaml ${OSM_HELM_OPTS}

# Deploy OSM helm chart
helm -n osm install osm installers/helm/osm -f osm-values.yaml ${OSM_HELM_OPTS}
helm -n osm status osm
```

#### Specific instructions if Juju is used

Get Juju host, secret, public key and CA certificate:

```bash
@@ -422,19 +461,7 @@ OSM_VCA_HOST=$(juju show-controller osm |grep api-endpoints|awk -F\' '{print $2}
OSM_VCA_SECRET=$(parse_juju_password osm)
OSM_VCA_CACERT=$(juju controllers --format json | jq -r --arg controller osm '.controllers[$controller]["ca-cert"]' | base64 | tr -d \\n)
OSM_VCA_PUBKEY=$(cat $HOME/.local/share/juju/ssh/juju_id_rsa.pub)
```

Deploy OSM Helm chart:

```bash
# Make sure you are in devops directory
cd devops
# Optionally check out a specific version
# DESIRED_OSM_VERSION="15.0.0"
# git checkout $DESIRED_OSM_VERSION

# Check default values
helm -n osm show values installers/helm/osm

# Generate helm values to be passed with -f osm-values.yaml
sudo bash -c "cat << EOF > osm-values.yaml
@@ -442,23 +469,9 @@ vca:
  pubkey: \"${OSM_VCA_PUBKEY}\"
EOF"
# Customize your own helm options (--set ...)
OSM_HELM_OPTS=""
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.host=${OSM_VCA_HOST}"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.secret=${OSM_VCA_SECRET}"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.cacert=${OSM_VCA_CACERT}"
# Specify the repository base and the version that you want for the docker images
# OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.repositoryBase=opensourcemano"
# OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.tag=\"15\""

# Build the helm chart dependencies 
helm dependency build installers/helm/osm

# Check that there are no errors
helm -n osm template osm installers/helm/osm -f osm-values.yaml ${OSM_HELM_OPTS}

# Deploy OSM helm chart
helm -n osm install osm installers/helm/osm -f osm-values.yaml ${OSM_HELM_OPTS}
helm -n osm status osm
```

### Deploy NG-SA