Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Working with LXD Containers

LXD, or the Linux Container Daemon, lets us leverage the resource-lite LXC virtualization method, as well as providing additional support for the container images we use to spin up our containers. In this lab, we'll be creating a test LAMP stack by setting up two containers: one for our website and one for a database. Note the lab has been updated with a more recent alpine/edge image as alpine/3.10 is no longer available.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 15m
Published
Clock icon Apr 03, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Review Provided Dev Environment

    1. See if any existing servers have been created:

      lxc list
      
    2. Remove any unrelated to the LAMP stack:

      lxc stop prometheus-test
      lxc delete prometheus-test
      
  2. Challenge

    Launch the web01 Containers

    1. Create the web01 container:

      lxc launch alpine web01
      
  3. Challenge

    Configure the web01 Container

    1. Upload the container:

      lxc exec web01 -- apk update
      
    2. Install nginx:

      lxc exec web01 -- apk add nginx
      
    3. Start and enable nginx:

      lxc exec web01 -- sh -c "rc-service nginx start && rc-update add nginx default"
      
  4. Challenge

    Configure Container Boot Settings

    1. Set the boot.autostart.priority for both containers:

      lxc config set web01 boot.autostart.priority 50
      lxc config set db01 boot.autostart.priority 90
      

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans