Skip to content

Commit 70d68c1

Browse files
committed
Update docs covering LXD token auth (closes #573)
1 parent 78e018b commit 70d68c1

File tree

1 file changed

+37
-25
lines changed

1 file changed

+37
-25
lines changed

Diff for: docs/Installation.md

+37-25
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,59 @@
11
## Installation
22

3+
### Pre-Installation
34

4-
### Pre Installation
5+
#### Initialize LXD
56

6-
#### Initialise LXD
7+
An opinionated guide on how to set up LXD is forthcoming. For now, refer to these guides:
78

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)
911

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
1213

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.
1415

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:
1717

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:
1923

2024
```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
2326
```
2427

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:
2629

27-
### Installing LXDMosaic Ubuntu
30+
```bash
31+
lxc config set core.trust_password some-secret-string
2832
```
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
3040
lxc launch ubuntu: lxdMosaic
31-
# Connect to ubuntu console
41+
42+
# Connect to Ubuntu console
3243
lxc exec lxdMosaic bash
33-
# Download the script
44+
45+
# Download the script
3446
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
3649
chmod +x installLxdMosaic.sh
37-
# Then run bellow to setup the program
50+
51+
# Run the script to set up the program
3852
./installLxdMosaic.sh
3953
```
4054

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

Comments
 (0)