Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host Acces Point on Raspberry 3 B+ #17

Merged
merged 73 commits into from
May 11, 2019

Conversation

b23prodtm
Copy link
Owner

What type of PR is this?
/kind feature

What this PR does / why we need it:
How to build a Raspberry Pi Cluster at home with Kubespray. It may be configured from a mac os running ansible 2.7 machine and connected to the Pis cluster by ethernet router.
Here's a look at the tiny network schema

#    #
#   #  #    # #####  ######  ####  #####  #####    ##   #   #
#  #   #    # #    # #      #      #    # #    #  #  #   # #
###    #    # #####  #####   ####  #    # #    # #    #   #
#  #   #    # #    # #           # #####  #####  ######   #
#   #  #    # #    # #      #    # #      #   #  #    #   #
#    #  ####  #####  ######  ####  #      #    # #    #   #


==============			             
- ISP ROUTER -
 _(  )_( )_
(_ W A N _)
 (_) (__)
==============
 |
 | Home network
 |       ,--./,-.
 |      / #     /
 L---- |       :                iMac
 |      \       \
 |       `._,._,'
 S          L Ansible - ssh
 S
 H
 | DMZ IP - Bastion Host
 | (eth0)
 |         .\V/,
 |        ()_()_)
 L ----  (.(_)()_)             raspberrypib+
          (_(_).)'
           `'"'`
            L ufw - netplan - isc-dhcp-server
  Private   |
  Network   I
  (br0)     P
            V
            4
            |
            L (((( HOSTAPd ))))

            O
             o
            o  Gatewayed Host(s)
          O
            o
           o

          etcd
                                            .\V/,
         __v_                   Private    ()_()_)
  K8s   (____\/{  docker        IP        (.(_)()_)      raspberrypia+
                                           (_(_).)'
                                            `'"'`
          Calico                            | (wlan0)
                                    K 8 s   L (((( wpa_supplicant ))))
            K
            8
            S
            | (wlan0)
            L (((( wpa_supplicant ))))
              .\V/,
  Private    ()_()_)
   IP       (.(_)()_)           raspberrypia+
             (_(_).)'
              `'"'`

Which issue(s) this PR fixes:

Fixes #
scripts/:

  • my_cluster.sh - Ansible configuration
  • my_playbook.sh - Kubernetes build tool
    K8s Calico nodes located in gatewayed private network. (hosts.ini)
    Bridged Internet Sharing (docker-DNS)
    Special notes for your reviewer:
    Ubuntu Server should be installed on every Raspberry Pi host as 18.04 LTS/arm64
    Upload kubespray folder to Raspberry Pis and run the configuration scripts/hap-wiz-bionic.sh on each one. Add option --clientfor nodes.
    Does this PR introduce a user-facing change?:
(c) 2019 - b23prodtm/kubespray

b23prodtm and others added 30 commits March 31, 2019 22:18
* Raspberry configuration : ARM is to rollback kubernetes v1.12.5

Note that flannel works on amd64, arm, arm64 and ppc64le.

https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/

Create setup_playbook.sh for ansible-architecture armv7l (RasPi)

* Trusted Ansible repository

* etcdctl must be manually installed on node from github.com/etcd-io/etcd/tree/release-3.1

* Update README.md

* checksums

* Bastion PI Readme FAQ

* armv7l -> arm64 compatibility mode with Pi3

* Git releases search for architectures binaries

* declare PI=pi # replace 'pi' with 'ubuntu' or any other user

* SSH permit root login
Development convenience script : $ curl -fsSL https://get.docker.com -o 
get-docker.sh $ sudo sh get-docker.sh

* Update README.md

* Classic server configuration
kubernetes-sigs/kubesrpay/issues/4293

* Bastion sudoers

* Update README.md

* - Package preinstall tasks sudo -> become: yes | no - Python 3 sudo pip3 install -r requirements.txt

* Ignore APT cache update errors [concurency lock issue](ansible/ansible#47322)

* kubernetes-sigs#2767

* Update setup_playbook.sh

* Bionic python3-dev

* Pip3

* Update master (#8) (#9)

* fix(contrib/metallb): adds missing become: true in role (kubernetes-sigs#4356)

On CoreOS, without this, it fails to kubectl apply MetalLB due to lack of privileges.

* Fix kubernetes-sigs#4237: update kube cert path (kubernetes-sigs#4354)

* Use sample inventory file in doc (kubernetes-sigs#4052)

* Revert "Fix kubernetes-sigs#4237: update kube cert path (kubernetes-sigs#4354)" (kubernetes-sigs#4369)

This reverts commit ea7a6f1.

This change modified the certs dir for Kubernetes, but did not move the directories for existing clusters.

* Fix support for ansible 2.7.9 (kubernetes-sigs#4375)

* Use wide for netchecker debug output (kubernetes-sigs#4383)

* Added support of bastion host for reset.yaml (kubernetes-sigs#4359)

* Added support of bastion host for reset.yaml

* Empty commit to triger CI

* Use proxy_env with kubeadm phase commands (kubernetes-sigs#4325)

* clarify that kubespray now supports kubeadm (fixes kubernetes-sigs#4089) (kubernetes-sigs#4366)

* Reduce jinja2 filters in coredns templates (kubernetes-sigs#4390)

* Upgrade to k8s 1.13.5

* Increase CPU flavor for CI (kubernetes-sigs#4389)

* Fix CA cert environment variable for ectd v3 (kubernetes-sigs#4381)

* Added livenessProbe for local nginx apiserver proxy liveness probe (kubernetes-sigs#4222)

* Added configurable local apiserver proxy liveness probe

* Enable API LB healthcheck by default

* Fix template spacing and moved healthz location to nginx http section

* Fix healthcheck listen address to allow kubelet request healthcheck

* Default values for variable dns_servers and dns_domain  are set in two files: (kubernetes-sigs#3999)

values from inventory in roles/kubespray-defaults/defaults/main.yml
hardcoded values in roles/container-engine/defaults/main.yml

dns_servers set empty in roles/container-engine/defaults/main.yml and skydns_server not set in docker_dns_servers variables
also set default value for manual_dns_serve

another variables in roles/container-engine/defaults not need to set

* Fix bootsrap-os role, failing to create remote_tmp (kubernetes-sigs#4384)

* Fix bootsrap-os role, failing to create remote_tmp

* use ansible_remote_tmp hostvar

* Use static files in KubeDNS templating task (kubernetes-sigs#4379)

This commit adapts the "Lay Down KubeDNS Template" task to use the static
files moved by pull request [1]

[1] kubernetes-sigs#4341

* Fix supplementary_addresses rendering error (kubernetes-sigs#4403)

* Corrected cloud name (kubernetes-sigs#4316)

The correct name is Packet, not Packet Host.

* adapt inventory script to python 2.7 version (kubernetes-sigs#4407)

* Calico felix - Fix jinja2 boolean condition (kubernetes-sigs#4348)

* Fix jinja2 boolean condition

* Convert all felix variable to booleans instead.
initial dns setup=coredns
ansible * --ask-become-pass
- docker-ce (scale.yml's suppported)
- cri-o (light weight as raspberry's)
Raspberries 3 B+ and A+
b23prodtm and others added 23 commits April 13, 2019 17:46
fix issue destination directory doesnt exists
* Update my_cluster.sh

* Update my_playbook.sh

* TASK Copy kubectl binary to ansible host 
fix issue destination directory doesnt exists

* wip Starting dashboard

* Apt sources

* Hosts roles balances resources usage in k8s cluster set master node with etcd, dedicated one host to calico-rr

* Docker Update ubuntu-arm64.yml

* Docker install

* sample hosts groups

* Host AP : HOSTAPD service ISC DHCP service IP MASQUERADE ifw rules [Gatewayed] hosts (bastion-ssh-config)

1°/2° internet sharing dnsmasq/bridge

* Ubuntu before 1804 Bridge connection

reset args parsing

Country code selection

Netplan.io manager
Define Hostapd channel 0

Master node on Hostapd netplan

* Bionic cloud-init behavior IPV6 support

WPA-PSK Interface selection Custom channel Firewall

Strong encryption keys  https://www.ibm.com/developerworks/library/l-wifiencrypthostapd/index.html

* WPA enable wpa=2 DHCP bridge

* Timeouts

DHCP and nameservers bridge

Apply configuration netplan on reboot ma ...nually

* Stateful DHCPv6
Netplan reboot script - rc.local

Don't mix interfaces dhcpd subnet leases. Define subnet for eth0 segment to retrieve expected server addresses.
Pip requirements for Ubuntu.

Python script bastion host access point

Py Host access Point environ settings

IPV6 support
…dhclient)

Script environment variables and rc.local
@b23prodtm b23prodtm closed this May 9, 2019
@b23prodtm
Copy link
Owner Author

b23prodtm commented May 9, 2019

Merged with rebase

@b23prodtm b23prodtm reopened this May 9, 2019
@b23prodtm b23prodtm merged commit 6444e24 into development May 11, 2019
@b23prodtm b23prodtm deleted the feature/ubuntu-raspi2-arm64 branch November 23, 2019 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant