Blog Moved –> http://blog.leifmadsen.com
I am no longer blogging here. Please update your links to http://blog.leifmadsen.com which uses GoHugo and GitHub pages as a backend.
All previous content is also available at the new home of my blog.
Docker container results in x509: failed to load system roots and no roots provided
We have a small system running in AWS as a CentOS 7 image. It has a few containers that we’re using to host a few Golang API proxies. We migrated a customers API proxy that was running on the local VM into a container, and spun it up. Upon testing, we ran into the following error:
x509: failed to load system roots and no roots provided
We get that failure when trying to connect to an HTTPS endpoint (remote API that we’re proxying to Asterisk).
Figured it had to do with the fact we were using a scratch disk to build the container image, and that there were no certs loaded. Did some Googling and found some people with similar problems, but their solutions didn’t work for us on our CentOS 7 host system.
Then I thought maybe there was some issue with following a symlink as the source since we were loading in the ca-bundle.crt
file as a volume. I didn’t test enough to determine if that was the issue (it probably wasn’t), but this post gave me a hint:
https://github.com/docker/docker/issues/5157#issuecomment-69325677
So we did the following:
docker run -d -p 8085:8085 -v /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt [etc...]
After linking that file and mounting it in the container, all was well. I suspect it’s the path to the ca-certificates.crt
that was the real trick.
Configuring powerline to show working Git branch
So the documentation for Powerline kind of sucks. I followed this pretty good article on getting started with it. First thing I noticed however is that the if
statement on the article doesn’t work if you don’t have powerline installed (which kind of defeats the purpose of having the if
statement there at all).
# if powerline is installed, then use it command -v powerline-daemon &>/dev/null if [ $? -eq 0 ]; then powerline-daemon -q POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1 . /usr/share/powerline/bash/powerline.sh fi
Next up is the configuration. I primarily use my bash prompt as a way to indicate which branch I’m working in within a Git repository. You need to point at the default_leftonly
theme which is pretty easy to find when you web search for it. The issue is everything seems to just point you at the powerline docs, which aren’t the most clear.
First, start by creating a local configuration directory that will override the configuration for powerline for your user.
$ mkdir -p ~/.config/powerline
Then the next thing is to copy over the config.json
from the main powerline configuration directory where you can find the available color schemes and other shell, i3, vim, etc themes.
(Again, the documentation kind of sucks on where the root of these configurations live…)
On my Fedora 22 system they live in /etc/xdg/powerline/
. I then copy the config.json
from that directory to ~/.config/powerline
To get the Git branch stuff going, I modified the configuration file in the following way:
--- /etc/xdg/powerline/config.json 2015-02-18 18:56:51.000000000 -0500 +++ /home/lmadsen/.config/powerline/config.json 2015-09-09 17:11:43.937522571 -0400 @@ -18,7 +18,7 @@ }, "shell": { "colorscheme": "default", - "theme": "default", + "theme": "default_leftonly", "local_themes": { "continuation": "continuation", "select": "select"
To make it active you can run powerline-config --reload
. If you have any errors in your configuration (I actually ran into this when playing with the colorscheme setting and used “solorized” instead of “solarized”), you can check it with powerline-lint
.
Rumors of my death have been greatly exaggerated
It’s been way too long since I’ve blogged. And this post isn’t going to be all the impressive unfortunately. However, I recently have been running a BBS and some friends and I have been playing LORD.
We’ve been playing this for the last few months, and I think I’m going to run a tournament. Perhaps with some sort of buy in like $10 or something, winner takes all.
Going to build it out in such a way that first person to beat the dragon 3 times will win the game, and at that point that person will win the pot.
Additionally, I’ve been reading a lot about the Go language and trying to get myself up to speed on that. Very interesting programming language. Essentially C but for concurrency (multiple processors).
I’m hoping to start blogging in the near future, but my current work has just kept me too busy and I haven’t really had anything all that worth of blogging about. I hope to start changing that around soon and get back to blogging on a semi-regular basis with things I’ve learned in the world of telecommunications and cloud platforms / virtualization.
Additionally, I don’t have any confirmation yet, but I’m pretty sure I’ll be attending AstriCon in Las Vegas this year. I’m going to figure it out either way, so hopefully i can meet up with some of you this year! The last few years I’ve just kind of mostly kept to myself and hung out with those I’ve met previously. I’m going to make a better attempt at reaching out to those I haven’t met before, so if you see me, come say hi please!
Asterisk: The Definitive Guide 4th Edition goes to print
Howdy folks,
Sorry for the lack of updates lately. I’ve recently (December 2012) started at Thinking Phone Networks as the Lead UC Systems Engineer, and we’ve been incredibly busy there. In addition, the authors and I had been working on the final touches to the 4th edition of Asterisk: The Definitive Guide, which documents Asterisk 11 LTS.
Late last week, the book went to print, and should start to appear on store shelves and start shipping from Amazon and other locations within the next 6-8 weeks I believe. However, if you’ve purchased the digital version, it’s already available!
I got mine from O’Reilly, and sync’d it to my Dropbox and shared it with my co-workers. There are usually deals around on Amazon and the O’Reilly website that will let you purchase both the digital and printed versions. The digital should be available immediately, with the printed version shipping as soon as it’s available.
Thanks to everyone who helped make the 4th edition a success, and to get it done in the last 8 months! It’s been quite the journey since the 1st edition was released in 2005.
You must be logged in to post a comment.