How caching works and why you would like to use it is very well explained by Gitlab themselves and I certainly don’t have anything to add to their story. This article includes nothing more than a super simple demonstration on how to apply caching to speed up the simple Gitlab CI pipeline for a Python Django project as a short follow up on my earlier article.
storing project dependencies
The only dependencies that we will focus on are the artifacts created by the installation of pip packages of both the test and the production setup.
If a cluttered desk is a sign of a cluttered mind, of what, then, is an empty desk a sign? — Albert Einstein
It is actually not at all certain whether Einstein has said the above “wisdom”. It’s probably just a bad excuse and we mortals, therefore, just have to keep our desktops tidy. I’ll show a method to automate this discipline on your Mac.
Save the following .cleanup.sh
file somewhere, not on your Desktop, for example in your user folder (e.g. ~/.cleanup.sh
):
#!/bin/bash echo "start clean up: $(date)"; find ~/Desktop -depth 1 -mmin +240 -exec rm -rf {} \…
I was happy with Helm when a far-more-experienced-Kubernetes-guy told me I should not use Helm because Tiller is unsafe and some other reasons. Now I follow the method of Tobias Bradtke, with the advantage of declarative application management; while I keep one cluster-definition in one Git repository.
update: The most apparent change of Helm 3 is the removal of Tiller, which makes the templating as shown here less relevant.
When you want to route HTTP and HTTPS traffic from outside your Kubernetes cluster to services inside your cluster, this can be done with Nginx-Ingress. Let’s Encrypt is a non-profit certificate…
For a project I was specifically asked to build an API using Python Django. So, my first starting point was to google “django cookiecutter” which immediately brought me to this amazing cookiecutter project. What I am going to demonstrate here is how to quickly setup the project (for the sake of completeness) and use Gitlab Continuous Integration to automatically unit test, run linters, generate documentation, build a container and release it.
We start with initiating the project using the mentioned cookiecutter project, although you can also use another cookiecutter or build on your existing project; you probably need to make…
Quite often I want to run a quick-and-dirty API to feed some data to mock-ups or hobby pilots. Without setting up a container orchestrator, I want a 5$ server and have my container running within 10 minutes and the ability to update it. I assume you have ssh access to an Ubuntu server with a user with root permissions, know some Ubuntu cli and Docker commands. We are going to follow the next steps:
Obviously you can skip this step if Docker is already installed…
Let’s initialize a Vue project from a docker container; build the Vue project with a multi-stage Dockerfile; and finish with how to develop in debug mode with docker-compose!
All that is required is that you have docker and docker-compose installed locally.
Run the following command while replacing myproject
with your project name:
mkdir myproject && cd "$_" && docker run --rm -v "${PWD}:/$(basename `pwd`)" -w "/$(basename `pwd`)" -it node:11.1-alpine sh -c "yarn global add @vue/cli && vue create ."
It creates the directory and runs a node container with the Vue/cli mounted to this directory. When installing choose yarn.
While working on many different applications with co-developers on different platforms, Docker solves many of our problems. Also it narrows the gap between development, testing and production environments. The only requirement here is to have Docker and docker-compose locally installed.
We start with how to initialize a Quasar project from a docker container; next we build the Quasar project with a multi-stage Dockerfile; we finish with how to develop in debug mode with docker-compose.
To initialize the project, we only need to make the new directory and install the vue-cli. …
This is not really the recommended way to run applications in production, but it is a fast and effective method to run mock-ups on a simple webserver in minutes.
Prerequisite:
The following steps:
I usually follow the following simple steps to prepare the machine. …