What is CI/CD

Our space is about mobile CI/CD but, let’s start with the basics in this article before going into the details of why mobile CI/CD is actually different than other CI/CD flows in our future articles. What is Continuous Integration? Continuous Integration (CI) is the building process for every code pushed to a repository automatically. This is of course a very simplified definition and CI contains a number of different components, which are like the building blocks that come together to become a workflow. A CI workflow may include operations like compiling the app, static code reviews and unit/UI testing with automated tools. There are a number of different tools for CI/CD, some of the most popular ones are Jenkins, Travis and CircleCI, but mobile CI/CD requires specialization and in our space, we will be talking more about mobile CI/CD tools like Appcircle and Bitrise…. Leggi tuttoWhat is CI/CD

Demystifying Containers – Part II: Container Runtimes

This second blog post (and talk) is primary scoped to container runtimes, where we will start with their historic origins before digging deeper into two dedicated projects: runc and CRI-O. We will initially build up a great foundation about how container runtimes work under the hood by starting with the lower level runtime runc. Afterwards, we will utilize the more advanced runtime CRI-O to run Kubernetes native workloads, but without even running Kubernetes at all. Introduction In the previous part of this series we discussed Linux Kernel Namespaces and everything around to build up a foundation about containers and their basic isolation techniques. Now we want to dive deeper into answering the question: “How to actually run containers?”. We will do so without being overwhelmed by the details of Kubernetes’ features or security related topics, which will be part of further blog… Leggi tuttoDemystifying Containers – Part II: Container Runtimes

Demystifying Containers – Part I: Kernel Space

This series of blog posts and corresponding talks aims to provide you with a pragmatic view on containers from a historic perspective. Together we will discover modern cloud architectures layer by layer, which means we will start at the Linux Kernel level and end up at writing our own secure cloud native applications. Simple examples paired with the historic background will guide you from the beginning with a minimal Linux environment up to crafting secure containers, which fit perfectly into todays’ and futures’ orchestration world. In the end it should be much easier to understand how features within the Linux kernel, container tools, runtimes, software defined networks and orchestration software like Kubernetes are designed and how they work under the hood. Part I: Kernel Space This first blog post (and talk) is scoped to Linux kernel related topics, which will… Leggi tuttoDemystifying Containers – Part I: Kernel Space

Apache server-status

To the uninitiated, the mod_status output can look like so much gobbledegook, but it’s really quite straightforward. Let’s take a look at some sample output. Apache Server Status for somedomain.com Server Version: Apache/1.3.9 (Unix) PHP/4.0b3 Server Built: Mar 4 2000 17:01:01 The first few lines identify and provide a brief description of your server. The server version information includes an incomplete list of some of the modules compiled into your server. Our example server is running on a Unix system and has been compiled with support for the PHP scripting language. (The level of detail provided by the server version line may be limited by the ServerTokens configuration directive.) Current Time: Thursday, 13-Apr-2000 17:22:36 PDT Restart Time: Thursday, 13-Apr-2000 17:15:26 PDT Parent Server Generation: 14 Server uptime: 7 minutes 10 seconds Total accesses: 42 – Total Traffic: 187 kB CPU… Leggi tuttoApache server-status

Logging the php mail function

From php version 5.3.0 we can use the directive mail.log to log who’s calling the function mail(). When someone calls the function mail() from a php script we can get some info about the sender in our log. I will enable logging globally. You can choose yourself where to activate it, editing your php.ini for cli, cgi, apache2, fpm… To enable it globally: sudo echo “mail.log = /var/log/phpmail.log” > /etc/php5/conf.d/mail.ini phpmail.log is the log filename used in my example. Then create the file: touch /var/log/phpmail.log chmod 777 /var/log/phpmail.log …and restart apache or process manager you are using: /etc/init.d/apache2 restart or /etc/init.d/php5-fpm restart

Troubleshooting High I/O Wait in Linux

