dd500ec1ab4516a7e9a58565c6b584b9f276faf2 — Louis Solofrizzo 7 months ago 8e83016
Documentation: Add basic documentation

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
A doc/docs/SSH.md => doc/docs/SSH.md +32 -0
@@ 0,0 1,32 @@
+ ## `csc ssh add`
+ 
+ Add an ssh key to your account.
+ 
+ ```
+ $> csc ssh add ~/.ssh/id_rsa.pub
+ ```
+ 
+ ## `csc ssh list`
+ 
+ List your ssh keys
+ 
+ ```
+ $> csc ssh list
+ +-------------------------------------------------+------------------------------+
+ |                   FINGERPRINT                   |          CREATED AT          |
+ +-------------------------------------------------+------------------------------+
+ | ca:3f:b3:85:f0:4a:dd:97:b8:8a:83:e2:f2:92:9e:2d | Sun Oct 13 20:31:22 UTC 2019 |
+ +-------------------------------------------------+------------------------------+
+ ```
+ 
+ **Options**
+ 
+ - `--key-only`: Only dump the content of the public key
+ 
+ ## `csc ssh delete`
+ 
+ Delete a key from your account
+ 
+ ```
+ $> csc ssh delete ca:3f:b3:85:f0:4a:dd:97:b8:8a:83:e2:f2:92:9e:2d
+ ```

