Deploy a build (updating)

Updated:2023-07-03

Prepare

Prepare, if not already done, the environment file and the configuration file to deploy a build.

‚Äč The environment file must have following variables defined:

  • SRC_ROOT
  • LOG_ROOT
  • MAIA_CORE_HOST
  • MAIA_CORE_HTTP_PORT
  • MAIA_CORE_APP_CONTEXT
  • MAIA_CORE_USE_SSL
  • MAIA_CORE_API_TOKEN_FILE
  • COMPONENT_CONF_FILE
  • COMPONENT_STATE_FILE
  1. Check out a component with the MAIA Agent command maia checkout.

    bundle exec maia checkout -c component_name

  2. Go to the root directory of the component.

    cd <%INSTALL_PATH%>/component_name

  3. If the component has no configuration file, create a configuration file.

    touch MAIA.yml

  4. Edit the parameters in the configuration file. The file must contain at least the parameters version, deliverables and deploy.

    The commands defined in the parameter cmd will be executed to generate the deliverables.

    The scripts defined in the parameter deploy_path_generator will generate the name and the paths to the deliverables and post the information to MAIA WebApp.

    See component configuration file for more information about parameters and deploy_path_generator.

    Example of a basic component configuration file.

    version: 4.0
    deliverables:
      -name: Image
    deploy:
      -cmd: make deploy
      -deploy_path_generator: <script>
    
  5. Save the configuration file and make a commit to the version control system.

Deploy

Use the MAIA Agent command deploy to deploy the built component_name to a repository.

a. To deploy with an activity that is posted to the MAIA WebApp:

maia deploy -b component_name -z "comment"

b. To deploy the component without an activity:

maia deploy -b component_name