mirror of
https://github.com/bluxmit/alnoda-workspaces.git
synced 2024-06-29 11:40:21 +12:00
infra-wid, more tooling
This commit is contained in:
parent
807dc0fbae
commit
5bccb02f86
|
@ -81,8 +81,24 @@ RUN echo "------------------------------------------------------ ara" \
|
|||
&& cd /tmp && curl -Lo ./terrascan.tar.gz https://github.com/accurics/terrascan/releases/download/v1.9.0/terrascan_1.9.0_Linux_x86_64.tar.gz \
|
||||
&& tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz \
|
||||
&& install terrascan /usr/local/bin && rm terrascan \
|
||||
&& echo "------------------------------------------------------ terraform-visual" \
|
||||
&& cd /tmp && curl -sL https://deb.nodesource.com/setup_12.x | -E bash - \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y nodejs \
|
||||
&& apt-get install -y yarn \
|
||||
&& npm install -g @terraform-visual/cli \
|
||||
&& echo "------------------------------------------------------ terraform inframap" \
|
||||
&& cd /tmp && curl -Lo ./terraform-inframap.tar.gz https://github.com/cycloidio/inframap/releases/download/v0.6.7/inframap-linux-amd64.tar.gz \
|
||||
&& tar -xzf terraform-inframap.tar.gz && rm terraform-inframap.tar.gz \
|
||||
&& chmod +x inframap-linux-amd64 \
|
||||
&& mv inframap-linux-amd64 /usr/bin/inframap \
|
||||
&& echo "------------------------------------------------------ terraform rover" \
|
||||
&& cd /tmp && curl -Lo ./terraform-rover.zip https://github.com/im2nguyen/rover/releases/download/v0.1.6/rover_0.1.6_linux_amd64.zip \
|
||||
&& unzip /tmp/terraform-rover.zip -d /tmp/rover && rm terraform-rover.zip \
|
||||
&& chmod +x /tmp/rover/rover_v0.1.6 \
|
||||
&& mv /tmp/rover/rover_v0.1.6 /usr/bin/rover \
|
||||
&& rm -rf /tmp/rover \
|
||||
&& echo "------------------------------------------------------ mkdocs" \
|
||||
|
||||
&& echo "------------------------------------------------------ user" \
|
||||
&& chown -R abc /home/abc/.ara/server \
|
||||
&& chown -R abc /opt/theia \
|
||||
|
|
57
workspaces/infra-workspace/docs/tooling.md
Normal file
57
workspaces/infra-workspace/docs/tooling.md
Normal file
|
@ -0,0 +1,57 @@
|
|||
## Ansible tools
|
||||
|
||||
|
||||
|
||||
## Terraform tools
|
||||
|
||||
|
||||
### Pre-commit hook
|
||||
|
||||
|
||||
### [Blast-Radius](https://github.com/28mm/blast-radius)
|
||||
Serves folder `/home/terraform`
|
||||
|
||||
In order to serve another terraform folder, for example `/home/project/my-terraform`
|
||||
```
|
||||
blast-radius --serve --port 8033 /home/project/my-terraform
|
||||
```
|
||||
|
||||
### [Terraform Visual](https://github.com/hieven/terraform-visual)
|
||||
|
||||
- Generate Terraform plan in json
|
||||
```
|
||||
terraform plan -out=plan.out # Run plan and output as a file
|
||||
terraform show -json plan.out > plan.json # Read plan file and output it in JSON format
|
||||
```
|
||||
- Generate Terraform-visual report
|
||||
```
|
||||
terraform-visual --plan plan.json
|
||||
```
|
||||
|
||||
### [Terraform Graph](https://www.terraform.io/docs/cli/commands/graph.html)
|
||||
|
||||
- Create report
|
||||
```
|
||||
terraform graph | dot -Tsvg > graph.svg
|
||||
```
|
||||
|
||||
|
||||
### [Inframap](https://github.com/cycloidio/inframap)
|
||||
|
||||
- Visualize terraform state
|
||||
```
|
||||
inframap generate terraform.tfstate | dot -Tpng > graph.png
|
||||
```
|
||||
|
||||
|
||||
### [Rover](https://github.com/im2nguyen/rover)
|
||||
|
||||
- serve terraform visualisation
|
||||
```
|
||||
rover --workingDir /home/terraform
|
||||
```
|
||||
NOTE: Rover serves only on port 9000
|
||||
|
||||
## Tutorials
|
||||
|
||||
- [Deploy Cloud Instances with Packer and Terraform](https://www.scaleway.com/en/docs/deploy-cloud-servers-with-packer-and-terraform/)
|
|
@ -8,3 +8,7 @@ logfile_maxbytes = 1024
|
|||
[program:blast-radius]
|
||||
directory=/home/terraform
|
||||
command=/bin/sh -c " blast-radius --serve --port 8030 /home/terraform "
|
||||
|
||||
[program:rover]
|
||||
directory=/home/terraform
|
||||
command=/bin/sh -c " rover --workingDir /home/terraform "
|
Loading…
Reference in a new issue