What is SwitchSetup?
This software is designed to configure network devices using Ansible
For now it works in a very simple way, but I plan to improve security and new features.
For more information, diagrams and project architecture, see our documentation.
Be free to collaborate!
To set up the project locally, please follow these steps:
- Clone the repository:
git clone https://github.com/AleDouglas/SwitchSetup.git
. - Install the packages from the requirements.txt file in your Virtual Environment or use the Dockerfile .
- You need generate your own Secret Key .
- Configure your .env .
- You can run it in your terminal or dockerfile .
Start the Python interpreter
import secrets
secrets.token_hex(32)
Copy the key in .env
Create an .env file in the /core directory:
SECRET_KEY=SECRET KEY
DEBUG=True
Use DEBUG=TRUE only when in development.
Be mindful that you can generate a new key whenever necessary. However, it is crucial to remember that if you are using our project, you should not disclose the key to anyone.
cd Alpha
python manage.py migrate
python manage.py runserver
cd Alpha
python manage.py migrate
cd ..
docker build -t image_name .
docker run -p 8000:8000 imagename
Use for login:
Username: admin
Password: 123
We use SQLite at first, but it is possible to manage other databases.
Use Django's own reference.
If you lose the database file or decide to switch to a different one, you will need to follow these steps:
- Migration ( Inside the Alpha file )
python manage.py migrate
After this, you just need to either use Docker or run it on your local machine.
Use for login:
Username: admin
Password: 123
I recommend using MySQL or PostgreSQL to avoid the use of a physical database within the documents. Simply follow the Django reference for the necessary modifications.
We have identified an issue regarding Ansible authentication. This might be caused by the required keys. Simply copy the keys from the ~/.ssh/ file to the 'sshkeys' folder within the project. We will work on resolving this problem in the upcoming updates.
We've identified some issues on certain machines. You just need to add the:
'allauth.account.middleware.AccountMiddleware',
to the MIDDLEWARE list in the settings.py file.
Version | Date | |
---|---|---|
Alpha V.1.1 | Added key system and resolve responsive bugs, this version for attribution via API is not yet ready | 11/01/2024 |
Alpha V.1.0 | Added an Alpha version with a new, more attractive and functional look, this version for attribution via API is not yet ready | 27/12/2023 |
1.6.1 | Fixing and Update system for customized playbooks and hosts | 13/09/2023 |
1.6 | Added a system for customized playbooks and hosts ( TEST ) | 13/09/2023 |
1.5.3 | Resolved Datetime Import and finish tests | 18/08/2023 |
1.5.2 | Resolved logging issue in certain system tasks | 18/08/2023 |
1.5.1 | Added ansible execution information control system | 18/08/2023 |
1.5 | Possible solution for connecting via docker-ansible and adding level of information when running ansible | 17/08/2023 |
1.4 | Fixed ansible conection | 17/07/2023 |
1.3 | SSH Save Credentials | 16/07/2023 |
1.2 | User Options | 14/07/2023 |
1.1 | Fixed login form | 14/07/2023 |
1.0 | Up version 1.0 | 14/07/2023 |