-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from SaneiSaya/dev
Dev
- Loading branch information
Showing
4 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
VAULT_TOKEN=<vault-token> | ||
UNSEAL_VAULT_KEY1=<unseal-key1> | ||
UNSEAL_VAULT_KEY2=<unseal-key2> | ||
UNSEAL_VAULT_KEY3=<unseal-key3> | ||
SECRET_KEY=<secret-key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Set the base image | ||
FROM python:3.9 | ||
|
||
# Set environment variables | ||
ENV FLASK_APP=app.py | ||
ENV UNSEAL_VAULT_KEY1=key1 | ||
ENV UNSEAL_VAULT_KEY2=key2 | ||
# Add more environment variables if needed... | ||
|
||
# Create and set work directory | ||
WORKDIR /eNMS | ||
|
||
# Download the latest release of eNMS | ||
RUN wget https://github.com/afourmy/eNMS/archive/refs/tags/v5.1.1.tar.gz && \ | ||
tar -xzf v5.1.1.tar.gz --strip-components=1 && \ | ||
rm v5.1.1.tar.gz | ||
|
||
# Install required packages | ||
RUN apt-get update && apt-get install -y wget supervisor | ||
|
||
# Copy requirements.txt and supervisord.conf | ||
COPY requirements.txt supervisord.conf /eNMS/ | ||
|
||
# Install Python requirements | ||
RUN pip install -r requirements.txt | ||
|
||
# Set the command to run when the container starts | ||
CMD ["supervisord", "-c", "/eNMS/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,76 @@ | ||
# docker-enms | ||
just testing | ||
# eNMS Deployment with Docker Compose and Traefik | ||
|
||
This repository includes Docker configurations for running eNMS in a production environment, utilizing Docker Compose for container orchestration and Traefik for reverse proxy and automatic HTTPS. | ||
|
||
## Prerequisites | ||
|
||
These instructions assume you are deploying on a Linux machine and have Docker, Docker Compose and Git installed. | ||
|
||
## Deployment Steps | ||
|
||
### Step 1: Clone the Repository | ||
|
||
You need to clone the repository where you've stored the Dockerfile and docker-compose.yml: | ||
|
||
```sh | ||
git clone https://github.com/SaneiSaya/docker-enms | ||
cd docker-enms | ||
``` | ||
|
||
### Step 2: Create a .env File | ||
|
||
In the root of the project, create a .env file using the example to store your environment variables: | ||
|
||
``` | ||
Copy code | ||
touch .env | ||
``` | ||
Populate the .env file with your environment variables or refer to the examples: | ||
|
||
``` | ||
Copy code | ||
echo "ENMS_PASSWORD=<your-enms-password>" >> .env | ||
echo "UNSEAL_VAULT_KEY1=<your-unseal-key1>" >> .env | ||
echo "UNSEAL_VAULT_KEY2=<your-unseal-key2>" >> .env | ||
echo "UNSEAL_VAULT_KEY3=<your-unseal-key3>" >> .env | ||
``` | ||
Replace <your-enms-password>, <your-unseal-key1>, <your-unseal-key2>, <your-unseal-key3> with your actual values. | ||
|
||
### Step 3: Create the Directories for Volumes | ||
Create the directories that will be used by Docker as volumes, such as /data/docker: | ||
|
||
``` | ||
Copy code | ||
mkdir -p /data/docker/eNMS/{files,logs,db} | ||
``` | ||
### Step 4: Create settings.json and scheduler.json Files | ||
Create two files: settings.json and scheduler.json inside the files directory: | ||
|
||
``` | ||
Copy code | ||
touch /data/docker/eNMS/files/settings.json | ||
touch /data/docker/eNMS/files/scheduler.json | ||
``` | ||
Populate settings.json and scheduler.json with your preferred configuration values. | ||
|
||
### Step 5: Start the Docker Containers | ||
Run the following command in the same directory as your docker-compose.yml file to start your containers: | ||
|
||
``` | ||
Copy code | ||
docker-compose up -d | ||
``` | ||
Your custom eNMS application should now be up and running and accessible via your configured domain through Traefik. Please adjust these instructions according to your specific environment and configuration needs. | ||
|
||
|
||
|
||
Again, don't forget to replace `<your-enms-password>`, `<your-unseal-key1>`, `<your-unseal-key2>`, `<your-unseal-key3>` with your actual values. | ||
|
||
## Acknowledgments | ||
|
||
This project uses the following open-source packages: | ||
|
||
- [eNMS](https://github.com/afourmy/eNMS): Enterprise Network Management System | ||
|
||
We would like to express our gratitude to the developers and maintainers of these projects. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"database_type": "mysql+pymysql", | ||
"database_user": "root", | ||
"database_password": "root_password", | ||
"database_address": "db", | ||
"database_name": "enms", | ||
"authentication": { | ||
"method": "database", | ||
"openldap": { | ||
"address": "ldap://ldap.example.com", | ||
"base_dn": "dc=example,dc=com" | ||
} | ||
}, | ||
"slack": { | ||
"token": "your_slack_token_here" | ||
} | ||
} |