Git Product home page Git Product logo

blog's Introduction

rpi-golang

Docker image containing GOLANG that is compatible to the Raspberry Pi.

Build the Docker Image

make build

Run the Docker Image and get version of installed GOLANG

make version

Push Docker Image to Docker Hub

  • First, use a docker login with username, password and email address
  • Second, push Docker Image to the official Docker Hub
make push

blog's People

Contributors

alexellis avatar bpruessm avatar capytan avatar dieterreuter avatar dnguy078 avatar dvdmuckle avatar ecliptik avatar fibergames avatar fxstein avatar gerzhan avatar govinda-fichtner avatar jamesbiederbeck avatar jaylinski avatar jeffeb3 avatar jimt avatar jswetzen avatar levino avatar luxas avatar mathiasrenner avatar reedy avatar renevo avatar rhuss avatar sabrehagen avatar sandyman avatar solidnerd avatar stefanscherer avatar tiesebarrell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

error when running docker container on macos

I was reading this article which is really fantastic
https://blog.hypriot.com/post/run-your-own-github-like-service-with-docker/

I ran this:

docker run -ti --name my-go-git-server -p 8022:22 -p 3000:3000 --volume `pwd`/gogs-data/:/data hypriot/rpi-gogs-raspbian

but I get this error:


[ ok ] Starting OpenBSD Secure Shell server: sshd.
sending incremental file list

sent 2,800 bytes  received 41 bytes  5,682.00 bytes/sec
total size is 370,720  speedup is 130.49
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          120510      46/qemu-arm     
tcp6       0      0 :::22                   :::*                    LISTEN      0          120513      46/qemu-arm     
  PID TTY          TIME CMD
   46 ?        00:00:00 sshd
  136 ?        00:00:00 ps
fatal error: rt_sigaction failure

runtime stack:
runtime.throw(0xb4c345)
        /goroot/src/runtime/panic.go:491 +0xa4
runtime.setsig(0x40, 0xcb660, 0xc21b01)
        /goroot/src/runtime/os_linux.c:302 +0xa8
runtime.initsig()
        /goroot/src/runtime/signal_unix.c:39 +0x88
mstart()
        /goroot/src/runtime/proc.c:856 +0x6c
runtime.mstart()
        /goroot/src/runtime/proc.c:836 +0x4c

goroutine 1 [runnable]:
runtime.main()
        /goroot/src/runtime/proc.go:16
runtime.goexit()
        /goroot/src/runtime/asm_arm.s:1322 +0x4

it should work on macos right?

For what it's worth, here is the gogs data in the shared volume:

Screen Shot 2019-05-02 at 5 45 04 PM

Guide needs updating

The guide references installing HypriotOS v1.4.0, which came out more than two years ago, and does not have support for newer models like the Raspberry Pi 4.

Attempting the same steps with a newer version of HypriotOS results in issues like:
CoreDNS CrashLoopBackOff - I encountered this when using HypriotOS v1.11.2 on Pi 4. The newer version of Docker doesn't seem to play well with k8s

Once I can get k8s to work on HypriotOS for Raspberry Pi 4 I'm happy to contribute myself, but so far I haven't gotten all the way to a working cluster.

The link to the cni conf is not present

We are trying to run the setup but failing on the step where we configure flannel , if we add the cni file manually it works , are we doing something wrong ?

Cleanup download page

Remove old downloads

  • remove docker-machine 0.4.1 -> link to FAQ (TBD)
  • remove old SD images
    • create another page with old downloads
  • remove cluster lab downloads
    • 0.8.0 has cluster-lab included
  • remove old docker-hypriot deb downloads
    • link to FAQ how to connect to packagecloud

Flannel pod creation no longer works

First, let me thank you for the blog and the time that you spend on creating it!.

I spotted an error while installing the cluster related to the flannel pods creation.

You are using the master version here:

curl -sSL https://rawgit.com/coreos/flannel/master/Documentation/kube-flannel.yml | sed "s/amd64/arm/g" | kubectl create -f -

