In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the LXD and OpenStack example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Introduction
First of all, I'm sorry for the delay. It took me a long time to make everything all right. My * attempt was to encounter some problems that must be solved when using devstack. However, even so, I still can not make the network normal.
I finally gave up devstack and tried to deploy a full Ubuntu OpenStack using "conjure-up" using user-friendly Juju. It's finally working!
Here's how to run a full OpenStack, use the LXD container instead of VM, and run all of this in the LXD container (nested!).
Request
This article assumes that you have a working LXD setting that provides container network access, and that you have a very powerful CPU, about 50GB for container space and at least 16GB of memory.
Remember, we run a full OpenStack here, which is not very lightweight!
Set up the container
OpenStack consists of a large number of different components that do different things. Some require some additional privileges, and in order to make the setup easier, we will use the privileged container.
We will configure a container that supports nesting, preload all the required kernel modules, and allow it to access / dev/mem (obviously required).
Note that this means that most of the security features of the LXD container are disabled for that container. However, containers generated by OpenStack itself will be unprivileged and can use the security features of LXD normally.
Lxc launch ubuntu:16.04 openstack-c security.privileged=true-c security.nesting=true-c "linux.kernel_modules=iptable_nat, ip6table_nat, ebtables, openvswitch" lxc config device add openstack mem unix-char path=/dev/mem
There is a small bug in LXD that attempts to load kernel modules that have been loaded on the host. This has been fixed in LXD 2.5 and will be fixed in LXD 2.0.6, but until then, you can use the following methods:
Lxc exec openstack-- ln-s / bin/true / usr/local/bin/modprobe
We need to add a few PPA and install conjure-up, which is the deployment tool we use to install OpenStack.
Lxc exec openstack-apt-add-repository ppa:conjure-up/next-y lxc exec openstack-apt-add-repository ppa:juju/stable-y lxc exec openstack-apt update lxc exec openstack-apt dist-upgrade-y lxc exec openstack-apt install conjure-up-y
* one step is to configure the LXD network inside the container.
All questions are chosen by default, except:
Use dir to store the backend (zfs is not used in nested containers)
Do not configure the IPv6 network (conjure-up/juju is not compatible with it)
Lxc exec openstack-lxd init
Now that the container is configured, let's deploy OpenStack!
Deploy OpenStack with conjure-up
As mentioned earlier, we deploy OpenStack using conjure-up.
This is a great user-friendly tool that can interact with Juju to deploy complex services.
First of all:
Lxc exec openstack-- sudo-u ubuntu-I conjure-up
Select "OpenStack with NovaLXD"
Select "localhost" as the deployment target (using LXD)
Click "Deploy all remaining applications"
Next, OpenStack will be deployed. The whole process will take more than an hour, depending on the machine you are running. You will see that all services are assigned a container, then deployed and eventually interconnected.
Conjure-Up deploying OpenStack
A complete installation interface is displayed after the deployment is complete. It will import some initial images, set SSH permissions, configure the network, and display the IP address of the panel.
Access the panel and generate a container
The panel runs in a container, so you cannot access it directly from the browser.
The easiest way is to set up a NAT rule:
Lxc exec openstack-- iptables-t nat-A PREROUTING-p tcp-- dport 80-j DNAT-- to
Here is the IP address of the panel that conjure-up gave you at the end of the installation.
You can now get the IP address of the "openstack" container (from lxc info openstack) and point the browser to: http:///horizon.
* * it may take several minutes for each load. Once the login screen is displayed, enter the default login name and password (admin/openstack), and you will see the welcome panel of OpenStack!
Oslxd-dashboard
You can now select the "Project" tab on the left to go to the "Instances" page. To start a new instance using nova-lxd, click "Launch instance", select the image you want, network, etc., and your instance will be generated.
Once it is running, you can assign it a floating IP, which will allow you to access your instance from your "openstack" container.
Thank you for reading this article carefully. I hope the article "sample Analysis of LXD and OpenStack" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.