Compare commits
	
		
			3 Commits
		
	
	
		
			main
			...
			9e19fd56ab
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					9e19fd56ab | ||
| 
						 | 
					3dfd046850 | ||
| 
						 | 
					2da11078f0 | 
@@ -2,6 +2,11 @@ name: DEPLOY VM at proxmox
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					    inputs:
 | 
				
			||||||
 | 
					      vm_id:
 | 
				
			||||||
 | 
					        description: 'ID virtuálního stroje'
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					        default: '244'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  deploy:
 | 
					  deploy:
 | 
				
			||||||
@@ -17,8 +22,9 @@ jobs:
 | 
				
			|||||||
          password: ${{ secrets.PASSWORD }}
 | 
					          password: ${{ secrets.PASSWORD }}
 | 
				
			||||||
          port: 22
 | 
					          port: 22
 | 
				
			||||||
          script: |
 | 
					          script: |
 | 
				
			||||||
 | 
					            vm_id=${{ github.event.inputs.vm_id }}
 | 
				
			||||||
            pveversion
 | 
					            pveversion
 | 
				
			||||||
            qm create 244 --name k8s01DEV --memory 12288 --net0 virtio,bridge=vmbr0 --cores 4 --sockets 2 --ostype l26
 | 
					            qm create 244 --name k8s01DEViscsi --memory 12288 --net0 virtio,bridge=vmbr0 --cores 4 --sockets 2 --ostype l26
 | 
				
			||||||
            qm set 244 --bios seabios
 | 
					            qm set 244 --bios seabios
 | 
				
			||||||
            qm importdisk 244 /mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img iSCSIsynologyLVM
 | 
					            qm importdisk 244 /mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img iSCSIsynologyLVM
 | 
				
			||||||
            qm set 244 --virtio0 iSCSIsynologyLVM:vm-244-disk-0
 | 
					            qm set 244 --virtio0 iSCSIsynologyLVM:vm-244-disk-0
 | 
				
			||||||
@@ -30,4 +36,16 @@ jobs:
 | 
				
			|||||||
            qm set 244 --agent enabled=1
 | 
					            qm set 244 --agent enabled=1
 | 
				
			||||||
            qm resize 244 virtio0 +30G
 | 
					            qm resize 244 virtio0 +30G
 | 
				
			||||||
            qm start 244
 | 
					            qm start 244
 | 
				
			||||||
             
 | 
					             
 | 
				
			||||||
 | 
					            qm create $vm_id --name k8s01DEV --memory 12288 --net0 virtio,bridge=vmbr0 --cores 4 --sockets 2 --ostype l26
 | 
				
			||||||
 | 
					            qm set $vm_id --bios seabios
 | 
				
			||||||
 | 
					            qm importdisk $vm_id /mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img iSCSIsynologyLVM
 | 
				
			||||||
 | 
					            qm set $vm_id --virtio0 iSCSIsynologyLVM:$vm_id/vm-$vm_id-disk-0.raw
 | 
				
			||||||
 | 
					            qm set $vm_id --ide2 iSCSIsynologyLVM:cloudinit
 | 
				
			||||||
 | 
					            qm set $vm_id --boot order=virtio0
 | 
				
			||||||
 | 
					            qm set $vm_id --ipconfig0 ip=192.168.11.$((vm_id%255))/24,gw=192.168.11.1
 | 
				
			||||||
 | 
					            qm set $vm_id --ciuser chs --cipassword genius
 | 
				
			||||||
 | 
					            qm set $vm_id --sshkey <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZn0A7BiDckpYHS8qgphNHc7hpx4/Ml1iQ4KI1FTtpa Ansible key")
 | 
				
			||||||
 | 
					            qm set $vm_id --agent enabled=1
 | 
				
			||||||
 | 
					            qm start $vm_id
 | 
				
			||||||
 | 
					            qm resize $vm_id virtio0 +30G
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,22 +0,0 @@
 | 
				
			|||||||
