|
1 | 1 | ## Installation
|
2 | 2 |
|
| 3 | +### Pre-Installation |
3 | 4 |
|
4 |
| -### Pre Installation |
| 5 | +#### Initialize LXD |
5 | 6 |
|
6 |
| -#### Initialise LXD |
| 7 | +An opinionated guide on how to set up LXD is forthcoming. For now, refer to these guides: |
7 | 8 |
|
8 |
| -An opinionated guide on how to setup LXD is to come, for now there are a few guides; |
| 9 | +- [Official Guide](https://linuxcontainers.org/lxd/getting-started-cli/) |
| 10 | +- [Managing LXD Snap](https://discuss.linuxcontainers.org/t/managing-the-lxd-snap/8178) |
9 | 11 |
|
10 |
| - - <a href="https://linuxcontainers.org/lxd/getting-started-cli/">Official Guide</a> |
11 |
| - - <a href="https://discuss.linuxcontainers.org/t/managing-the-lxd-snap/8178">Managing LXD Snap</a> |
| 12 | +#### Make LXD Available Over the Network |
12 | 13 |
|
13 |
| -#### Make LXD available over the network |
| 14 | +When LXDMosaic accesses each LXD server for the first time, it needs to authenticate using a token or trust password. This allows LXDMosaic to deploy a trust certificate for future communications. |
14 | 15 |
|
15 |
| -When LXDMosaic accesses each LXD server for the first time it needs to be able to authenticate |
16 |
| -using a trust password, this is so LXDMOsaic can deploy a trust certificate for future communications. |
| 16 | +First, make LXD available over the network: |
17 | 17 |
|
18 |
| -You can set a trust password by executing the following commands on each LXD server. |
| 18 | +```bash |
| 19 | +lxc config set core.https_address :8443 |
| 20 | +``` |
| 21 | + |
| 22 | +For LXD version 6+ Token-based authentication is required. Token auth is available in version 5 onwards and is the recommended process: |
19 | 23 |
|
20 | 24 | ```bash
|
21 |
| -lxc config set core.https_address [::] # make LXD available over IPV4 & IPV6 on all interafaces |
22 |
| -lxc config set core.trust_password some-secret-string # password LXDMosaic needs, you will be asked for this later |
| 25 | +lxc config trust add --name lxdmosaic |
23 | 26 | ```
|
24 | 27 |
|
25 |
| -_If you try to connect to LXD server in a cluster we will try to add all cluster members using the same trust password_ |
| 28 | +For LXD versions older than 6 You can use a "trust password," but this has security drawbacks and is not recommended: |
26 | 29 |
|
27 |
| -### Installing LXDMosaic Ubuntu |
| 30 | +```bash |
| 31 | +lxc config set core.trust_password some-secret-string |
28 | 32 | ```
|
29 |
| -# Launch a ubuntu container |
| 33 | + |
| 34 | +Note: If you try to connect to an LXD server in a cluster, we will attempt to add all cluster members using the same trust password. |
| 35 | + |
| 36 | +## Installing LXDMosaic on Ubuntu |
| 37 | + |
| 38 | +```bash |
| 39 | +# Launch an Ubuntu container |
30 | 40 | lxc launch ubuntu: lxdMosaic
|
31 |
| -# Connect to ubuntu console |
| 41 | + |
| 42 | +# Connect to Ubuntu console |
32 | 43 | lxc exec lxdMosaic bash
|
33 |
| -# Download the script |
| 44 | + |
| 45 | +# Download the script |
34 | 46 | curl https://raw.githubusercontent.com/turtle0x1/LxdMosaic/master/examples/install_with_clone.sh >> installLxdMosaic.sh
|
35 |
| -# Then give the script execution permissions |
| 47 | + |
| 48 | +# Give the script execution permissions |
36 | 49 | chmod +x installLxdMosaic.sh
|
37 |
| -# Then run bellow to setup the program |
| 50 | + |
| 51 | +# Run the script to set up the program |
38 | 52 | ./installLxdMosaic.sh
|
39 | 53 | ```
|
40 | 54 |
|
41 |
| -### Post Installation |
42 |
| -Once the installation is complete you need to go to into your browser and vist; |
43 |
| - |
44 |
| -`https://container_ip_address` |
45 |
| - |
46 |
| -and accept the self signed certificate, you will then be able to enter your LXD instance |
47 |
| -details. |
| 55 | +## Post-Installation |
| 56 | +Once the installation is complete, follow these steps: |
| 57 | + - Open your browser and visit: https://container_ip_address |
| 58 | + - Accept the self-signed certificate |
| 59 | + - Follow the on screen instructions |
0 commit comments