But on this commit the image URL no longer includes the amd64 tag, so the sed has no effect on it.

I'm on a rush right now and can't think on a good solution for a PR atm.

Re-base HypriotOS on Buildroot.org / SkiffOS?

Hypriot is a pre-configured version of Debian with Docker installed. Buildroot is a tool for cross-compiling a GNU/Linux OS for a target system, with easy customization and adaptation to other types of systems.

SkiffOS is a tool for building a minimal immutable OS image optimized with Docker with the latest kernel, firmware, etc, for over 20 board types, which uses Buildroot: https://github.com/skiffos/skiffos

It might make sense to reduce maintenence overhead for Hypriot by using the approach shown here to use SkiffOS as a sub-module of Hypriot and provide all of the device configurations: https://github.com/skiffos/skiff-ext-example

Thanks & let me know what the community thinks~

"Setup Kubernetes on a Raspberry Pi Cluster easily the official way!" -- missing steps?

So I'm going through https://blog.hypriot.com/post/setup-kubernetes-raspberry-pi-cluster/

After running kubeadm init --pod-network-cidr 10.244.0.0/16 and then kubeadm join --token on the nodes... I go back to the master and run kubectl get nodes, I get

root@rpi-node01:/home/pirate# kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port?

Scrolling back up, I notice

To start using your cluster, you need to run (as a regular user):

  sudo cp /etc/kubernetes/admin.conf $HOME/
  sudo chown $(id -u):$(id -g) $HOME/admin.conf
  export KUBECONFIG=$HOME/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  http://kubernetes.io/docs/admin/addons/

Did some steps get missed out from your tutorial? Or did it get out of order?

If I run the copies...

root@rpi-node01:/home/pirate#   sudo cp /etc/kubernetes/admin.conf $HOME/
root@rpi-node01:/home/pirate#   sudo chown $(id -u):$(id -g) $HOME/admin.conf
root@rpi-node01:/home/pirate#   export KUBECONFIG=$HOME/admin.conf
root@rpi-node01:/home/pirate# kubectl get nodes
NAME         STATUS     AGE       VERSION
rpi-node01   NotReady   19m       v1.6.1
rpi-node02   NotReady   18m       v1.6.1
rpi-node03   NotReady   18m       v1.6.1
rpi-node04   NotReady   18m       v1.6.1
rpi-node05   NotReady   18m       v1.6.1

But all my nodes are NotReady now... Follow the guide a bit further...

