Invalid value for field ‘resource.disks[0].initializeParams.sourceImage’

December 6, 2018 Leave a comment

Problem:
You ran (from https://github.com/kelseyhightower/intro-to-kubernetes-workshop/blob/master/labs/install-gce-client-tools.md)

$ gcloud compute instances create workshop-test \
 --image-project coreos-cloud \
 --image coreos-stable-835-12-0-v20160202 \
 --boot-disk-size 200GB \
 --machine-type n1-standard-1 \
 --can-ip-forward \
 --scopes compute-rw

And get the following error

– Invalid value for field ‘resource.disks[0].initializeParams.sourceImage’: ‘https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-835-12-0-v20160202’. The referenced image resource cannot be found.

Solution:
The image being referenced does not exist. Get the list of images and pick the correct one.

$ gcloud compute images list --uri | less

$ gcloud compute instances create workshop-test \
 --image-project coreos-cloud \
 --image coreos-stable-1911-4-0-v20181127 \
 --boot-disk-size 200GB \
 --machine-type n1-standard-1 \
 --can-ip-forward \
 --scopes compute-rw
Created [https://www.googleapis.com/compute/v1/projects/ktinga-hallway-224527/zones/us-central1-f/instances/workshop-test].
NAME           ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP     STATUS
workshop-test  us-central1-f  n1-standard-1               10.128.0.2   35.184.123.230  RUNNING

Source:
https://github.com/docker/machine/issues/3904

Advertisements
Categories: gcloud Tags: ,

Reinstalling minikube

December 5, 2018 Leave a comment

Problem:
How to reinstall minikube

Solution:

1. Stop it if it was running

$ minikube stop

2. Delete the VM in Virtualbox
3. Delete the .minikube folder

$ rm -rf ~/.minikube

4. Reinstall it if need be. Follow install instructions -> https://kubernetes.io/docs/setup/minikube/

Source:
Troubleshooting annoying issues with minikube

Categories: kubernetes Tags:

ALE (Asynchronous Lint Engine)

December 4, 2018 Leave a comment

ALE (Asynchronous Lint Engine) is a plugin for providing linting in NeoVim 0.2.0+ and Vim 8 while you edit your text files, and acts as a Vim Language Server Protocol client.

ALE makes use of NeoVim and Vim 8 job control functions and timers to run linters on the contents of text buffers and return errors as text is changed in Vim. This allows for displaying warnings and errors in files being edited in Vim before files have been saved back to a filesystem.

In other words, this plugin allows you to lint while you type.

https://github.com/w0rp/ale

Categories: vim Tags: ,

How can I change the author name / email of a commit?

December 3, 2018 Leave a comment

Problem:
I needed to change the email address for multiple commits.

Solution:
Followed the steps under this section in the source.

Using Interactive Rebase

Interactive Rebase is the Swiss Army Knife of tools in Git: it allows you to do and change almost anything. However, being as powerful as it is, this also means you can very easily shoot yourself in the foot. Use it with care (and possibly read up on it)!

Source:
https://www.git-tower.com/learn/git/faq/change-author-name-email

Categories: git, Interesting Tags:

Kubernetes for Python Developers: Part 1

November 29, 2018 Leave a comment

Kubernetes is an open-source container-orchestration system for automating deployment, scaling and management of containerised apps.

Kubernetes helps you to run, track and monitor containers at scale. It has become the de facto tool for container management.

Kubernetes is the largest and fastest growing open-source container orchestration software.

This blog post is the first part of a series: Kubernetes for Python developers.

Our goal is to migrate a Celery app app we developed in a previous blog post from Docker Compose to Kubernetes.

You do not need any Kubernetes knowlegde to follow this blog post. You should have some experience with Docker.

In this first part of the series, you will learn how to set up RabbitMQ as your Celery message broker on Kubernetes.

You will learn about kubectl, the Kubernetes command line interface. And by the end of this article you will know how to deploy a self-healing RabbitMQ application with a stable IP address and DNS name into the cluster.

https://www.distributedpython.com/2018/11/28/kubernetes-python-developers-part-1/

Categories: Interesting, kubernetes Tags: ,

Infrastructure As Code Tutorial

November 26, 2018 Leave a comment

This tutorial is intended to show what the Infrastructure as Code (IaC) is, why we need it, and how it can help you manage your infrastructure more efficiently.

It is practice-based, meaning I don’t give much theory on what Infrastructure as Code is in the beginning of the tutorial, but instead let you feel it through the practice first. At the end of the tutorial, I summarize some of the key points about Infrastructure as Code based on what you learn through the labs.

This tutorial is not meant to give a complete guide on how to use a specific tool like Ansible or Terraform, instead it focuses on how these tools work in general and what problems they solve.

https://github.com/Artemmkin/infrastructure-as-code-tutorial

Source:

https://github.com/Artemmkin/infrastructure-as-code-tutorial?utm_source=DigitalOcean_Newsletter

Useful Linux Command Line Bash Shortcuts You Should Know

November 21, 2018 Leave a comment

In this article, we will share a number of Bash command-line shortcuts useful for any Linux user. These shortcuts allow you to easily and in a fast manner, perform certain activities such as accessing and running previously executed commands, opening an editor, editing/deleting/changing text on the command line, moving the cursor, controlling processes etc. on the command line.

Although this article will mostly benefit Linux beginners getting their way around with command line basics, those with intermediate skills and advanced users might also find it practically helpful. We will group the bash keyboard shortcuts according to categories as follows.

https://www.tecmint.com/linux-command-line-bash-shortcut-keys/

Categories: bash, Interesting