name: Create VM at proxmox
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  deploy:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Deploying VM to Proxmox 
 | 
					 | 
				
			||||||
        uses: appleboy/ssh-action@v1.2.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          host: 192.168.11.102
 | 
					 | 
				
			||||||
          username: root
 | 
					 | 
				
			||||||
          password: ${{ secrets.PASSWORD }}
 | 
					 | 
				
			||||||
          port: 22
 | 
					 | 
				
			||||||
          script: |
 | 
					 | 
				
			||||||
            pveversion
 | 
					 | 
				
			||||||
            qm stop 242
 | 
					 | 
				
			||||||
            qm destroy 242
 | 
					 | 
				
			||||||
@@ -1,33 +0,0 @@
 | 
				
			|||||||
name: DEPLOY VM at proxmox
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  deploy:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Deploying VM to Proxmox 
 | 
					 | 
				
			||||||
        uses: appleboy/ssh-action@v1.2.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          host: 192.168.11.102
 | 
					 | 
				
			||||||
          username: root
 | 
					 | 
				
			||||||
          password: ${{ secrets.PASSWORD }}
 | 
					 | 
				
			||||||
          port: 22
 | 
					 | 
				
			||||||
          script: |
 | 
					 | 
				
			||||||
            pveversion
 | 
					 | 
				
			||||||
            qm create 242 --name k8s02DEV --memory 12288 --net0 virtio,bridge=vmbr0 --cores 4 --sockets 2 --ostype l26
 | 
					 | 
				
			||||||
            qm set 242 --bios seabios
 | 
					 | 
				
			||||||
            qm importdisk 242 /mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img iSCSIsynologyLVM
 | 
					 | 
				
			||||||
            qm set 242 --virtio0 iSCSIsynologyLVM:vm-242-disk-0
 | 
					 | 
				
			||||||
            qm set 242 --ide2 iSCSIsynologyLVM:cloudinit
 | 
					 | 
				
			||||||
            qm set 242 --boot order=virtio0
 | 
					 | 
				
			||||||
            qm set 242 --ipconfig0 ip=192.168.11.242/24,gw=192.168.11.1
 | 
					 | 
				
			||||||
            qm set 242 --ciuser chs --cipassword genius
 | 
					 | 
				
			||||||
            qm set 242 --sshkey <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZn0A7BiDckpYHS8qgphNHc7hpx4/Ml1iQ4KI1FTtpa Ansible key")
 | 
					 | 
				
			||||||
            qm set 242 --agent enabled=1
 | 
					 | 
				
			||||||
            qm resize 242 virtio0 +30G
 | 
					 | 
				
			||||||
            qm start 242
 | 
					 | 
				
			||||||
             
 | 
					 | 
				
			||||||
@@ -1,22 +0,0 @@
 | 
				
			|||||||
name: Create VM at proxmox
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  deploy:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Deploying VM to Proxmox 
 | 
					 | 
				
			||||||
        uses: appleboy/ssh-action@v1.2.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          host: 192.168.11.102
 | 
					 | 
				
			||||||
          username: root
 | 
					 | 
				
			||||||
          password: ${{ secrets.PASSWORD }}
 | 
					 | 
				
			||||||
          port: 22
 | 
					 | 
				
			||||||
          script: |
 | 
					 | 
				
			||||||
            pveversion
 | 
					 | 
				
			||||||
            qm stop 243
 | 
					 | 
				
			||||||
            qm destroy 243
 | 
					 | 
				
			||||||
@@ -1,33 +0,0 @@
 | 
				
			|||||||
