mcp deployment guide - mirantis · pdf filepreface this documentation provides information on...

298
MCP Deployment Guide version latest

Upload: ngokhanh

Post on 25-Mar-2018

280 views

Category:

Documents


19 download

TRANSCRIPT

  • MCP Deployment Guideversion latest

  • Copyright notice2018 Mirantis, Inc. All rights reserved.This product is protected by U.S. and international copyright and intellectual property laws. Nopart of this publication may be reproduced in any written, electronic, recording, or photocopyingform without written permission of Mirantis, Inc.Mirantis, Inc. reserves the right to modify the content of this document at any time without priornotice. Functionality described in the document may not be available at the moment. Thedocument contains the latest information at the time of publication.Mirantis, Inc. and the Mirantis Logo are trademarks of Mirantis, Inc. and/or its affiliates in theUnited States an other countries. Third party trademarks, service marks, and names mentionedin this document are the properties of their respective owners.

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 2

  • PrefaceThis documentation provides information on how to use Mirantis products to deploy cloudenvironments. The information is for reference purposes and is subject to change.

    Intended audienceThis documentation is intended for deployment engineers, system administrators, anddevelopers; it assumes that the reader is already familiar with network and cloud concepts.

    Documentation historyThis is the latest version of the Mirantis Cloud Platform documentation. It is updatedcontinuously to reflect the recent changes in the product. To switch to any release-taggedversion of the Mirantis Cloud Platform documentation, use the Current version drop-down menuon the home page.

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 3

  • Introduction to the MCP deploymentMCP enables you to deploy MCP clusters, that include OpenStack environments and Kubernetesclusters, automatically through the MCP DriveTrain or using manual deployment procedures.The manual deployment covered in this guide bases on four physical nodes. Three of thesenodes are physical servers hosting the Salt Master node, the MaaS node, and OpenStack VCP.The fourth node is a compute host for the OpenStack environment instances.

    SeealsoMinimum hardware requirements

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 4

    https://docs.mirantis.com/mcp/latest/mcp-standard-configuration/min-hw-reqs.html

  • Plan the deploymentThe configuration of you MCP installation depends on the individual requirements your MCPcloud environment should meet to serve various purposes. Therefore, the plan of any MCPdeployment is discussed on a per-customer basis.The outcome of this step are input parameters that are used to generate the Reclass metadatamodel by Cookiecutter.

    Seealso

    Plan an OpenStack environment Plan a Kubernetes cluster

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 5

    https://docs.mirantis.com/mcp/latest/mcp-ref-arch/openstack-environment-plan.htmlhttps://docs.mirantis.com/mcp/latest/mcp-ref-arch/kubernetes-cluster-plan.html

  • Create a project repositoryAn MCP cluster deployment configuration is stored in a Git repository created on a per-customerbasis. This section instructs you on how to manually create and prepare your project repositoryfor an MCP deployment.Before you start this procedure, create a Git repository in your version control system, such asGitHub.To create a project repository manually:

    1. Log in to any computer.2. Create an empty directory and change to that directory.3. Initialize your project repository:

    git init

    Example of system response:

    Initialized empty Git repository in /Users/crh/Dev/mcpdoc/.git/

    4. Add your repository to the directory you have created:

    git remote add origin

    5. Create the following directories for your deployment metadata model:

    mkdir -p classes/clustermkdir nodes

    6. Add the Reclass variable to your bash profile:

    vim ~/.bash_profile

    Example:

    export RECLASS_REPO=

    7. Log out and log back in.8. Verify that your ~/.bash_profile is sourced:

    echo $RECLASS_REPO

    The command returns the content of the ~/.bash_profile file.9. Add the Mirantis Reclass module to your repository as a submodule:

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 6

  • git submodule add https://github.com/Mirantis/reclass-system-salt-model ./classes/system/

    System response:

    Cloning into /classes/system...remote: Counting objects: 8923, done.remote: Compressing objects: 100% (214/214), done.remote: Total 8923 (delta 126), reused 229 (delta 82), pack-reused 8613Receiving objects: 100% (8923/8923), 1.15 MiB | 826.00 KiB/s, done.Resolving deltas: 100% (4482/4482), done.Checking connectivity... done.

    10. Update the submodule:

    git submodule syncgit submodule update --init --recursive --remote

    11. Add your changes to a new commit:

    git add -A

    12. Commit your changes:

    git commit

    13. Add your commit message.Example of system response:

    [master (root-commit) 9466ada] Initial Commit 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 classes/system

    14. Push your changes:

    git push

    15. Proceed to Create a deployment metadata model.

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 7

  • Create local mirrorsDuring an MCP deployment or MCP cluster update, you can make use of local mirrors.By default, MCP deploys local mirrors with packages in a Docker container on the DriveTrainnodes with GlusterFS volumes. MCP creates and manages mirrors with the help of Aptly, whichruns in the container named aptly in the Docker Swarm mode cluster on the DriveTrain nodes,or cid0x in terms of Reclass model.MCP provides a prebuilt mirror image that you can customize depending on the needs of yourMCP deployment, as well as the flexibility to manually create local mirrors. Specifically, theusage of the prebuilt mirror image is essential in the case of an offline MCP deploymentscenario.

    Get the prebuilt mirror imageThe prebuilt mirror image contains the Debian package mirror (Aptly), Docker images mirror(Registry), Python packages mirror (PyPi), Git repositories mirror, and mirror of Mirantis UbuntuVM cloud images.To get the prebuilt mirror image:

    1. On http://images.mirantis.com, download the latest version of the prebuilt mirror VM in themcp-offline-image-.qcow2 format.

    2. If required, customize the VM contents as described in Customize the prebuilt mirror image.3. Proceed to Automated deployment of MCP DriveTrain.

    SeealsoList of repositories

    Customize the prebuilt mirror imageYou can easily customize mirrored Aptly, Docker, and Git repositories by configuring contents ofthe mirror VM defined in the cicd/aptly.yml file of the Reclass model.After you perform the customization, apply the changes to the Reclass model as described inUpdate mirror image.To customize the Aptly repositories mirrorsYou can either customize the already existing mirrors content or specify any custom mirrorrequired by your MCP deployment:

    To customize existing mirror sources:The sources for existing mirrors can be configured to use different upstream.Each Aptly mirror specification includes parameters that define their source on the systemlevel of the Reclass model as well distribution, components, key URL, and GPG keys. Tocustomize a mirror content, redefine these parameters as required.

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 8

    http://images.mirantis.comhttps://docs.mirantis.com/mcp/latest/mcp-ref-arch/repo-plan/list-repos.htmlhttps://docs.mirantis.com/mcp/latest/mcp-operations-guide/update-upgrade/minor-update/update-mirror.html

  • An example of the apt.mirantis.com mirror specification:

    _param: apt_mk_version: stable mirror_mirantis_openstack_xenial_extra_source: http://apt.mirantis.com/xenial/ mirror_mirantis_openstack_xenial_extra_distribution: ${_param:apt_mk_version} mirror_mirantis_openstack_xenial_extra_components: extra mirror_mirantis_openstack_xenial_extra_key_url: "http://apt.mirantis.com/public.gpg" mirror_mirantis_openstack_xenial_extra_gpgkeys: - A76882D3aptly: server: mirror: mirantis_openstack_xenial_extra: source: ${_param:mirror_mirantis_openstack_xenial_extra_source} distribution: ${_param:mirror_mirantis_openstack_xenial_extra_distribution} components: ${_param:mirror_mirantis_openstack_xenial_extra_components} architectures: amd64 key_url: ${_param:mirror_mirantis_openstack_xenial_extra_key_url} gpgkeys: ${_param:mirror_mirantis_openstack_xenial_extra_gpgkeys} publisher: component: extra distributions: - ubuntu-xenial/${_param:apt_mk_version}

    NoteYou can find all mirrors and their parameters that can be overriden in theaptly/server/mirror section of the Reclass System Model

    To add new mirrors, extend the aptly:server:mirror part of the model using the structure asshown in the example above

    NoteThe aptly:server:mirror::publisher parameter specifies how thecustom repository will be published.

    The example of a custom mirror specification:

    aptly: server: mirror: my_custom_repo_main: source: http://my-custom-repo.com

    Mirantis Cloud Platform Deployment Guide

    2018, Mirantis Inc. Page 9

    https://github.com/Mirantis/reclass-system-salt-model/tree/master/aptly/server/mirror

  • distribution: custom-dist components: main architectures: amd64 key_url: http://my-custom-repo.com/public.gpg gpgkeys: - AAAA0000 publisher: component: custom-component distributions: - custom-dist/stable