Skip to content

Commit

Permalink
Merge pull request #279 from stavros-k/restruct
Browse files Browse the repository at this point in the history
Restruct
  • Loading branch information
stavros-k authored Dec 26, 2023
2 parents 57b7149 + 403f6af commit f29d422
Show file tree
Hide file tree
Showing 29 changed files with 295 additions and 159 deletions.
2 changes: 1 addition & 1 deletion config/presetOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const classicPresetOptions: Options = {
docs: <DocsPluginOptions>{
routeBasePath: "/",
sidebarPath: "./sidebars.ts",
showLastUpdateTime: true,
showLastUpdateTime: false,
editUrl: "https://github.com/stavros-k/docs/tree/master/",
},
// https://docusaurus.io/docs/next/api/plugins/@docusaurus/plugin-content-blog#configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Ubuntu - First things to do
sidebar_position: 3
title: First tweaks
sidebar_position: 2
---

After installing an Ubuntu VM, this is some things I personally do first.
Expand Down Expand Up @@ -77,37 +77,5 @@ sudo netplan apply

## Install guest tools (Optional)

- On XenOrchestra navigate to the console tab of your VM
- Mount the `guest-tools.iso` on the dropdown

![xoa-guest-tools](img/xoa-guest-tools.png)

```shell
sudo mount /dev/cdrom /mnt
sudo /mnt/Linux/install.sh
sudo umount /dev/cdrom
sudo reboot
```

Example output:

```shell
user@vm:~$ sudo mount /dev/cdrom /mnt
sudo /mnt/Linux/install.sh
sudo umount /dev/cdrom
mount: /mnt: WARNING: source write-protected, mounted read-only.
Detected `Ubuntu 22.04 LTS' (ubuntu version 22).

The following changes will be made to this Virtual Machine:
* packages to be installed/upgraded:
- xe-guest-utilities_7.20.0-9_amd64.deb

Continue? [y/n] y

(Reading database ... 74231 files and directories currently installed.)
Preparing to unpack .../xe-guest-utilities_7.20.0-9_amd64.deb ...
Unpacking xe-guest-utilities (7.20.0-9) over (7.20.0-9) ...
Setting up xe-guest-utilities (7.20.0-9) ...

You should now reboot this Virtual Machine.
```
- On your Hypervisor, mount the `guest-tools.iso`
- Follow instructions from the hypervisor website.
4 changes: 4 additions & 0 deletions docs/software/docker/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Docker
sidebar_position: 6
---
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Install Docker on Ubuntu
title: Install Docker
sidebar_position: 5
---

Let's install `docker` on `Ubuntu 22.04`
In this example we will install `docker` on `Ubuntu 22.04`.

## Clean previous installations

Expand Down
4 changes: 2 additions & 2 deletions docs/software/portainer/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Installation
sidebar_position: 1
---

Assuming you have a running [Ubuntu VM](../../virtualization/xcp-ng/install-ubuntu-vm.md)
and installed [docker](../../virtualization/xcp-ng/install-docker-ubuntu.md)
Assuming you have a running [Ubuntu VM](../../operating-systems/ubuntu/installation.md)
and installed [docker](../../software/docker/install-docker.md)

```shell
mkdir -p $HOME/docker/portainer
Expand Down
2 changes: 1 addition & 1 deletion docs/software/prometheus/installation-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ as a reverse proxy to expose prometheus

:::info Prerequisite

- Installed [VM](../../virtualization/xcp-ng/install-ubuntu-vm.md)
- Installed [VM](../../operating-systems/ubuntu/installation.md)
- Installed Docker and Docker-Compose

:::
Expand Down
2 changes: 1 addition & 1 deletion docs/software/rport/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 1
## Install Ubuntu

You will need a linux VM (or bare metal), I tested this on `Ubuntu 22.04`.
You can use this [guide](../../virtualization/xcp-ng/install-ubuntu-vm.md).
You can use this [guide](../../operating-systems/ubuntu/installation.md).

## Install `RPort`

Expand Down
2 changes: 1 addition & 1 deletion docs/software/tacticalrmm/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 1
## Install Ubuntu

You will need a linux VM (or bare metal), I tested this on `Ubuntu 20.04`.
You can use this [guide](../../virtualization/xcp-ng/install-ubuntu-vm.md).
You can use this [guide](../../operating-systems/ubuntu/installation.md).

:::caution

Expand Down
32 changes: 32 additions & 0 deletions docs/virtualization/xcp-ng/create-iso-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Create ISO storage
sidebar_position: 4
---

Start by SSH-ing to your `xcp-ng` host

## Create storage directory

```shell
mkdir -p /isos && cd /isos
```

## Download ISO

```shell
curl https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso --output ubuntu-22.04-live-server-amd64.iso
```

![xoa-source-mkdir-download-img](img/xoa-source-mkdir-download-img.png)

## Create ISO storage in XOA

Navigate to `➕New` > `💿Storage`

- Host: Select your host
- Name: `ISOs`
- Description: `Local storage for ISOs`
- Storage type: `ISO SR Local`
- Path: `/isos`
- Click <kbd>▶️Create</kbd>
![xoa-source-storage](img/xoa-source-storage.png)
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
---
title: Install Ubuntu VM
sidebar_position: 2
title: Create VM
sidebar_position: 5
---

- Follow steps from [Download Ubuntu ISO](../../operating-systems/ubuntu/installation.md#download-the-iso)
- SSH to your `xcp-ng` host
In this example we will use Ubuntu 22.04 as the OS for our VM.

```shell
mkdir -p /isos && cd /isos
curl https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso --output ubuntu-22.04-live-server-amd64.iso
```
:::info Prerequisites

![xoa-source-mkdir-download-img](img/xoa-source-mkdir-download-img.png)
- [ISO storage created](./create-iso-storage#create-iso-storage-in-xoa)
- [ISO downloaded](./create-iso-storage#download-iso)

## Create storage

Navigate to `➕New` > `💿Storage`

- Host: Select your host
- Name: `ISOs`
- Description: `Local storage for ISOs`
- Storage type: `ISO SR Local`
- Path: `/isos
- Click <kbd>▶️Create</kbd>

![xoa-source-storage](img/xoa-source-storage.png)
:::

## Create VM

Expand Down
54 changes: 54 additions & 0 deletions docs/virtualization/xcp-ng/guest-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Install Guest Tools
sidebar_position: 6
---

## Install guest tools (Optional)

- On XenOrchestra navigate to the console tab of your VM
- Mount the `guest-tools.iso` on the dropdown

![xoa-guest-tools](img/xoa-guest-tools.png)

- SSH to your VM
- Mount the `guest-tools.iso`

```shell
sudo mount /dev/cdrom /mnt
```

- Run the install script

```shell
sudo /mnt/Linux/install.sh
```

- Unmount the `guest-tools.iso`

```shell
sudo umount /dev/cdrom
sudo reboot
```

Example output:

```shell
user@vm:~$ sudo mount /dev/cdrom /mnt
sudo /mnt/Linux/install.sh
sudo umount /dev/cdrom
mount: /mnt: WARNING: source write-protected, mounted read-only.
Detected `Ubuntu 22.04 LTS' (ubuntu version 22).
The following changes will be made to this Virtual Machine:
* packages to be installed/upgraded:
- xe-guest-utilities_7.20.0-9_amd64.deb
Continue? [y/n] y
(Reading database ... 74231 files and directories currently installed.)
Preparing to unpack .../xe-guest-utilities_7.20.0-9_amd64.deb ...
Unpacking xe-guest-utilities (7.20.0-9) over (7.20.0-9) ...
Setting up xe-guest-utilities (7.20.0-9) ...
You should now reboot this Virtual Machine.
```
Binary file modified docs/virtualization/xcp-ng/img/xoa-connected-server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/virtualization/xcp-ng/img/xoa-welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/virtualization/xcp-ng/install-xoa/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Docker
sidebar_position: 4
---

- SSH to your docker host
- Create a directory for XOA to store it's data

```shell
mkdir -p /opt/xoa
```

- Create the following file `/opt/xoa/docker-compose.yml`

```yaml
services:
xen-orchestra:
restart: always
image: ronivay/xen-orchestra:5.129.0
stop_grace_period: 1m
ports:
- "8443:8443"
environment:
HTTPS_PORT: 8443
REDIRECT_TO_HTTPS: true
# Capabilities are needed for NFS/SMB mount
# cap_add:
# - SYS_ADMIN
# - DAC_READ_SEARCH
volumes:
- /opt/xoa/data:/var/lib/xo-server
- /opt/xoa/redis:/var/lib/redis
healthcheck:
test: /healthcheck.sh
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
```
- Run the following command
```shell
docker-compose -f /opt/xoa/docker-compose.yml up -d
```

- Visit `https://<ip.of.your.docker.host>:8443`
- Follow the [Quick Start](../setup-xoa.md) guide
33 changes: 33 additions & 0 deletions docs/virtualization/xcp-ng/install-xoa/easy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Fast/Easy
sidebar_position: 2
---

- SSH to your `xcp-ng` host
- Run the following command

```shell
sudo bash -c "$(curl -s https://raw.githubusercontent.com/ronivay/XenOrchestraInstallerUpdater/master/xo-vm-import.sh)"
```

- Follow the on-screen instructions
- Visit `https://<ip.you-entered-on.setup>`

![xoa-easy](img/xoa-easy.png)

- Done

You might want to make this VM auto start when xcp-ng host boots.
Also protect from accidental deletion or shutdown.

Navigate to `🏠Home` > `🖥️VMs`

- Click `xo-ce`
- Click `Advanced`
- Toggle on `Auto power on`
- Toggle on `Protect from accidental deletion`
- Toggle on `Protect from accidental shutdown`

![xoa-auto-power](img/xoa-auto-power.png)

- Follow the [Quick Start](../setup-xoa.md) guide
20 changes: 20 additions & 0 deletions docs/virtualization/xcp-ng/install-xoa/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Install XOA
sidebar_position: 2
---

:::warning Warning

Most of the XOA features (eg Scheduled Backups) require XOA to run continuously.
You cannot only use it to manage your VMs and then shut it down and
this should be considered when choosing the installation method.

:::

You can choose between 3 Methods to install XOA.

- [**Quick Deploy**](./quick.md), which spins a VM with limited available features
- [**Fast/Easy**](./easy.md), which downloads a pre-created VM that is build from source code and includes all features
- [**From source**](./source.md), which you manually download and install the OS and then run the installer to build XOA,
this also includes all features
- [**Docker**](./docker.md), which you deploy a docker container with XOA, this also includes all features
41 changes: 41 additions & 0 deletions docs/virtualization/xcp-ng/install-xoa/quick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Quick Deploy
sidebar_position: 1
---

Deploying XOA the first time is very easy.
Grab the IP of your xcp-ng host, and visit `https://<xpc.ng.host.ip>`

You will see a webpage like below

![xoa-deploy](img/xoa-deploy.png)

- Click <kbd>Quick Deploy</kbd>
- Type the root password you entered while installing xcp-ng
- Click <kbd>Connect</kbd>

![xoa-deploy-connect](img/xoa-deploy-connect.png)

- Leave everything empty if you want to use DHCP.
- Click <kbd>Next</kbd>

![xoa-deploy-net](img/xoa-deploy-net.png)

- Leave everything empty and change password later

or

- Create XOA Admin Account now
- Click <kbd>Deploy</kbd>

![xoa-deploy-account](img/xoa-deploy-account.png)

It will take a while to deploy XOA VM, depending on your hardware.
Once it's done it will redirect you to XOA's web login

Default Username/Password is:

Username: `[email protected]`
Password: `admin`

- Follow the [Quick Start](../setup-xoa.md) guide
Loading

0 comments on commit f29d422

Please sign in to comment.