Monthly Archives: February 2020

AWS: CloudFormation – Nested Stacks and stacks parameters Import/Export

29 February 2020
 

 Nested Stacks in AWS CloudFormation are stacks, created from another, a “parent”, stack using AWS::CloudFormation::Stack. The main idea behind the Nested Stacks is to avoid writing superfluous code and to make templates reusable. Instead, a template is created only once, stored in an S3 bucket, and during stacks creation – you just refer to it.… Read More »

Linux: gnome-keyring setup as Freedesktop SecretService

26 February 2020
 

 Currently, I’m using KeePass as passwords, RSA-keys, and as the Freedesktop SecretService, see the KeePass: an MFA TOTP codes, a browser’s passwords, SSH keys passwords storage configuration and Secret Service integration post. The first issue I faced with during such a setup is the fact that KeePass’ database is synced between my computers (it’s database… Read More »

Redis: “psync scheduled to be closed ASAP for overcoming of output buffer limits” and the client-output-buffer-limit

26 February 2020
 

 We have a Redis-cluster with Master-slave replication and Sentinel, see the Redis: replication, part 2 – Master-Slave replication, and Redis Sentinel, Redis: fork – Cannot allocate memory, Linux, virtual memory and vm.overcommit_memory, and Redis: main configuration parameters and performance tuning overview posts. The system worked great until we started using it much more actively. Redis… Read More »

Linux: PHP-FPM, Docker, STDOUT and STDERR – no an application’s error logs

24 February 2020
 

 We have a Docker image with NGINX, PHP-FPM, and Supervisor. In the same image, we have our PHP application included, which outputs its errors to the /dev/stderr as per its php.ini file: … [global] error_log=/dev/stderr … The problem is, that if run kubectl logs –  there will be no error output from the application. So,… Read More »

PHP: PHP-FPM ignores environment variables – solutions

19 February 2020
 

 We have a PHP-based application running in Kubernetes and uses settings from a /app/.env file plus environment variables. The problem is that application running in a Docker container can’t see an $TEST_VAR variable although it’s present in the Deployment: … containers: – name: application-dev-web image: bttrm-application:119 … – name: TEST_VAR valueFrom: secretKeyRef: name: bttrm-app-secret key:… Read More »

Kubernetes: running metrics-server in AWS EKS for a Kubernetes Pod AutoScaler

15 February 2020
 

 Assuming, we already have an AWS EKS cluster with worker nodes. In this post – we will connect to a newly created cluster, will create a test deployment with an HPA – Kubernetes Horizontal Pod AutoScaler and will try to get information about resources usage using kubectl top. Kubernetes cluster Create a test cluster using… Read More »

Kubernetes: running a push-server with Gorush behind an AWS LoadBalancer

6 February 2020
 

 Gorush is a Go-written application which we are planning to use to send push notifications to our mobile clients. The project’s home – https://github.com/appleboy/gorush The service will be running in our Kubernetes cluster in a dedicated namespace and must be accessible within the cluster’s VPC only, so we will use an Internal ALB from AWS.… Read More »