Linux has many tools available for troubleshooting some are easy to use, some are more advanced. I/O Wait is an issue that requires use of some of the more advanced tools as well as an advanced usage of some of the basic tools. The reason I/O Wait is difficult to troubleshoot is due to the fact that by default there are plenty of tools to tell you that your system is I/O bound, but not as many that can narrow the problem to a specific process or processes. Answering whether or not I/O is causing system slowness To identify whether I/O is causing system slowness you can use several commands but the easiest is the unix command top. # top top – 14:31:20 up 35 min, 4 users, load average: 2.25, 1.74, 1.68 Tasks: 71 total, 1 running, 70 sleeping, 0… Leggi tuttoTroubleshooting High I/O Wait in Linux

Deframmenta per ottimizzare le tabelle di MySQL

In MySQL, quando si eliminano record da una tabella, lo spazio è riassegnato automaticamente. E ‘come uno spazio vuoto e formando gli allegati nuovi vantaggio. Il problema è che se una tabella di eseguire molte operazioni di DELETE, lo spazio fisico del tavolo sarà sempre più frammentato e il rendimento è ridotto. Nel MyISAM e InnoDB, OPTIMIZE TABLE comando disponibile ad effettuare l’ottimizzazione su qualsiasi tabella che, tra l’altro, esegue una deframmentazione automatica del tavolo. Si consiglia vivamente di utilizzare questo comando regolarmente in particolare su tabelle che sono più le dichiarazioni di smaltimento dei record. Per precauzione, di tenere presente che durante l’esecuzione, naturalmente, la tabella è bloccato. Si deve ricordare quando si sta per l’utilizzo con tabelle di grandi dimensioni e occupato. La sintassi è la seguente: OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE mi_tabla1 [, mi_tabla2] …; Per fare un tavolo di ottimizzazione frammentati possono essere selezionati per avere spazio libero, probabilmente… Leggi tuttoDeframmenta per ottimizzare le tabelle di MySQL

Mysqldump per prendere solo lo schema di una tabella

Mysqldump è uno strumento che viene utilizzato per creare copie di backup (o dump) dei database, incusi dati struttura e schemi. Ci sono una serie di switch (flags) da riga di comando che si possono lanciare per scaricare solo i dati o solo la struttura invece di tutto. Dump della struttura del database per tutte le tabelle senza dati Aggiungere il flag -d per indicare che nessun dato deve essere incluso nell’output. Il seguente comando dump della struttura della tabella per tutte le tabelle nel database specificato MySQL: mysqldump -d -u -p someuser miodatabase Il flag-d dice di non inserire i dati nel dump. In alternativa si può usare –no-data che è più semplice da ricordare. mysqldump –no-data -u  -p someuser miodatabase Dump della struttura del database per una sola tabella senza dati Esempio per una tabella mysqldump-d-u-p someuser miodatabase prodotti Pratiche di… Leggi tuttoMysqldump per prendere solo lo schema di una tabella

Creazione instanza mysql parallela

… ovvero come faccio ad avere due instanze indipendenti di mysql sullo stesso server ? Attenzione : Questo how-to è stato scritto e pensato per Ubuntu/Debian in particolare, alcuni path e directory potrebbero essere differenti nella vostra versione di Linux 1. Creo directory e predispongo i file di log mkdir /var/lib/mysql2 chown −R mysql.mysql /var/lib/mysql2/ mkdir /var/log/mysql2 chown −R mysql.mysql /var/log/mysql2 2. Creo una nuova configurazione di mysql cp -R /etc/mysql/ /etc/mysql2 A questo punto dobbiamo modificare il file di configurazione di mysql e cambiare la porta, socket e pid :  cd /etc/mysql2/ sed −i ‘s/3306/3307/g’ my.cnf sed −i ‘s/mysqld.sock/mysqld2.sock/g’ my.cnf sed −i ‘s/mysqld.pid/mysqld2.pid/g’ my.cnf sed −i ‘s/var\/lib\/mysql/var\/lib\/mysql2/g’ my.cnf sed −i ‘s/var\/log\/mysql/var\/log\/mysql2/g’ my.cnf 3. Inizializzazione e start Abbiamo a questo punto dell’how-to due scelte da fare : 1. creiamo una instanza vuota con database di default come se fosse una nuova… Leggi tuttoCreazione instanza mysql parallela