Create local mirrors manually

Create local mirrors manuallyΒΆ

If you prefer to manually create local mirrors for your MCP deployment, refer to MCP Release Notes: Release artifacts for the list of repositories and artifacts required for an installation of MCP.


Perform the procedure below only in case you need a new downstream, self-hosted repository structure. To fetch and update the Mirantis mirrors, refer to Customize the prebuilt mirrors.

To manually create an Aptly-based local mirror:

  1. Log in to the Salt Master node.

  2. Identify where the container with the aptly service is running in the Docker Swarm cluster.

    salt -C 'I@docker:swarm:role:master' 'docker service ps aptly|head -n3'
  3. Log in to the node where the container with the aptly service is running.

  4. Open the console in the container with the aptly service:

    docker exec -it <CONTAINER_ID> bash
  5. In the console, import the public key that will be used to fetch the repository.


    The public keys are typically available in the root directory of the repository and are called Release.key or Release.gpg. Also, you can download the public key from the key server

    gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver \
        --recv-keys <PUB_KEY_ID>

    For example, for the repository:

    gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver \
        --recv-keys 24008509A76882D3
  6. Create a local mirror for the specified repository:


    You can find the list of repositories in the Repository planning section of the MCP Reference Architecture guide.


    For example, for the repository:

    aptly mirror create local.apt.mirantis.xenial stable
  7. Update a local mirror:

    aptly mirror update <LOCAL_MIRROR_NAME>

    For example, for the local.apt.mirantis.xenial local mirror:

    aptly mirror update local.apt.mirantis.xenial
  8. Verify that the local mirror has been created:

    aptly mirror show <LOCAL_MIRROR_NAME>

    For example, for the local.apt.mirantis.xenial local mirror:

    aptly mirror show local.apt.mirantis.xenial

    Example of system response:

    Name: local.apt.mirantis.xenial
    Status: In Update (PID 9167)
    Archive Root URL:
    Distribution: stable
    Components: extra, mitaka, newton, oc31, oc311, oc32, oc323, oc40, oc666, ocata,
                salt, salt-latest
    Architectures: amd64
    Download Sources: no
    Download .udebs: no
    Last update: never
    Information from release file:
    Architectures: amd64
    Codename: stable
    Components: extra mitaka newton oc31 oc311 oc32 oc323 oc40 oc666 ocata salt
    Date: Mon, 28 Aug 2017 14:12:39 UTC
    Description:  Generated by aptly
    Label: xenial stable
    Origin: xenial stable
    Suite: stable
  9. In the Model Designer web UI, set the local_repositories parameter to True to enable using of local mirrors.

  10. Add the local_repo_url parameter manually to classes/cluster/<cluster_name>/init.yml after model generation.