Post

Jolie on Azure Functions

Immagine
Hi all. Some weeks ago Azure Functions' team released (as a preview) custom handlers . From the official doc: Custom handlers are best suited for situations where you want to: Implement a function app in a language that's not officially supported . Implement a function app in a language version or runtime not supported by default. Provide more granular control over the function app execution environment. I think this is a really powerful feature and you can actually find a lot of articles showing how to leverage it to write functions in Go, PHP, etc Now I'm going to add yet another programming language to the list: Jolie . Again, from the documentation: To implement a custom handler, you need the following aspects to your application: A host.json file at the root of your app A function.json file for each function (inside a folder that matches the function name) A command, script, or executable, which runs a web server In addition, you have to supply a

Jolie micro services on Kubernetes

Jolie is a (micro) service-oriented language. Jolie's capabilities work well with Docker and you can find an example in the official documentation here . So d eploying a Jolie service in a Docker container is quite easy. Now it's time to go onboard with Kubernetes ;-) This is only a little demo on how to set up a Kubernetes environment on your PC (thanks to minikube) and build up a scalable clusterized version of Jolie's "Hello world" example. You can find Jolie examples on this GitHub project . What we are going to do now is to transform "01_getting_started" sample (which simply twices a number) into a powerful Kubernetes scalable app (doing exactly the same thing, but in a cool way). If you object that this is very unreasonable, I have to remind you that it is perfectly aligned with today's software industry standards. :-P To be honest I'm not going to explain what Kubernetes is and how it does what it does, so please go read a

Kubernetes NGINX Ingress - Automating dynamic rules management

A few points to ensure you're interested in this argument. You set up a Kubernetes cluster where you deployed your brand new containerized application. You set up an NGINX based Ingress to expose it and manage TLS termination. You need to handle a lot of routing rules (growing from some to thousands) and, more important, you need automation. I assume steps 1 and 2 are done, so let's dive in rules management and its automation. The first option Kubernetes gives you is this cli command : kubectl edit ingress <your_ingress_name> An editor comes up you can modify the ingress resource, when you save the configuration is  automatically updated. That's ok and really useful, but not suitable if you need automation, and a DevOps guy should automate everything! :-P So I've found resources can also be patched , supplying a json string. As an example you can create a file with json patch definition: [{     "op": "add",     "

Ansible, Azure & WSL survival guide (VS Code bonus track)

Hi all you new DevOps! This guide is meant for poor Windows' users struggling to get Ansible working on their workstations, like me few days ago :-( Scenario: you're involved in a brand new cloud project on Azure, you're trying to make things work with Ansible and your company provides you a Windows 10 ™ PC, but Ansible DO NOT RUN on Windows. In addiction you're lazy and bored to start yet another virtual machine, just to type "git pull" and "ansible-palybook" :-D (by the way your precious SSD is getting dangerously full). And you do want your memory greed Visual Studio Code, with autocompletion, syntax highlight, all-known languages modules and other silly stuff. First of all, let's install WSL (if you don't know what WSL is, google it): https://docs.microsoft.com/en-us/windows/wsl/install-win10 I assume you installed an Ubuntu 16.04 upon WSL. Quite simple, isn't it? Now you should install Ansible and all needed Azure modules.

Faa(m)s - Fuffa as a microservice [seconda parte]

Immagine
Dopo aver esplorato in maniera pressoché esaustiva nel post precedente la potenza del Serverless Cloud Computing, in questa seconda puntata ho pensato di orientarmi verso altre 2 tematiche-totem dell'informatica contemporanea: la cross-platformitidune e l'architettura a microservizi. Qualunque progetto che ambisca ad essere al passo con i tempi non può prescindere da queste buzzwords! In realtà il punto cross-platform era già stato smarcato mentre preparavo il materiale per il primo post: grazie all'avvento di .NET Core è stata M$ stessa a risolvere la questione alla radice. L'unico problema era portare la libreria TinyGrammar da .NET Framework a .NET Core (anzi a .NET Standard per essere precisi), per fortuna la cosa si è rivelata molto semplice seguendo questa guida . Libreria e unit test non hanno praticamente richiesto nessuna modifica, la console app l'ho dovuta riscrivere, nel senso che ho dovuto fare copia e incolla dentro il progetto vuoto di VS2017:

FaaS - Fuffa as a Service [Prima parte]

Immagine
Qualche tempo fa qualcuno mi ha segnalato questa pagina: http://www.massimobarbieri.it/it/Tecnichese/ In pratica si tratta di un sofisticato generatore di supercazzole in gergo tecnico, basato su solide basi teoriche  (guardate anche l'altro esempio di utilizzo di TinyGrammar, ne vale la pena). Dopo aver fatto diversi click sul pulsante "Genera altro tecnichese" ho constatato (con le lacrime agli occhi per le risate) che il tool è robusto ed affidabile :-P Il contagio si è rapidamente sparso tra i colleghi, scatenando la facile ironia di chi faceva notare quanto le frasi generate fossero praticamente indistinguibili da alcuni discorsi sentiti durante serissime riunioni di lavoro. A questo punto, siccome non so se sono più nerd o più cazzaro, mi sono accorto che Barbieri (grazie Massimo) ha pubblicato su GitHub la sua libreria  con licenza GPL e che sarebbe stato facile modificare il dizionario della grammatica per renderlo ancora più affine al mio ambito aziendale (

Jelly Bean on Toshiba Folio

Immagine
Only few weeks with ICS, it's time for Jelly Bean on my Folio! I just followed the instructions on this post (only cache wipe required). This ROM is CyanogenMod 10 based and works really fine . By the way I did the entire procedure within the tablet, no PC need, just download, reboot and flash!