# Copyright 2020 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
#     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.
description: |
  **Single instance Charmed OSM**

  Charmed OSM is an OSM distribution, developed and maintained by Canonical, which uses
  Juju charms to simplify its deployments and operations. This bundle distribution refers
  to the development stack for OSM and allows you to deploy a single instance OSM bundle
  that is fast, reliable, and a complete solution with MicroStack and MicroK8s.

  - Industry‐aligned and fully compliant with upstream
  - Predictable release cadence and upgrade path
  - Simplified deployments and operations
  - Stable and secure
  - Supported with Ubuntu Advantage
  - Availability of managed services
bundle: kubernetes
applications:
  zookeeper:
    charm: "cs:~charmed-osm/zookeeper-1"
    scale: 1
    series: kubernetes
    storage:
      database: 100M
    annotations:
      gui-x: 0
      gui-y: 500
  mariadb-k8s:
    charm: "cs:~charmed-osm/mariadb-k8s"
    channel: "stable"
    scale: 1
    series: kubernetes
    storage:
      database: 50M
    options:
      password: manopw
      root_password: osm4u
      user: mano
    annotations:
      gui-x: -300
      gui-y: -250
  kafka:
    charm: "cs:~charmed-osm/kafka-1"
    scale: 1
    series: kubernetes
    storage:
      database: 100M
    annotations:
      gui-x: 0
      gui-y: 250
  mongodb:
    charm: ch:mongodb-k8s
    scale: 1
    series: kubernetes
    storage:
      db: 50M
    annotations:
      gui-x: 0
      gui-y: 0
  nbi:
    charm: "cs:~charmed-osm/nbi-18"
    scale: 1
    series: kubernetes
    options:
      database_commonkey: osm
      auth_backend: keystone
      log_level: DEBUG
    annotations:
      gui-x: 0
      gui-y: -250
  ro:
    charm: "cs:~charmed-osm/ro-10"
    scale: 1
    series: kubernetes
    options:
      log_level: DEBUG
    annotations:
      gui-x: -300
      gui-y: 250
  ng-ui:
    charm: "cs:~charmed-osm/ng-ui-25"
    scale: 1
    series: kubernetes
    annotations:
      gui-x: 600
      gui-y: 0
  lcm:
    charm: "cs:~charmed-osm/lcm-15"
    scale: 1
    series: kubernetes
    options:
      database_commonkey: osm
      log_level: DEBUG
    annotations:
      gui-x: -300
      gui-y: 0
  mon:
    charm: "cs:~charmed-osm/mon-12"
    scale: 1
    series: kubernetes
    options:
      database_commonkey: osm
      log_level: DEBUG
      keystone_enabled: true
    annotations:
      gui-x: 300
      gui-y: 0
  pol:
    charm: "cs:~charmed-osm/pol-10"
    scale: 1
    series: kubernetes
    options:
      log_level: DEBUG
    annotations:
      gui-x: -300
      gui-y: 500
  pla:
    charm: "cs:~charmed-osm/pla-13"
    scale: 1
    series: kubernetes
    options:
      log_level: DEBUG
    annotations:
      gui-x: 600
      gui-y: -250
  prometheus:
    charm: "cs:~charmed-osm/prometheus-9"
    scale: 1
    series: kubernetes
    storage:
      data: 50M
    options:
      default-target: "mon:8000"
    annotations:
      gui-x: 300
      gui-y: 250
  grafana:
    charm: "cs:~charmed-osm/grafana-10"
    scale: 1
    series: kubernetes
    annotations:
      gui-x: 300
      gui-y: 500
  keystone:
    charm: "cs:~charmed-osm/keystone-16"
    scale: 1
    series: kubernetes
    annotations:
      gui-x: 300
      gui-y: -250
relations:
  - - grafana:prometheus
    - prometheus:prometheus
  - - kafka:zookeeper
    - zookeeper:zookeeper
  - - keystone:db
    - mariadb-k8s:mysql
  - - lcm:kafka
    - kafka:kafka
  - - lcm:mongodb
    - mongodb:database
  - - ro:ro
    - lcm:ro
  - - ro:kafka
    - kafka:kafka
  - - ro:mongodb
    - mongodb:database
  - - pol:kafka
    - kafka:kafka
  - - pol:mongodb
    - mongodb:database
  - - mon:mongodb
    - mongodb:database
  - - mon:kafka
    - kafka:kafka
  - - pla:kafka
    - kafka:kafka
  - - pla:mongodb
    - mongodb:database
  - - nbi:mongodb
    - mongodb:database
  - - nbi:kafka
    - kafka:kafka
  - - nbi:prometheus
    - prometheus:prometheus
  - - nbi:keystone
    - keystone:keystone
  - - mon:prometheus
    - prometheus:prometheus
  - - ng-ui:nbi
    - nbi:nbi
  - - mon:keystone
    - keystone:keystone
  - - mariadb-k8s:mysql
    - pol:mysql
  - - grafana:db
    - mariadb-k8s:mysql
