Skip to content

Commit c726785

Browse files
committed
Adding a first version of install.md
1 parent 5f16535 commit c726785

File tree

1 file changed

+119
-6
lines changed

1 file changed

+119
-6
lines changed

doc/install.md

Lines changed: 119 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,128 @@
1-
# Installation Guidelines
1+
# Installation Guidelines (Work in Progress)
22
## Basic installation
33
### Server installation
4+
This guide details installing Hashtopolis using Docker, the recommended method since version 0.14.0. Docker offers a faster, more consistent setup process.
5+
#### Prerequisites:
46

5-
_NOTE: The instructions provided in this section have only been tested on Ubuntu 22.04 and Windows 11 with WSL2_
7+
> [!NOTE]
8+
> The instructions provided in this section have only been tested on Ubuntu 22.04 and Windows 11 with WSL2.
69
710
To install Hashtopolis server, ensure that the following prerequisites are met:
8-
9-
1. *Docker*: Follow the instructions available on the Docker website:
11+
1. Docker: Follow the instructions available on the Docker website:
1012
- Install Docker on Ubuntu
1113
- Install Docker on Windows
12-
2. *Docker Compose v2*: Follow the instructions available on the Docker website:
13-
- [Install Docker Compose on Linux](https://docs.docker.com/compose/install/linux/#install-using-the-repository)
14+
2. Docker Compose v2: Follow the instructions available on the Docker website:
15+
- Install Docker Compose on Linux
16+
17+
#### Setup Hashtopolis Server
18+
The official Docker images can be found on Docker Hub at: https://hub.docker.com/u/hashtopolis. Two Docker images are needed to run Hashtopolis: hashtopolis/frontend (setting up the web user interface), and hashtopolis/backend (taking care of the Hashtopolis database).
19+
20+
A docker-compose file allowing to configure the docker containers for Hashtopolis is available in this repository. Here are the steps to follow to run Hashtopolis using that docker-compose file:
21+
22+
1. Create a folder and change into the folder
23+
```
24+
mkdir hashtopolis
25+
cd hashtopolis
26+
```
27+
2. Download docker-compose.yml and env.example
28+
```
29+
wget https://raw.githubusercontent.com/hashtopolis/server/master/docker-compose.yml
30+
wget https://raw.githubusercontent.com/hashtopolis/server/master/env.example -O .env
31+
```
32+
3. Edit the .env file and change the settings to your likings.
33+
```
34+
nano .env
35+
```
36+
4. Start the containers:
37+
```
38+
docker compose up --detach
39+
```
40+
5. Access the Hashtopolis UI through: http://127.0.0.1:8080 using the credentials (user=admin, password=hashtopolis)
41+
6. If you want to play around with a preview of the version 2 of the UI, consult the New user interface: technical preview section.
42+
43+
#### New user interface: technical preview
44+
45+
> [!NOTE]
46+
> The APIv2 and UIv2 are a technical preview. Currently, when enabled, everyone through the new API will be fully admin!
47+
48+
To enable 'version 2' of the API:
49+
50+
1. Stop your containers
51+
52+
2. set the HASHTOPOLIS_APIV2_ENABLE to 1 inside the .env file.
53+
54+
3. Relaunch the containers
55+
```
56+
docker compose up --detach
57+
```
58+
59+
4. Access the technical preview via: http://127.0.0.1:4200 using the credentials user=admin and password=hashtopolis, unless modified in the .env file.
60+
61+
### Agent installation
62+
#### Prerequisites
63+
To install the agent, ensure that the following prerequisites are met:
64+
1. Python: Python 3 must be installed on the agent system. You can verify the installation by running the following command in your terminal:
65+
```
66+
python3 --version
67+
```
68+
If Python 3 is not installed, refer to the official Python installation guide.
69+
2. Python Packages: The Hashtopolis agents depends on the following Python packages:
70+
- requests
71+
- psutil
72+
73+
[***To be checked***]
74+
It is recommended to use a virtual environment for installing the required packages to avoid conflicts with system-wide packages. You can create and activate a virtual environment with the following commands:
75+
```
76+
python3 -m venv hastopolis_env
77+
source hashtopolis_env/bin/activate
78+
```
79+
80+
Then, install the packages:
81+
```
82+
pip install requests psutil
83+
```
84+
85+
#### Download the Hashtopolis agent
86+
1. Connect to the Hashtopolis server: http://<server-ip-address>:8080 and log in. Navigate to the Agents tab > New Agent.
87+
2. From that page, you can either download the agent by clicking on the Download button, or copy and paste the provided url to download the agent using wget/curl:
88+
```
89+
curl -o hastopolis.zip "http://<server-ip-address>:8080/agents.php?download=1"
90+
```
91+
92+
#### Start and register a new agent
93+
94+
1. Activate your python virtual environment if not done before:
95+
```
96+
source hashtopolis_env/bin/activate
97+
```
98+
2. Start the agent:
99+
```
100+
python hashtopolis.zip
101+
```
102+
103+
3. When prompted, provide the URL to the server API as provided in the Agents page of Hashtopolis (http://<server-ip-address>:8080/api/server.php).
104+
```
105+
Starting client 's3-python-0.7.2.4'...
106+
Please enter the url to the API of your Hashtopolis installation:
107+
http://localhost:8080/api/server.php
108+
```
109+
4. On the server Agents page of Hashtopolis, create a new Voucher and copy it.
110+
5. Register the agent by providing the newly created token.
111+
```
112+
No token found! Please enter a voucher to register your agent:
113+
peKxylVY
114+
Successfully registered!
115+
Collecting agent data...
116+
Login successful!
117+
```
14118

119+
Your agent is now ready to receive new tasks. If you wish to finetune the configuration of your agent, please consult the section related to the agent configuration file or the command line arguments in the Advanced installation section. Otherwise, to start using Hashtopolis, consult the Basic workflow section.
15120

121+
## Advanced installation
122+
- Installation in an airgapped/offline/oil-gapped system (make a note about the binary)
123+
- Installation with local folders
124+
- Installation of TLS X.509 certificate
125+
- Agent configuration file and command line arguments
126+
- (Boot from PXE) and run HtP as a service (voucher, local disk,...)
127+
- Misc.
128+
- Upgrade of the install

0 commit comments

Comments
 (0)