root@rpi-node01:/home/pirate# curl -sSL https://rawgit.com/coreos/flannel/master/Documentation/kube-flannel.yml | sed "s/amd64/arm/g" | kubectl create -f -
serviceaccount "flannel" created
configmap "kube-flannel-cfg" created
daemonset "kube-flannel-ds" created
root@rpi-node01:/home/pirate# kubectl get nodes
NAME         STATUS     AGE       VERSION
rpi-node01   NotReady   21m       v1.6.1
rpi-node02   NotReady   20m       v1.6.1
rpi-node03   NotReady   20m       v1.6.1
rpi-node04   NotReady   20m       v1.6.1
rpi-node05   NotReady   20m       v1.6.1
root@rpi-node01:/home/pirate# kubectl get po --all-namespaces
NAMESPACE     NAME                                 READY     STATUS              RESTARTS   AGE
kube-system   etcd-rpi-node01                      1/1       Running             0          20m
kube-system   kube-apiserver-rpi-node01            1/1       Running             0          20m
kube-system   kube-controller-manager-rpi-node01   1/1       Running             0          20m
kube-system   kube-dns-279829092-l9sn0             0/3       Pending             0          21m
kube-system   kube-flannel-ds-fl1r8                0/2       ContainerCreating   0          28s
kube-system   kube-flannel-ds-j2859                0/2       ContainerCreating   0          28s
kube-system   kube-flannel-ds-k05w2                0/2       ContainerCreating   0          28s
kube-system   kube-flannel-ds-mc7xx                0/2       ContainerCreating   0          28s
kube-system   kube-flannel-ds-rztch                0/2       ContainerCreating   0          28s
kube-system   kube-proxy-0qszs                     1/1       Running             0          20m
kube-system   kube-proxy-24tv2                     1/1       Running             0          20m
kube-system   kube-proxy-dmkqs                     1/1       Running             0          21m
kube-system   kube-proxy-nqj28                     1/1       Running             0          20m
kube-system   kube-proxy-wxcb0                     1/1       Running             0          20m
kube-system   kube-scheduler-rpi-node01            1/1       Running             0          21m
root@rpi-node01:/home/pirate# kubectl get po --all-namespaces
NAMESPACE     NAME                                 READY     STATUS              RESTARTS   AGE
kube-system   etcd-rpi-node01                      1/1       Running             0          20m
kube-system   kube-apiserver-rpi-node01            1/1       Running             0          20m
kube-system   kube-controller-manager-rpi-node01   1/1       Running             0          20m
kube-system   kube-dns-279829092-l9sn0             0/3       Pending             0          21m
kube-system   kube-flannel-ds-fl1r8                2/2       Running             1          43s
kube-system   kube-flannel-ds-j2859                0/2       ContainerCreating   0          43s
kube-system   kube-flannel-ds-k05w2                2/2       Running             0          43s
kube-system   kube-flannel-ds-mc7xx                0/2       ContainerCreating   0          43s
kube-system   kube-flannel-ds-rztch                1/2       CrashLoopBackOff    1          43s
kube-system   kube-proxy-0qszs                     1/1       Running             0          20m
kube-system   kube-proxy-24tv2                     1/1       Running             0          21m
kube-system   kube-proxy-dmkqs                     1/1       Running             0          21m
kube-system   kube-proxy-nqj28                     1/1       Running             0          20m
kube-system   kube-proxy-wxcb0                     1/1       Running             0          21m
kube-system   kube-scheduler-rpi-node01            1/1       Running             0          21m
root@rpi-node01:/home/pirate# kubectl get po --all-namespaces
NAMESPACE     NAME                                 READY     STATUS             RESTARTS   AGE
kube-system   etcd-rpi-node01                      1/1       Running            0          20m
kube-system   kube-apiserver-rpi-node01            1/1       Running            0          21m
kube-system   kube-controller-manager-rpi-node01   1/1       Running            0          20m
kube-system   kube-dns-279829092-l9sn0             0/3       Pending            0          21m
kube-system   kube-flannel-ds-fl1r8                1/2       CrashLoopBackOff   1          53s
kube-system   kube-flannel-ds-j2859                1/2       CrashLoopBackOff   1          53s
kube-system   kube-flannel-ds-k05w2                1/2       CrashLoopBackOff   1          53s
kube-system   kube-flannel-ds-mc7xx                1/2       CrashLoopBackOff   1          53s
kube-system   kube-flannel-ds-rztch                1/2       CrashLoopBackOff   1          53s
kube-system   kube-proxy-0qszs                     1/1       Running            0          20m
kube-system   kube-proxy-24tv2                     1/1       Running            0          21m
kube-system   kube-proxy-dmkqs                     1/1       Running            0          21m
kube-system   kube-proxy-nqj28                     1/1       Running            0          20m
kube-system   kube-proxy-wxcb0                     1/1       Running            0          21m
kube-system   kube-scheduler-rpi-node01            1/1       Running            0          21m
root@rpi-node01:/home/pirate# kubectl get nodes
NAME         STATUS    AGE       VERSION
rpi-node01   Ready     21m       v1.6.1
rpi-node02   Ready     21m       v1.6.1
rpi-node03   Ready     21m       v1.6.1
rpi-node04   Ready     21m       v1.6.1
rpi-node05   Ready     20m       v1.6.1
root@rpi-node01:/home/pirate# 

I guess doing some more commands forced it to do stuff?

