Categories
Resources Software Development

Linux how to fix Command ‘go’ not found, but can be installed with:

Command ‘go’ not found, but can be installed with:

So you just installed Go on Linux huh?

go not found
go not found error

This means you probably set the environmental variable via the command line which is temporary.  Don’t install go this way. You could do as the documentation says and add :

export PATH=$PATH:/usr/local/go/bin

However if you look in that file it has some important looking code in it. This is because it is a script.

linux profile script
linux profile script

It felt dirty to place the above code in that file so I did some research and found a better alternative. You simply create a new file in the /etc/profile.d directory and place the above export line of code in it and save it. You can name the file anything and add .sh to it and it will be found and loaded. Then you logout and back in like the documentation suggests and open a terminal and type “go version” and it works properly.

See my go_profile.sh file :

profile.d directory
linux profile.d directory

Doing it this way instead of adding it to the ~.profile file is better because it reduces the chance of messing up the code in a file. The script actually reads all of the files in the profile.d folder and this is why it works. For more information see this article in the section “Persistent environment variables”. You can do any other environmental variables you need set this way too.

Categories
Resources Software Development

How to easily add a desktop icon in ubuntu 18

They decided to make adding a desktop launch Icon even harder in Ubuntu 18, because you know we all love wasting our time googling all day trying to figure stuff out. It’s a repeating theme in the Linux community for decades now. Making things harder makes you feel smarter.

If you can avoid the UI and go for the command line, then go for it right. We all love typing in 120+ characters into the terminal, looking closely squinting, comparing character to character. It makes us feel smart like pretend hackers in movies right!!!

Why would anyone want to work efficiently anyways? Surely memorizing 1,000 linux commands and how the entire system works makes you feel smarter right? No? Me neither. My time is precious to me and maybe yours is to you too.

Here is a video that shows how to create desktop launch Icons. It still works in Ubuntu 18. Everything else you find suggests locating a file and typing a whole lot of lines of code.  And since it is so obscure  I will never remember it,  I am creating this post so  I can find it again later.

Categories
Resources Software Development

Computer Science information, resources and links

Articles

Introduction to concurrent programming. Link to a PDF by Rob Pike

CSP communicating sequential process free online book

Videos

Programming Language Syntax 1 – Backus-Naur Form (BNF)

Categories
Resources Software Development Web Development

Golang useful resources.

Useful Golang programming resources

Making The Move From Scala To Go, And Why We’re Not Going Back -> a great article about some reasons why a company switched to golang. It mentions some important things to consider. Golang is great for microservices.

Golang book. Free online book.

50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs

Golang Modules explained

More about Golang Modules

Golang Slices explained

Golang pointers explained in the tour

Golang interfaces explained. This is a very helpful article. I found the interfaces section on tour of go to be nonsensical jibberish. Here is the pure jibberish

var a Abser
f := MyFloat(-math.Sqrt2)
v := Vertex{3, 4}

a = f // a MyFloat implements Abser
a = &v // a *Vertex implements Abser

How is this implementing anything? It looks to me like assignment? Makes ZERO sense. Most of the tour is awesome and makes sense but this entire section is pure fail. It causes more questions than answers. Like this
// In the following line, v is a Vertex (not *Vertex)
// and does NOT implement Abser.
a = v

Ok  I am new. This to me looks like reassignment. Once again how does assignment make something implement something? And why not explain it to the new users? Any details as to what is going on would be helpful to new comers. If you quote it out and run the program it works. This section needs heavy updating and explaining. This is purely WTFF??? This is literally the absolute worst part of the entire Tour. This is where I hit my WTF moments and had to start using google to DECIPHER the encoded message.

Thinking in Go. This article is a must read for anyone coming from an OOP background such as Java wanting to understand Golang. There are no classes. No inheritance. No generics. No this. No that and No. Golang requires thinking entirely differently. Interfaces are the hardest thing to wrap my mind around so far.  The implicit magic is something  I don’t like I prefer words like implements to make my code more clear. If I could just find good enough information I’d understand it. I literally have to undo all of the years of OOP damage. When I first encountered Golang I heard that interfaces confused most new people, I understand why now. It is not just interfaces it is learning to think and build software in an entirely new alien way.

Golang Structs explained

More on Golang Interfaces — because they are nothing like interfaces you have face in other languages. The whole implementing thing is just totally wild. I hate implicit bullshit. It’s just unneeded magic for no reason other than to drop a few characters.https://www.digitalocean.com/community/tutorials/how-to-deploy-a-go-web-application-using-nginx-on-ubuntu-18-04

Thinking about Interfaces in Go — another great article about Golang interfaces. Interfaces are the most complex thing in go, so multiple references helps  more.

Go for Java Programmers — this is an awesome series of articles for java programmers coming to Golang. This is also helpful to PHP programmers since PHP is so similar to Java these days.

