Update README.md
This commit is contained in:
parent
9b081ed314
commit
9bb2fcfb21
138
README.md
138
README.md
@ -12,22 +12,22 @@ of servers within a production environment.
|
|||||||
QUICK START
|
QUICK START
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
For the impatient, `sudo pip install ansible` and add these lines to your group_vars/all:
|
For the impatient, `sudo pip install ansible` :
|
||||||
|
```bash:
|
||||||
|
# install pip (Python package manager) and ansible
|
||||||
|
$ sudo easy_install pip
|
||||||
|
$ sudo pip install ansible
|
||||||
|
```
|
||||||
|
|
||||||
```bash:
|
and add these lines to your group_vars/all:
|
||||||
# install pip (Python package manager) and ansible
|
```YAML:group_vars/all
|
||||||
$ sudo easy_install pip
|
# deploy tag
|
||||||
$ sudo pip install ansible
|
tag: Deploy1
|
||||||
```
|
|
||||||
|
# path
|
||||||
```YAML:group_vars/all
|
seeder_files_path: ~/builds
|
||||||
# deploy tag
|
destination_path: /directorypath/hoge/
|
||||||
tag: Deploy1
|
```
|
||||||
|
|
||||||
# path
|
|
||||||
seeder_files_path: ~/builds
|
|
||||||
destination_path: /opt/hoge
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
HOW IT WORKS
|
HOW IT WORKS
|
||||||
@ -45,24 +45,24 @@ All involved servers must have python and pizg installed and the related murder
|
|||||||
support files (BitTornado, etc.). To upload the support files to the
|
support files (BitTornado, etc.). To upload the support files to the
|
||||||
tracker, seeder, and peers, run:
|
tracker, seeder, and peers, run:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ ansible-playbook -i prodction setup.yml
|
$ ansible-playbook -i prodction setup.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, these will go in `/usr/local/murder` in your apps deploy directory.
|
By default, these will go in `/usr/local/murder` in your apps deploy directory.
|
||||||
Override this by setting the variable `remote_murder_path`.
|
Override this by setting the variable `remote_murder_path`.
|
||||||
|
|
||||||
Before deploying, you must start the tracker:
|
Before deploying, you must start the tracker:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ ansible-playbook -i prodction start_tracker.yml
|
$ ansible-playbook -i prodction start_tracker.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
At this point you should be able to deploy normally:
|
At this point you should be able to deploy normally:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ ansible-playbook -i prodction deploy.yml
|
$ ansible-playbook -i prodction deploy.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
MANUAL USAGE (ansible-lssd without a deploy strategy)
|
MANUAL USAGE (ansible-lssd without a deploy strategy)
|
||||||
@ -70,62 +70,70 @@ MANUAL USAGE (ansible-lssd without a deploy strategy)
|
|||||||
|
|
||||||
Modify a ./production and ./group_vars/all, manually define servers:
|
Modify a ./production and ./group_vars/all, manually define servers:
|
||||||
|
|
||||||
```INI:production
|
./production:
|
||||||
# ansible host
|
```INI:production
|
||||||
[ansible_host]
|
# ansible host
|
||||||
localhost ansible_connection=local
|
[ansible_host]
|
||||||
|
localhost ansible_connection=local
|
||||||
|
|
||||||
|
# tracker node
|
||||||
|
[tracker]
|
||||||
|
10.0.0.1
|
||||||
|
|
||||||
|
# seeder node
|
||||||
|
[seeder]
|
||||||
|
10.0.0.1
|
||||||
|
|
||||||
|
# peer nodes
|
||||||
|
[peer]
|
||||||
|
10.1.1.1
|
||||||
|
10.1.1.2
|
||||||
|
10.1.1.3
|
||||||
|
```
|
||||||
|
|
||||||
# tracker node
|
group_vars/all:
|
||||||
[tracker]
|
```YAML:group_vars/all
|
||||||
10.0.0.1
|
# deploy tag
|
||||||
|
tag: Deploy1
|
||||||
# seeder node
|
|
||||||
[seeder]
|
# path
|
||||||
10.0.0.1
|
seeder_files_path: ~/builds
|
||||||
|
destination_path: /opt/hoge # or some other directory
|
||||||
# peer nodes
|
```
|
||||||
[peer]
|
|
||||||
10.1.1.1
|
|
||||||
10.1.1.2
|
|
||||||
10.1.1.3
|
|
||||||
```
|
|
||||||
|
|
||||||
```YAML:group_vars/all
|
|
||||||
# deploy tag
|
|
||||||
tag: Deploy1
|
|
||||||
|
|
||||||
# path
|
|
||||||
seeder_files_path: ~/builds
|
|
||||||
destination_path: /opt/hoge # or some other directory
|
|
||||||
```
|
|
||||||
|
|
||||||
To distribute a directory of files, first make sure that murder is set
|
To distribute a directory of files, first make sure that murder is set
|
||||||
up on all hosts, then manually run the murder cap tasks:
|
up on all hosts, then manually run the murder cap tasks:
|
||||||
|
|
||||||
1. Start the tracker:
|
1. Start the tracker:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ ansible-playbook -i prodction start_tracker.yml
|
$ ansible-playbook -i prodction start_tracker.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create a torrent from a directory of files on the seeder, and start seeding:
|
2. Create a torrent from a directory of files on the seeder, and start seeding:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ scp -r ./builds host1:~/builds
|
# copy to seeder node
|
||||||
$ ansible-playbook -i prodction create_torrent.yml
|
$ scp -r ./builds 10.0.0.1:~/builds
|
||||||
$ ansible-playbook -i prodction start_seeder.yml
|
|
||||||
```
|
# create torrent file
|
||||||
|
$ ansible-playbook -i prodction create_torrent.yml
|
||||||
|
|
||||||
|
# start seeding
|
||||||
|
$ ansible-playbook -i prodction start_seeder.yml
|
||||||
|
```
|
||||||
|
|
||||||
3. Distribute the torrent to all peers:
|
3. Distribute the torrent to all peers:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ ansible-playbook -i prodction deploy.yml
|
$ ansible-playbook -i prodction deploy.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Stop the seeder and tracker:
|
4. Stop the seeder and tracker:
|
||||||
|
|
||||||
```bash:
|
```bash:
|
||||||
$ ansible-playbook -i prodction stop_seeder_and_tracker.yml
|
$ ansible-playbook -i prodction stop_seeder_and_tracker.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
When this finishes, all peers will have the files in /opt/hoge/Deploy1
|
When this finishes, all peers will have the files in /opt/hoge/Deploy1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user