Stress test CPU & Memory in Ubuntu

stress is a command line tool you can use to stress test CPU and Memory in Linux. An example could be:

stress --cpu 8

A pretty neat snippet to generate a small CPU load in a container

You can use the following to create a small CPU load in a container's bash:

 while :; do echo 'Hit CTRL+C'; sleep 1; done

"docker-compose up" error "Couldn't connect to Docker daemon"

I got this error trying to run the "docker-compose up" command:

$ docker-compose up -d     
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?                                                                                                                             
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

A quick fix is:

$ sudo chown $USER:docker /var/run/docker.sock

My first month as Searchlight's PTL

At the end of the Rocky development cycle of OpenStack, the Technical Committee intended to remove Searchlight [1] and some other projects (e.g. Freezer) from the Governance (OpenStack official projects). The reasons for that are because Searchlight has missed several milestones and lacked communication of the PTLs (Project Technical Lead). I couldn't stand the fact that a pretty cool project would be abandoned so I nominated to be the PTL of Searchlight for the Stein cycle. I hope that I can do something to revive it.

Why should Searchlight be revived? 

That is the question I tried to answer when decided to take the lead. It's harder and harder for cloud operators to get the information about the resources of other services (e.g Nova Compute, Swift, Cinder etc.) because they evolve very fast and there are more and more resources and APIs are made (Do you hear about the placement API of Nova?). Searchlight is pretty cool in this case because It centralizes all of that informat…

Search and replace a string in multiple text files in Linux

You can use this following command to search and replace a string in multiple text files in Linux:

Original string: "Click here for filters."New string: "Click here for filters or full text search."

find ./ -type f -exec sed -i 's/"Click here for filters."/"Click here for filters or full text search."/g' {} \;