Go in VSCode: Must-have extensions and some limitations

Building Web Applications with GO — a free online book about how to build a web app with golang

How to deploy a Golang Application on Linux with NGINX 

 Go: the Good, the Bad and the Ugly   An article with lots of good information about Gotchas in Golang and some best practices.
Golang: Concurrency is Hard; So What Can We Do About It? A very good article about concurrency in Golang

Everything you need to know about Packages in Go – a great article all about packages.

Publishing Golang packages – golang article about how to version packages/modules

Why you should use a Go module proxy– why and how to create a go module proxy

Go 1.13 for Private Repositories  – What are private repositories

Videos

GothamGo 2018 – Things in Go I Never Use by Mat Ryer

7 common mistakes in Go and when to avoid them by Steve Francia (Docker)

Categories
Software Development

How many microservices per kubernetes pod?

How many microservices should I have per Kubernetes Pod? This is the question I had when I first encountered Kubernetes when trying to decide how to deploy my Microservice architecture based application.

When reading through Kubernetes documentation or watching videos about kubernetes, you are told a pod holds one or more containers. So your first question if you are doing microservices probably is. How many microservices do I put per pod if each microservice goes into a container? I mean it sort of seems like you could put all of your microservices in containers then put those in a pod.  You could do this, but it is not the correct way.

I kept digging and digging until I found a definitive answer. This video helped. It does a great job of explaining what a Pod is in Kubernetes and how it relates to microservices.

So as you can see each microservice goes into a container and each container becomes a pod. Therefore the answer is you should place one microservice per pod. However, as noted if your microservice container relies on something else then you also place that inside the pod, but do not place more than one microservice in a pod. If you are wondering more about when you would use more than one container in a pod this article gives examples.

Another question you may have is how many pods can you have per node? That is totally up to who you are using as your host, if you are using cloud services then many will list the limit. Here is a link I found about Amazon cloud instance limits.

Links

Here is a link to the documentation shown in the video about PODS.

Here is a link the the Kubernetes API documentation shown in the video.

Here is a link to more Kubernetes resources.

Categories
Resources Software Development

Kubernetes resources

Kubernetes resource list

Kubernetes and Microservices go hand in hand. Basically you don’t want to do one without the other. Kubernetes is a container orchestration software. When you build a system based on the Microservice architecture you need a way to package and run those microservices on the cloud.

The traditional way of preparing a machine by running scripts which download software and prepare a server environment to run your applications are over. It is far easier to roll your Microservices up into a container with all of it’s requirements and then deploy the container.

However, once you get all of your microservices into containers you need a way for them to find each other and work together as a team to form a larger application. This is where Kubernetes comes in. With Kubernetes you use YAML files to describe your system and how you would like your system to be maintained. Once you describe your system Kubernetes works hard to keep it in the way you describe it.

Kubernetes monitors your Microservice containers. When one crashes Kubernetes fires up another. When traffic is too much for a single Microservice node Kubernetes fires up another identical node and load balances the requests, when traffic reduces Kubernetes reduces the identical node count. Kubernetes is a dream come true for Microservice based applications.

Kubernetes is highly complex and takes a lot of time to master. That is why I suggest using Openshift. Openshift interacts with the Kubernetes api for you which makes everything much easier. You should still have a basic understanding of Kubernetes since Openshift is built on top of Kubernetes. OpenShift is one of the final links in the modern DevOps pipleline. Here is a link to more resources and information about OpenShift.

Articles

Here is a link to the main Kubernetes website.

Here is a link to a glossary of  Kubernetes terms

What is Kubernetes a beginners guide.

Here is a link to a page explaining Kubernetes Terminology. There are so many new terms this article makes it easy to find the meaning of Pods, Nodes, Clusters etc.

Here is the documentation overview link.

Here is a link to the kubernetes tutorials page.

Here is a link to the list of kubernetes api programming language clients for interacting with the Kubernetes API directly in your applications code.

Here is a link to the Kubetcl  online free book about kubernetes.

Kubernetes clusters and node size suggestions. This article will help you decide how large your node instances should be and how many nodes you should include in your cluster.

Kubernetes cluster autoscaler link on github.

List of Amazon cloud instance kubernetes POD limit per instance.

Kubernetes bootcamp website. This cool website walks you through the basics of Kubernetes.

Kubernetes YAML File simply explained for Beginners This is exactly what it sounds like

Videos

Kubernetes Architecture Simplified | K8s Explained in 10 Minutes


Organizing Kubernetes with Namespaces (Kubernetes Best Practices)


Kubernetes: One Cluster or Many?


Microservices, Kubernetes, and Application Modernization Done Right


Deploying Microservices in Kubernetes – Webinar by Certified Kubernetes Administrator Janakiram MSV