A doc/docs/admin.md => doc/docs/admin.md +216 -0
@@ 0,0 1,216 @@
+ ## `csc admin instance create`
+ 
+ Create a new type of instance
+ 
+ ```
+ $> csc admin instance create EC2
+ ```
+ 
+ ## `csc admin instance delete`
+ 
+ Delete a type of instance
+ 
+ ```
+ $> csc admin delete EC2
+ ```
+ 
+ ## `csc admin instance list`
+ 
+ Get a list of instance types
+ 
+ ```
+ $> csc admin instance list
+ +------+--------------+-----+---------+-----------------+---------+
+ | NAME | ARCHITECTURE | CPU | MEMORY  |      TYPE       | ENABLED |
+ +------+--------------+-----+---------+-----------------+---------+
+ | I-0  | x86_64       |   1 | 256MB   | container       | true    |
+ | I-1  | x86_64       |   2 | 2048MB  | container       | true    |
+ | I-2  | x86_64       |   4 | 8192MB  | container       | true    |
+ | I-3  | x86_64       |   8 | 16384MB | container       | true    |
+ | I-4  | x86_64       |  16 | 32768MB | container       | true    |
+ | A-0  | arm          |   1 | 256MB   | container       | false   |
+ | A-1  | arm          |   2 | 1024MB  | container       | false   |
+ | A-2  | arm          |   2 | 2048MB  | container       | false   |
+ | V-0  | x86_64       |   1 | 256MB   | virtual-machine | false   |
+ | V-1  | x86_64       |   2 | 2048MB  | virtual-machine | false   |
+ | V-2  | x86_64       |   4 | 8192MB  | virtual-machine | false   |
+ | V-3  | x86_64       |   8 | 16384MB | virtual-machine | false   |
+ | V-4  | x86_64       |  16 | 32768MB | virtual-machine | false   |
+ +------+--------------+-----+---------+-----------------+---------+
+ ```
+ 
+ ## `csc admin instance update architecture`
+ 
+ Update the architecture of an instance type
+ 
+ ```
+ $> csc admin instance update architecture EC2 [arm/x86_64]
+ ```
+ 
+ ## `csc admin instance update cpu`
+ 
+ Update the number of allocated CPUs of an instance
+ 
+ ```
+ $> csc admin instance update cpu EC2 4
+ ```
+ 
+ ## `csc admin instance update enable`
+ 
+ Change the visibility of an instance type
+ 
+ ```
+ $> csc admin instance update enable EC2 [true/false]
+ ```
+ 
+ ## `csc admin instance update memory`
+ 
+ Change the allocated memory of an instance, in MB:
+ 
+ ```
+ $> csc admin instance update memory EC2 2048
+ ```
+ 
+ ## `csc admin instance update type`
+ 
+ Update the type of an instance
+ 
+ ```
+ $> csc admin instance update type EC2 [virtual-machine/container]
+ ```
+ 
+ ## `csc admin quotas create`
+ 
+ Create a quota
+ 
+ ```
+ $> csc admin quotas create newbie
+ ```
+ 
+ ## `csc admin quotas delete`
+ 
+ Delete a quota
+ 
+ ```
+ $> csc admin quotas delete newbie
+ ```
+ 
+ ## `csc admin quotas list`
+ 
+ List quotas
+ 
+ ```
+ $> csc admin quotas list                                                                                                1 ↵
+ +--------+-----------+------+---------+---------+
+ |  ROLE  | INSTANCES | IPV4 | STORAGE | INVITES |
+ +--------+-----------+------+---------+---------+
+ | admin  |        -1 |    5 |      -1 |       5 |
+ | newbie |         1 |    1 |      50 |       1 |
+ +--------+-----------+------+---------+---------+
+ ```
+ 
+ ## `csc admin quotas update instances`
+ 
+ Update the instances quotas of a quota
+ 
+ ```
+ $> csc admin quotas update instances newbie 1
+ $> csc admin quotas update instances newbie infinite
+ ```
+ 
+ ## `csc admin quotas update invites`
+ 
+ Update the invites quotas of a quota
+ 
+ ```
+ $> csc admin quotas update invites newbie 1
+ $> csc admin quotas update invites newbie infinite
+ ```
+ 
+ ## `csc admin quotas update storage`
+ 
+ Update the storage quotas of a quota, in GB
+ 
+ ```
+ $> csc admin quotas update storage newbie 100
+ $> csc admin quotas update storage newbie infinite
+ ```
+ 
+ ## `csc admin user get`
+ 
+ Get admin info on an user
+ 
+ ```
+ $> csc admin user get louis
+ User Infos:
+     Username   : louis
+     Email      : louis@ne02ptzero.me
+     Role       : admin
+     Created at : 2019-10-11 16:25:45.471835596 +0000 UTC
+ Quotas:
+     Instances : 3 / Infinite
+     IPV4      : 2 / 5
+     Storage   : 450 / Infinite
+     Invites   : 1 / 5
+ Tokens (1):
+     Token created at 2019-10-11 16:25:45.484774181 +0000 UTC:
+         Key         : 95c2c6da-64cf-4bb1-883d-5b918206f8c2
+         Secret      : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+         Description : Initialization admin credentials
+ Instances (3):
+     3bdb2202-3b44-42b7-bbb4-57d1aa8d6b38:
+         Name         : ne02ptzero-git
+         Size         : 200GB
+         OS           : archlinux/current
+         Type         : I-2
+         Created      : 2019-10-13 16:25:45.484774181 +0000 UTC
+     0542c574-2c85-4d5e-959f-1ca910f798fa:
+         Name         : minecraft
+         Size         : 50GB
+         OS           : debian/stretch
+         Type         : I-3
+         Created      : 2019-10-19 13:45:19.953032411 +0000 UTC
+     4f3b3970-adb9-45ea-a652-442c53d3b520:
+         Name         : kart
+         Size         : 200GB
+         OS           : archlinux/current
+         Type         : I-1
+         Created      : 2019-10-27 19:05:05.816168404 +0000 UTC
+ SSH Keys (1):
+     Key ca:3f:b3:85:f0:4a:dd:97:b8:8a:83:e2:f2:92:9e:2d:
+         Created : 2019-10-13 20:31:22.374954485 +0000 UTC
+         Key     : ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZL7G12BOhQwDBph0tGaqz52T5PUnBQXJkK6SmEFrcK8WrIBZV3fzLB25f3rUNW+O2/iOmS69mzlhudPPDgEC4lQvYPoXXCUw28y5UUKt+fAQ7LfmM8XAlW7+Zs4GViMQg++BXc8CpMsFL8P/J4YjLVhYJAiztNjJ6moKf6k9gRFn6s/3ck/eoozt2AgRhTcNHkdYJ4bxyPL0dqc9/DoQyHSLNCdwz27l7MaT08gCLX/1aozdcj0oa8vZZwYRKd1FGLbuzAsSycaX5sikZDDIvGY1beCZjYuWIvZa41iemAkVI1lolSe4mQrlH5AwT3ucy023gU8XEoUoHbYafEMiN louis@MacBook-Pro-de-Louis.local
+ 
+ IPv4s (2):
+     IP created 2019-10-13 16:25:45.484774181 +0000 UTC at:
+         IP       : 51.158.107.126
+         Instance : 3bdb2202-3b44-42b7-bbb4-57d1aa8d6b38
+     IP created 0001-01-01 00:00:00 +0000 UTC at:
+         IP       : 51.158.71.82
+         Instance : 4f3b3970-adb9-45ea-a652-442c53d3b520
+ Invites (1):
+     Invite created at 2019-11-16 23:28:43.461243757 +0000 UTC:
+         Email   : tifox@tifox.fr
+         Claimed : true
+ ```
+ ## `csc admin user list`
+ 
+ List every user on the plaform
+ 
+ ```
+ $> csc admin user list
+ +----------+---------------------+-------+
+ | USERNAME |        EMAIL        | ROLE  |
+ +----------+---------------------+-------+
+ | louis    | louis@ne02ptzero.me | admin |
+ | tifox    | tifox@tifox.fr      | admin |
+ +----------+---------------------+-------+
+ ```
+ 
+ ## `csc admin user set-role`
+ 
+ Update the quota (or role) of an user
+ 
+ ```
+ $> csc admin user set-role louis admin
+ ```

