0

We have a number of LXC Linux containers running on a linux host in data center. I was asked to explore feasibility of moving these containers to Azure as part of cloud migration strategy, but I am having hard time finding any info about support of such scenario in Azure.

So my questions are:

  1. Can I just host LXC Linux containers on a Linux VM in Azure?
  2. Can LXC containers be orchestrated with Kubernetes (ex with Azue Kubernetes Service)?
  3. Are there any other options here?
1
  • 1. Yes. Same/Same, but there are new toys to decrease administrative workload now. 2. No. Docker is an idiot. Put in place to allow you to run container magic because you think it's fun. Now the Linux kernel has backfilled and Docker is just a way to never hear "Works on my machine" ever again now. 3. Yes. Lxc clustering has evolved greatly at this point, and eliminates the need for the vast majority of things Docker was needed for initially. As evidenced by officially dropping EtcD for ContainerD, and so on. Chef + Terraform + LXD + Rundeck solves everything invented thus far FWIW. Commented Sep 11, 2021 at 5:49

2 Answers 2

0

Old question and problem is probably solved, but this is how my setup would solve this issue.

I run my host based on Ubuntu 18.04 server at DigitalOcean using mostly this setup: https://blog.simos.info/trying-out-lxd-containers-on-ubuntu-on-digitalocean/

Depending on your security needs you might want to set up a VPN solutions, but there is a firewall and you need to open port 8443 with other needed ports like 22.

This is a bit old, but a lot of good information regarding LXC/LXD https://stgraber.org/2016/04/12/lxd-2-0-remote-hosts-and-container-migration-612/

You add your DigitalOceanHost as a remote host:

OnPremHost#lxc config set core.https_address [::]:8443
OnPremHost#lxc config set core.trust_password something-secure

DigitalOceanHost#lxc config set core.https_address [::]:8443
DigitalOceanHost#lxc config set core.trust_password something-secure

OnPremHost#lxc remote add DigitalOceanHost "DigitalOcean IP"
Generating a client certificate. This may take a minute...
Certificate fingerprint: ca5484446dfgsdg4dfgs6gs4g6d465s4g6sgcg659h8gy8hg4ahdjhjkj6
ok (y/n)? y
Admin password for DigitalOceanHost:
Client certificate stored at server:  DigitalOceanHost

OnPremHost#lxc snapshot localContainer remoteContainer
OnPremHost#lxc copy localContainer/remoteContainer DigitalOceanHost:DigitalOceanContainer

Then I manage the containers from on prem Host like:

OnPremHost#lxc list DigitalOceanHost:
+----------+---------+---------------------+------+------------+-----------+
|   NAME   |  STATE  |        IPV4         | IPV6 |    TYPE    | SNAPSHOTS |
+----------+---------+---------------------+------+------------+-----------+
| container| RUNNING | 10.10.10.10 (eth0)  |      | PERSISTENT | 1         |
+----------+---------+---------------------+------+------------+-----------+

OnPremHost#lxc exec lxchost3:container bash
container#

See https://gist.github.com/berndbausch/a6835150c7a26c88048763c0bd739be6 for more lxc commands.

This way it's easy to maintain the containers using snapshots as backups stored on local storage and script most of the tasks.

1
  • (1) You should put [::] in quotes.   (2) What is "on prem Host"? Commented May 7, 2020 at 0:12
0

Doesn't provide bare metal. AKA, drop the Virt-Tax on performance like LXC/LXD do. In fact, if you arent running on C5 or M5 AWS Nitro hosts, you are paying the virt tax regardless of cloud provider if LXD isn't being provided.

2
  • Welcome to the site, and thank you for your contribution. Please note that currently, your post looks more like a comment than like a definitive answer. You may want to edit it to turn it into an answer, or change it to a comment. Commented Aug 26, 2021 at 11:20
  • Negative. Per the question " I was asked to explore feasibility of moving these containers to Azure" denotes a need to continue to justify the extra administrative burdens and complexity of running containers on a platform that simply does not support the technology required to do so. I am happy to discuss with anyone, but my answer provides the person asking the justification to push back which is the objective. Whoever asked doesn't understand the technology and needs technical justification from a 3rd party, and anyone who doesn't agree with the answer is missing critical information. Commented Sep 11, 2021 at 5:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.