name: DEPLOY VM at proxmox
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  deploy:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Deploying VM to Proxmox 
 | 
					 | 
				
			||||||
        uses: appleboy/ssh-action@v1.2.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          host: 192.168.11.102
 | 
					 | 
				
			||||||
          username: root
 | 
					 | 
				
			||||||
          password: ${{ secrets.PASSWORD }}
 | 
					 | 
				
			||||||
          port: 22
 | 
					 | 
				
			||||||
          script: |
 | 
					 | 
				
			||||||
            pveversion
 | 
					 | 
				
			||||||
            qm create 243 --name k8s03DEV --memory 12288 --net0 virtio,bridge=vmbr0 --cores 4 --sockets 2 --ostype l26
 | 
					 | 
				
			||||||
            qm set 243 --bios seabios
 | 
					 | 
				
			||||||
            qm importdisk 243 /mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img iSCSIsynologyLVM
 | 
					 | 
				
			||||||
            qm set 243 --virtio0 iSCSIsynologyLVM:vm-243-disk-0
 | 
					 | 
				
			||||||
            qm set 243 --ide2 iSCSIsynologyLVM:cloudinit
 | 
					 | 
				
			||||||
            qm set 243 --boot order=virtio0
 | 
					 | 
				
			||||||
            qm set 243 --ipconfig0 ip=192.168.11.243/24,gw=192.168.11.1
 | 
					 | 
				
			||||||
            qm set 243 --ciuser chs --cipassword genius
 | 
					 | 
				
			||||||
            qm set 243 --sshkey <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZn0A7BiDckpYHS8qgphNHc7hpx4/Ml1iQ4KI1FTtpa Ansible key")
 | 
					 | 
				
			||||||
            qm set 243 --agent enabled=1
 | 
					 | 
				
			||||||
            qm resize 243 virtio0 +30G
 | 
					 | 
				
			||||||
            qm start 243
 | 
					 | 
				
			||||||
             
 | 
					 | 
				
			||||||
							
								
								
									
										18
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								readme.md
									
									
									
									
									
								
							@@ -1,5 +1,4 @@
 | 
				
			|||||||
## Autmatic Instalation check 140 static ip:
 | 
					## Autmatic Instalation check 140 static ip:
 | 
				
			||||||
First shot of deplyment via bash script
 | 
					 | 
				
			||||||
``` 
 | 
					``` 
 | 
				
			||||||
qm create 140 --name cloudINIT140 --memory 2048 --net0 virtio,bridge=vmbr0 --cores 2 --sockets 1 --ostype l26
 | 
					qm create 140 --name cloudINIT140 --memory 2048 --net0 virtio,bridge=vmbr0 --cores 2 --sockets 1 --ostype l26
 | 
				
			||||||
qm set 140 --bios seabios
 | 
					qm set 140 --bios seabios
 | 
				
			||||||
@@ -12,21 +11,4 @@ qm set 140 --ciuser chs --cipassword genius
 | 
				
			|||||||
qm set 140 --sshkey <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAE39D/Dep3EHMWXB6wiMTL0My1SlMZVk0Y80jEv7LOb xchose@freya.local")
 | 
					qm set 140 --sshkey <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAE39D/Dep3EHMWXB6wiMTL0My1SlMZVk0Y80jEv7LOb xchose@freya.local")
 | 
				
			||||||
qm start 140
 | 
					qm start 140
 | 
				
			||||||
qm resize 140 virtio0 +30G
 | 
					qm resize 140 virtio0 +30G
 | 
				
			||||||
```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Second shot install to iSCSI synology disk:
 | 
					 | 
				
			||||||
First shot of deplyment via bash script
 | 
					 | 
				
			||||||
``` 
 | 
					 | 
				
			||||||
qm create 244 --name k8s01DEV --memory 12288 --net0 virtio,bridge=vmbr0 --cores 4 --sockets 2 --ostype l26
 | 
					 | 
				
			||||||
qm set 244 --bios seabios
 | 
					 | 
				
			||||||
qm importdisk 244 /mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img iSCSIsynologyLVM
 | 
					 | 
				
			||||||
qm set 244 --virtio0 iSCSIsynologyLVM:vm-244-disk-0
 | 
					 | 
				
			||||||
qm set 244 --ide2 iSCSIsynologyLVM:cloudinit
 | 
					 | 
				
			||||||
qm set 244 --boot order=virtio0
 | 
					 | 
				
			||||||
qm set 244 --ipconfig0 ip=192.168.11.244/24,gw=192.168.11.1
 | 
					 | 
				
			||||||
qm set 244 --ciuser chs --cipassword genius
 | 
					 | 
				
			||||||
qm set 244 --sshkey <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZn0A7BiDckpYHS8qgphNHc7hpx4/Ml1iQ4KI1FTtpa Ansible key")
 | 
					 | 
				
			||||||
qm set 244 --agent enabled=1
 | 
					 | 
				
			||||||
qm resize 244 virtio0 +30G
 | 
					 | 
				
			||||||
qm start 244
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
		Reference in New Issue
	
	Block a user