This video contains useful information about Kubernetes, Microservices and Launching a Microservice based application with Kubernetes. The beginning of this video starts out explaining how the traditional Monolithic architecture worked. It then moves onto how Microservice architectures work and continues by providing a comparison of the two. At ~22:45 the video starts to talk about deploying with Kubernetes

Kubernetes Architecture Made Easy | Coupon: UDEMYJAN20 | Udemy: Kubernetes Made Easy | K8s Tutorial


Kubernetes in 5 minutes

This video quickly gives an overview of kubernetes. It could go higher up on the list, but this is where it is.

Categories
Resources Software Development

Useful and interesting programming tools

Usernap this interesting tool connects to your github or gitlab account and visually displays bug tracking information to where ever you want it. This gives you the ability to allow guest views. I may use this to show my progress on development of the Social Platform.

Categories
Resources Software Development

Redhat developer resources

My list of resources and information about Redhat software etc.

RedHat OpenShift developer resources. This page has many links to free books, videos, articles etc.

Building containerized applications Lots of useful information and resources here. This covers some of the tools RedHat offers for development with containers such as Buildah, Podman and Skopeo. It has a link for a free Ebook about using PodMan. It also has many links to tutorials.

Ebook Introduction to Enterprise Kubernetes. This covers what RedHat OpenShift does for kubernetes deployments.

RedHat OpenShift for Developers This article quickly explains what OpenShift offers developers it has some great links to more resources.

RedHat OpenShift 4 CodeReady Containers . This page talks about running OpenShift clusters on your local desktop/laptop

Local OpenShift Development Environment on Windows. This shows how to install, run and use OpenShift CodeReady containers on your local machine. This is useful for learning how OpenShift works and testing your projects. This only works on computers with Windows 10

OpenShift CodeReady Container documentation. This is the documentation to CodeReady Containers mentioned above.

 

 

 

Categories
Resources Software Development

Container technology resources and information

Containers are quickly and drastically changing the way we build and deploy apps these days. Containers make deployment easier and faster by providing the exact environment that your code needs to operate. However, with this power and ease comes complexity.

First off there are various container technologies, but the most common is Docker.

Articles and links

Link to the Openshift Startup program membership page.

Link to Kubernetes free ebook. What to know before adopting kubernetes .

This is a really good link to a page full of OpenShift resources, videos, articles etc.

Link to Official OpenShift platform youtube page.

Link to OpenShift Demos and Developer info video playlist on youtube. This has some videos about version 3 but they are still useful as an overview of how OpenShift works etc.

What are the New Features of OpenShift 4? This article covers the new features in OpenShift.

OpenShift vs Kubernetes: What are the Differences?  Basically Openshift uses Kubernetes under the hood and offers improved features especially to security. One of the main reasons I never used Docker and Kubernetes was due to running all containers in root mode. That just begs to be hacked and destroyed. So when I realized that is how it worked I moved on. Now someone has done something about the lunacy.

CRI-O container engine runtime for kubernets

Containerization Explained

The Following video explains containerization technology.

This video actually does a Virtual Machine vs Container comparison which is handy information to know. When I first started down the Microservices route I was using Virtual Machines to emulate environments. Now I can just use Docker. The VM ate tons of resources.


Introduction To Docker and Docker Containers

This next video is about Docker and containerization. It covers some of what was in the above video but explains Docker.


Docker Tutorial – What is Docker & Docker Containers, Images, etc?

I really like this video it does a nice job of explaining Docker with diagrams.


Docker Tutorial for Beginners – A Full DevOps Course on How to Run Applications in Containers

Once you know what Docker is you will want to know how to use it. This is a Two Hour tutorial course on Docker.


Container Orchestration Explained


What is Kubernetes

Once you learn about containers and Docker you then need to know how to orchestrate your applications Docker containers. Kubernetes is an orchestrator for containers.


Kubernetes for Beginners – Docker Introduction in 15 Minutes

This video explains more about containerization, docker, kubernetes and why you would want to use them.


What is OpenShift?

Once you decide you want to use Kubernetes you need some way to host your apps. Meet OpenShift

 


OpenShift Technical Overview


Building and running micro services on OpenShift: Part I

This video has some useful technical information about how OpenShift works.


Building and running micro services on OpenShift: Part II

This video has some useful technical information about how OpenShift works with Kubernetes to orchestrate your application and help it scale up and down in response to traffic.


Building and running Microservices on OpenShift: Part III

This video further covers some of the basic features of OpenShift from a developers standpoint.


Demo – Deploying from GitLab to OpenShift Container Cluster

Categories
Resources Software Development

API resources and information

API (application programmers interface) Resources

This page lists different resources about API’s how to build and test them etc.

Articles

REST And Hypermedia And GraphQL And gRPC And Event-Driven This is a great article about these topics.

Postman apphttps://www.getpostman.com/downloads/


Videos

The Basics of Using Postman for API Testing