Nodes stay ready... But the kube-flannel error all over the place and seemingly give up?

 root@rpi-node01:/home/pirate# kubectl get po --all-namespaces
NAMESPACE     NAME                                 READY     STATUS                                                                                                                                                                                                                                                                                RESTARTS   AGE
kube-system   etcd-rpi-node01                      1/1       Running                                                                                                                                                                                                                                                                               0          26m
kube-system   kube-apiserver-rpi-node01            1/1       Running                                                                                                                                                                                                                                                                               0          27m
kube-system   kube-controller-manager-rpi-node01   1/1       Running                                                                                                                                                                                                                                                                               0          26m
kube-system   kube-dns-279829092-l9sn0             0/3       rpc error: code = 2 desc = failed to start container "74f5e4fa84e81b2d58247fb84fae563e21b0979045fb1b6cd935ba8088088c04": Error response from daemon: {"message":"cannot join network of a non running container: 2fc0830fbbc0ba2a455cc7dd7d7d72374bcebfa726940919e8716eed2c13337a"}   0          27m
kube-system   kube-flannel-ds-fl1r8                1/2       CrashLoopBackOff                                                                                                                                                                                                                                                                      6          6m
kube-system   kube-flannel-ds-j2859                1/2       Error                                                                                                                                                                                                                                                                                 6          6m
kube-system   kube-flannel-ds-k05w2                1/2       Error                                                                                                                                                                                                                                                                                 6          6m
kube-system   kube-flannel-ds-mc7xx                1/2       CrashLoopBackOff                                                                                                                                                                                                                                                                      6          6m
kube-system   kube-flannel-ds-rztch                1/2       CrashLoopBackOff                                                                                                                                                                                                                                                                      6          6m
kube-system   kube-proxy-0qszs                     1/1       Running                                                                                                                                                                                                                                                                               0          26m
kube-system   kube-proxy-24tv2                     1/1       Running                                                                                                                                                                                                                                                                               0          27m
kube-system   kube-proxy-dmkqs                     1/1       Running                                                                                                                                                                                                                                                                               0          27m
kube-system   kube-proxy-nqj28                     1/1       Running                                                                                                                                                                                                                                                                               0          26m
kube-system   kube-proxy-wxcb0                     1/1       Running                                                                                                                                                                                                                                                                               0          27m
kube-system   kube-scheduler-rpi-node01            1/1       Running                                                                                                                                                                                                                                                                               0          27m
root@rpi-node01:/home/pirate# 

I also noticed

curl -sSL https://rawgit.com/coreos/flannel/master/Documentation/kube-flannel.yml | sed "s/amd64/arm/g" | kubectl create -f -

Using master is probably a bit temperamental...

curl -sSL https://rawgit.com/coreos/flannel/v0.7.0/Documentation/kube-flannel.yml | sed "s/amd64/arm/g" | kubectl create -f -

I suppose, with the date of https://blog.hypriot.com/post/setup-kubernetes-raspberry-pi-cluster/ being Jan 11, and https://github.com/coreos/flannel/releases/tag/v0.7.0 being Jan 10... I guess you were using that. Rather than the various commits that are on master now flannel-io/flannel@v0.7.0...master


So, I think there's a versioning issue with flannel... I'll do a PR to swap it from master. And see about where to put the kubectl get nodes copy fixes

Docker Swarm Stack Deploy at Jenkins Cluster Compose file

I modified your docker-compose file shown as below

version: "3"

networks:
  jenkins_swarm:
    driver: overlay
    ipam:
      driver: default
      config:
        - subnet: 10.10.2.0/16

services:
  jenkins:
    image: csanchez/jenkins-swarm
    expose:
      - 8080
      - 50000
    ports:
      - 8080:8080
    restart: always
    networks:
      - jenkins_swarm
    environment:
      - "constraint:NODE==cl-leader"

  worker:
    image: csanchez/jenkins-swarm-slave
    command: -username jenkins -password jenkins -executors 1
    networks:
      - jenkins_swarm
    environment:
      - "JENKINS_PORT_8080_TCP_ADDR=jenkins"
      - "JENKINS_PORT_8080_TCP_PORT=8080"

