Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

HOW-TO setup a 3scale AMP on-premise all-in-one install

May 22, 2017
Hugo Guerrero
Related topics:
APIs
Related products:
Red Hat 3scale API Management

Share:

    As many of you already know, a couple of weeks ago, on April 25, 2017, Red Hat announced it's fully containerized API Management Platform On-Premises version. Alongside the Software as a Service (SaaS) version, the 3Scale Openshift-based on-premise version opens new opportunities with customers looking for more control over their private APIs. Deploying API Management in their own data center or self-managed cloud environment is part of a critical path.

    One of the most common requests from developers and architects is how to setup an all-in-one Openshift installation for testing and demoing in a development virtual machine. A favorite tool used commonly among colleagues to try Openshift locally is the oc cluster up provided client. In addition to the oc client, the oc-cluster wrapper project was created to help developers by automating many tasks when setting up a local installation like using profiles and automatically creating persistent volumes. As we want to automate most of the underlying Openshift infrastructure, the oc-cluster wrapper suits better this guide.

    To setup a 3scale AMP on-premise all-in-one Openshift 3.5 installation from scratch follow the next steps.

    1. Spin off a RHEL 7.3 minimal installation VM. You can create one on any public provider like AWS or use a local hypervisor like KVM.
    2. Subscribe the machine using a subscription with the right entitlements. This is important, as the user needs access to the Red Hat registry to download the 3Scale AMP docker images. As a privileged user you can run the following commands:

      $ subscription-manager register --username <USERNAME> --password <PASSWORD>
      $ subscription-manager attach --pool=<POOL_WITH_RIGHT_ENTITLEMENTS>
    3. Managed the repos. Usually, your subscription has several repositories enabled. Turn on only the ones need for the Openshift 3.5 installation.

      $ subscription-manager repos --disable="*"
      $ subscription-manager repos --enable="rhel-7-server-rpms" --enable="rhel-7-server-extras-rpms" --enable="rhel-7-server-ose-3.5-rpms" --enable="rhel-7-fast-datapath-rpms"
    4. Install the prerequisites for Openshift.

      $ yum install -y wget git net-tools bind-utils iptables-services bridge-utils bash-completion
    5. (OPTIONAL) Update the system.

      $ yum update -y
    6. Install and configure Docker.
      1. Install Docker.

        $ yum install -y docker
      2. Enable SELinux and the insecure registry.

        $ sed -i '/OPTIONS=.*/c\OPTIONS="--selinux-enabled --insecure-registry 172.30.0.0/16"' /etc/sysconfig/docker
      3. Enable and restart Docker service.

        $ systemctl enable docker
        $ systemctl restart docker
    7. (OPTIONAL) Punch the holes in the firewall if not done before.
      1. Inspect Docker network.

        $ docker network inspect -f "{{range .IPAM.Config }}{{ .Subnet }}{{end}}" bridge
      2. Create a new firewall zone.

        $ firewall-cmd --permanent --new-zone dockerc
      3. Add the ports to the new zone.

        $ firewall-cmd --permanent --zone dockerc --add-source 172.17.0.0/16
        $ firewall-cmd --permanent --zone dockerc --add-port 8443/tcp
        $ firewall-cmd --permanent --zone dockerc --add-port 53/udp
        $ firewall-cmd --permanent --zone dockerc --add-port 8053/udp
      4. Add the public ports.

        $ firewall-cmd --permanent --zone public --add-port 8443/tcp
        $ firewall-cmd --permanent --zone public --add-port 443/udp
        $ firewall-cmd --permanent --zone public --add-port 80/udp
      5. Reload firewall.

        $ firewall-cmd --reload
    8. Install the Openshift 'oc' client.

      $ yum install -y atomic-openshift-clients
    9. Install and configure the oc-cluster wrapper.
      1. Clone the github repo.

        $ git clone https://github.com/openshift-evangelists/oc-cluster-wrapper
      2. Add oc-cluster wrapper to the PATH.

        $ echo 'PATH=$HOME/oc-cluster-wrapper:$PATH' >> $HOME/.bash_profile
        $ echo 'export PATH' >> $HOME/.bash_profile
      3. (OPTIONAL) Enable bash completion.

        $ $HOME/oc-cluster-wrapper/oc-cluster completion bash > /etc/bash_completion.d/oc-cluster.bash
    10. Spin off an Openshift local cluster.

      $ oc-cluster up 3scale-amp --public-hostname <PUBLIC_IP/ACCESSIBLE_DNS>  --routing-suffix apps.<PUBLIC_IP/ACCESSIBLE_DNS>.nip.io
    11. Download the amp.yml template from 3Scale GitHub page.

      $ wget https://raw.githubusercontent.com/3scale/3scale-amp-openshift-templates/2.0.0.GA/amp/amp.yml
    12. Remove the SELinux categories from the created volumes.

      $ chcat -d /root/.oc/profiles/3scale-amp/volumes/vol{01..10}

      Note: This is required so containers are able to write to the mount volumes.

    13. Log into Openshift as developer user.

      $ oc login --username=developer --password=developer
    14. Create a new project.

      $ oc new-project 3scale-amp
    15. Create the new-app processing the amp.yml template.

      $ oc new-app --file amp.yml --param WILDCARD_DOMAIN=amp.<PUBLIC_IP/ACCESSIBLE_DNS>.nip.io --param ADMIN_PASSWORD=3scaleUser

      Note: You may need to wait a few minutes for AMP to fully deploy on OpenShift for your login and credentials to work.

    16. Follow the project status on the web console.

      1. Open the Openshift web console in a new browser window at https://<PUBLIC_IP/ACCESSIBLE_DNS>:8443.
      2. Log in with the 'developer' user.
      3. Select the 3scale-amp project.
      4. Wait until all the pods are successfully deployed.

      Note: First check the *-redis pods, if you notice an error about a problem with permissions you will need to check the persistent volume filesystem permissions in your file system.

    17. Access the 3Scale Admin portal.
      1. Open the 3Scale admin console in a new browser window at https://3scale-admin.amp.<PUBLIC_IP/ACCESSIBLE_DNS>.nip.io.
      2. Log in with the 'admin' user and '3scaleUser' password.
      3. Follow the instructions to setup the Echo API.

    You're done! You can now test your Echo API using curl to the staging link.


    Whether you are new to Containers or have experience, downloading  this cheat sheet can assist you when encountering tasks you haven’t done lately.

    Last updated: May 31, 2024

    Recent Posts

    • How to change the meaning of python and python3 on RHEL

    • vLLM or llama.cpp: Choosing the right LLM inference engine for your use case

    • How to implement and monitor circuit breakers in OpenShift Service Mesh 3

    • Analysis of OpenShift node-system-admin-client lifespan

    • What's New in OpenShift GitOps 1.18

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue