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

Installing Red Hat Container Development Kit on Fedora

 

December 1, 2016
Preeti Chandrashekar
Related topics:
ContainersDeveloper ToolsKubernetesMicroservices
Related products:
Developer ToolsRed Hat OpenShift Container Platform

Share:

    Fedora users seeking help on installing Container Development Kit (CDK), here is how you can install CDK 2.2 on your Fedora 24. These same steps can be used for CDK 2.3 too.

    CDK provides a container development environment, to build production-grade applications, for use on OpenShift.

    The installation of CDK 2.2 on Fedora essentially involves the following stages:

    Setting up your virtualization environment
    You need to first install the virtualization software, in this case, KVM/libvirt, and then proceed to install Vagrant and its additional plugins to enable the various features of CDK.

    1. Install KVM and libvirt:
      $ sudo dnf install @Virtualization
    2. Launch the libvirt daemon and configure it to start at boot:
      $ sudo systemctl start libvirtd
      $ sudo systemctl enable libvirtd
    3. Install Vagrant and the other required vagrant-libvirt plugins:
      $ sudo dnf install vagrant vagrant-libvirt vagrant-libvirt-doc vagrant-registration rubygem-ruby-libvirt
    4. A PolicyKit rule needs to be added that allows users in the vagrant group to control VMs through libvirt. Add the PolicyKit rule on to your system:
      $ sudo cp /usr/share/vagrant/gems/doc/vagrant-libvirt-*/polkit/10-vagrant-libvirt.rules /etc/polkit-1/rules.d
      Note: Starting from Fedora 25 the PolicyKit rule is no longer shipped. So Fedora 25 users should follow these steps, instead of the one mentioned above:
      $ sudo gpasswd -a ${USER} libvirt
      $ newgrp libvirt

      This would add the user to the libvirt UNIX group.
    5. Restart the libvirt and PolicyKit services for the changes to take effect:
      $ sudo systemctl restart libvirtd
      $ sudo systemctl restart polkit

      Note: If you get an error PolicyKit daemon disconnected from the bus. We are no longer a registered authentication agent., try $ systemctl status polkit, if the status is active (running), you can carry on with the installation.
    6. Add your user name to the vagrant group:
      $ sudo usermod -a -G vagrant

    Installing and setting up CDK software components
    Download Red Hat CDK from the Red Hat Developers website, install the plugins and add the CDK box to Vagrant.

    1. Download the CDK software components to your home directory. The following steps assume that these components have been downloaded in the ~/Downloads directory:
      • Red Hat Container Tools (cdk-2.2.0.zip)
      • Red Hat Enterprise Linux 7.2 Vagrant box for libvirt (rhel-cdk-kubernetes-7.2-*.x86_64.vagrant-libvirt.box or later)
    2. Unzip the ZIP file you downloaded in your home directory. This should create the ~/cdk subdirectory:
      $ cd
      $ unzip ~/Downloads/cdk-2.2.0.zip
    3. Install the vagrant plugins contained in the plugins directory:
      $ cd ~/cdk/plugins/
      $ vagrant plugin install \
      ./vagrant-registration-1.3.0.gem \
      ./vagrant-service-manager-1.3.3.gem \
      ./vagrant-sshfs-1.2.0.gem

      Note: If you use libvirt as your vagrant provider, and get a vagrant provider missing error, ensure that you have the provider plugin installed as follows:
      $ vagrant plugin install vagrant-libvirt
    4. Verify that all the vagrant plugins are installed by running:
      $ vagrant plugin list
      You should see the following output:
      vagrant-libvirt (0.0.32, system)
      vagrant-registration (1.3.1)
      - Version Constraint: 1.3.1
      vagrant-service-manager (1.4.1)
      - Version Constraint: 1.4.1
      vagrant-sshfs (1.2.1)
      - Version Constraint: 1.2.1

      Note: vagrant-libvirt would be displayed in the output, only if you have installed the vagrant-libvirt plugin.
    5. Add the CDK box to Vagrant with this command:
      $ vagrant box add --name cdkv2 ~/Downloads/rhel-cdk-kubernetes-7.2*.x86_64.vagrant-libvirt.box
      Verify that the box is installed by running the following command:
      $ vagrant box list

    Starting CDK
    Start the Vagrant box using a Vagrantfile. CDK provides you with Vagrantfiles for OpenShift and Kubernetes. The OpenShift (rhel-ose) Vagrantfile launches a VM with OpenShift Enterprise running on it.

    1. Navigate to the rhel-ose directory:
      $ cd ~/cdk/components/rhel/rhel-ose/
    2. Start CDK with OpenShift Container Platform setup as follows:
      $ vagrant up
      Note that, this returns a very helpful message with tips to access the OpenShift console and CLI.
    3. Enter your developers.redhat.com user credentials when prompted to register the Red Hat Enterprise Linux system running in the Vagrant VM.
    4. Verify that your Vagrant VM is running, to ensure you are ready to use CDK, as follows:
      $ vagrant status
      Note that, for this command to work, you need to be in the same directory where your Vagrantfile is located.

    Ta da, you can now access the OpenShift console or use the OpenShift CLI to run a microservices based architecture on a stable platform.

    Last updated: March 22, 2023

    Recent Posts

    • Cloud bursting with confidential containers on OpenShift

    • Reach native speed with MacOS llama.cpp container inference

    • A deep dive into Apache Kafka's KRaft protocol

    • Staying ahead of artificial intelligence threats

    • Strengthen privacy and security with encrypted DNS in RHEL

    What’s up next?

     

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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