Skip to main content

Hosting Service

Overview

Hosting Service is a core service that is included in the Mosaic Platform and is enabled by default for every environment. Using this service, you can securely host and scale your own custom Mosaic Services in the cloud. We aim to take away the complexity of managing infrastructure, and let you focus on developing your service.

What resources can be provisioned?

The Hosting Service can provision the following infrastructure resources when you host a new service:

  • Compute resources (CPU, RAM, Disk)
  • Kubernetes configuration artifacts to scale and manage your service
  • PostgreSQL Database & roles with credentials
  • RabbitMQ vhost and user credentials
  • DNS entries for exposed ports with TLS certificates
  • Secure storages for storing service specific secrets
  • Logging and monitoring

The capacity of resources provisioned will depend on the Hosting Plan. You can read more about the different Hosting Plans and their offerings.

What should I prepare to host my service?

The Hosting Service only requires three inputs from you to be able to host your service:

  • The container image of your service
  • (optionally) The packaged microfrontend artifact of your service if it has any
  • A deployment manifest that describes the configuration of your service backend and frontend

Steps to host a custom service via the Hosting Service

How do I package my service?

To help you to get started with building the service backend, we offer a Dockerfile in the Mosaic Media Template GitHub repository. Feel free to fine-tune it to your needs and use standard docker commands to build and push your container image to a container registry of your choice.

note

Axinom reserves the right to reject hosting of any service that is deemed to be malicious or harmful to the platform or other services. So if you are unsure about using different base layers for your container image that the one we specify, please get in touch with us.

Once you have your container image built and pushed to your container registry, you can configure the connection to your Container Registry under Hosting Service in the Admin Portal, so that it can be pulled during deployments.

If your service also includes a microfrontend workflow based on the Piral framework, you can package it using the appropriate packaging scripts. To help you get started, we offer a package.json script called build:media-workflows:prod.

Then similar to how you pushed the container image to a container registry, your microfrontend artifacts can be pushed to the Mosaic Microfrontend Service to be pulled during deployments. We offer support to upload the microfrontend artifacts using our Mosaic-CLI tool.

What is a deployment manifest?

This is a YAML file that describes the configuration of your service backend and frontend (i.e. ENV key-value pairs). It also describes some metadata such as exposed ports and any required Mosaic Service Accounts, so that the Hosting Service can provision the required resources accordingly.

The schema of the deployment manifest is versioned, so we will extend the amount of configuration options available in the future. You can read more details about the deployment manifest.

How do I deploy my service?

Once you have prepared your service artifacts (container image, micro-fe artifact, deployment manifest) to be deployed, you can create a new deployment by supplying the three inputs to the Hosting Service. We offer a UI to do this in the Admin Portal under Hosting Service, as well as CLI support via the Mosaic-CLI tool if you prefer to automate the process.

How can I update my deployed service?

Once a service is deployed, several things on it could be updated. For example, you might want to update the container image of your service, or change the configuration of your service backend and frontend, or update your service micro-fe. To do this, you can create a new deployment with the updated service artifacts. The Hosting Service will then perform a rolling update of your service to the new version.