# 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.
name: osm
bundle: kubernetes
docs: https://discourse.charmhub.io/t/osm-docs-index/8806
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
applications:
  zookeeper:
    charm: zookeeper-k8s
    channel: latest/stable
    scale: 1
    storage:
      data: 100M
  kafka:
    charm: kafka-k8s
    channel: latest/stable
    scale: 1
    trust: true
    storage:
      data: 100M
  mariadb:
    charm: charmed-osm-mariadb-k8s
    scale: 1
    series: kubernetes
    storage:
      database: 50M
    options:
      password: manopw
      root_password: osm4u
      user: mano
  mongodb:
    charm: mongodb-k8s
    channel: 5/edge
    scale: 1
    series: kubernetes
    storage:
      db: 50M
  nbi:
    charm: osm-nbi
    channel: latest/beta
    trust: true
    scale: 1
    options:
      database-commonkey: osm
      log-level: DEBUG
    resources:
      nbi-image: opensourcemano/nbi:testing-daily
  ro:
    charm: osm-ro
    channel: latest/beta
    trust: true
    scale: 1
    options:
      log-level: DEBUG
    resources:
      ro-image: opensourcemano/ro:testing-daily
  ng-ui:
    charm: osm-ng-ui
    channel: latest/beta
    trust: true
    scale: 1
    resources:
      ng-ui-image: opensourcemano/ng-ui:testing-daily
  lcm:
    charm: osm-lcm
    channel: latest/beta
    scale: 1
    options:
      database-commonkey: osm
      log-level: DEBUG
    resources:
      lcm-image: opensourcemano/lcm:testing-daily
  mon:
    charm: osm-mon
    channel: latest/beta
    trust: true
    scale: 1
    options:
      database-commonkey: osm
      log-level: DEBUG
      keystone-enabled: true
    resources:
      mon-image: opensourcemano/mon:testing-daily
  pol:
    charm: osm-pol
    channel: latest/beta
    scale: 1
    options:
      log-level: DEBUG
    resources:
      pol-image: gatici/pol:testing-daily
  vca:
    charm: osm-vca-integrator
    channel: latest/beta
    scale: 1
  ingress:
    charm: nginx-ingress-integrator
    channel: latest/stable
    scale: 1
  prometheus:
    charm: osm-prometheus
    channel: latest/stable
    scale: 1
    series: kubernetes
    storage:
      data: 50M
    options:
      default-target: "mon:8000"
  grafana:
    charm: osm-grafana
    channel: latest/stable
    scale: 1
    series: kubernetes
  keystone:
    charm: osm-keystone
    channel: latest/beta
    scale: 1
    resources:
      keystone-image: opensourcemano/keystone:testing-daily
relations:
  - - grafana:prometheus
    - prometheus:prometheus
  - - kafka:zookeeper
    - zookeeper:zookeeper
  - - keystone:db
    - mariadb:mysql
  - - lcm:kafka
    - kafka:kafka
  - - lcm:mongodb
    - mongodb:database
  - - lcm:vca
    - vca:vca
  - - 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
  - - mon:vca
    - vca:vca
  - - nbi:mongodb
    - mongodb:database
  - - nbi:kafka
    - kafka:kafka
  - - nbi:ingress
    - ingress:ingress
  - - nbi:prometheus
    - prometheus:prometheus
  - - nbi:keystone
    - keystone:keystone
  - - mon:prometheus
    - prometheus:prometheus
  - - ng-ui:nbi
    - nbi:nbi
  - - ng-ui:ingress
    - ingress:ingress
  - - mon:keystone
    - keystone:keystone
  - - mariadb:mysql
    - pol:mysql
  - - grafana:db
    - mariadb:mysql