A doc/docs/image.md => doc/docs/image.md +12 -0
@@ 0,0 1,12 @@
+ ## `csc image list`
+ 
+ List system images
+ 
+ ```
+ $> csc image list
+ +-------------------+------------------------------------------------------------------+--------------+-----------+
+ |       NAME        |                           FINGERPRINT                            | ARCHITECTURE |   SIZE    |
+ +-------------------+------------------------------------------------------------------+--------------+-----------+
+ | archlinux/current | 3113f514ada143fe875f986c386c1f2b9f2980d2190912d305b40db44c5992c5 | x86_64       | 379201983 |
+ +-------------------+------------------------------------------------------------------+--------------+-----------+
+ ```

A doc/docs/index.md => doc/docs/index.md +10 -0
@@ 0,0 1,10 @@
+ # Cisco Documentation
+ 
+ ## Command line
+ 
+ - admin
+ - image
+ - instances
+ - invite
+ - ssh
+ - token

A doc/docs/instance.md => doc/docs/instance.md +112 -0
@@ 0,0 1,112 @@
+ ## `csc instance delete`
+ 
+ Delete an instance
+ 
+ ```
+ $> csc instance delete test
+ ```
+ 
+ ## `csc instance destroy`
+ 
+ Destroy (stop and deletes) an instance
+ 
+ ```
+ $> csc instance destroy test
+ ```
+ 
+ ## `csc instance launch`
+ 
+ Create and start an instance
+ 
+ ```
+ $> csc instance launch [name] [image] [type]
+ $> csc instance launch test archlinux/current I-0
+ ```
+ 
+ **Options:**
+ 
+ - `--size`: Set the size of the instance root disk, in GB
+ 
+ ## `csc instance list`
+ 
+ List instances
+ 
+ ```
+ $> csc instance list                                                                                                    1 ↵
+ +----------------+---------+------+-------------------+-------------------------------------+-------+
+ |      NAME      | STATUS  | TYPE |        OS         |                IPV6                 | SIZE  |
+ +----------------+---------+------+-------------------+-------------------------------------+-------+
+ | ne02ptzero-git | Running | I-2  | archlinux/current | 2001:470:c85d:32:216:3eff:fe58:e4a1 | 200GB |
+ | minecraft      | Running | I-3  | debian/stretch    | 2001:470:c85d:32:216:3eff:fec9:8563 | 50GB  |
+ | kart           | Running | I-1  | archlinux/current | 2001:470:c85d:32:216:3eff:fe8a:34ed | 200GB |
+ +----------------+---------+------+-------------------+-------------------------------------+-------+
+ ```
+ 
+ ## `csc instance new`
+ 
+ Create a new instance
+ 
+ ```
+ $> csc instance new [name] [image] [type]
+ $> csc instance new test archlinux/current I-0
+ ```
+ 
+ **Options:**
+ 
+ - `--size`: Set the size of the instance root disk, in GB
+ 
+ ## `csc instance restart`
+ 
+ Restart an instance
+ 
+ ```
+ $> csc instance restart test
+ ```
+ 
+ ## `csc instance start`
+ 
+ Start an instance
+ 
+ ```
+ $> csc instance start test
+ ```
+ 
+ ## `csc instance stop`
+ 
+ Stop an instance
+ 
+ ```
+ $> csc instance stop test
+ ```
+ ## `csc instance types`
+ 
+ List instance types
+ 
+ ```
+ $> csc instance types
+ +------+--------------+-----+---------+-----------+
+ | NAME | ARCHITECTURE | CPU | MEMORY  |   TYPE    |
+ +------+--------------+-----+---------+-----------+
+ | I-0  | x86_64       |   1 | 256MB   | container |
+ | I-1  | x86_64       |   2 | 2048MB  | container |
+ | I-2  | x86_64       |   4 | 8192MB  | container |
+ | I-3  | x86_64       |   8 | 16384MB | container |
+ | I-4  | x86_64       |  16 | 32768MB | container |
+ +------+--------------+-----+---------+-----------+
+ ```
+ 
+ ## `csc instance set size`
+ 
+ Change the root size of an instance disk, in GB
+ 
+ ```
+ $> csc instance set size test 100
+ ```
+ 
+ ## `csc instance set type`
+ 
+ Change the type of an instance
+ 
+ ```
+ $> csc instance set type test I-1
+ ```