I created 2 docker-machine and create small swarm cluster , I run this script
$ docker stack deploy --compose-file docker-compose.yml jenkinsdemo

after look at the logs of slave node service I have a error as shown as below

SEVERE: RetryException occurred
hudson.plugins.swarm.RetryException: Failed to fetch slave info from Jenkins, HTTP response code: 401
	at hudson.plugins.swarm.SwarmClient.discoverFromMasterUrl(SwarmClient.java:233)
	at hudson.plugins.swarm.Client.run(Client.java:146)
	at hudson.plugins.swarm.Client.main(Client.java:119)

Jun 02, 2018 11:26:43 PM hudson.plugins.swarm.Client run
INFO: Retrying in 10 seconds

What is the problem accually ?

Notice : I could not see the slave node , UI at master node .

Thank you for your helping .

post/setup-kubernetes-raspberry-pi-cluster needs a bit of updating

Hi,

I went through setup-kubernetes-raspberry-pi-cluster (which is super handy). But it needs some upgrading:
In random order:

  • I've used current released flannel, 0.9.1, so no need to warn about 0.7.1 being bad
  • My nodes came up NotReady when I used --pod-network-cidr (only after flannel install they were OK)
  • flannel rbac is not(?) needed anymore (didn't double check)
  • Default flannel defaults to amd64 which is manually changed into arm. There is a not about this, but that it references is old, so I forgot to do it (took me a while to figure out this mistake)
  • the flash's -n option didn't work for me (got an error after flashing, assumed it was ok), but the hostname was still the default.

Need RPi Zero W setup guide

I am flash 1.10.0-rc1 to RPi Zero W.
I edit "user-data" on the sd card, but I can't connect to my AP.


#cloud-config
# vim: syntax=yaml
#

# The current version of cloud-init in the Hypriot rpi-64 is 0.7.6
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html

# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
hostname: black-pearl
manage_etc_hosts: true

# You could modify this for your own user information
users:
  - name: pirate
    gecos: "Hypriot Pirate"
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    groups: users,docker,video,input
    plain_text_passwd: hypriot
    lock_passwd: false
    ssh_pwauth: true
    chpasswd: { expire: false }

# # Set the locale of the system
# locale: "en_US.UTF-8"

# # Set the timezone
# # Value of 'timezone' must exist in /usr/share/zoneinfo
# timezone: "America/Los_Angeles"

# # Update apt packages on first boot
# package_update: true
# package_upgrade: true
# package_reboot_if_required: true
package_upgrade: false

# # Install any additional apt packages you need here
# packages:
#  - ntp

# # WiFi connect to HotSpot
# # - use `wpa_passphrase SSID PASSWORD` to encrypt the psk
write_files:
  - content: |
      allow-hotplug wlan0
      iface wlan0 inet dhcp
      wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
      iface default inet dhcp
    path: /etc/network/interfaces.d/wlan0
  - content: |
      country=tw
      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      network={
      ssid="..."
      psk="..."
      proto=RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP
      auth_alg=OPEN
      }
    path: /etc/wpa_supplicant/wpa_supplicant.conf

# These commands will be ran once on first boot only
runcmd:
  # Pickup the hostname changes
  - 'systemctl restart avahi-daemon'

  # Activate WiFi interface
  - 'ifup wlan0'

404 Not Found for k8s arm based dashboard

Getting a 404 error when trying to run the:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-arm.yaml error: unable to read URL "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-arm.yaml", server reported 404 Not Found, status code=404

command in the blog post https://blog.hypriot.com/post/setup-kubernetes-raspberry-pi-cluster/

Missing latest deb packages

There are download links for the latest deb releases of 1.10.3, etc but there aren't any for the 1.11 or 1.12 releases (of which there are SD card images)

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.