Code Monkey home page Code Monkey logo

Comments (21)

jdalke avatar jdalke commented on June 2, 2024

Tried adding sym link as noted in issues 195 & 184 and did not resolve the issue. Not sure what to try?

from raspberry-pi-dramble.

floatingman avatar floatingman commented on June 2, 2024

One thing I changed was in setup/networking/templates/hosts.j2

and changed line 12 to be
192.168.0.{{ 49 + loop.index }} kube{{ loop.index }} kube{{ loop.index }}.pidramble.com

That didn't quite fix my problem, but I think I was having an issue because I was trying to run Ansible in WSL on Windows.

When I switched to my linux machine, I was able to succsfully run the playbook.

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Following is the IP addresses I decided to use and coded in my setup/networking/inventory file :
[dramble]
192.168.1.221
192.168.1.222
192.168.1.223
192.168.1.224

[dramble:vars]
ansible_ssh_user=pi

Below it the hosts.j2 settings

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.1.1 {{ dramble_hostname }}

{# Add an entry for each host in the cluster, using the loop index to map IPs #}
{% for host in groups['dramble'] %}
192.168.1.{{ 200 + loop.index }} kube{{ loop.index }} kube{{ loop.index }}.pidramble.com
{% endfor %}

I am assuming this is correct as the network setup ansible worked.

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Also when I go to kube1 thru 4 and look at the /etc/hosts it looks correct. Here is what is in kube1 hosts file

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.1.1 kube1.pidramble.com

192.168.1.201 kube1 kube1.pidramble.com
192.168.1.202 kube2 kube2.pidramble.com
192.168.1.203 kube3 kube3.pidramble.com
192.168.1.204 kube4 kube4.pidramble.com
192.168.1.223 registry.pidramble.test

from raspberry-pi-dramble.

floatingman avatar floatingman commented on June 2, 2024

Sure it all depends on your network configuration. Just make the starting loop index one less than what you want to start with.

This was the only place where 10.0.100.X netmask is hardcoded.

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

The hosts files are correct on the PI's so I am assuming it worked correct. Since I started at 201 I updated hosts.j2 with the following

192.168.1.{{ 200 + loop.index }} kube{{ loop.index }} kube{{ loop.index }}.pidramble.com

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

I don't believe networking is the issue. Will post the ansible playbook response with the -vvv option

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

When running with the -vvv option it is very verbose so I have attached a file with the results. I think the error may be:

fatal: [kube1 -> 192.168.1.221]: FAILED! => changed=false
module_stderr: |-
/usr/lib/python3/dist-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
ansible playbook error.txt

  RequestsDependencyWarning)

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Searching the above error resulted in Issue 201 where the resolution was they were running the wrong ansible version. Unfortunately the issue did not state what version was causing the issue and what version resolved it.

I'm running the following:
ansible 2.9.6
config file = /home/jdalke/raspberry-pi-dramble/ansible.cfg
configured module search path = ['/home/jdalke/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]

from raspberry-pi-dramble.

floatingman avatar floatingman commented on June 2, 2024

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Running on Ubuntu 20.04

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Sorry - on a dedicated linux box

from raspberry-pi-dramble.

floatingman avatar floatingman commented on June 2, 2024

You could look into installing a later version of Ansible directly from pip.

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#upgrading-from-ansible-3-or-ansible-core-2-10

The only other thing I've changed is to a more recent version of Kubernetes in vars/main.yml

kubernetes_version: '1.22'
kubernetes_packages:
  - name: kubelet=1.22.1-00
    state: present
  - name: kubectl=1.22.1-00
    state: present
  - name: kubeadm=1.22.1-00
    state: present
  - name: kubernetes-cni
    state: present

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

PIP3 install did not work on Unbuntu as after the install the ansible --version gave me nothing. Installed using APT:
sudo add-apt-repository --yes --update ppa:ansible/ansible-2.10

Ansible version -
ansible [core 2.11.4]
config file = /home/jdalke/raspberry-pi-dramble/ansible.cfg
configured module search path = ['/home/jdalke/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/jdalke/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/jdalke/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True

Also update the vars/main.yml as directed and now getting the following error:

statically imported: /home/jdalke/raspberry-pi-dramble/tasks/k8s-services.yml
redirecting (type: modules) ansible.builtin.k8s to kubernetes.core.k8s
ERROR! couldn't resolve module/action 'k8s'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/jdalke/raspberry-pi-dramble/tasks/k8s-services.yml': line 10, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • name: Apply metrics-server manifest to the cluster.
    ^ here

from raspberry-pi-dramble.

floatingman avatar floatingman commented on June 2, 2024

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Running ansible-galaxy install -r requirements.yml provides the following so assuming everything okay
Starting galaxy role install process
[WARNING]: - geerlingguy.security (2.0.1) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.swap (1.0.2) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.nfs (2.0.0) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.pip (2.1.0) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.containerd (1.1.1) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.kubernetes (7.1.0) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.k8s_manifests (1.2.0) is already installed - use --force to change version to unspecified

Also I'm assuming I installed PIP3 under sudo as I can run PIP3 commands.

What version of linux are you running?

from raspberry-pi-dramble.

floatingman avatar floatingman commented on June 2, 2024

from raspberry-pi-dramble.

jdalke avatar jdalke commented on June 2, 2024

Downgraded to Ansible 2:10 and past first error and right back where I started:

TASK [Apply metrics-server manifest to the cluster.] ***************************************************************************************************************
fatal: [kube1 -> kube1]: FAILED! => changed=false
msg: 'Failed to get client due to HTTPConnectionPool(host=''localhost'', port=80): Max retries exceeded with url: /version (Caused by NewConnectionError(''<urllib3.connection.HTTPConnection object at 0x7f8ef8eef0>: Failed to establish a new connection: [Errno 111] Connection refused''))'

Very frustrating when these playbooks crap and your new to ansible. Looking at what the metrics-server is trying to do.

from raspberry-pi-dramble.

stale avatar stale commented on June 2, 2024

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

from raspberry-pi-dramble.

stale avatar stale commented on June 2, 2024

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

from raspberry-pi-dramble.

jtcleek avatar jtcleek commented on June 2, 2024

@jdalke Did you ever get past this error? I am currently feeling the frustration you expressed.

from raspberry-pi-dramble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.