A doc/docs/invite.md => doc/docs/invite.md +15 -0
@@ 0,0 1,15 @@
+ ## `csc invite claim`
+ 
+ Claim an invite, and create your account
+ 
+ ```
+ $> csc invite claim b01379c67fc53ec9a7ee83891ef9dccf52ae25b0b5b8af07fe3e637143b5bc3e
+ ```
+ 
+ ## `csc invite new`
+ 
+ Invite someone to use the platform
+ 
+ ```
+ $> csc invite new name@mail.com
+ ```

A doc/docs/token.md => doc/docs/token.md +35 -0
@@ 0,0 1,35 @@
+ ## `csc token new`
+ 
+ Add a new public/secret pair to you account
+ 
+ ```
+ $> csc token new
+ Username: louis
+ Password:
+ Description (can be empty): Example
+ ===== TOKEN =====
+ key: cbf7b535-44c4-4958-932e-1ad3f6c64628
+ secret: 27fdf100f141f7ed3e50a11c0e3df9126c34b1c5c7319b08eac9e1ae8fbc3cee
+ This is the only time you will see this secret. Do not loose it!
+ ```
+ 
+ ## `csc token list`
+ 
+ List your tokens
+ 
+ ```
+ $> csc token list
+ +--------------------------------------+--------------------------------+------------------------------+
+ |                 KEY                  |          DESCRIPTION           |          CREATED AT          |
+ +--------------------------------------+--------------------------------+------------------------------+
+ | cbf7b535-44c4-4958-932e-1ad3f6c64628 | Example                        | Fri Nov 22 12:47:55 UTC 2019 |
+ +--------------------------------------+--------------------------------+------------------------------+
+ ```
+ 
+ ## `csc token revoke`
+ 
+ Revoke a token
+ 
+ ```
+ $> csc token revoke cbf7b535-44c4-4958-932e-1ad3f6c64628
+ ```

A doc/mkdocs.yml => doc/mkdocs.yml +3 -0
@@ 0,0 1,3 @@
+ site_name: Cisco Documentation
+ theme:
+   name: readthedocs