惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Last Watchdog
The Last Watchdog
AI
AI
Recent Announcements
Recent Announcements
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
J
Java Code Geeks
TaoSecurity Blog
TaoSecurity Blog
L
LangChain Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Project Zero
Project Zero
Microsoft Security Blog
Microsoft Security Blog
量子位
T
Threatpost
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
博客园 - 聂微东
L
LINUX DO - 最新话题
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
C
Check Point Blog
宝玉的分享
宝玉的分享
G
Google Developers Blog
Spread Privacy
Spread Privacy
Cloudbric
Cloudbric
SecWiki News
SecWiki News
有赞技术团队
有赞技术团队
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
V
Vulnerabilities – Threatpost
Cyberwarzone
Cyberwarzone
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
P
Palo Alto Networks Blog
H
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
About on SuperTechFans
N
Netflix TechBlog - Medium
罗磊的独立博客
月光博客
月光博客

Dizzy zone

Pangolin Private Resources With Domain Https About Redis is fast - I'll cache in Postgres n8n and large files Malicious Node install script on Google search Wrapping Go errors with caller info BLAKE2b performance on Apple Silicon State of my Homelab 2025 My homelabs power consumption On Umami ML for related posts on Hugo Probabilistic Early Expiration in Go SQLC & dynamic queries Enums in Go Streaming Netdata metrics from TrueNAS SCALE SQL string constant gotcha Moving from Jenkins to Drone My new server: MSI Cubi 3 Silent My thoughts on Ansible® Profiling gin with pprof How I host this blog, CI and tooling Refactoring Go switch statements OAuth with Gin and Goth I made my own commenting server. Here's why. Why I hate OpenApi(swagger) IDE for GO How I started my professional career Kestrel vs Gin vs Iris vs Express vs Fasthttp on EC2 nano Go's defer statement Self-hosted disqus alternative for 5$ a month Why I like go Speeding hexo (or any page) for PageSpeed insights Starting a blog with hexo and AWS S3
Jenkins on raspberry pi 3
Vik · 2018-02-09 · via Dizzy zone

So I’ve had this raspberry pi 3 laying around in my closet for a year or a bit more now. While I thought I’d use it for automating something such as monitoring our plants for changes in soil moisture that did not come to fruition. With the start of this blog and the increase in tooling around it, I really needed something to run any sort of CI platform. I tend to host everything under AWS so that everything is under one roof. Issue there is that it might become rather expensive if you start spinning many instances. And CI is something that you might not want to run on the same machine as your services. So I thoguht to myself maybe I can get my jenkins on ec2-nano? That would probably set me back 5$ a month. Then a cheaper option came to mind - why not use the RPI3 for my Jenkins?

Getting jenkins on rpi3

The setup process was rather easy. Just ran this bash script on my raspbian terminal.

# install docker
curl -sSL https://get.docker.com | sh
# install jenkins
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

Now what I needed to do is get the generated admin password for jenkins. Just run this:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

I then ran into an issue where jenkins could not connect to the internet. To fix it

sudo nano /var/lib/jenkins/hudson.model.UpdateCenter.xml`
# (I know I'm a scrub for not using vim)
# change the https://updates.jenkins.io/update-center.json to http://updates.jenkins.io/update-center.json.

Once that is done, I could do everything I’d normally do on jenkins. The intent for my jenkins instance has always been to build docker images and push them to AWS registry, where I could use ECS to run them on one of my isntances. Once I tried doing that, I noticed that there was an issue where jenkins could not reach docker. To fix it, run this on the raspberry sudo usermod -a -G docker jenkins && sudo service jenkins restart. With this, everything works as expected.

Performance

As expected, the raspberry is not a quick beast. Due to the meager cpu and the slow drive(32gb sd card) the raspberry is nowhere near a proper dedicated instance. Just to give you an example a build that runs 22 seconds on my Mac Pro with an i7, takes around 2.5 to 3 minutes to complete on the raspberry. Since I’m in no rush the build times are acceptable. Especially since I don’t build that often and the raspberry is powered 24/7. I’m still rather impressed that it manages to do what it does with the limited resources it has. Here’s a snap of what the top looks like while performing a go build:

A snap of RPI3 top under load.

It seems to be able to squeeze every single bit out of the tiny machine.

Limitations

Not all is well though. Raspberry runs on ARM. This is a particular pain for the types of work I’m using it for. If I build an image, I have to cross compile the binaries to AMD64. It’s all good an well with GO but if I end up using a more complex Dockerfile all hell breaks loose. It’s either exec errors when running commands while building the image or when running the image on AMD64. Qemu might be the answer here. I tried using it but to no avail. I ended up making the decision to rewrite everything to GO instead, since I like it so much. If you’ve got an idea how to make this work - let me know in the comments below.

The other limitation with this approach is that my jenkins is not reachable from the outside of my local home network. This means no hooks to trigger builds. Back to good old polling. It’s possible to expose it to the internet but since my IP is dynamic, I feel it would be too much work for little benefit.

Either way - I’m pretty damn happy about my new jenkins server. The question remains if the raspberry’s electricity bill is going to be less than 5$ a month though…

EDIT: I’ve since moved away from both the raspberry and the Jenkins towards a beefier machine. You can read about it here.

What do you guys use your raspberries for?