View instance information on all supported cloud providers
Project description
# cloudview
View instance information on all supported cloud providers: Amazon Web Services, Azure, Google Compute Platform & OpenStack.
[![Build Status](https://travis-ci.org/ricardobranco777/cloudview.svg?branch=master)](https://travis-ci.org/ricardobranco777/cloudview)
## Usage
```
Usage: cloudview [OPTIONS]
Options:
-h, --help show this help message and exit
-l, --log debug|info|warning|error|critical
-o, --output text|html|json|JSON output type
-p, --port PORT run a web server on port PORT
-r, --reverse reverse sort
-s, --sort name|time|status sort type
-S, --status stopped|running|all filter by instance status
-T, --time TIME_FORMAT time format as used by strftime(3)
-v, --verbose be verbose
-V, --version show version and exit
Filter options:
--filter-aws NAME VALUE may be specified multiple times
--filter-azure FILTER Filter for Azure
--filter-gcp FILTER Filter for GCP
--filter-nova NAME VALUE may be specified multiple times
```
**NOTES**:
- Use `--output JSON` to dump _all_ available information received from each provider.
- Remember to set these environment variables:
- `GOOGLE_APPLICATION_CREDENTIALS`
- `AZURE_TENANT_ID`
- `AZURE_SUBSCRIPTION_ID`
- `AZURE_CLIENT_SECRET`
- `AZURE_CLIENT_ID`
- `OS_USERNAME`
- `OS_PASSWORD`
- `OS_PROJECT_ID`
- `OS_AUTH_URL`
- `OS_USER_DOMAIN_NAME`
- `OS_CACERT`
This script is best run with Docker to have all dependencies in just one package, but it may be run stand-alone on systems with Python 3.5+
## To run stand-alone:
```
pip3 install --user cloudview
```
## To run with Docker:
Build image with:
```
docker build -t cloud --pull .
```
Export the variables listed in the [.dockerenv](.dockerenv) file and run with:
```
docker run --rm -v ~/.aws:/root/.aws:ro -v "$GOOGLE_APPLICATION_CREDENTIALS:$GOOGLE_APPLICATION_CREDENTIALS:ro" --env-file .dockerenv cloudview --status all
```
## Run the web server with [Docker Compose](https://docs.docker.com/compose/install/):
If you have a TLS key pair, rename the certificate to `cert.pem`, the private key to `key.pem` and the file containing the password to the private key to `key.txt`. Then edit the [docker-compose.yml](docker-compose.yml) file to mount them to `/etc/nginx/ssl` in read-only mode like this: `- "/path/to/tls:/etc/nginx/ssl:ro"`.
If you don't have a TLS key pair, a self-signed certificate will be generated. Be aware of the typical problems with time resolution related to TLS certificates.
```
docker-compose up -d
```
Now browse to [https://localhost:8443](https://localhost:8443)
To stop the web server:
```
docker-compose down
```
To rebuild with latest version:
```
docker-compose build --pull
```
## TODO
- Search by tag
- Sort by instance type
- Use apache-libcloud?
- Improve documentation with use cases
View instance information on all supported cloud providers: Amazon Web Services, Azure, Google Compute Platform & OpenStack.
[![Build Status](https://travis-ci.org/ricardobranco777/cloudview.svg?branch=master)](https://travis-ci.org/ricardobranco777/cloudview)
## Usage
```
Usage: cloudview [OPTIONS]
Options:
-h, --help show this help message and exit
-l, --log debug|info|warning|error|critical
-o, --output text|html|json|JSON output type
-p, --port PORT run a web server on port PORT
-r, --reverse reverse sort
-s, --sort name|time|status sort type
-S, --status stopped|running|all filter by instance status
-T, --time TIME_FORMAT time format as used by strftime(3)
-v, --verbose be verbose
-V, --version show version and exit
Filter options:
--filter-aws NAME VALUE may be specified multiple times
--filter-azure FILTER Filter for Azure
--filter-gcp FILTER Filter for GCP
--filter-nova NAME VALUE may be specified multiple times
```
**NOTES**:
- Use `--output JSON` to dump _all_ available information received from each provider.
- Remember to set these environment variables:
- `GOOGLE_APPLICATION_CREDENTIALS`
- `AZURE_TENANT_ID`
- `AZURE_SUBSCRIPTION_ID`
- `AZURE_CLIENT_SECRET`
- `AZURE_CLIENT_ID`
- `OS_USERNAME`
- `OS_PASSWORD`
- `OS_PROJECT_ID`
- `OS_AUTH_URL`
- `OS_USER_DOMAIN_NAME`
- `OS_CACERT`
This script is best run with Docker to have all dependencies in just one package, but it may be run stand-alone on systems with Python 3.5+
## To run stand-alone:
```
pip3 install --user cloudview
```
## To run with Docker:
Build image with:
```
docker build -t cloud --pull .
```
Export the variables listed in the [.dockerenv](.dockerenv) file and run with:
```
docker run --rm -v ~/.aws:/root/.aws:ro -v "$GOOGLE_APPLICATION_CREDENTIALS:$GOOGLE_APPLICATION_CREDENTIALS:ro" --env-file .dockerenv cloudview --status all
```
## Run the web server with [Docker Compose](https://docs.docker.com/compose/install/):
If you have a TLS key pair, rename the certificate to `cert.pem`, the private key to `key.pem` and the file containing the password to the private key to `key.txt`. Then edit the [docker-compose.yml](docker-compose.yml) file to mount them to `/etc/nginx/ssl` in read-only mode like this: `- "/path/to/tls:/etc/nginx/ssl:ro"`.
If you don't have a TLS key pair, a self-signed certificate will be generated. Be aware of the typical problems with time resolution related to TLS certificates.
```
docker-compose up -d
```
Now browse to [https://localhost:8443](https://localhost:8443)
To stop the web server:
```
docker-compose down
```
To rebuild with latest version:
```
docker-compose build --pull
```
## TODO
- Search by tag
- Sort by instance type
- Use apache-libcloud?
- Improve documentation with use cases
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cloudview-0.2.4.tar.gz
(12.6 kB
view details)
Built Distribution
cloudview-0.2.4-py3-none-any.whl
(19.6 kB
view details)
File details
Details for the file cloudview-0.2.4.tar.gz
.
File metadata
- Download URL: cloudview-0.2.4.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c713cca101decdb3e4cf165646f799e97aa91f8166138576a227be5f729c7c2e |
|
MD5 | b2ae3c16ff6df302b1fc0f6f1456af7c |
|
BLAKE2b-256 | 8ba2e296199d241a900d07c2f393a682a7f5e668d1e31d7b6276da84326b36b3 |
File details
Details for the file cloudview-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: cloudview-0.2.4-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 532fb29103cc053cfde1d1d72efcf7d88f723bc5c4decfe59d377f28de6ce663 |
|
MD5 | 102bcd30c7d3c8df638846374c57ec37 |
|
BLAKE2b-256 | 0defe5b3c04731d86e0ae9ebb9c9270ea2d9d42c70b68df0a2cc9cc4db73e913 |