Skip to content

Instantly share code, notes, and snippets.

@dulltz
Created March 20, 2018 01:51
Show Gist options
  • Save dulltz/f48416e62735c909ec17d6a6f524d0cf to your computer and use it in GitHub Desktop.
Save dulltz/f48416e62735c909ec17d6a6f524d0cf to your computer and use it in GitHub Desktop.
kind: Node
name: my-node
spec:
interfaces:
- my-net
volumes:
- name: ubuntu
source: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
recreatePolicy: IfNotPresent
- name: seed
cloud-config:
user-data: seed.yml
network-config: network.yml
recreatePolicy: Always
- name: data
size: 10G
recreatePolicy: Always
resources:
cpu: 2
memory: 4G
---
kind: Network
name: my-net
spec:
addresses:
- 172.16.0.11/22
version: 2
ethernets:
ens3:
addresses:
- 172.16.0.12/22
gateway4: 172.16.0.11
#cloud-config
users:
- name: cybozu
sudo: ALL=(ALL) NOPASSWD:ALL
primary-group: cybozu
groups: users, admin
lock_passwd: false
passwd: $6$rounds=4096$m3AVOWeB$EPystoHozf.eJNCm4tWyRHpJzgTDymYuGOONWxRN8uk4amLvxwB4Pc7.tEkZdeXewoVEBEX5ujUon9wSpEf1N.
write_files:
- path: /etc/ssh/sshd_config
content: |
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication yes
PasswordAuthentication yes
UsePAM yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
@dulltz
Copy link
Author

dulltz commented Apr 2, 2018

kind: Node
name: bootserver
spec:
  interfaces:
    - my-net
  volumes:
    - name: ubuntu
      source: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
      recreatePolicy: IfNotPresent
    - name: seed
      cloud-config:
        user-data: seed.yml
        network-config: network.yml
    - name: data
      size: 10G
      recreatePolicy: Always
  resources:
    cpu: 2
    memory: 2G
---
kind: Network
name: my-net
spec:
  addresses:
    - 10.0.0.1/22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment