Labels

Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Thursday, August 13, 2026

RPi OVS Split #01 - still coming to grips with what I want from the change

So even though I generated an output from chatGPT, I am still contemplating if this is all that I want the AI prompt to provide. The output that was produced was some 22 pages in length.  I had added a third namespace to the item.

My thoughts were to have one namespace be connected to an external Ethernet adapter, eth1, which could then provide a router function to my WISP environment.  I was going to do this even though I really didn't need it.  I have plenty of routers in my stock without resorting to having a RPi be my router, providing DNS and DHCP services to whatever was connected to the adapter.  I had originally thought about using it to provide DNS/DHCP to my laptop if I decided to turn off the rack equipment.  So far so good. 

Saturday, August 1, 2026

Project #39 - Using AI to Develop a Configuration to Connect a Raspberry Pi into Two Different Networks

 I was attempting to determine how to connect a Raspberry Pi into 2 different networks using the power of OpenVSwitch.  What I came up with used the following prompt:

"You are an expert user of bash on Linux and of virtual networking including Docker and LXC.  Develop a set of CLI commands to use on a Raspberry Pi 4B using RaspiOS to use Open V Switch to:

1. Use OVS to split the networking into 2 or 3 separate name spaces so that the Raspberry Pi has an internal NAT separating a network using the Raspberry Pi’s wifi and a network using the Raspberry Pi’s ethernet. 

2. Show the network setups in a Docker Compose yaml file to connect to the name spaces that have been defined. 

3. The Docker Compose yaml file will separate the Docker containers to those on the wifi facing network and those on the ethernet facing network. 

4. Both of the name spaces should have their own IP addresses defined from external DHCP sources. 

5. Explain each step in the process, including installation and configuration of changes to the Raspberry Pi networking system and introduction of openvswitch software. 

6. Document this setup in a Microsoft Word document that can be downloaded."

I now have a Microsoft Word document that I can execute items from to test out if this is going to work.

Tuesday, February 15, 2022

Net Interface #02 - Spin up an NGINX Server with accompanying web server

I am starting with spinning up an NGINX server on my Proxmox server box in an LXC container using Docker.  The NGINX server will interface from the gateway vlan to the web vlan.  This will require me to spin up a web vlan and provide it with a dns/dhcp service and connect the web vlan to the Proxmox server.  Fortunately I already have a vlan setup on the Edgerouter-12 that I can use for this.  I just have to provide the path for the web vlan to pass directly to the Proxmox server.

Sunday, August 30, 2020

Project #22 - Heartbeat / Shutdown Container to shutdown computer equipment in a graceful manner

I was also thinking of a third container that might be useful.  A container, that interfaces to MQTT, that issues heartbeats, and can issue a shutdown command on equipment.  The master controller would then have the ability to issue an mqtt shutdown command, listen for heartbeats, then when the heartbeat ceases, could issue a command to the IP Power Strip to turn off the power to that computer and report back status on the computer.  This has the added thought that it would be universal, working on different operating systems.  The code is pretty much the same, but the implementation is different.

Monday, August 17, 2020

Trying to Resurrect the WeatherPi

Now that I have most of the previous parts of the network seemingly working again (have found replacements for the two Netgear GS108Tv2s that crapped out), I can concentrate on some of the other items that seemed to have gone south.  The first up is the WeatherPi that is connected to my Personal Weather Station.  It doesn't seem to be pushing data out anymore.

I am also wondering if this would be a good time to replace the WeatherPi with a USB server and move the weewx program to the HA Server.  The HA Server is also giving me problems right now, but I can deal with that later.  First off, I am going to try to get the WeatherPi to at least push data to weather underground again.

I did manage to remove the WeatherPi from underneath the TV stand and discovered that the SD Card was pretty much done with (probably a result of the power outage).  I put a new SD Card into the RPi that used to be the WeatherPi and discovered that the RPi was okay.  The new designation was PiHoleLDAP; apparently this was the one that was going to be the one that I was going to use for the PiHole, Radius, and LDAP setup using Docker.  Which reminds me, there is no reason that I cannot run weewx under Docker, I just have to research it.

There seems to be a bit of a problem with weather underground.  Since IBM took over, the API has been removed; so things like predictions and the like are no longer available to gather for an html display.  Weewx has not been updated for Python 3, so should I go to a different outlet to publish the weather station data, or should I just abandon the weather station all together?  Part of me is saying the latter, because I still have to maintain the station, look at the stats, and generally update portions of this as my time allows.  Going into retirement, it would be a scheduled activity that I would do say once every two weeks.  Not sure if it is worth the trouble.

Update: it is looking like weewx under Docker is going to be a pain to complete.  There are a number of builds on the Docker site, but all of them are rather complicated.  I am going to have to delay getting this accomplished.

Friday, September 7, 2018

HA #1 - Making Changes to the Network for Home Automation

