mirror of
https://github.com/torproject/community.git
synced 2025-02-10 04:43:07 +00:00
Update content/relay/setup/snowflake/ansible/contents.lr
This commit is contained in:
parent
f6a1f898a9
commit
8afe65ef3e
@ -2,41 +2,54 @@ _model: page
|
||||
---
|
||||
color: primary
|
||||
---
|
||||
title: Standalone Snowflake proxy with ansible role
|
||||
|
||||
title: Ansible role
|
||||
---
|
||||
key: 1
|
||||
---
|
||||
html: two-columns-page.html
|
||||
---
|
||||
subtitle: How to run a standalone Snowflake proxy with Ansible role
|
||||
---
|
||||
section_id: snowflake-operations
|
||||
---
|
||||
section: Snowflake operations
|
||||
---
|
||||
body:
|
||||
|
||||
With this ansible role you can install, configure and operate snowflake proxies of the Tor network with standalone version.
|
||||
### Features
|
||||
|
||||
## Features
|
||||
This Ansible role will install, configure, and operate Snowflake standalone proxy.
|
||||
|
||||
- Support for Ubuntu, Debian, Debian, ArchLinux, Fedora and FreeBSD
|
||||
- Systemd unit to manage Snowflake service on GNU/Linux and rc script for FreeBSD
|
||||
- Support for Ubuntu, Debian, Debian, Arch Linux, Fedora and FreeBSD.
|
||||
- Systemd unit to manage Snowflake service on GNU/Linux and rc script for FreeBSD.
|
||||
|
||||
## Requirements
|
||||
### Requirements
|
||||
|
||||
- Python
|
||||
- Ansible 2.9 or higher
|
||||
|
||||
## How to use
|
||||
#### 1. Install Ansible
|
||||
|
||||
### Ansible installation with pip
|
||||
You can install Ansible using `pip`:
|
||||
|
||||
```
|
||||
python -m pip install --user ansible
|
||||
$ python -m pip install --user ansible
|
||||
```
|
||||
|
||||
Other ways to install ansible [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
|
||||
Or find other ways to [install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
|
||||
|
||||
### Download ansible role from the Galaxy repository
|
||||
#### 2. Download the Ansible role
|
||||
|
||||
The Ansible role is called `nvjacobo.snowflake`.
|
||||
You can find it in [Galaxy repository](https://galaxy.ansible.com/nvjacobo/snowflake) and install using the command line:
|
||||
|
||||
```
|
||||
ansible-galaxy install nvjacobo.snowflake
|
||||
$ ansible-galaxy install nvjacobo.snowflake
|
||||
```
|
||||
|
||||
Galaxy repository where users can share roles, and to a command line tool for installing, creating and managing roles.
|
||||
#### 3. Create a playbook
|
||||
|
||||
### Creating the playbook site.yml
|
||||
Next, create an Ansible playbook to run the new role:
|
||||
|
||||
```
|
||||
- hosts: snowflake
|
||||
@ -44,79 +57,61 @@ Galaxy repository where users can share roles, and to a command line tool for i
|
||||
- nvjacobo.snowflake
|
||||
```
|
||||
|
||||
An Ansible playbook is an organized unit of scripts that defines work for a server configuration managed by the automation tool Ansible.
|
||||
#### 4. Create an inventory
|
||||
|
||||
### Creation of our inventory file
|
||||
An inventory is a list of servers that Ansible will automatically manage through the playbook.
|
||||
|
||||
```
|
||||
[snowflake]
|
||||
ip-address
|
||||
```
|
||||
Inventory represents the set of machines that Ansible will automatically manage through the playbooks.
|
||||
|
||||
### Running our playbook
|
||||
#### 5. Deploy
|
||||
|
||||
Finally, by running the playbook, Ansible will deploy the Snowflake standalone proxy.
|
||||
You can run it as root:
|
||||
|
||||
```
|
||||
ansible-playbook -i inventory site.yml -u root
|
||||
$ ansible-playbook -i inventory site.yml -u root
|
||||
```
|
||||
|
||||
Or with sudo
|
||||
Or with sudo:
|
||||
|
||||
```
|
||||
ansible-playbook -i inventory site.yml -u username -b
|
||||
$ ansible-playbook -i inventory site.yml -u username -b
|
||||
```
|
||||
|
||||
## Managing snowflake proxy with systemd on Ubuntu, Debian, Fedora, ArchLinux via Ansible
|
||||
#### 6. Manage Snowflake proxy
|
||||
|
||||
Status snowflake proxy
|
||||
If the Snowflake proxy host is running systemd, you can manage your Snowflake proxy by using systemd commands: start, status, and stop.
|
||||
For example:
|
||||
|
||||
```
|
||||
ansible all -i inventory -a 'systemctl status snowflake-proxy'
|
||||
```
|
||||
Start snowflake proxy
|
||||
|
||||
```
|
||||
ansible all -i inventory -a 'systemctl start snowflake-proxy'
|
||||
$ ansible all -i inventory -a 'systemctl status snowflake-proxy'
|
||||
```
|
||||
|
||||
Stop snowflake proxy
|
||||
For FreeBSD, you can manage your Snowflake proxy by using these rc script commands.
|
||||
For example:
|
||||
|
||||
```
|
||||
ansible all -i inventory -a 'systemctl stop snowflake-proxy'
|
||||
$ ansible all -i inventory -a 'service snowflake status'
|
||||
```
|
||||
|
||||
## Managing snowflake proxy with rc script on FreeBSD
|
||||
#### 7. Upgrading your Snowflake proxy
|
||||
|
||||
Status snowflake proxy
|
||||
It's important to keep your Snowflake standalone proxy up to date.
|
||||
Running the Ansible playbook will install the updates:
|
||||
|
||||
```
|
||||
ansible all -i inventory -a 'service snowflake status'
|
||||
$ ansible-playbook -i inventory site.yml -u root
|
||||
```
|
||||
|
||||
Start snowflake proxy
|
||||
### 8. (Optional) Limiting usage
|
||||
|
||||
```
|
||||
ansible all -i inventory -a 'service snowflake start'
|
||||
```
|
||||
You can limit the number of clients (Snowflake users) by using the variable `client`.
|
||||
The maximum concurrent clients by default is unlimited (0 = non limit).
|
||||
|
||||
Stop snowflake proxy
|
||||
|
||||
```
|
||||
ansible all -i inventory -a 'service snowflake stop'
|
||||
```
|
||||
## Upgrade snowflake proxy version via Afnsible
|
||||
|
||||
To update to the latest snowflake version available it is necessary to run our playbook again.
|
||||
|
||||
```
|
||||
ansible-playbook -i inventory site.yml -u root
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
Role Variables (not for FreeBSD). You can set the number of clients for your proxy by clients variable. Maximum concurrent clients by default is 0 = non limit.
|
||||
|
||||
### Example Playbook site.yml with Variable clients
|
||||
The playbook below has a limit of 300 concurrent clients:
|
||||
|
||||
```
|
||||
- hosts: snowflake
|
||||
@ -125,11 +120,9 @@ Role Variables (not for FreeBSD). You can set the number of clients for your pro
|
||||
roles:
|
||||
- nvjacobo.snowflake
|
||||
```
|
||||
The above playbook has a limit of 300 concurrent clients.
|
||||
|
||||
**Note:** This Ansible role variable isn't available for FreeBSD.
|
||||
---
|
||||
key: 1
|
||||
_hidden: no
|
||||
---
|
||||
html: two-columns-page.html
|
||||
---
|
||||
subtitle: How to run a standalone Snowflake proxy with Ansible role
|
||||
_discoverable: no
|
||||
|
Loading…
x
Reference in New Issue
Block a user