3.1 KiB
Setting Up Development Environment
Before contributing to this project, you will have to make sure you have the tools that are utilized. We have made it incredibly easy to get started - just run bash .start.sh
in the root of the repository. Most of the requirements (listed below) will automatically install (rootlessly) if they are missing from your system when you initialize the project by running bash .start.sh
.
Requirements
- Task
- Python 3, along with the
python3-netaddr
andpython3-pip
libraries (i.e.sudo apt-get install python3 python3-netaddr python3-pip
) - Docker
- Node.js >=12 which is used for the development environment which includes a pre-commit hook
- VirtualBox which is used for running Molecule tests
Docker and VirtualBox must be installed with root priviledges. If they are missing from your system, running bash .start.sh
will prompt you for your password and automatically install them. Otherwise, you can follow the official directions for installing Docker and directions for installing VirtualBox.
Getting Started
With all the requirements installed, navigate to the root directory and run the following command to set up the development environment which includes installing the Python dependencies and installing the Ansible Galaxy dependencies:
bash .start.sh
This will install all the dependencies and automatically register a pre-commit hook. More specifically, bash .start.sh
will:
- Install Task which provides an easy-to-use interface for performing common tasks while leveraging parallel execution
- Install missing development tools like Node.js and Python
- Install the Node.js development environment dependencies
- Install a pre-commit hook using [husky]({{ misc.husky }})
- Ensure that meta files and documentation are up-to-date
- Install the Python 3 requirements
- Install the Ansible Galaxy requirements
- Re-generate documentation using the latest sources
- Perform other miscellaneous tasks depending on the project type
Tasks Available
With the dependencies installed, you can see a list of the available commands by running task --list
. This will log a help menu to the console informing you about the available commands and what they do. After running the command, you will see something that looks like this:
❯ task --list
{{ task_list_output }}
Using the information provided above by running task --list
, we can see that the task lint:all
command will lint the project with all the available linters. You can see exactly what each command is doing by checking out the Taskfile.yml
file (and following the imports). You can also get a detailed summary of any task reported by task --list
by running task group:task-name --summary
.