Managed Services
Every service offered through the Managed Services section is configured as an
individual Managed Service Provider in the codesphere.managedServices array in
config.yaml. The configuration follows a specific schema.
Managed Service Providers can be external to Codesphere (an external API is called), but there are also built-in Managed Services, where the provider runs within Codesphere. With the current release there is one such provider, for PostgreSQL.
Codesphere comes with a set of preconfigured providers. To enable any of them, specify name and version:
managedServices:
- name: postgres
schemaVersion: v1
- name: babelfish
schemaVersion: v1
- name: s3
schemaVersion: v1
- name: virtualK8sV1
schemaVersion: v1
If you use any of those providers, ensure the respective backend is also enabled in
the managedServiceBackends section.
It is possible to override properties of the preconfigured providers, or even implement and add your own providers (see Create your own REST backend).
Full example: the PostgreSQL Managed Service Provider
managedServices:
- name: postgres
schemaVersion: v1
backend:
api:
endpoint: "http://ms-backend-postgres.postgres-operator:3000/api/v1/postgres"
author: Codesphere
category: Database
displayName: PostgreSQL
# Set to true to allow only one non-deleted service per team for this provider version.
# teamSingleton: true
iconUrl: /ide/assets/managed-services/postgresql.svg
configSchema:
type: object
properties:
version:
type: string
description: Version of the Postgres DB. Includes pre-installed extensions compatible with this version. Extension versions are managed and cannot be customized.
enum:
- '17.6'
- '16.10'
default: '17.6'
readOnly: false
userName:
type: string
default: app
pattern: '^(?!postgres$)'
databaseName:
type: string
default: app
required: []
additionalProperties: false
detailsSchema:
type: object
properties:
port:
type: integer
hostname:
type: string
dsn:
type: string
ready:
type: boolean
required:
- port
- hostname
- dsn
- ready
additionalProperties: false
secretsSchema:
type: object
properties:
userPassword:
type: string
format: password
superuserPassword:
type: string
format: password
required:
- userPassword
- superuserPassword
additionalProperties: false
description: >-
Open-source database system tailored for efficient data management and
scalability. Deployed on Codesphere using the CNPG K8s Operator.
plans:
- id: 0
description: 0.5 vCPU / 500 MB Memory
name: Small
parameters:
storage:
pricedAs: storage-mb
schema:
description: Storage (MB)
type: integer
default: 10000
readOnly: false
cpu:
pricedAs: cpu-tenths
schema:
description: CPU Tenths
type: number
default: 5
readOnly: true
memory:
pricedAs: ram-mb
schema:
description: Memory (MB)
type: integer
default: 500
readOnly: true
- id: 1
description: 1 vCPU / 1 GB Memory
name: Medium
parameters:
storage:
pricedAs: storage-mb
schema:
description: Storage (MB)
type: integer
default: 25000
readOnly: false
cpu:
pricedAs: cpu-tenths
schema:
description: CPU Tenths
type: number
default: 10
readOnly: true
memory:
pricedAs: ram-mb
schema:
description: Memory (MB)
type: integer
default: 1000
readOnly: true
- id: 2
description: 1 vCPU / 2 GB Memory
name: Medium High-Mem
parameters:
storage:
pricedAs: storage-mb
schema:
type: integer
default: 25000
readOnly: false
cpu:
pricedAs: cpu-tenths
schema:
type: number
default: 10
readOnly: true
memory:
pricedAs: ram-mb
schema:
type: integer
default: 2000
readOnly: true
- id: 3
description: 2 vCPU / 4 GB Memory
name: Large
parameters:
storage:
pricedAs: storage-mb
schema:
type: integer
default: 50000
readOnly: false
cpu:
pricedAs: cpu-tenths
schema:
type: number
default: 20
readOnly: true
memory:
pricedAs: ram-mb
schema:
type: integer
default: 4000
readOnly: true
- id: 4
description: 4 vCPU / 8 GB Memory
name: Extra Large
parameters:
storage:
pricedAs: storage-mb
schema:
type: integer
default: 150000
readOnly: false
cpu:
pricedAs: cpu-tenths
schema:
type: number
default: 40
readOnly: true
memory:
pricedAs: ram-mb
schema:
type: integer
default: 8000
readOnly: true