On a lark, I started changing out my Experimental vlan to add some Home Automation components.  I took my Plex server and changed it out to run Ubuntu 18.04 LTS, now called the HA-IOT server, added Docker, and spun up around 12 containers to support what I wanted to do.  I also added an Aeotec Z-Wave USB stick to interface to a number of Z-Wave components.  So far I have added three multi-sensors (temp, movement, humidity, etc.), three Z-Wave dimmable wall switches, two Z-Wave toggle wall switches, one plug in Z-Wave dimmer, one plug in Z-Wave switch, one Z-Wave door lock, and one Z-Wave door open switch.  In addition I have added one wifi multicolor LED bulb and have started adding dimmable LED bulbs in various lamps.

I have also started a project using a Raspberry Pi Zero W which interfaces to a LinkMaster 850LM so that I can press the buttons on my Subaru to activate some automations via a MQTT message.  The containers include home-assistant which interfaces to the Z-Wave USB stick, node-red which sets up automations, and pertainer which is used to manage containers in Docker.  I originally set-up the containers using a docker-compose script that I found on the home-assistant blog.  I will be changing those docker-compose scripts as I go.

Right now I am attempting to understand how to control lights via triggers so that I will be able to set-up automations that will work pretty much the first time.  I am also exploring a couple of different dashboard layouts.  All of this is actually controllable via web interfaces, so I am able to push the ports through a router (Netgear FVS318N) to my media vlan so that I am able to get to the web interfaces easily.

Saturday, June 30, 2018

OVS Changes #3 - spinning up Home Assistant in a Docker Container

Now that I know how to connect a Docker Container to a specific bridge through the OVS, it's time to spin up an example.  I am trying to get into Home Automation and I have settled on the use of Home Assistant (http://www.home-assistant.io).  I am going to be reporting more on the use of this controller since it will pretty much control what I do within my house.

I have settled on the use of Z-Wave Plus components throughout the house because of the added distance and mesh connection improvements.  Home Assistant gives me the flexibility to connect to all sorts of things that normally don't go together because you know business.  Every company out there wants to do there own thing and control the whole market.  I'm not buying it if I can't use it with other companies products that have a capability I want.

I am going to first spin it up on the Experimental vlan until I am able to configure everything the way that I want.  I am intending on using OVS to connect ways of having devices on separate vlans and integrating them within the home system.  Anyway, that is the plan.

According to https://www.home-assistant.io/docs/installation/docker/, I have to do the following on Ubuntu:

$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

Except in my case I need to have the container attached to a specific OVS bridge, so:

$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

Update: well that didn't work out as planned.  I sent the following commands:

$ docker run -d --name="home-assistant" -v <my_HA_directory>:/config -v /etc/localtime:/etc/localtime:ro --net=none homeassistant/home-assistant

$ ovs-docker add-port <my_ovs_bridge> eth1 home-assistant --ipaddress=<home-assistant-ip>/24

What I ended up with was the home assistant available on every vlan that was in the ubuntu server.  I only want it on the <my_ovs_bridge>.  So what do I do to get it there?

Sunday, May 13, 2018

OVS Changes #2 - getting Docker containers to attach to the OVS bridges

Now that I have been successful with KVM VMs and their connections to the OVS bridges, I need to figure out how to do much of the same thing with Docker containers.  One of the reasons that I run ubuntuServer is because it is very easy (so they say) to get Docker containers running.  So now, what I am going to attempt is to startup a Docker container attached to one of the OVS bridges, used on a pfSense KVM VM.

So according to the site, http://containertutorials.com/network/ovs_docker.html, I have to do the following steps:

Install OVS (already done on my system) -

Install OVS-docker utility (already done on my system) -

Create an OVS bridge (already done on my system, except the bridge doesn't have an IP address) -

Create the docker container

Connect the container to the OVS bridge, such as
$ ovs-docker add-port ovs-br1 eth1 <container_name> --ipaddress=<ip_address_for_container>

Wednesday, July 13, 2016

Thinking about distributing the network servers

I have been reading up on openvswitch, openflow, and docker and it occurs to me that I might want to take advantage of some of the concepts available to me.  I have a VM Server currently that pretty much limits things to the KVM world, each connected to a specific bridge to a hardware port.  Those hardware ports in turn are connected to a managed switch.  I can do a lot with this setup but I can do better.

One thing that I want to do is distribute the data plane between different VMs and allow for usage of different file servers across my network.  I have plenty of space available to me for various files but because of the need to distribute the VMs between different vlans it becomes more difficult without having several hardware routers in the network.  I want to use SDN and openvswitch to be able to spread the VM connections around to places that I need them as well as give myself the ability to access any device that I want to.  So how would I go about doing this?  I have decided to use openvswitch to spread the network access plane around my house without changing the physical network layout of routers and switches.  I will instead go the virtual route and apply some Software Defined Network (SDN) concepts.

More Later.