Skip to content
Snippets Groups Projects
Commit f663a6a4 authored by ngyimesi's avatar ngyimesi
Browse files

New vsalgo config

parent 06d4da2d
Branches
No related tags found
1 merge request!1Ne w salgo
[defaults] [defaults]
inventory = inventory.yml inventory = inventory.yml
forks = 300 forks = 300
#strategy = free
nocows=1 nocows=1
cow_selection=stegosaurus
[ssh_connection] \ No newline at end of file
retries=2
\ No newline at end of file
#!/usr/bin/env bash
AUTH="bootstrapper:6cDoVsyYzzDE6fLi5MTB"
git clone \
https://${AUTH}@git.sch.bme.hu/kszk/sysadmin/ansible/ansci.git \
.template \
|| (cd .template && git pull)
exec .template/playbook-template/bootstrap.sh
--- ---
- hosts: all - hosts: all
tags: net tags: bootstrap
tasks: tasks:
- name: Set up network #- name: Install kszk-host stuff
# import_tasks: tasks/kszk-host.yml
- name: Upgrade
import_tasks: tasks/upgrade.yml
- name: Install network utils
import_tasks: tasks/net.yml import_tasks: tasks/net.yml
- name: User setup
import_tasks: tasks/create_users.yml
- name: Other useful packages
import_tasks: tasks/other-packages.yml
all: all:
hosts: hosts:
node1.vsalgo: vsalgo-1:
cluster_ip: 10.42.0.101/24 cluster_ip: 10.42.0.101/24
admin_ip: 10.0.42.101/16 admin_ip: 10.0.42.101/16
internal_ip: 10.151.42.101/16 internal_ip: 10.151.42.101/16
node2.vsalgo: ansible_user: root
vsalgo-2:
cluster_ip: 10.42.0.102/24 cluster_ip: 10.42.0.102/24
admin_ip: 10.0.42.102/16 admin_ip: 10.0.42.102/16
internal_ip: 10.151.42.102/16 internal_ip: 10.151.42.102/16
node3.vsalgo: ansible_user: root
vsalgo-3:
cluster_ip: 10.42.0.103/24 cluster_ip: 10.42.0.103/24
admin_ip: 10.0.42.103/16 admin_ip: 10.0.42.103/16
internal_ip: 10.151.42.103/16 internal_ip: 10.151.42.103/16
ansible_user: root
--- ---
roles: [] roles:
- src: git@git.sch.bme.hu:kszk/ansible/roles/kszk_host.git
scm: git
ref: 0.1.0
name: kszk.host
- name: create user
user:
name: "{{ item }}"
state: present
groups: [ sudo ]
create_home: yes
shell: /bin/bash
with_items:
- norbey
- mike
- name: add key
authorized_key:
user: "{{ item.name }}"
key: "{{ item.key }}"
with_items:
- name: norbey
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJ6Rp2ETGHzEfyQZsR4Ac0iJUrtytLi2C7MZIiiCcug norbey@hellothere
- name: mike
key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVHRlgZ+UTSBCChrpYTzOhLek9r9CcoNPoE2EcFXvz0 mike@curiosity
---
- name: Install kszk-host role
roles:
- { role: kszk.host }
#- { role: jmcvetta.passwordless-sudo }
vars:
motd_playbook_url: "https://git.sch.bme.hu/kszk/sysadmin/vsalgo-ansible"
users: []
ssh:
port: 22
passwordAuthentication: "yes"
pubkeyAuthentication: "yes"
permitRootLogin: "yes"
no_iptables: yes
\ No newline at end of file
...@@ -5,13 +5,4 @@ ...@@ -5,13 +5,4 @@
- ifupdown2 - ifupdown2
- libpve-network-perl - libpve-network-perl
- openvswitch-switch - openvswitch-switch
state: present
- name: Template network config
template:
src: interfaces
dest: /etc/network/interfaces
register: interfaces
- name: Reload ifupdown2
command: ifreload -a
when: interfaces.changed
\ No newline at end of file
---
- name: Upgrade nodes
apt:
update_cache: yes
upgrade: yes
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
auto enp3s0f0
iface enp3s0f0 inet manual
mtu 9000
dns-nameservers 152.66.208.1
dns-search internal
#Bal lent
auto enp3s0f1
iface enp3s0f1 inet manual
mtu 9000
#Bal fent
auto enp4s0f0
iface enp4s0f0 inet manual
mtu 9000
#Jobb oldali
auto enp4s0f1
iface enp4s0f1 inet manual
mtu 9000
#Középső
auto bond0
iface bond0 inet manual
ovs_bonds enp3s0f0 enp3s0f1 enp4s0f0 enp4s0f1
ovs_type OVSBond
ovs_bridge vmbr0
ovs_mtu 9000
ovs_options bond_mode=balance-slb
#Main bond
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports bond0 vlan10 vlan151 vlan420
ovs_mtu 9000
#Main vSwitch
auto vlan10
iface vlan10 inet static
address {{ admin_ip }}
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_mtu 9000
#AdminLAN
auto vlan151
iface vlan151 inet static
address {{ internal_ip }}
gateway 10.151.255.254
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_mtu 9000
ovs_options tag=151
#Internal with :80 and :443 NAT
auto vlan420
iface vlan420 inet static
address {{ cluster_ip }}
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_mtu 9000
ovs_options tag=420
#Cluster network
source /etc/network/interfaces.d/*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment