forked from rancher/k3os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* proxmox vagrant template
- Loading branch information
Showing
4 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# k3os on Proxmox VE | ||
|
||
## Quick Start | ||
|
||
1. Build Proxmox VE image using [Packer](https://www.packer.io/): | ||
|
||
``` | ||
packer build -var-file=vars.json template.json | ||
``` | ||
|
||
## Notes | ||
|
||
Can define IP and other parameter on config/cloud.yml, according to [Configuration Reference](https://github.com/rancher/k3os/blob/master/README.md#configuration-reference) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
write_files: | ||
- path: /etc/ssh/sshd_config | ||
content: | | ||
AllowTcpForwarding no | ||
GatewayPorts no | ||
PasswordAuthentication yes # necessary for access from packer build | ||
X11Forwarding no | ||
PermitRootLogin no | ||
LoginGraceTime 30s | ||
MaxAuthTries 5 | ||
Ciphers [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr | ||
MACs [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,[email protected] | ||
KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256 | ||
Subsystem sftp internal-sftp | ||
k3os: | ||
datasource: cdrom | ||
password: YourSSHPasswordReplaceIt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"builders": [ | ||
{ | ||
|
||
"insecure_skip_tls_verify": "true", | ||
"node": "{{user `pve_node`}}", | ||
"proxmox_url": "https://{{user `pve_server`}}:8006/api2/json", | ||
"password": "{{user `pve_password`}}", | ||
"username": "{{user `pve_username`}}", | ||
|
||
"cores": 2, | ||
"memory": 2048, | ||
"boot_command": [ | ||
"rancher", | ||
"<enter>", | ||
"sudo k3os install", | ||
"<enter>", | ||
"1", | ||
"<enter>", | ||
"2", | ||
"<enter>", | ||
"Y", | ||
"<enter>", | ||
"http://{{ .HTTPIP }}:{{ .HTTPPort }}/cloud.yml", | ||
"<enter>", | ||
"Y", | ||
"<enter>" | ||
], | ||
"boot_wait": "50s", | ||
"cloud_init": "false", | ||
"disks": [ | ||
{ | ||
"type": "virtio", | ||
"disk_size": "8G", | ||
"storage_pool": "{{user `vm-disk-pool`}}", | ||
"storage_pool_type": "rbd" | ||
} | ||
], | ||
"http_directory": "config", | ||
"iso_url": "{{user `iso-url`}}", | ||
"iso_checksum": "{{user `iso-checksum-type`}}:{{user `iso-checksum`}}", | ||
"iso_storage_pool": "{{user `iso-storage-pool`}}", | ||
"network_adapters": [ | ||
{ | ||
"model": "virtio", | ||
"bridge": "{{user `network-vlan`}}", | ||
"firewall": true | ||
} | ||
], | ||
"os": "l26", | ||
"qemu_agent": "true", | ||
"ssh_password": "{{user `ssh_password`}}", | ||
"ssh_username": "{{user `ssh_username`}}", | ||
"template_name": "{{user `template_name`}}", | ||
"template_description": "Template Server K3Os v011", | ||
"type": "proxmox", | ||
"unmount_iso": true, | ||
"vga": { | ||
"type": "qxl" | ||
}, | ||
"vm_name": "{{user `template_name`}}" | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"execute_command": "{{ .Vars }} sudo -E sh '{{ .Path }}'", | ||
"inline": [ | ||
"echo hello world" | ||
], | ||
"type": "shell" | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"template_name":"k3os-cloud", | ||
"pve_server":"{{env `pve_server`}}", | ||
"pve_username":"{{env `pve_username`}}", | ||
"pve_password":"{{env `pve_password`}}", | ||
"pve_node":"{{env `pve_node`}}", | ||
|
||
"network-vlan": "{{env `network_vlan`}}", | ||
|
||
"vm-cpu-num": "1", | ||
"vm-mem-size": "2048", | ||
"vm-disk-size": "8G", | ||
"vm-disk-pool": "{{env `vm_disk_pool`}}", | ||
|
||
"ssh_username": "{{env `ssh_username`}}", | ||
"ssh_password": "{{env `ssh_password`}}", | ||
|
||
"iso-url": "{{env `iso_url`}}", | ||
"iso-storage-pool": "{{env `iso_storage_pool`}}", | ||
"iso-checksum": "{{env `iso_checksum`}}", | ||
"iso-checksum-type": "{{env `iso_checksum_type`}}" | ||
} |