Standalone Containers based Deployment

Standalone Containers based Deployment

This documentation explains how the underlying framework used by the Containterized Undercloud deployment mechanism can be reused to deploy a single node capable of running OpenStack services for development.

Deploying a Standalone Keystone node

  1. Log into your machine (baremetal or VM) where you want to install the standalone services on as a non-root user.:

    ssh <non-root-user>@<machine>
    
  2. Enable needed repositories:

    RHEL

    Enable optional repo:

    sudo yum install -y yum-utils
    sudo yum-config-manager --enable rhelosp-rhel-7-server-opt
    

    Download and install the python2-tripleo-repos RPM from the current RDO repository. For example

    sudo yum install -y https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-<version>.el7.centos.noarch.rpm
    

    Note

    tripleo-repos removes any repositories that it manages before each run. This means all repositories must be specified in a single tripleo-repos call. As an example, the correct way to install the current and ceph repos is to run tripleo-repos current ceph, not two separate calls.

    Stable Branch

    Enable the appropriate repos for the desired release, as indicated below. Do not enable any other repos not explicitly marked for that release.

    Newton

    Enable the current Newton repositories

    sudo -E tripleo-repos -b newton current
    

    Ceph

    Include the Ceph repo in the tripleo-repos call

    sudo -E tripleo-repos -b newton current ceph
    

    Ocata

    Enable the current Ocata repositories

    sudo -E tripleo-repos -b ocata current
    

    Ceph

    Include the Ceph repo in the tripleo-repos call

    sudo -E tripleo-repos -b ocata current ceph
    

    Pike

    Enable the current Pike repositories

    sudo -E tripleo-repos -b pike current
    

    Ceph

    Include the Ceph repo in the tripleo-repos call

    sudo -E tripleo-repos -b pike current ceph
    

    Queens

    Enable the current Queens repositories

    sudo -E tripleo-repos -b queens current
    

    Ceph

    Include the Ceph repo in the tripleo-repos call

    sudo -E tripleo-repos -b queens current ceph
    

    Warning

    The remaining repositories configuration steps below should not be done for stable releases!

    Run tripleo-repos to install the appropriate repositories. The option below will enable the latest master TripleO packages and the latest promoted packages for all other OpenStack services and dependencies. There are other repository configurations available in tripleo-repos, see its –help output for details.

    sudo -E tripleo-repos current-tripleo-dev
    

    Ceph

    Include the Ceph repository in the tripleo-repos command

    sudo -E tripleo-repos current-tripleo-dev ceph
    
  3. Install the TripleO CLI, which will pull in all other necessary packages as dependencies:

    sudo yum install -y python-tripleoclient
    
  4. Specify required parameters for network configuration:

    # TODO(aschultz): This still assumes a bunch of undercloud stuff that may
    # not be needed anymore. Will need to clean this up.
    
    export NETWORK=192.168.24
    export NETMASK=24
    export IP=$NETWORK.2
    export INTERFACE=eth1
    
    cat <<EOF > $HOME/standalone_parameters.yaml
    parameter_defaults:
      CertmongerCA: local
      CloudName: $IP
      ContainerImagePrepare:
      - set:
          ceph_image: daemon
          ceph_namespace: docker.io/ceph
          ceph_tag: v3.0.3-stable-3.0-luminous-centos-7-x86_64
          name_prefix: centos-binary-
          name_suffix: ''
          namespace: docker.io/tripleomaster
          neutron_driver: null
          tag: current-tripleo
        tag_from_label: rdo_version
      ControlPlaneStaticRoutes: []
      Debug: true
      DeploymentUser: $USER
      DnsServers: ''
      DockerInsecureRegistryAddress:
      - $IP:8787
      MasqueradeNetworks:
        $NETWORK.0/$NETMASK:
        - $NETWORK.0/$NETMASK
      NeutronPublicInterface: $INTERFACE
      StandaloneCtlplaneLocalSubnet: ctlplane-subnet
      StandaloneCtlplaneSubnets:
        ctlplane-subnet:
          DhcpRangeEnd: $NETWORK.40
          DhcpRangeStart: $NETWORK.20
          NetworkCidr: $NETWORK.0/$NETMASK
          NetworkGateway: $IP
      StandaloneEnableRoutedNetworks: false
      StandaloneHomeDir: $HOME
      StandaloneLocalMtu: 1500
    EOF
    
  5. Run deploy command:

    sudo openstack tripleo deploy \
      --templates \
      --local-ip=$IP/$NETMASK \
      -e /usr/share/openstack-tripleo-heat-templates/environments/standalone.yaml \
      -r /usr/share/openstack-tripleo-heat-templates/roles/Standalone.yaml \
      -e $HOME/standalone_parameters.yaml \
      --output-dir $HOME \
      --standalone
    
  6. Validate Keystone services

    You can validate the Keystone is running by fetching a token:

    # validate keystone
    export ADMIN_PASS=$(egrep "^[[:space:]]+AdminPassword:" $HOME/tripleo-undercloud-passwords.yaml | awk '{print $2}')
    
    KEYSTONE_PAYLOAD=$(cat <<EOF
    { "auth": {
        "identity": {
          "methods": ["password"],
          "password": {
            "user": {
              "name": "admin",
              "domain": { "id": "default" },
              "password": "$ADMIN_PASS"
            }
          }
        }
      }
    }
    EOF
    )
    curl -i \
      -H "Content-Type: application/json" \
      -d "$KEYSTONE_PAYLOAD" \
      "http://$IP:5000/v3/auth/tokens" ; echo
    
  7. Create clouds.yaml for use with openstackclient

    You can create a clouds.yaml which allows you to use the openstackclient:

    mkdir -p ~/.config/openstack
    cat <<EOF >~/.config/openstack/clouds.yaml
    clouds:
      standalone:
        auth:
          auth_url: http://$IP:5000/
          project_name: admin
          username: admin
          password: $ADMIN_PASS
        region_name: regionOne
        identity_api_version: 3
    EOF
    export OS_CLOUD=standalone
    
    openstack endpoint list
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.