технология_terraform

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
технология_terraform [2024/07/20 05:48]
val [terraform-provider-lxc]
технология_terraform [2025/02/13 12:07] (current)
val [Управление проектом]
Line 75: Line 75:
 ==== Простой проект ==== ==== Простой проект ====
 <​code>​ <​code>​
-~/nodes# cp network-config network-config.tftpl 
- 
 ~/nodes# cat meta-data.tftpl ~/nodes# cat meta-data.tftpl
 </​code><​code>​ </​code><​code>​
 local-hostname:​ ${name} local-hostname:​ ${name}
 </​code><​code>​ </​code><​code>​
 +~/nodes# cp network-config network-config.tftpl
 +
 ~/nodes# cat network-config.tftpl ~/nodes# cat network-config.tftpl
 </​code><​code>​ </​code><​code>​
Line 192: Line 192:
  
 ~/nodes# terraform apply #​-auto-approve ~/nodes# terraform apply #​-auto-approve
 +
 +~/nodes# virsh list --all
  
 ~/nodes# virsh console --domain domain-node1 ~/nodes# virsh console --domain domain-node1
 +
 +~/nodes# virsh vncdisplay domain-node1
  
 ~/nodes# terraform state list ~/nodes# terraform state list
  
 ~/nodes# terraform state show libvirt_domain.domain-node1 ~/nodes# terraform state show libvirt_domain.domain-node1
- +... 
-~/nodes# virsh vncdisplay domain-node1+    ​network_interface { 
 +            addresses 
 +...
  
 ~/nodes# terraform destroy #​-auto-approve ~/nodes# terraform destroy #​-auto-approve
 +
 +~/nodes# ###virsh destroy domain-nodeN
 +~/nodes# ###virsh undefine --domain domain-nodeN
  
 ~/nodes# ### rm -r .terraform .terraform.lock.hcl terraform.tfstate terraform.tfstate.backup ~/nodes# ### rm -r .terraform .terraform.lock.hcl terraform.tfstate terraform.tfstate.backup
Line 241: Line 250:
 local-hostname:​ ${name} local-hostname:​ ${name}
 </​code><​code>​ </​code><​code>​
 +home-computer:​~/​nodes#​ ip r
 +home-computer:​~/​nodes#​ cat /​etc/​resolv.conf
 +
 home-computer:​~/​nodes#​ cat network-config.tftpl home-computer:​~/​nodes#​ cat network-config.tftpl
 </​code><​code>​ </​code><​code>​
Line 256: Line 268:
       addresses: [192.168.X.10]       addresses: [192.168.X.10]
 </​code><​code>​ </​code><​code>​
 +home-computer:​~/​nodes#​ mv node1.tf nodes.tf
 +
 home-computer:​~/​nodes#​ cat nodes.tf home-computer:​~/​nodes#​ cat nodes.tf
 </​code><​code>​ </​code><​code>​
технология_terraform.1721443735.txt.gz · Last modified: 2024/07/20 05:48 by val