Skip to content

Commit

Permalink
add: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ak1ra24 committed Jan 5, 2020
1 parent aa2aca2 commit 7b7db02
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@

Go implement of [slankdev/tinet](https://github.com/slankdev/tinet).

:warning: Operation check is still
## Requirements

- docker
- graphviz (if you want to use `tn img`)

## Install

## Setup
```
wget https://github.com/ak1ra24/tinet-go/releases/download/v0.0.0/tinet-go_linux_amd64.tar.gz -P /tmp
tar zxvf /tmp/tinet-go_linux_amd64.tar.gz -C /usr/local/bin
```

## Usage

```
tn up -c spec.yaml | sudo sh -x
tn conf -c spec.yaml | sudo sh -x
Expand All @@ -23,7 +28,7 @@ tn down -c spec.yaml | sudo sh -x
## Command Options

```
➜ tn
➜ tn
tinet is network simultulator created by docker
Usage:
Expand Down Expand Up @@ -54,4 +59,8 @@ Flags:
Use "tn [command] --help" for more information about a command.
```
```

## Links

- [Command Line Usage Example](docs/command-line-usage-example.md)
112 changes: 112 additions & 0 deletions docs/command-line-usage-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Command Line Usage Example

## tn build
That hasn't been implemented yet.

## tn check
```
## Check link node to node
tn check -c spec.yaml
```

## tn conf
```
tn conf -c spec.yaml
## docker and netns exec config
tn conf -c spec.yaml | sudo sh -x
```

## tn down
```
tn down -c spec.yaml
## Remove docker container and netns
tn conf -c spec.yaml | sudo sh -x
```

## tn exec
That hasn't been implemented yet.

## tn help
```
tn help
tn -h
```

## tn img
```
## Output dot
tn img -c spec.yaml
## Generate img file
tn img -c spec.yaml | dot -Tpng > spec.png
```

## tn init
```
## Output tinet config template
tn init
## Generate Tinet config file
tn init > spec.yaml
```

## tn print
```
tn print -c spec.yaml
```

## tn ps
```
## Output docker and netns info cmd
tn ps -c spec.yaml
## Output docker and netns info
tn ps -c spec.yaml | sudo sh -x
```

## tn pull
```
tn pull -c spec.yaml
## Execute docker pull
tn pull -c spec.yaml | sudo sh -x
```

## tn reconf
```
tn reconf -c spec.yaml
## down, up, conf
tn reconf -c spec.yaml | sudo sh -x
```

## tn reup
```
tn reup -c spec.yaml
## down, up
tn reup -c spec.yaml | sudo sh -x
```

## tn up
```
tn up -c spec.yaml
## up
tn up -c spec.yaml | sudo sh -x
```

## tn upconf
```
tn upconf -c spec.yaml
## up, conf
tn upconf -c spec.yaml | sudo sh -x
```

## tn version
```
tn version
```

0 comments on commit 7b7db02

Please sign in to comment.