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

That app you love, part 5: Upping our (cloud) game

 

October 11, 2016
N. Harrison Ripps
Related topics:
ContainersDeveloper ToolsKubernetesMicroservices
Related products:
Red Hat OpenShift Container Platform

Share:

    Welcome to the fifth installment of That App You Love, a blog series in which I show you how to you can make almost any app into a first-class cloud citizen. If you want to start from the beginning, jump back and check out Part 1: Making a Connection.

    The previous posts of this series have focused on how to package ZNC in a way that exposes run-time configurability into the immutable world of containers. But forget about ZNC - we’re really talking about That App You Love, and what it takes to make that app a secure, stateful and robust cloud resident.

    By introducing configurability to our app container image, we are priming the pump for security and statefulness. But what about robustness? Well, we really can’t go much further without a cloud to play around in, so...

    It’s Time To Get Our Cluster On

    For the rest of this blog series, we’re going to use the OpenShift Container Platform to go through the process of cloud-ifying our app. Why OpenShift? Well, I’m part of the OpenShift team, and it would be weird if I launched into directions on how to do this with cgroups, SSH, and Bash scripts. But also, I’m pretty sure OpenShift is the only full-lifecycle container platform that is a) built on the amazing power of Kubernetes orchestration and b) deployable with a single command.

    So without further ado:

    1. If you don’t have docker installed, you’ll need that first. Shortcut for Fedora users:
      sudo dnf install docker
      
    2. Even if you do have docker installed, you may need to change a line in the docker config file. OpenShift runs a docker registry internally on the 172.30.x.y subnet, and we need to let docker know that this registry is okay to use. Shortcut for Fedora users:
      1. Open /etc/sysconfig/docker with root permissions in an editor:
        sudo gedit /etc/sysconfig/docker
        
      2. Uncomment the INSECURE_REGISTRY line and change it to:
        INSECURE_REGISTRY='--insecure-registry 172.30.0.0/16'
        
      3. Save file; start or restart docker:
        sudo systemctl restart docker
        
    3. Download the latest OpenShift client. (If you've already installed the Red Hat Container Development Kit (CDK), then you can skip this installation --- OpenShift is already installed in your VM.) As of the time I wrote this, I was using v1.3.0-alpha.3, but any release after that will work as well:
      https://github.com/openshift/origin/releases/
      (Click on a release title and scroll to the bottom of the page for binary downloads.)
    4. Unpack and move the oc binary to somewhere into your $PATH
    5. Run the magic command as root (required because this does docker operations):
      sudo <path_to>/oc cluster up
      
    6. In the output from the “cluster up” command, look for an IP address / port number combination ending in port 8443. This is your OpenShift server. As your regular non-root user, log in with the “oc” utility:
      oc login -u developer -p developer --server=<server_IP>:8443

      You will need to accept the server’s self-signed certificate, and then you are all set!

    For a lot more detail on “oc cluster up”, check out these notes.

    What Have We Here?

    Assuming everything worked correctly, the following things are now true:

    • Running `oc whoami` should reveal that you are the ‘developer’ user
    • In a web browser, navigating to the URL listed in the output of “oc cluster up” (the one ending in port 8443) should put you face to face with the OpenShift web console (after you accept the self-signed SSL certificate)

    Let’s take a quick tour of the web console. After you log in with user: ‘developer’ and password ‘developer’, you should see a list of your “Projects”:

    that_app_you_love_img2

    Projects are namespaces that can contain a number of related application components. When we deploy That App You Love, it will live in a Project along with all of the components that make it secure, stateful and robust.

    If you click into “My Project”, which is the project that the oc cluster up command creates for you, you’ll see that there isn’t much going on right now:

    that_app_you_love_img3

    On the command line front, we can do a lot of the same things with the oc tool directly:

    • oc get projects - Tells us what projects are available to our current user account
    • oc status - Tells us what is going on in our currently selected project.

    We’ll learn more oc commands and their web console companion actions in the next part of our blog series.

    Leaving the Party

    When you are done experimenting with your portable cloud, you can take it down very easily with:

    sudo <path_to>/oc cluster down

    Alas, once again, the spectre of statelessness looms large! Because this whole experimental cloud environment lives entirely in containers, any work that we do there will be lost when we shut it all down. But no matter! Anything that works for us on our portable cloud will work equally well in any full-scale production OpenShift system.

    In the next post, we’ll get back to That App You Love, and learn about what we’ll need to get it up and running in our mini-cloud. See you in Part 6: Container, Meet Cloud!

    This series will run every Tuesday and Thursday until we've accomplished our goals, so stay tuned in, subscribe, and thanks for reading!

    Title Date
    That app you love, part 1: Making a connection 2016/09/27
    That app you love, part 2: Immutable but flexible – What settings matter? 2016/09/29
    That app you love, part 3: Every setting in its place 2016/10/04
    That app you love, part 4: Designing a config-and-run container 2016/10/06
    That app you love, part 5: Upping our (cloud) game 2016/10/11
    That app you love, part 6: Container, meet cloud 2016/10/13
    That app you love, part 7: Wired for sound 2016/10/18
    That app you love, part 8: A blueprint for “that app you love” 2016/10/20
    That app you love, part 9: Storage and statefulness 2016/10/25
    That app you love, part 10: Long live “that app you love” 2016/10/27

    About the Author

    Hi there! My name is N. Harrison Ripps, and I am an engineer and people manager on the Containers team at Red Hat. Together with the greater open source community, our team has taken the combination of the docker container format and Google’s Kubernetes orchestration system, and then extended this framework with a number of administrator- and developer-friendly features that we call the OpenShift Container Platform.

    Last updated: June 23, 2023

    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

    What’s up next?

     

    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