<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gabriele Provinciali on Medium]]></title>
        <description><![CDATA[Stories by Gabriele Provinciali on Medium]]></description>
        <link>https://medium.com/@Gabba?source=rss-e3e79e29ce2a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gV7-3QL7O3nrEQ8HJqtjcA.jpeg</url>
            <title>Stories by Gabriele Provinciali on Medium</title>
            <link>https://medium.com/@Gabba?source=rss-e3e79e29ce2a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:39:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Gabba/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[L’eco degli Dei]]></title>
            <link>https://medium.com/@Gabba/leco-degli-dei-30650447f7cf?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/30650447f7cf</guid>
            <category><![CDATA[metallo]]></category>
            <category><![CDATA[pink-floyd]]></category>
            <category><![CDATA[running]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Sun, 05 Sep 2021 18:19:28 GMT</pubDate>
            <atom:updated>2021-09-05T18:36:19.949Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E38mvBwSWFhc1AVAKCNbDQ.jpeg" /></figure><p>E’ agosto, la brutta stagione. Finestre aperte, rumori umani e quadrupedi senza pietà, in questo angolo morto di periferia dimenticata ma modernizzabile attraverso apposita funivia. Fa già ridere così, inutile accanirsi.</p><p>Continuo a camminare est-ovest-est nel mio picostudio.</p><p>In condizioni normali uno spazio sufficiente, in pandemia meno di quattro falcate dalla porta pieghevole alla finestra con dotazione di inferriata dissuaditrice, anche se non credo metta paura ai malintenzionati. La povera inferriata sta ritta lì da anni come uno spaventapasseri in campo aperto, contro ogni norma euclidea.</p><p>Il camminamento mima inconsapevolmente lo stesso portamento del galeotto che mi abita sotto (dobbiamo darci delle regole: mi è consentita una sola rima per paragrafo, e questa me la sono giocata), ma senza la sua criminale sicumera, e questo vela un po’ di tristezza la procedura pappa-e-a-nanna-presto, dedita al fantasticare l’equivalente post-millennio digitale di pecore che saltano la staccionata, in imperfetto loop.</p><p>Di sopra invece vive famiglia Neanderthal in puro Osmio. Ogni passo dei primati causa stress alla povera inferriata, che mi scongiura di smontarla e di darle nuova vita regalandola ai “TUTO FERO RACOLIAMO” che squillano la loro presenza a 110 dB la mattina alle 07.30.</p><p>Decido che i punti della lista possono esser tre, probabilmente un quarto romperebbe una comoda e confortevole asimmetria e decido di dormirci sopra. Per coprire i rumori del fuorilegge e dei ferrobipedi potrei mettere in cuffia qualcosa di tranquillo, tipo Meshuggah o primi Opeth non ancora rincoglioniti, ma ho le orecchie che sembrano due panzerotti materani, e me ne farò una ragione.</p><p>*****</p><p>La mattina seguente, rinnovo un’occhiata al post-it bianco che reca, vergati a matita, i tre punti chiave. Non vedo alcuna scritta. Inforco gli occhiali da diversamente ipermetrope e, con doppio salto alla Houdini, caratteri non lineari appaiono sul quadrato bianco di un blocco che tempo fa prelevai sodomiticamente in uno spazio di coworking, e con somma goduria (basta poco per farmi felice e sopire i miei istinti clepto, come l’asportazione di una matita — quella utilizzata per scrivere i punti, un blocco di post-it, una coffee mug coordinata, anche in sessioni diverse).</p><p>Rileggo, sperando di trovare qualche significato nascosto o dimenticato, e i tre punti si ergono come spartani alle Termopili. <em>Vieni a prenderci</em>, ululano. Inutile chieder loro una spiegazione, preferirebbero tornare a casa sopra lo scudo che una disonorevole delazione. Pronuncio a media voce la sgrammaticata ed insensata triade:</p><ul><li><strong>Pezzo batteria.</strong></li><li><strong>Ricominciare correre.</strong></li><li><strong>Scrivere qualcosa.</strong></li></ul><p>la cui interpretazione vocale da stereotipo pellerossa-in-film-di-visi-pallidi si interrompe con una risata soffocata. Mai scrivere note prima di andare a letto. E mai dimenticare di scrivere note che il giorno dopo non ricorderesti.</p><p>Mi dico che sto iniziando alla grande, e che soprattutto la precisione chirurgica del primo e del terzo punto riflette accuratamente il mio abbrutimento calcificato, la regressione che sto vestendo come uno smoking su misura ormai da anni. Il sarcasmo lascia spazio (a calci ben assestati) alla speranza. I giorni di ferie non sono molti, e allo stesso tempo sono un’eternità, dipende da quello che devi fare e da come devi farlo. La speranza lascia spazio (organicamente, stavolta) al dubbio.</p><p>Guardo il quadrato bianco come se fosse una carta del Mercatore miniaturizzata, lo posiziono vicino alla coffee mug coordinata e investo quasi tre euro in materiale digitale per iniziare la lavorazione del punto numero uno. “Pezzo batteria” è un rituale orfico che ha bisogno di tempo, coinvolge minimo due bipedi (uno sono io) e un luogo ben preciso. Sembra quasi tempo di farsi forza attraverso una citazione via intramuscolo, ma penso alla sterminata platea dei citazionisti e negazionisti seriali di cui etere e social avvelenati sono gonfi. Spero che la legge del contrappasso li confini — post-esistenza — a sedute terapeutiche presso il Grande Ordine Ultraterreno degli Aforismi Anonimi, perennemente seduti in circolo, dove ci si introduce con la solita formula che ben sappiamo “Ciao, sono Tizio, e ho smesso di citare da 8 giorni…” continuando a rubacchiare perle di saggezza da fonti infinite.</p><p>Desisto.</p><p>Preferisco pensare qualcosa di volgare, autentico e viscerale per descrivere il primo giorno devoto all’inizio di tre incantesimi, scritti su blocchetto di post-it rubacchiati, che impiegheranno giorni per essere pienamente maturati.</p><p>Sono una persona semplice, con modi ed accenti in bilico tra ragione e sentimento, e in questo momento la prima è in netto svantaggio, lasciando spazio a pulsioni periferiche ed a allitterazioni ovine. Nessun aforisma, nessuna velleità di investigazione ermeneutica. Solo tre piccoli sassolini nella scarpa, nativi dell’hinterland romanide che ritroverò, intonsi, domattina.</p><p>*****</p><p>Il primo visitatore è il primo giorno. Sveglia ore 6.00, lo specchio davanti al letto mi restituisce uno scenario insano. Un vecchio, completamente fradicio, bollito da una notte a 29 gradi senza conforto termoregolatore (deh, le gioie del matrimonio), borse ineleganti e démodé sotto l’apparato oculare, panza da stato interessante terzo mese, semicalvo, imbolsito e gonfio come un batrace. In pratica, un colonnello Kurtz de noantri senza la geniale ed inarrivabile attenuante denominata Marlon Brando.</p><p>Data terribile ed inopportuna vista, mi rimetto a letto, sperando che la memoria da pesce rosso cancelli o attenui l’orrore appena esperito. Non riesco a riaddormentarmi. Il paragone infausto con Kurtz mi ricorda l’aforisma della lumaca e del rasoio, mi stimola un giustappunto d’angoscia e rododendro per aver pensato ad una citazione e mi costringe finalmente al rialzo, alla lavatura e alla scozzonatura della prima corsetta dopo qualche mese.</p><p>Vestizione per il ricomincio: maglietta da corsa del 2011, pantaloncini da corsa del 2011, calze del 2011. Le scarpe sono di qualche anno fa, pre-pandemiche, quelle del 2011 non le trovo. L’aspetto e le movenze sono quelle di un cotechino di S. Silvestro con arti antropomorfi. Le sembianze da wurstellone scaduto non piega né spezza le mie aspettative, alle 6 di mattina mi vedranno poche persone, carico una playlist sospetta denominata “Monday Run” (immagino sia del 2011) sullo Smartphone, vada come vada, parto.</p><p>Temperatura alle 6.20 antimeridiane: 26 gradi. Umidità al 73 per cento. Un canetto in miniatura mi abbaia con ampia produzione di saliva e odio, protetto da una staccionata: io lo mando serenamente affanculo insieme al suo compagno umano e ognuno continua per la propria strada coltivando i propri sogni: il microcanide sogna un osso grande il doppio di lui, io sogno di tornare a casa vivo.</p><p>Nonostante il caldo, il primo pezzo è un colpo di maglio sul mesencefalo: Pieces of Me dei Fates Warning, anno domini 2000. Mi ricordo di Disconnected, un grande album, ho sempre adorato i Fates, con Ray Alder e con John Arch. Non mi piacciono le guerre di religione.</p><p>Continuano i Fates con Prelude To Ruin dal vivo di Still Life, anno domini 1998. Gran pezzo. Il classico su vinile del 1986 è cantato da John Arch, quello dal vivo da Ray Alder. I fan preferiscono John Arch, a me piacciono entrambi. L’unica reale differenza è che nel 1986 avevo 22.5 anni, ero metallaro, lavoravo come sviluppatore in Ericsson e Internet non era disponibile ai comuni mortali. Nel 1998 lavoravo per una startup (esistevano anche allora) e il mio terzo pargolo aveva 1 anno.</p><p>I Fates lasciano il posto al metallo industriale dei Fear Factory: Demanufacture, Self Bias Resistor e una solleticante ed inutile cover di Cars, un pezzo new wave che all’epoca mi provocava deiezioni improvvise, ma che ricostruita dai Fear trova il suo posto nella playlist di un pisquano che, ballonzolando, corre ad agosto, in città borgata, con chiaro aspetto da Boomer sfigato, rock nelle orecchie e montante odio per l’auto-tuner <em>che sia stramaledetto causa di tutti i mali chissà dove andremo a finire musica di merda Spotify è la rovina dei musicisti progresso ‘sta ceppa si stava meglio quando si stava peggio </em>eccetera eccetera.</p><p>Non riesco a fare due cose insieme, cioè correre e incazzarmi per la presunta scarsa qualità della musica odierna, ed inizio a rallentare mentre iniziano i Metallica con Through the Never, The Wait e una cover degli Anthrax che simpaticamente suonano Phantom Lord. Perché mi piacciono così tanto le cover? Transfert musicale? Se mai avrò un analista, proverò a chiederlo. Forse.</p><p>Quanti ricordi! I primi CD comprati a Piccadilly Circus da Tower Records (mi domando se ora sia un Sushi Restaurant per finti ricchi o un Pret-a-Porter per finti poveri).</p><p>In particolare ricordo l’uscita del Black Album, nel 1991, come pellegrinaggio e passaggio obbligato da Tower per prendere il ciddì che ascoltai a ripetizione (fino ad usura batterie del mio Sony Discman e usura gonadi dei miei vicini di posto) nel viaggio in treno da Londra a Manchester.</p><p>I ricordi si aggrovigliano, si contaminano e sbiadiscono con qualche pezzo dal vivo di Live Scenes from New York dei Dream Theater, come The Mirror, Just Let Me Breathe, Acid Rain (pezzo dei Liquid Tension Experiment giocato in casa) e la crasi Caught in a New Millennium. Che mi prenda un colpo secco (si fa per dire), erano in grande spolvero i DT, e sono contento che abbiano lasciato un disco stupendo con qualche (lievissima) imperfezione (uno degli stacchi in Erotomania, una sbavatura in New Millennium): la musica dal vivo richiede un tocco umano, fatto di variazioni, creatività e differenze. In caso contrario, si rischia l’annegamento nel soffio digitale realizzato dalle macchine e non dalle persone. Cerco di evitare gli accidenti ai figli ed ai parenti dell’auto-tuner e gli incidenti a causa di bipedi che pensano di essere al <em>Grand Prix de Casalottì</em> su strade larghe due spanne e mezzo e ritorno a casa, dove mi preparo per la registrazione del non articolato ‘Pezzo Batteria’.</p><p>Val (il maestro di batteria) mi accoglie con la coppia di unità foniche “Big Gabba!”, e, dopo propiziatorio caffè con sberleffo di sedicenti grandi musicisti (penso che ne abbia conosciuti diversi), regola il suo Drum Kit sulle mie caratteristiche biometriche. Tom più inclinati, Snare diritto e più basso, e altre minutaglie. Spiego il mio progetto a Val, ci pensa un secondo, e mi risponde che si può fare. Rispetto alle sue composizioni, è una nenia da quarta elementare servoassistita, ma non me lo fa pesare, mi fa segno che è tutto ok ed alla mia portata. Questi giorni iniziano ad assumere senso.</p><p>*****</p><p>I giorni passano, continuo a correre e a provare. La sveglia non fa cilecca (almeno lei), la temperatura è costante sui 29–30, con un gradiente di umidità in più. Faccio per alzarmi ed assorbire lo shock restituito dalla mia immagine nello specchio, ma il corpo risponde con latenza inaccettabile. Le gambe <em>laggano</em> come in un videogioco troppo potente per una console di vecchia generazione. Sorrido amaro, il paragone è azzeccato. Sono il corrispettivo del Super Nintendo in un mondo di Nintendo Switch ultima generazione. Sono <em>vintage</em>. Lo sguardo allo specchio rimbalza sulle retine non ancora calibrate sulla luce fioca dell’alba, e non riesco a credere di essere diventato così vecchio in così po(r)co tempo. Alla fine la consapevolezza vince sulla meschina supponenza e il concetto mi scivola addosso. Scivolerebbe comunque, ch’io lo voglia o no, e quindi cerco di sistemarmi come cotanto cotechino sansilvestrino, controllo la playlist di oggi, chiamata tramite apposito volo pindarico “Thursday Run”. Scendo, spingo il maledetto bottone virtuale sul coso-monolite rettangolare e nero (secondo me la fondazione Kubrick dovrebbe ricevere royalty annuali da Apple per la forma degli ultimi smartphone) e la musica inizia, di corsa.</p><p>Parte “Are you ready?” dei Creed. Ricordo come ho conosciuto i Creed. Ero a Milano, inverno 2003, e sulla moquette dell’albergo trovo, supino, un iPod di seconda generazione in pratica nuovo. Per un attimo (solo un attimo) penso di tenermelo, ma subito i demoni interiori iniziano a palesarsi e lo riporto in reception. Fammi almeno vedere cosa c’è dentro. Scorro la lista e vedo Iron Maiden, Metallica, Halloween. E’ di un metallaro! I demoni avevano ragione. Tra la lista, i Creed, che non conoscevo. Ergo, me li ha presentati una persona che non ho mai conosciuto. O forse sono stati i demoni. O forse era destino.</p><p>Arrivano i Mastodon, americanoni integralmente tatuati che scalciano come Clydesdales in libero campo agricolo. Non so perché mi sono simpatici, ma Dry Bone Valley, Once More ‘Round the Sun e Show Yourself mi danno un po’ di forza per affrontare la corsetta che si fonda sulla traballanza delle gambe e su suppliche a deità rigorosamente di concezione politeista. Credo che il batterista dei Mastodon esegua i paradiddle anche quando tromba, mandando in sollucchero il/la partner.</p><p>I Mastodon lasciano il posto ai Priest. Mondo ladro, era il 1980 quando uscì British Steel. Stamattina mi sparo l’ accoppiata Rapid Fire e Grinder. Il delizioso strumentale “Where’s my thing?” dei Rush mi riaccompagna a casa con le gambe leggermente meno storte. Mi mancano i Rush. Mi manca Neil Peart, avrei voluto vederlo solo una volta dal vivo. Sarà per la prossima vita.</p><p>Svestiti gli abiti da insaccato stagionale e cercando di riprendere una forma complessiva diversa da un anfibio mi dedico alla segmentazione del brano che ho scelto, e che oggi dovrò provare nello studio di registrazione. Ventitrè minuti e rotti di storia della musica rock che decido di affrontare con serena scelleratezza suonando batteria e percussioni, pensando di essere abbastanza scemo per farlo e passarla liscia, ed ignorando le conseguenze di affrontare la scalata agli dei.</p><p>Inizio ad annotare le varie ripartizioni con l’aiuto di Audacity :</p><p>00.00–01.51 — Intro — Instrumental</p><p>01.51–02:58 — Intro — With Drums. [Drums A ] [Reverse Echo on Cues and Hi Hat]</p><p>02.58–03.44 — Verse [Drums A ]</p><p>03.44–04.12 — Chorus [Drums A ]</p><p>04.12–04.56 — Verse [Drums A ]</p><p>04.56–05.24 — Chorus [Drums A ]</p><p>05.25–06.07 — Guitar Solo [Drums A ]</p><p>07.02–10:42 — Funk [Drums A Left ] [Drums A Right ]</p><p>10.42–11.22 — Drums Fade Out [Drums A Left ] [Drums A Right ]</p><p>11.22–16.00 — Ambient to Resurgence</p><p>16.00–17.05 — Drums Fade In [Drums B ] [Drums C]</p><p>18.15–18.43 — Special [Drums B ] [Drums C]</p><p>18.43–19.12 — Resurgence Part 2 [Drums B ] [Drums C]</p><p>19.12–19.56 — Verse [Drums A ]</p><p>19.56–21.18 — Chorus [Drums A ]</p><p>21.18–22.40 — Closure [Drums A ]</p><p>22.40–22.58 — Drums Fade Out [Drums A ]</p><p>22.58–23.31 — Shepard Tone &amp; End [Drums A ]</p><p>Decimo di secondo in più o in meno, questo è quello che debbo registrare, considerando che avrò la responsabilità di un singolo strumento in un contesto musicale di una traccia:</p><ul><li>Semisconosciuta o poco rilevante ai Millennial e generazioni successive.</li><li>Amata da una cerchia di Boomer che mai la scorderanno.</li><li>Recante un BPM variable intorno ai 134, più o meno il logaritmo elicoidale del giramento di palle del pianista in quel preciso istante.</li><li>La cui tonalità è Do Diesis minore-remora, tristemente conosciuto come il tragico accordo delle mongolfiere (dimensione delle sfere maschili subito dopo la riproduzione su qualsiasi strumento a corde o ad ance).</li><li>Lunga come un cine-mashup girato in coppia da Kubrick e Leone che si mettono d’accordo per fare — finalmente — un film lento come si deve.</li><li>Dotata di effetti speciali concepiti ed eseguiti con strumenti rigorosamente analogici in misura di un quinto della durata totale del brano.</li><li>Le cui melodie vocali e le armonizzazioni utilizzano un Leslie e non, non, NON si avvalgono dell’auto-tuner <em>che possa sprofondare negli inferi l’inventore e i producer finti come i performer tacciloro ah i bei tempi in cui essere artista significava essere preparato prendete ad esempio Louis Prima Shirley Bassey Johnny Dorelli Allan Holdsworth Gilbert Becaud Satchmo Van Halen e Lady Day e la musica è morta per colpa di Spotify e non piove, governo ladro </em>e basta, BASTA, sei proprio un Boomer, falla finita.</li></ul><p>Fatemi un favore. Non nominate più quell’attrezzatura inutile altrimenti partono le dannazioni alla Ginko.</p><p>Sulla carta (o sui fotoni) sembra facile. Tutto sembra facile quando non lo devi fare tu. Poi, un bel giorno, capita a te e come sospettavi è facile combinato col piffero.</p><p>*****</p><p>E’ di nuovo alba. Non ho cuore di guardare il vecchio nello specchio. Poi ci ripenso e lo guardo e mi pento di averlo fatto. Meglio pensare alla playlist che utilizzerò per correre, giorno in cui sarà registrato il pezzo gonfiacoglioni al fine di soddisfare il primo punto della lista. La corsa che ormai è quasi regolare soddisfa il secondo. L’epistola senza destinatario corrente soddisfa il terzo. In realtà non mi sento proprio soddisfatto ma chi si accontenta si accontenta.</p><p>Dopo la corsa al parco della Cellulosa non sento più le gambe, spero la momentanea sindrome amotivazionale degli arti inferiori non pregiudichi la prestazione alla batteria da parte di un dilettante come me. Conosco il pezzo a memoria, ma soprattutto ne studiai i retroscena sociali. Dal 1971 ad oggi, riporta la rivista “Almanacco Segreto del Rock”, durante l’ascolto del brano sono successi i seguenti accadimenti (aggiornati annualmente):</p><ul><li>Sono nate 573.825 storie d’amore, di cui 59.243 sono sfociate in un amplesso consumato entro la fine del pezzo.</li><li>702 nastri di audiocassette si sono ingarbugliati, 89 in maniera irreversibile.</li><li>Sono state rollate e fumate complessivamente 12.748.911 canne (che includono hashish, erba, svuotini e camouflages).</li><li>Si sono verificati 76 casi di licantropia conclamata.</li><li>Sono stati persi 9012 portafogli, di cui più di 8000 serbanti pecunia.</li><li>110973 persone hanno perso l’ispirazione ed hanno smesso di suonare uno strumento musicale.</li><li>892621 persone hanno trovato l’ispirazione per iniziare lo studio di uno strumento musicale.</li></ul><p>Il pezzo si chiama Echoes, e un giorno avrò il coraggio di condividerlo. Val mi da il via per la registrazione, adesso tocca a me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30650447f7cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mr. Stark’s briefcase and ProximaSafe]]></title>
            <link>https://medium.com/oracledevs/mr-starks-briefcase-and-proximasafe-19e6b1154295?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/19e6b1154295</guid>
            <category><![CDATA[proxima]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Mon, 26 Jul 2021 06:47:28 GMT</pubDate>
            <atom:updated>2021-09-06T18:01:52.095Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The briefcase dream</strong></p><p>I’ve always been a fan of Marvel superheroes comics, long before the successful movie franchise known as MCU. Actually, around 1972–1975, I could find several Marvel comics carefully translated and lettered in my native language by visiting my friendly (actually, he wasn’t) news vendor, strategically placed in the market street corner few hundred yards from where I lived.</p><p>The hard limit — at the time — was the number of physical coins I was allowed to spend within a month without incurring into Mum’s inevitable semi-verbal reproach.</p><p>Few years later, my tastes and interests turned to the Golden Age Sci-Fi (Asimov and all of the <a href="https://en.wikipedia.org/wiki/Futurians">Futurians</a>, Heinlein, Bradbury ). The news vendor corner was always there, my monthly allowance was a tad more generous and I could smuggle sci-fi books in my school bag without arousing suspicion. With a notable exception: pooled with the books, a comic, the Iron Man episode where the iconic Mr. Stark briefcase was introduced to my ‘magnets and miracles’ world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QlK5ghQgbpPjilw51jon7A.png" /><figcaption>I think I should write something like © Marvel Comics — All right reserved</figcaption></figure><p>I wish I had that briefcase available in a number of situations, getting a bad grade or running into the inevitable school bully: my curiosity about the relationship between miniaturization and technology remains a fixed point even today.</p><p>Then, decades later, the briefcase idea surfaced again while having fun with an iteration of the Oracle’s<strong> </strong><a href="https://www.youtube.com/watch?v=aJUSEEagm8Q"><strong>Proxima City</strong></a><strong> </strong>model made by the Italian Innovation Team, a whimsical (as it’s been called) construction made with Legos, Arduinos, sensors and Oracle Cloud Infrastructure services.</p><p>During the 2020 lockdown we had no access to the city model, installed in the Customer Visit Center in Rome. I was struggling to find a way to show a functioning demo either via Zoom or bringing some artifacts into customer premises (no Star Trek transporter available, so far), and urged to prepare something smaller than a city model but powerful enough to show the concept.</p><p>“I should definitely do it” was my inner morning echo while sipping my favorite daily <em>americano</em> brew. Changing the model to be portable also meant changing the use cases perimeter: the year 2020 required — for obvious reasons — a rapid transition from Smart City services to an extended and appropriate Safe City scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*gLFfQFmNjrUQuBr0HUZUMA.jpeg" /><figcaption>The playground</figcaption></figure><p>Requirements were clear: small enough to fit in my backpack, programmable, made with off-the-shelf components, easily connectable to OCI services, and capable to show the end-to-end message flow by means of physical interaction. The stretch goal was to enable teachers, students, developer and tinkerers to improve this ‘portable lab’ and develop new use cases oriented to safety, exploring and expanding the needed back-end cloud services.</p><p><strong>From Briefcase to Cloud, and back</strong></p><p>So, the articles series is all about what I call <strong>ProximaSafe</strong>, showing how to build some Cloud and Edge capabilities to make a testbed for safety-related applications (included, but not limited to) using a number of technologies and tools, such as:</p><ul><li><strong>Oracle Golden Gate Streaming Analytics</strong>, to analyze data in motion and detect anomalies and/or errors</li><li><strong>OCI Streaming</strong>, the messaging backbone</li><li><strong>OCI Functions</strong>, the serverless infrastructure used to enable the upstream messages to Edge</li><li>the <strong>M5Stack</strong> family of development boards, acting as Edge Components enabled to publish and subscribe to IoT topics</li><li>a <strong>Raspberry Pi 4</strong>, the inevitable Edge gateway taking care of communication between sensors &amp; boards to Cloud — and viceversa</li><li>a suitable battery pack to power the whole stuff.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*szYE7GAvG7OLTAXSPSkX2A.jpeg" /><figcaption>The bag of goodies</figcaption></figure><p>The overall architecture designed for this mobile lab includes the representation of the edge (the boards inside the briefcase) and the communication flow edge -&gt; OCI -&gt; edge with return messages containing anomaly detections and alarms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcFjaobeWFV4aMX96-RHTg.png" /></figure><p>So, given a number of messages that can be recognized as an uptrend/downtrend pattern or a number of messages within a time frame (maybe few seconds), the stream analysis within OCI may (or may not) throw an alarm, sent back to the edge to make something happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qKoE07irqnJzZOEh_pL4Gw.jpeg" /><figcaption>Something has definitely happened</figcaption></figure><p>Here’s a short YouTube video: <a href="https://youtu.be/dw_odrtwAUk">https://youtu.be/dw_odrtwAUk</a>.</p><p><strong>Three chapters, a common goal</strong></p><p>I’ve divided the whole path in chapters that will be published every fortnight or something, trying to avoid the ‘War and Peace’ syndrome (I’m not sure I achieved that). Here’s the breakdown of the articles:</p><ul><li>In <strong>chapter 1</strong>, we’ll set up OCI resources to implement an even-driven engine, capable of analyzing the stream of events (and data) from the edge</li><li>In <strong>chapter 2</strong>, we’ll set up the feedback mechanism to return alarms to the edge in order to make something happen locally</li><li>In the <strong>final chapter</strong> (three is the magic number), we’ll select and program the edge components (thingies in our briefcase) and we’ll design some pipelines in the cloud corresponding to a number of use cases.</li></ul><p>It was fun to build it. The boy I used to be would be proud of it.</p><p>The briefcase needs more engineering. I became no Tony, no superpowers, no millionaire, and — overall — my once dark goatee has become white (alas!), so the distant reflection of that boy slipping comics and books in the backpack while wondering about future technology maybe it’s gone forever. My morning back pain reminds me that, indeed, it is.</p><p>Well, here’s the link to the first chapter, for it is time to think about the next thing to write:</p><p><a href="https://developer.oracle.com/proximasafe/chapter-1/?source=:ex:of:::::RC_WWMK210721P00049:Medium&amp;SC=:ex:of:::::RC_WWMK210721P00049:Medium&amp;pcode=WWMK210721P00049">ProximaSafe — Chapter 1</a>.</p><p>I still daydream about that magical briefcase, tough.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19e6b1154295" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/mr-starks-briefcase-and-proximasafe-19e6b1154295">Mr. Stark’s briefcase and ProximaSafe</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pi to OCI: using ARM to develop and deploy apps to Kubernetes (OKE)]]></title>
            <link>https://medium.com/oracledevs/pi-to-oci-using-arm-to-develop-and-deploy-apps-to-kubernetes-oke-18ddd2a6ffc3?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/18ddd2a6ffc3</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[oke]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[oraclecloudinfrastructure]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 15:32:17 GMT</pubDate>
            <atom:updated>2021-08-23T07:23:03.723Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>OKE on ARM</strong></p><p>Recently, I’ve been excited about the <a href="https://blogs.oracle.com/cloud-infrastructure/arm-based-cloud-computing-is-the-next-big-thing-introducing-arm-on-oci?source=:ex:tb:::::RC_WWMK210625P00070:PItoIOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PItoIOCI&amp;pcode=WWMK210625P00070">announcements</a> regarding the availability of the Ampere A1 on OCI and, more generally, the ARM-based computing as a renewed instance of the RISC architecture we dealt with in the past. ARM is available at the infrastructure level and — above all — when designing and implementing cloud and container native apps with the world’s leading orchestration engine: the ubiquitous K8S, available on OCI via the Container Engine for Kubernetes (<a href="https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengoverview.htm/?source=:ex:tb:::::RC_WWMK210625P00070:PItoOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PItoOCI&amp;pcode=WWMK210625P00070">OKE</a>).</p><p><strong>Piece of Pi</strong></p><p>Immediately after the news, I thought that one of my local Raspberry Pi stack (RPi 4, 8 GB RAM), currently hosting a node of <a href="https://microk8s.io/">microK8S</a> cluster, could also be used as an ARM developer workstation. Moreover, it would be interesting to check for compatibility issues or any other idiosyncrasies I might experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c6O3TQnqpb4SVuhOI5fS5A.jpeg" /><figcaption>The Pi</figcaption></figure><p>An oversimplified schema of the required components is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybPf4rZT5gQzNKD5G_dqTQ.png" /><figcaption>Yes, it’s that simple.</figcaption></figure><p>First things first, I needed to find a suitable Docker image for this test. I compared the specs of the Ampere A1 with the RPi’s CPU, both adopting the ARM v8 architecture, which is 64-bits, so I selected the <a href="https://hub.docker.com/r/arm64v8/ubuntu">arm64v8/ubuntu</a> image for this tinkering session.</p><p>Before reserving my OKE cluster, I tried a simple application made with node.js, express.js and <a href="http://jade-lang.com/">Jade</a> just with Docker on my RPi. Here’s the Dockerfile:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*me4BoMcwYKvRyLjVUQHlZg.png" /></figure><p>That Dockerfile was used by the Docker build command:</p><pre>docker build -t gabba/gabbasite-armv8 .</pre><p>Then, I run the application locally via the Docker run command:</p><pre>docker run --rm -d --name gabbasite -p 3000:3000 gabba/gabbasite-armv8:latest</pre><p>Having exposed the web app on port 3000, I accessed it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*CQYtlC_VYBcubpNv94OEVw.png" /></figure><p><strong>OKE on ARM</strong></p><p>So, the first part was ok. We just need to push the image to a repo for further use:</p><pre>docker push gabba/gabbasite-armv8</pre><p>Afterwards, try this application on the ARM-OKE power combo.</p><p>Now, I’m required to launch an OKE Quick Create on Oracle Cloud Infrastructure to create a K8S Cluster with the available ARM shape (and we’ll stick with this bare minimum three node setup).</p><p>The OKE service allows— via the Quick Create option — creating a cluster within minutes by reserving the necessary Compute and Network resources. Handy for developers! Follow the guide <a href="https://docs.oracle.com/en/learn/arm_oke_cluster_oci/index.html?source=:ex:tb:::::RC_WWMK210625P00070:PItoOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PItoOCI&amp;pcode=WWMK210625P00070#introduction">here</a> for details and remember to select the shape called <strong>VM.Standard.A1.Flex</strong>.</p><p>Then, I configured the local environment to access the K8S cluster with the RPi shell, which meant setting up the oci-cli <a href="https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliconfigure.htm?source=:ex:tb:::::RC_WWMK210625P00070:PitoOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PitoOCI&amp;pcode=WWMK210625P00070">configuration</a> and <a href="https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengdownloadkubeconfigfile.htm?source=:ex:tb:::::RC_WWMK210625P00070:PitoOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PitoOCI&amp;pcode=WWMK210625P00070">generating</a> the ~/.kube/config file. At the end of the procedure it’s possible to access the OKE cluster from the RPi shell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtSGAhWFZL_8YRkM5IssSQ.png" /><figcaption>Good old kubectl…</figcaption></figure><p><strong>Writing a deployment file</strong></p><p>Old habits die hard. I didn’t mix the deployment directives with the service definition: both are yaml files and could be grouped together to issue a single command, but my experience with an OKE/K8S deployment in a production environment has taught me to have separate files. Anyway, this is the deployment.yaml:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*bJ-TJ-1U2xbNTufdDo0Oyw.png" /><figcaption>deployment.yaml</figcaption></figure><p>This is the service.yaml which exposes the app to the cruel world by means of a Load Balancer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*Ttac8wXkB-_pKjkF0N7V2g.png" /><figcaption>service.yaml</figcaption></figure><p>Some simple commands will suffice to test the two configurations:</p><pre>kubectl apply -f deployment.yaml</pre><pre>kubectl apply -f service.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*P7oufZH0-pRPv6rrBJakuA.png" /><figcaption>Results…</figcaption></figure><p>Check the status of our deployments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*onAoFg0UgTQfS-x4F-3OgQ.png" /><figcaption>Nodes, services and pods</figcaption></figure><p>OKE was so kind enough to provide me with a public IP address associated to the Load Balancer, which I’m going to access via a web browser. The result seemed promising:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*0LppoKADiLfDso8wJckfGA.png" /></figure><p><strong>Outcomes</strong></p><ul><li>You can easily use and experiment with a RPi 4 to build the software and the Docker images needed for OKE on ARM. This method maybe isn’t as flashy and fast (and overpriced) as an ARM-based laptop by your favorite fruit brand, but it’s an order of magnitude cheaper.</li><li>After configuring it with valid OCI and K8S credentials, you can deploy an application directly to OKE (ARM to ARM).</li><li>ARM is the next big thing. Check it out using the <a href="https://www.oracle.com/cloud/free/?source=:ex:tb:::::RC_WWMK210625P00070:PitoOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PitoOCI&amp;pcode=WWMK210625P00070">Free Tier</a> and the <a href="https://www.oracle.com/cloud/free/?source=:ex:tb:::::RC_WWMK210625P00070:PItoOCI&amp;SC=:ex:tb:::::RC_WWMK210625P00070:PItoOCI&amp;pcode=WWMK210625P00070#always-free">Always Free Tier</a> on OCI.</li></ul><p>Happy tinkering!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18ddd2a6ffc3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/pi-to-oci-using-arm-to-develop-and-deploy-apps-to-kubernetes-oke-18ddd2a6ffc3">Pi to OCI: using ARM to develop and deploy apps to Kubernetes (OKE)</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Source & Innovation : riding the wave]]></title>
            <link>https://medium.com/@Gabba/open-source-innovation-riding-the-wave-6b7066fc5a34?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b7066fc5a34</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Tue, 02 Jul 2019 10:17:03 GMT</pubDate>
            <atom:updated>2019-07-18T16:03:47.003Z</atom:updated>
            <content:encoded><![CDATA[<h3>Open Source &amp; Innovation : riding the wave</h3><p><strong>What Open means.</strong></p><p>We are living interesting times, <em>software-wise</em>.</p><p>Entire ecosystems based on and built with open source software have conquered — decades ago — the IT realm and countless Glass Houses, and more recently even one of the most critical market perspectives: the interwork between consumer electronics and consumer services, driven and fed by the promises and the ideas winked by Cloud Computing providers. Every IT baby-boomer (even I, without any memory upgrade) can clearly remember, during the eighties, the abysmal and ludicrous gap between quantity and quality of IT tools/instruments available at work versus the few, meager and onerous resources available at home needed to finish the day’s tasks and to switch into <em>research-mode </em>to learn new stuff.</p><p>Look at us, now. We’ve got a bunch of CPU cores pocketed in our beloved smartphone, hi-definition screens everywhere (even in smartwatches), hyper-connectivity almost available everywhere, and we still want more of everything. Including the coffee-break feuds between Android and iOS fanboys with no ties to age range: “<em>Android is the most customizable, iOS is easier to use</em>”, “<em>Android is Open Source, iOS is closed</em>”, “<em>Android is Orwellian, iOS is a privacy bastion</em>”. Luckily enough, now it’s easier to use both, possibly due to other reasons than those exposed in coffee-machine room chats.</p><p>Open Source was indeed a key factor in this quantum leap, both for so-called <em>open </em>and <em>closed </em>mobile operating systems — Android is Open Source, iOS inherits the Mach kernel philosophy developed at Carnegie Mellon — not without a fair load of controversial aspects.</p><p>What does <em>open </em>mean? Does it mean free and available to everyone? Or, maybe, designing an open system means elaborating a number of defined specs so that interfaces (input, and primarily output) are accessible in an easy and clear fashion by any requestor? Does open mean to welcome a humongous and global family of developers by granting a share of the code to build and rebuild a complex distributed system? Does it mean to be designed as interoperable with other entities?</p><p>You guessed the answer, as trivial as it seems: the definition of the word <em>open</em>, in IT, encompasses all of that and surely more. Approaching the ’20s by giving a passing and naïve look to the current market trends, one would dare to say that being open also means being <em>designed to change</em>.</p><p>Quickly. Securely. Sustainably.</p><p><strong>Welcoming Industry Standards &amp; Open Source, together.</strong></p><p>Industry standards might seem as a series of tedious and overinflated processes to undiscerning eyes, but thanks to those interoperability committees we can call our significant others or former toddlers by phone, be confident that transportations wizardry can actually be executed correctly, that quality of certain critical services can be measured in a proper way, just to mention some mundane examples.</p><p>Oracle, as a company, is passionate about industrial standard <em>and </em>open source. The engineering departments are involved (since decades ago) in more than 65 forums elected for standards definition and almost 300 working groups and ensure the application of these standards within its technology proposition. A look focused on the industry, and another look focused on Open Source communities, which include the developers as committers for products freely available such as the Berkeley DB, which computes transactions over more than <em>200 million </em>(yes, you read that right) worldwide installations.</p><p>Starting in 2001 with the release of libraries concerning Asynchronous I/O, the active contribution to open source communities has been expanded to accommodate innovation in different layers: the infrastructure (<strong>Linux</strong>, <strong>Virtualbox</strong>, <strong>Xen</strong>, <strong>OpenStack</strong>), the beloved data layer (<strong>MySQL</strong>, <strong>NoSQL</strong>, <strong>Berkeley DB</strong>) and latest and greatest container-native initiatives driven by CNCF, that deserve a separate chapter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*VSApT7EXtZOg8SIG5crn0A.png" /></figure><p>An example of mediation between Industrial Standards and Open Source can be found in the Xen Project Advisory Board: <strong>Xen </strong>is licensed as GPLv2 with a governance structure similar to the Linux Kernel development. Xen is in its second decade and is currently used by more than 10 million users worldwide, with contributions offered by a rich industrial body: Oracle, ARM, BitDefender, Bosch, Citrix, Freescale, Intel, Linaro, Qualcomm, SUSE, Star Lab, US National Security Agency, Xilinx, Zentific and several Academic and individual works.</p><p>Should you spare time to visit the home site for Oracle Open Source projects, please warp your engines at <a href="http://oss.oracle.com/">http://oss.oracle.com</a> while getting yourself a cup of your favorite coffee mélange.</p><p><strong>Java: fancy a cup of coffee?</strong></p><p>Does anybody remember Java, about 25 years ago? Living in times where Mosaic was still a web browser and singing modems were needed to access the so-called Primordial-Internet), we were eager to get our hands on something that was previously known as Oak and that was to be launched as Java, starting from the iconic ‘Hello World’ example and ending with a rich Applet exploiting the AWT framework (Applets, AWT, does anybody remember those?).</p><p>We’ve come a long way since that. Teleporting to 2019, the TIOBE <a href="https://www.tiobe.com/tiobe-index/">index</a> reports Java still as the first programming language and its popularity has definitely steered in the back-end realm: Java can be considered one of the magnetic choices to design, develop and deploy applications in the back-end, due to the knowledge of a broad audience of seasoned and newbie developers.</p><p><strong>Java </strong>has evolved, and even the licensing terms have evolved. Let’s shed some light about these factors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*eMIeM_sJfj0fNeDlfcs9Cw.png" /></figure><p>To meet the demands of Java-based communities and Java developers, Oracle made available the Java code base as GPL-based licensing to OpenJDK. This process started with Java 7 until the release of Java 11 (LTS) in September 2019. Java developers, thus, can take advantage of two Java 11 LTS builds: Oracle Java 11 and OpenJDK Java 11, and both released by Oracle. The new licensing terms are aligned to existing practices in the Open Source string theory, whereby Community Editions (free) and Enterprise Editions (subscription-based support) coexist in the same multiverse peacefully: the Oracle Java can be considered an ‘enterprise edition’ that can exploit periodically scheduled LTS (Long Term Support) versions release in a three-year lifespan.</p><p>The new builds (major releases) of Oracle JDK and OpenJDK will be available each March and September (twice per year). Each major release will be accompanied by 2 minor release after 1 and 4 months, respectively.</p><p>Here’s a schedule example for the months to come, <em>afaik</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H_uCrJ_j25_oM7tKF7c4OQ.png" /></figure><p>Each LTS version (in our epoch, Java 11) will be available on the Oracle Site for three years and will be supported in terms of patching and security updates for subscribing customers. Customers have choice: Oracle and OpenJDK builds are identical (functionality, performances) so they can choose either Oracle in order to have enterprise level support, updates and patching or OpenJDK releasing the scheduled builds (major and minor) which will include updates and patching.</p><p>Needless to say, many products in Oracle have the Enterprise Java support built-in: in a world that constantly changes, though, a core value for developers, IT professional and enterprises is the ability to choose. In the Java ecosystem, a customer can choose to feel responsible for support, patches and security updates, or subscribe to a service provided by Oracle or even third-parties (yes, Java is Open!) such as Red Hat, Amazon, SAP.</p><p>Beside the licensing, what are the exciting news about Java? Well, a ton. Innovations like <strong><em>Project Valhalla </em></strong>to optimize value-based data representations, the massive data scaling for the Java Heap provided by the Garbage Collector <strong><em>ZGC</em></strong>, the ability to spawn millions of ‘fibers’ (lightweight threads) with <strong><em>Project Loom </em></strong>– and many, many others — offer a live and vibrant snapshot of the evolving Java environment which most of the times is mouth-watering for any developer.</p><p>Java, since version 10, is also Docker-aware, which allows a greater flexibility in seizing and control resources (RAM, CPUs) spanning from a tiny footprint application (a microcontainer running in 40 MB space) to huge enterprise apps requiring a larger amount of computing power.</p><p>As you can see, from polyglot languages support to containers, from orchestrators to serverless frameworks, we are set for exciting times (didn’t I tell you as a foreword?).</p><p><strong>Innovation in RunTimes</strong></p><p>Being open means all of the above, and more. We hinted at the Java ecosystem, what about the <em>polyglot </em>developers? Being proficient in more programming languages represents a plus in a developer résumé because the market is seeking smart individuals, capable of mixing classical architectures with cloud native capabilities. In order to be successful, a team involved in a critical project is sharing knowledge, computing power, networking, best practices, processes, and many more things.</p><p>Wouldn’t it be great to share <em>runtime</em>, and annihilate the artificial barriers between different programming languages, enabling a single runtime for applications to be executed in the front end environments (take a guess, Node.js), in any middle tier (Oracle or OpenJDK Java) and even in the data treasury department (the Oracle DB engine)?</p><p>Well, Oracle happens to have invented that!</p><p>It’s called <strong>GraalVM </strong>– please point your starship at <a href="http://www.graalvm.org/">www.graalvm.org</a> – and it’s a proven, universal virtual machine for running code written in a plethora of programming languages such JavaScript, Python, Ruby, R, and Java, Scala, Groovy, Kotlin from a JVM perspective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*hOgALE90HVceAiCpTJWnVQ.png" /></figure><p>GraalVM also supports C++ and even C (which, by the way, always got a certain charm — it’s the runner-up in the TIOBE index).</p><p>Did we say proven? Yes. <em>Twitter </em>uses GraalVM, not just to optimize applications performance and offer a better customer experience, but to <em>save money</em>! Consider a Cloud-Native (public) company with thousands of machines running thousands of JVM. Every percentage in CPU and RAM utilization is multiplied by thousand and results in perceivable and sustainable savings — think about Electricity, HVAC and physical space costs. As per Twitter’s Chris Thalinger words, it’s obviously not trivial but doable and “(…) Twitter is going down that way (…)”.</p><p>GraalVM can generate <em>native code</em>, which means a lot for startup time performances (the serverless environments where functions in a scalable pool are activated and executed on-the-fly and disposed when they’re finished) and for memory footprint consumption. So, ubiquity and polyglot can live happily ever after with performance and savings, satisfying both the Dev and Ops side of the equation.</p><p>In this case, native code can mean lesser resources consumption, lighter infrastructure, decreased labor. Thus, less money spent.</p><p><strong>Innovation: Programming Frameworks</strong></p><p><em>Runtimes </em>are not enough to conquer developers and operations hearts, though. IT needs <em>productivity accelerators </em>to do more in less time and the open source mechanisms to harbor and nurture the innovation provided by the massive volume of developers and IT pros available worldwide.</p><p>The major key trends involving new architectural styles include <strong>container support </strong>(i.e. Docker images), <strong>orchestration technologies </strong>(Kubernetes and its software-defined infrastructure capability), <strong>microservices </strong>(fine-grained and loosely-coupled applications using lightweight communication protocols) and <strong>serverless </strong>environments (pool of atomic functions available on demand, activated and deactivated depending on workloads).</p><p>Oracle is involved in CNCF (Cloud Native Computing Foundation) and provides the means and the knowledge to support the cloud-native — or better, <em>container-native </em>– journey with its second-generation Cloud named OCI — <strong>Oracle Cloud Infrastructure</strong>). By stacking container-ready Oracle Linux, upstream Kubernetes available in OCI (Oracle made no alterations to Kubernetes in order to grant the maximum portability between different Clouds), and other significant capabilities as Streaming, Events, Monitoring and development Pipelines, Oracle provides an up-to-date engine to ensure a smooth transition from a classic architectural style to cloud native bewitcheries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*dXd5GQraCb8ol7CzWbGHMg.png" /></figure><p>Modern architectures are inspired by a manifesto and a methodology that describes the capabilities needed to enforce portability and resilience in a global-scale digital service: The Twelve-Factor App. The capabilities describe — from a Development and Operations standpoint — what is required by the design and production environments to successfully create and continuously sustain a project involving world-wide accessible apps: one of the most intriguing capabilities is named as “<em>Dev/prod parity</em>”, that points to maintaining operating environments for Developers, Testers and Operations as similar as possible. By running a <em>software-defined infrastructure</em>, IT can issue commands to the Cloud to build (and contextually delete) entire sets of complex environments in <em>minutes</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*nKlwz9cxqZo1ASG5P6aQMg.png" /></figure><p>Oracle Cloud Infrastructure includes all this and extends it to the back-end critical areas — a unified data layer for classical and new-generation applications and services — which usually is not completely covered by most of literature describing the microservices design. This is achieved by means of advanced data management innovations and concepts like the <strong>Autonomous </strong>and <strong>Multi-model Database</strong>, exposing entire or partial datasets as APIs and uniquely manage combination of data sources supporting schema-on-read (JSON) and schema-on-write (SQL).</p><p>It’s indeed possible to get the best of classical and new-generation architectural styles, and, in case you wonder, Oracle is the driving force behind two of most promising, Apache 2.0 open-sourced, <strong>multi-cloud </strong>(yes, open!) frameworks for developing microservices and serverless functions: respectively, <strong>Helidon </strong>and <strong>FnProject</strong>.</p><p><strong>Darting through the clouds: Helidon.</strong></p><p><strong>Project Helidon </strong>(<a href="http://helidon.io/">http://helidon.io</a>) is a set of java libraries for developing microservices that responds to specific needs rising from Open Source enthusiasts: being <em>open</em>, being <em>innovative </em>and supporting <em>standards</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*VsC4i8tz1wd1b06QyaOLJg.png" /></figure><p>Hosted on GitHub, the project aims to boost productivity in development of Java-based <strong>microservices </strong>in two specified areas: MicroProfile applications and MicroFrameworks applications based on Java SE.</p><p>The MicroProfile initiative, hosted at the Eclipse Foundation (<a href="http://microprofile.io/">http://microprofile.io</a>), and active with 8 releases since 2016, includes members such as Oracle, IBM, Red Hat, Microsoft, Fujitsu and many others, and sports a MicroProfile implementation of microservices by means of declarative style, dependency injection and support for JAX-RS and JSON-P/B. Writing the skeleton of a microservice in Java has never been easier: exposing a fully functional service by means of a lightweight protocol requires few lines of code and some annotations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*7Ejc7Xitu71Z2eoBiqyy3g.png" /></figure><p>The operational section is simple: code those lines in any favorite editor (we wonder how many of you still use <em>vi</em>, old habits die hard), delegate to Maven the packaging of the application to build, run and test your code, and deploy to any Kubernetes cluster by means of a simple YAML file, enabling a sophisticated and highly-available orchestrator to manage hundreds, thousands of replicas and provide a world-wide class microservices environment. You’re ready!</p><p>Then, use your time machine of choice and recall, just few years ago, all the process (and the code!) you had to develop and integrate and check before having a quasi-functional artifact of a service-oriented application pool, working to enable the communication mechanisms, to deploy to one or more VM images over a cluster with pre-defined (and sometimes limited) capabilities in an environment with no <em>Development-Production Parity </em>covenant. It was harder, but — in the meanwhile — things are changed, aren’t they?</p><p>The Helidon framework also provides health check endpoints and metrics collection to automate detection of faults and the ability to gather and display time series via <em>Prometheus </em>and <em>Grafana</em>. Life’s easier for both Development and Operations!</p><p><strong>Going Severless with a multi-cloud approach.</strong></p><p>Serverless frameworks and environments are going mainstream. The Functions-as-a-service model represents the latest evolution step in abstracting the usage of the underlying infrastructure to build event-driven, ephemeral, stateless pieces of code (<em>functions</em>) to allow unprecedented workload volumes to be processed with a lower cost.</p><p>How do we achieve this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*9i5Vj-d7lKf3QH2Q_CC7Mg.png" /></figure><p>The revolutionary idea behind functions is have them available when needed and deactivate them when they’re not. A set of microservices — even if small, restrained, replicated — is usually always-on by design (let’s consider an online shop, or a government critical application, or a global-scale service), which leads to a 24 x 7 x 365 service model infrastructure and consumption. By separating the ‘always-on’ code and the small, atomic, stateless functions that can be invoked and executed on-demand, we’ve got benefits both for developers and for the business.</p><p><strong>Developers </strong>can be focused just on the code and not the infrastructure, taking advance of faster deployments and limitless up/down scaling, while <strong>Business </strong>can ensure a cost reduction (pay only for execution time and not for idle), increasing the reliability of critical apps especially when launching new services with no predictable workloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*__zG80IxYFQKua7Mictp1A.png" /></figure><p>The <strong>FnProject </strong>initiative (<a href="http://fnproject.io/">http://fnproject.io</a>and, of course, on GitHub) has been launched on October 2017 as an open-source, Apache 2.0 framework designed to run in any environment (on a laptop for developers, on-premise and on any Cloud), to be easy to code and operate and to support every programming language. The framework is provided with a number of components: an extendable server, a load balancer able to scale each function independently based on traffic loads, and a set of supporting services — Database, Message Queuing, Blob Store — as pluggable modules wrapping different technologies (MySQL or sqlite3 or Postgres as DB, Redis or Kafka for Message Queuing, and any Docker v2-compliant registry, even private). If there’s a well-fitting definition of an Open framework, one could blindly bet on FnProject!</p><p>The framework openness reflects also on the metrics analysis and monitoring capabilities: Fn is using OpenTracing for metrics and the combo Prometheus/Grafana for monitoring and dashboarding. A serverless environment based of FnProject can be hosted <em>within</em> Kubernetes, thus having the same operation mechanisms as the whole cloud and container-native infrastructure.</p><p>Oracle is launching a Functions-as-a-Service environment in Oracle Cloud Infrastructure based on FnProject: <strong>Oracle Functions</strong>, added to Oracle’s Cloud Native Stack supporting Cloud-based and hybrid architectures.</p><p><strong>Afterword: Open means ‘giving back’</strong></p><p>Oracle is in a unique position: supporting classical architectural styles and promoting innovative cloud and container native frameworks, with an unconditional passion and attention to data lifecycle for enterprises. The quality and quantity of open source initiatives and the solid presence on customer’s premises make Oracle an ideal partner that can be depicted as a bridge over the troubled waters of the digital transformation:<em>classical </em>and <em>new </em>can co-exist, facilitating the necessary organizational changes and leading to an IT environment where architectures can be designed both <em>to last </em>and <em>to change</em>.</p><p>Facing complex architectural choices that require considerable amounts of time and money is what — essentially — IT does as a part of the daily routine. The choice can be supported by a number of factors, so choosing <em>open </em>software it’s a critical step, albeit not the only one.</p><p>When embarking on a digital journey, an enterprise must ensure that the chosen <em>Shift </em>is really <em>Open</em>(no pun intended). As an example, the selection and adoption of a Kubernetes release should be based on its capability to ease the application and data migration between different clouds/vendors offering, so that all the investments on the software can be substantially leveraged in the years to come. Oracle’s choice, as said, is to support Kubernetes <em>upstream</em>, which is an untouched and ‘vanilla’ release of the orchestrator: the workload developed on Oracle Cloud can be moved transparently to other Clouds running an upstream release of Kubernetes. That, unfortunately, is not happening with customized releases. So, what’s the meaning of <em>open</em>, in this case?</p><p>This happens even in the data side with heavily customized releases of relational DBs based on the engine of open source Oracle’s MySQL, one the flagship DB loved by developers, or forks of older versions of PostgreSQL both found on some <em>Prime </em>cloud offering (no pun intended, really).</p><p>We are strongly convinced that, beyond the nature of inputs and the variety of outputs, being open — and open source — means ‘giving back’. Sticking an ‘Open’ badge onto a technology, sometimes, it’s not enough: we’re also measured upon the ability to return a feedback in the open source community, and this is one of Oracle’s commitment for the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b7066fc5a34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get a Serverless on K8S, in minutes]]></title>
            <link>https://medium.com/@Gabba/get-a-serverless-on-k8s-in-minutes-6c46dc261a86?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c46dc261a86</guid>
            <category><![CDATA[fn]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Thu, 20 Sep 2018 19:26:20 GMT</pubDate>
            <atom:updated>2018-09-20T19:26:20.858Z</atom:updated>
            <content:encoded><![CDATA[<p>It is indeed time to move from <a href="https://medium.com/@Gabba/da-trantor-a-terminus-con-fnproject-io-a63817e4cdad">a local serverless setup</a> to a full-fledged Kubernetes Cluster located on the Cloud: we’ll be using a multi-cloud, open-source, container native and (overall) very cool serverless framework (<a href="http://fnproject.io/">Fn Project</a>). We’ll use a tool to do that, such as <a href="https://github.com/helm/helm#install"><strong>Helm</strong></a> (the K8S package manager). Helm can be installed in a variety of ways. On my Mac, it goes like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*_Z1RIXZuXFMCr5RcZxqQbw.png" /><figcaption>At the Helm!</figcaption></figure><p>Once installed, let’s execute the <strong>helm init</strong> command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*QvIjN_9V7Ldq3OUnYm48FQ.png" /><figcaption>helm init</figcaption></figure><p>As you can see, the cluster <a href="https://medium.com/@Gabba/service-mesh-on-oracle-cloud-infrastructure-a-short-video-guide-f3d530e4b8cb">I’ve set up in Oracle Cloud</a> is already provided with Tiller, the server-side component, so we’re going to install the helm chart which contains the commands to deploy the fn framework on K8S:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*ys-nacbPbKAbjY30wEsoNA.png" /><figcaption>Cloning</figcaption></figure><p>…and install the dependencies needed. The default setup is quite simple and will install fn as a service within the cluster. Examples, anyway, are provided for OCI (Oracle Cloud Infrastructure), and <a href="https://kubernetes.io/docs/setup/minikube/">minikube</a> in case you want to experience a cloudless computing :).</p><p>Before issuing the command:</p><pre>helm install --name gabbafn fn</pre><p>please double-check that the istio-injection parameter is disabled — then go for it — and, in return, you should receive on your Matrix terminal something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NCQwhs69KcLpSuvCxAVKCQ.png" /></figure><p>Don’t forget to issue the <em>export</em> shell command as indicated by the NOTES output section, in order to set the FN_API_URL variable.</p><p>As you will see by issuing the command:</p><pre>kubectl get po</pre><p>the fn pods will be installed in the <em>default</em> namespace. As you can see, the fn engine is installed within the K8S cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*6qjA1PyKLs84hZyAP-K28A.png" /><figcaption>Yay!</figcaption></figure><p>This isn’t really everything we need to get a proper fn installation on K8S: I’m thinking about security and other stuff (… next story on Medium, maybe?), but it’s enough to get a working environment available to discerning eyes ;).</p><p>Peace,</p><p>Gabba</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c46dc261a86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service mesh on Oracle Cloud Infrastructure: a short video guide.]]></title>
            <link>https://medium.com/@Gabba/service-mesh-on-oracle-cloud-infrastructure-a-short-video-guide-f3d530e4b8cb?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3d530e4b8cb</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[service-mesh]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Sun, 16 Sep 2018 16:33:15 GMT</pubDate>
            <atom:updated>2018-09-16T16:33:15.291Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Hello, you beautiful people</em> (yes, I heard this beginning in a Udemy training video and it was compellingly funny, hope it’s not copyrighted yet), it’s time to refresh our setup notions about getting a <strong>microservices application ready and willing on Oracle Cloud Infrastructure</strong> (<a href="https://istio.io/docs/examples/bookinfo/">bookinfo</a>) with up-to-date (September 2018) information and How-Tos and tricks and tips and nuts and bolts.</p><p>Not too many tips as a matter of fact, but OCI has changed (for good!) and bookinfo has been updated to 1.0.2, so it is definitely time to refresh the info exposed in a previous post (<a href="https://medium.com/@Gabba/service-mesh-su-oci-oracle-cloud-infrastructure-bdc16d7e599f">here</a>, in italian, Google Translate is your friend).</p><p>But, you know what? This time I’ll show it with videos (and related screwups), so less words and more action. Being Jurassic as I am, it basically means: living with less time available, less memory available, less brain CPUs available: video stuff is easy to make and to remember. This also means I’ll have more quality time spent drumming over my beloved Pearl kit during the eagerly awaited weekend.</p><p>Without further ado, here are the 16 short chapters:</p><p><strong>1 — Create the K8S cluster VCN via a Terraform Script</strong></p><p>You can download the super-useful <a href="https://medium.com/@postak">Postak</a> script <a href="https://github.com/postak/vcn4container">here</a> on GitHub. Should you want to do that manually, you got to create 2 LBs and 3 SubNets (1 for each worker node).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTcFp86Z68h4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTcFp86Z68h4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTcFp86Z68h4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8fedb8f85903c0b94ea0867c3b7365bb/href">https://medium.com/media/8fedb8f85903c0b94ea0867c3b7365bb/href</a></iframe><p><strong>2 — Check on the Web GUI that everything is ok</strong></p><p>And <a href="https://www.youtube.com/watch?v=OD3F7J2PeYU">everything is gonna be alright</a>…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6eVtG6iodYo%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6eVtG6iodYo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6eVtG6iodYo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb493d64861a0b08a6e151a7601f068f/href">https://medium.com/media/bb493d64861a0b08a6e151a7601f068f/href</a></iframe><p><strong>3 — Setup the CLI</strong></p><p>You’ve got to issue some good ol’ Kubectl via CLI, so please warm-up your green-on-black Matrix fashioned terminal.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FtHyIXMfG4PI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtHyIXMfG4PI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FtHyIXMfG4PI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/eca8cf1c2e277fe07b9162c1952e226f/href">https://medium.com/media/eca8cf1c2e277fe07b9162c1952e226f/href</a></iframe><p><strong>4 — Create the Cluster!</strong></p><p>Open your (almost) favorite browser and discover what’s inside that suspect “Developer Services” option on OCI. K8S is upstream and you won’t shell out any money for the master nodes, which are (autonomously) managed inside OCI.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FD7aSbepO1TQ%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DD7aSbepO1TQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FD7aSbepO1TQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a89c1c48e6d422121a32f6df75cf22ff/href">https://medium.com/media/a89c1c48e6d422121a32f6df75cf22ff/href</a></iframe><p><strong>5 — Create worker nodes within the K8S cluster</strong></p><p>In this case three worker nodes, one in each Availability Domain.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FotIqc5iWZ7Y%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DotIqc5iWZ7Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FotIqc5iWZ7Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/909b0bb045f49a6b4046df314552802b/href">https://medium.com/media/909b0bb045f49a6b4046df314552802b/href</a></iframe><p><strong>6 — Check created nodes.</strong></p><p>Not compulsory, but due.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0Qfy2UBEXMM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0Qfy2UBEXMM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0Qfy2UBEXMM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7a43202c0c0e2b54ce963f7d7287396/href">https://medium.com/media/b7a43202c0c0e2b54ce963f7d7287396/href</a></iframe><p><strong>7 — Create kubeconfig file</strong></p><p>If you don’t know what’s a <a href="https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/">kubeconfig</a> file, maybe you’re in the wrong Medium channel ;)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1JPZxUbhyEo%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1JPZxUbhyEo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1JPZxUbhyEo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1beea645eec71366f722f5c384429c17/href">https://medium.com/media/1beea645eec71366f722f5c384429c17/href</a></iframe><p><strong>8 — Check CLI (very) basic commands</strong></p><p>Due and compulsory…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FzW5FH-0GJJc%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DzW5FH-0GJJc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FzW5FH-0GJJc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7b67290e0cf19232788e0971f3f9070/href">https://medium.com/media/e7b67290e0cf19232788e0971f3f9070/href</a></iframe><p><strong>9 — Create ClusterRoleBinding</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FugZbclc4Xng%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DugZbclc4Xng&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FugZbclc4Xng%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d47e450d8748ecc365ec537c44b28f8/href">https://medium.com/media/7d47e450d8748ecc365ec537c44b28f8/href</a></iframe><p><strong>10 — Download Istio</strong></p><p>Well, K8S cluster has been setup (hopefully). Now it’s time to download the <strong>Service Mesh</strong> platform (<strong>Istio</strong>, latest version available — at this epoch, 1.0.2).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FsWwnq6l0pyU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DsWwnq6l0pyU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FsWwnq6l0pyU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6fb84be9d746b631834e0f5a85631b3/href">https://medium.com/media/b6fb84be9d746b631834e0f5a85631b3/href</a></iframe><p><strong>11 — Install Istio</strong></p><p>Strongly suggested after a download ;)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTfg2KChN1mY%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTfg2KChN1mY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTfg2KChN1mY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d963f7c13f265956f55eaa7d675db54/href">https://medium.com/media/1d963f7c13f265956f55eaa7d675db54/href</a></iframe><p><strong>12 — Check Istio</strong></p><p>Not compulsory, but due (being aged means repeating yourself).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0hKXFoZYg40%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0hKXFoZYg40&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0hKXFoZYg40%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e587a6363b1974ea8d3937133de9d30f/href">https://medium.com/media/e587a6363b1974ea8d3937133de9d30f/href</a></iframe><p><strong>13 — Install CRDs</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FSM_vi13E7kE%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSM_vi13E7kE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FSM_vi13E7kE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b80c5f0e2f40c3ab35e4b0142a55dfdb/href">https://medium.com/media/b80c5f0e2f40c3ab35e4b0142a55dfdb/href</a></iframe><p><strong>14 — Install Microservices app (bookinfo)</strong></p><p>Simple as applying a yaml file via kubectl.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqZErae88TMU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqZErae88TMU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqZErae88TMU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9537459bf7669fb4b41f1725fe13e4dd/href">https://medium.com/media/9537459bf7669fb4b41f1725fe13e4dd/href</a></iframe><p><strong>15 — Setup bookinfo networking</strong></p><p>As required by bookinfo installation guide… This video gets an ‘unchanged’ status because I’ve done it before (shame on me).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPYy8zkRJkLQ%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPYy8zkRJkLQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPYy8zkRJkLQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b92f233c5680ec7e577084e9280af478/href">https://medium.com/media/b92f233c5680ec7e577084e9280af478/href</a></iframe><p><strong>16 — And finally… get bookinfo page!</strong></p><p>Well, this is it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOvROCJv6wN8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOvROCJv6wN8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOvROCJv6wN8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/13c7b0511135153e589662756d9fb39c/href">https://medium.com/media/13c7b0511135153e589662756d9fb39c/href</a></iframe><p>Guys, check out <a href="https://cloud.oracle.com/en_US/containers">OCI</a>. It rocks!</p><p>See ya,</p><p>Gabba</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3d530e4b8cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Mesh su OCI — Oracle Cloud Infrastructure]]></title>
            <link>https://medium.com/@Gabba/service-mesh-su-oci-oracle-cloud-infrastructure-bdc16d7e599f?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdc16d7e599f</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[service-mesh]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Wed, 23 May 2018 15:15:41 GMT</pubDate>
            <atom:updated>2018-07-10T09:25:40.808Z</atom:updated>
            <content:encoded><![CDATA[<p><em>“</em><strong><em>Prima legge di Finagle</em></strong><em>: Se un esperimento funziona, qualcosa è andato male.”</em></p><h3><strong>1. Premessa</strong></h3><p>La mia età avanza, l’andropausa inizia ad essere visibile ad occhio nudo e il mio personale switch -<strong>-v</strong> (-verbose, inventato da qualche pisquano per aumentare il numero di parole al minuto) non funziona più come soleva far qualche decennio fa. La risultante di tutto ciò non alimenta il <strong>debito tecnico</strong> — in qualsiasi punto della matrice che tenta di definirlo (<em>avventato</em> vs. <em>prudente</em>, <em>volontario</em> vs. <em>involontario</em>) — ma l’inquietante, terrificante e terribile <strong>debito mnemonico</strong>.</p><p>In sostanza, tendo a non ricordare gli esperimenti e le sessioni in Matrix (terminale con <em>bash</em> rigorosamente a fosfori verdi su sfondo nero, e sessioni CLI su una nuvola a caso da qualche parte) che tanto mi hanno divertito la settimana precedente.</p><p>L’unico neurone attivo rimasto (si chiama Goffredo, ci salutiamo con affetto ogni mattina, non ve lo presento perchè soffre di TeraTimidezza) ha un backlog lungo giorni e giorni, e quindi non mi rimane che affidare la memoria temporanea ad un insignificante post confidando in una piacevole sorpresa quando, tra qualche giorno, lo ritroverò nel feed di qualche <em>sociorete</em> ricordando (!) di non averlo mai scritto.</p><p>Andiamo subito al sodo, se mi dilungo corro il rischio di cadere nel fuso orario della dimenticanza e mi ritrovo a scrivere un articolo sul sincronismo tra “Echoes” dei Pink Floyd e “2001 — A space odyssey” di Stanley Kubrick senza sapere come sono arrivato a tale illuminata considerazione.</p><p>Divido i passi da seguire per creare un Service Mesh su OCI in tre categorie:</p><ul><li>il <strong>setup preparatorio di OCI</strong> per gestire correttamente un cluster K8S</li><li>la <strong>creazione del Cluster</strong> Kubernetes</li><li>L’<strong>installazione ed il test</strong> del Service Mesh</li></ul><h3><strong>2. Setup di OCI</strong></h3><p>Dopo essermi ricordato l’acronimo OCI (Oracle Cloud Infrastructure), procederemo alla creazione dell’identità e delle risorse di rete necessarie.</p><h4>2.1 Identità</h4><p>Una volta collegati alla nostra console OCI, andiamo prontamente a creare un utente dedicato allo scopo su <strong>Identity -&gt; Users -&gt; Create User</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G93kWT1Jsi_c4FfPyu5SwA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*QZJzdSE8LTpdv4I1vW0K6A.png" /></figure><p>Creato correttamente l’utente, dovrò poi gestire una <em>one-time password</em> molto simile ad un ruggito di Brontosauro, segnarmela nel mio salvamemoria (occhio, viene data una sola possibilità), e aspettarmi che successivamente OCI chieda di cambiarla una volta effettuato il login.</p><p>Aggiungiamo l’utente creato al gruppo <strong>Administrator</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yEz2xPv9--Q0IU86zgBLQ.png" /></figure><p>e continuiamo con il setup: occorre creare una policy che consenta al mio utente di gestire, dal servizio Kubernetes, tutte le risorse presenti nella tenancy. Nulla di più semplice: basta andare su <strong>Identity -&gt; Policies</strong> e creare una Policy che riporti l’istruzione:</p><pre><strong>allow service OKE to manage all-resources in tenancy</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*A-5lJrJHN_HkrIOvXfd-hA.png" /></figure><p>ed il gioco è fatto: provvederemo a completare quel che manca tra poco.</p><h4><strong>2.2 La rete e lo zampino di Postak</strong></h4><p>Il setup di OCI per gestire un cluster K8S può essere facilitato, in fase di creazione delle componenti di rete (VCN — Virtual Cloud Networks, Load Balancers, etc.) attraverso uno script <a href="https://terraform.io/">terraform</a> (da installare con <strong>brew install terraform</strong> se siete su Mac, o andando a cercare su Big G le istruzioni per installarlo su altre piattaforme), da configurare, scritto dal mitologico <a href="https://linkedin.com/in/postak/">Postak</a>, che trovate a quest’indirizzo su <strong>GitHub</strong>: <a href="https://github.com/postak/vcn4container">https://github.com/postak/vcn4container</a>.</p><p>E’ l’ora (finalmente!) di aprire una Matrix shell e clonare il progetto dal link sopra descritto:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pB86mmzqSYiIIhYVQco0uA.png" /></figure><p>andando a modificare il file terraform.tfvars con i parametri OCI richiesti e che sono reperibili dalla console, e che consistono in:</p><ul><li><strong><em>tenancy_ocid</em></strong></li><li><strong><em>compartment_ocid</em></strong></li><li><strong><em>fingerprint</em></strong></li><li><strong><em>private_key_path</em></strong></li><li><strong><em>user_ocid</em></strong></li><li><strong><em>region</em></strong></li></ul><p>Mmmmh. Il debito mnemonico, però, mi fa riflettere sulla completezza delle informazioni che ho disposizione, forse manca qualcosa. Goffredo (vedi sopra) è sotto stress, ma riesce a risolvere l’arcano dopo qualche secondo (sta invecchiando anche lui ma vi prego di essere gentili, non si chiede l’età ad un neurone): debbo generare il <strong>fingerprint</strong>, aggiungendo una Public Key nella schermata di dettaglio dell’utente creato:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9OgcogWN99vEmzcEDlc00w.png" /></figure><p>ed automagicamente OCI mi mette a disposizione il fingerprint, che includerò nel file terraform.tfvars. Siamo pronti per far girare <strong>terraform</strong>? Goffredo annuisce, forse un po’ troppo lentamente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*gzDS4MwauN_PlvYLGqe4OQ.png" /><figcaption>terraform init</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*nv7ytrK_69rVm0gc8i1YnA.png" /><figcaption>terraform plan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kstVRYLTvyr_181AxTIDxw.png" /><figcaption>terraform apply</figcaption></figure><p>Ed in un battito d’ali di farfalla la rete per il nostro Cluster Kubernetes gestito in OCI è pronta, composta da:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*echnfUHzoPGzzFPtHTdFkQ.png" /><figcaption>Postak dixit</figcaption></figure><p>Passiamo al prossimo segmento, e cioè la creazione del cluster vero e proprio.</p><h3>3. Setup del Cluster Kubernetes su OCI</h3><h4>3.1 C’è sempre più di un modo per farlo</h4><p>Approntare un Cluster Kubernetes su OCI può significare:</p><p><strong>a)</strong> Impostare tutto con terraform seguendo le istruzioni su <a href="https://github.com/oracle/terraform-provider-oci">https://github.com/oracle/terraform-provider-oci</a> e quindi essere responsabili per i nodi master e i nodi worker (e pagando il consumo di risorse su tutti i nodi)</p><p><strong>b)</strong> Continuare a seguire questo articolo sperando che il Postak sia nei paraggi o aspettando che venga creata Postakpedia nel caso il debito mnemonico passi dallo stadio ‘<em>fastidioso</em>’ allo stadio ‘<em>pericoloso</em>’ (le <em>screwups</em> sono sempre in agguato). Poi invocare qualche divinità (<a href="http://linkedin.com/in/postak/">Postacchini</a>, <a href="http://linkedin.com/in/gabfolchi/">Folchi</a>, <a href="https://en.wikipedia.org/wiki/Cthulhu">Chtulhu</a>), e proseguire. Il vantaggio di questa opzione risiede nella gestione autonoma, da parte di OCI, delle componenti di sistema di Kubernetes (ad esempio, i Master Node ed amenità connesse) che quindi non vengono contabilizzati nel computo dei costi. Non male.</p><h4>3.2 …e noi usiamo il Kubernetes ‘gestito’</h4><p>Corriamo - quindi - a seguire la versione b) del nostro malefico piano. Ci colleghiamo con l’utenza Gabba creata precedentemente, e ci viene chiesto di cambiare la one-time password ricevuta con una password definitiva (almeno per le prossime ore, la sicurezza non è mai troppa).</p><p>Da pochi giorni è comparso, sulla console OCI, un tab molto sospetto (Containers):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGQeTVVdSc0J6hZM6Zi8Uw.png" /></figure><p>che utilizzeremo per creare il Cluster K8S, premendo un visibile bottone blu in questa pagina:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Umw4JlL74fqqLJWBySPRgw.png" /><figcaption>Click that frickin’ button…</figcaption></figure><p>che apre un form su cui bisogna impostare il nome del Cluster (GabbaCluster), la versione di Kubernetes (es. 1.9.7), la VCN ed i due Load Balancers creati dallo script del Postak, le spunte su Kubernetes Dashboard Enabled (yes) e Tiller (Helm) enabled (yes).</p><p>E’ possibile creare il Node Pool (l’insieme dei nodi worker sotto il nostro controllo) già in questo form, ma per chiarezza lo faremo in un secondo momento.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*7cdedXujQrOnMyWYZPpCEg.png" /><figcaption>…and fill the form!</figcaption></figure><p>Excellent. Una volta avviata, la procedura di creazione del cluster richiede circa 5 minuti.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*tRmjUOCWNf9ID14I2Ia74g.png" /><figcaption>Making stuff available…</figcaption></figure><h4>3.3 Creazione del Node Pool</h4><p>Una volta creato il cluster, possiamo procedere alla creazione del Node Pool, che configureremo con la stessa versione di K8S (1.9.7), su Oracle Linux 7.4, con una Shape che include 1 OCPU, 15 GB di RAM e fino a 512 TB di storage.</p><p>Il sistema richiede la chiave SSH pubblica, che provvederemo a tradurre da una chiave che già abbiamo, public.pem, con il comando:</p><pre>ssh-keygen -f public.pem -i -mPKCS8</pre><p>Una volta completato il form, si procederà con l’avvio della creazione del Node Pool denominato (guarda un po’) GabbaNode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*4WifweYTUJBWTY3cGoHLJg.png" /><figcaption>Creating nodes</figcaption></figure><p>Dopo qualche minuto Goffredo mi implora di portarlo fuori a respirare aria di città. Povero, lo capisco, con il tempo (credo) ha bisogno di pause ripetute e passare dal terminale a fosfori verdi al riallineamento dei bulbi oculari guardando il <em>maggio-paesaggio</em> fuori la finestra. Lo sguardo sul mondo esterno durerà poco, purtroppo: la creazione dei nodi non richiede più di 15 minuti, la maggior parte dei quali è impiegata per aggiornare il software dei nodi stessi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*kmXZdNAq8uFEwj7Clux4eQ.png" /><figcaption>Active Active Active</figcaption></figure><p>L’ultimo step di questo segmento ci server per accedere al cluster Kubernetes da Matrix. Ci aiuterà, nella pagina dei Cluster, premere il bottone “Access Kubeconfig”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*6GPIbKWeNB_yWvBdPMy6wQ.png" /><figcaption>Access Kubeconfig</figcaption></figure><p>che ci fornisce le indicazioni per ottenere il prezioso Kubeconfig. Le seguiamo bovinamente:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*SyBBMylfUXBlKOFIs2t76A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*UiQHC8Kwfo0Al6H6LB-GeQ.png" /></figure><p>…ed il cluster K8S è attivo!</p><h3>4. Service Mesh!</h3><p>Cos’è un Service Mesh? In breve, se le esigenze di uno stile architetturale a microservizi richiede l’applicazione di pattern di osservabilità, di resilienza, di controllo del traffico (pensiamo alla sicurezza, al circuit-breaking, ed a tutte le indicazioni esplicite e non derivanti dall’adozione di questo stile), il Service Mesh si propone di indirizzare molti di questi temi.</p><p>Detta in maniera meno <em>sciencey</em>, il Service Mesh (ad esempio, <a href="http://istio.io/">Istio</a>) consiste nel fornire un Control Plane (il centro di comando e controllo delle connessioni, degli instradamenti e dei rilevamenti telemetrici) ed un pattern per costruire il Data Plane (l’insieme dei microservizi osservati): il <strong>Sidecar</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GRNkLTFomJG2K5rZo122KQ.png" /><figcaption>Istio stuff</figcaption></figure><p>Il pattern Sidecar (nel caso di Istio, <a href="https://www.envoyproxy.io/">Envoy</a>, sviluppato da Lyft) consiste nell’iniettare nei pod applicativi (alla parola <em>iniettare</em> Goffredo ha un tremito, è un neurofifone) un proxy con un impronta RAM minimale in grado di intercettare flussi, generare telemetria, e ricevere comandi (ad esempio, policy e regole di instradamento) provenienti dal Control Plane (pod di sistema Istio).</p><p>Per questo esempio, su Oracle Cloud Infrastructure, utilizzeremo Istio ed applicheremo delle regole per osservare il cambiamento del comportamento da parte di un’applicazione. L’applicazione di esempio (<strong>BookInfo</strong>) si presta egregiamente — nella sua semplicità — a questo tipo di interazione.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5KsPEfZbDKdsLkixw0U3A.png" /><figcaption>Architettura Bookinfo</figcaption></figure><p>Ogni microservizio di Bookinfo è scritto in un linguaggio diverso:</p><ul><li><strong>Python</strong> per il Front-End</li><li><strong>JavaScript</strong> su Node, un microservizio <strong>Java</strong> presente in varie versioni, e un microservizio <strong>Ruby</strong> sul Back-End,</li></ul><p>e l’intera applicazione, una volta installato Istio, cambia conformazione:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gtr9pn-I215gTS--pvxFHg.png" /><figcaption>Bookinfo con Istio</figcaption></figure><h4>4.1 Installare Istio su K8S</h4><p>Basta figure. Troppe figure fanno uscire da Matrix, dove subito rientriamo andando a scaricare Istio ed esempi dal sito. Il comando <strong>curl</strong> scarica Istio localmente, il secondo rende disponibile il comando istioctl nella shell, ed il terzo (buon vecchio <strong>kubectl</strong>, mi mancavi) installa Istio nel nostro cluster Kubernetes.</p><pre>curl -L https://git.io/getLatestIstio | sh -</pre><pre>export PATH=”$PATH:./istio-0.7.1/bin”</pre><pre>kubectl apply -f install/kubernetes/istio.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GltdyGZzx6S2kpL8rX5rHw.png" /><figcaption>Downloading</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_vW3E8nOTneP-JQnrgDAcg.png" /><figcaption>…And, Installing</figcaption></figure><p>E’ possibile verificare che l’installazione sia andata a buon fine con</p><pre>kubectl get svc -n istio-system<br>kubectl get po -n istio-system</pre><p>dove <em>pods</em> e <em>services</em> sono stati collocati su un apposito namespace (<em>istio-system</em>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqnjAeaOEZKyPn0hDbqWtw.png" /></figure><p>Notate che il servizio <strong>istio-ingress</strong>, che espone l’erogazione applicativa in modalità LoadBalancer, ha il suo indirizzo IP pubblico ed è proprio quello che utilizzeremo per capire se l’applicazione è viva e scalcia come un puledro uscito dal recinto oppure abbiamo sbagliato qualcosa e siamo costretti a entrare in modalità ‘infrastructure-as-code’ e debuggare/distruggere rapidamente quanto abbiamo costruito.</p><h4>4.2 Installare BookInfo</h4><p>L’applicazione BookInfo è installabile e <em>sidecarizzata </em>(Devoto-Oli, perdonatemi) con il comando <strong>istioctl</strong>, annidato nel comando <em>kubectl,</em> con il comando:</p><pre>kubectl create -f &lt;(istioctl kube-inject -f \ samples/bookinfo/kube/bookinfo.yaml)</pre><p>che ci restituisce una sfilza di ‘created’… buon segno.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDfpcqmdxpx2NA4w4s2TVg.png" /><figcaption>BookInfo</figcaption></figure><p>E’ tempo, poi, di effettuare il test (Goffredo, per cortesia, fai un rullo di tamburi con un <em>paradiddle</em> semplice), annotando l’indirizzo IP pubblico assegnato all’istio-ingress (129.213.66.43) ed aggiungendo, nell’URL, la pagina iniziale (productpage).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FLHdTIJ32ftjdtiZ0tcnvg.png" /><figcaption>It works :)</figcaption></figure><p>Il funzionamento di BookInfo è semplice: la <em>productpage</em> punta (con una regola di default) ad una delle istanze del microservizio Reviews (v1, v2 o v3) che, rispettivamente, fanno in modo di mostrare una pagina senza stelle (v1), una pagina con stelle nere (v2) ed una pagina con stelle rosse (v3). Ricaricando la pagina, vedremo che le tre versioni dello stesso microservizio vengono mostrate in maniera sequenziale (senza, stelle nere, stelle rosse).</p><h4>4.3 Cambiamo le regole!</h4><p>BookInfo è fornito con una serie di regole di esempio, applicabili a caldo, che permettono di fare cosine interessanti: in particolare, la regola chiamata <strong>route-rule-reviews-test-v2.yaml</strong> nella directory <strong>samples/bookinfo/kube</strong> e che riporta la seguente configurazione:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*4G3a26z7Ja9xPiv2X6G7eg.png" /><figcaption>regex…</figcaption></figure><p>permette ad un utente che ha effettuato il login come <strong>jason</strong> (un nome a caso) di accedere visualmente all’intera applicazione attraverso la <em>productpage</em>, che però a sua volta punterà esclusivamente alla versione v2 del microservizio Reviews. Proviamo ad applicarla.</p><pre>kubectl create -f \ <br>samples/bookinfo/kube/route-rule-reviews-test-v2.yaml</pre><p>Accedendo alla productpage dovremo effettuare il login, sempre in massima sicurezza (utente: jason, senza password) e capire se, ricaricando la pagina, la regola è stata applicata correttamente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*sRYZzAWnJYTufUXGZeGjUg.png" /><figcaption>Hi. I’m Jason.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*upvYAxilTFHfIJgInHCIiA.png" /><figcaption>Wow. It works again…</figcaption></figure><p>…In effetti, ricaricando la pagina, accediamo esclusivamente alle Reviews con stelle nere, e quindi la regola applicata nel nostro Service Mesh ha avuto successo! Il percorso che abbiamo seguito, quindi è quello contraddistinto dagli indicatori rossi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4sH7nam_9OGE5CF8d7dJWw.png" /></figure><h3>5. Conclusioni — Time and a word</h3><p>Vi ricordate cosa voleva dire (una ventina di anni fa - quando Goffredo-Highlander non era da solo ma in splendida compagnia di altri neuroni con cui tesseva proficue relazioni) disegnare infrastruttura, rete ed applicazioni in grado di supportare regole di <em>traffic shaping</em> a caldo? Oppure predisporre <em>canary test</em> in grado posizionare diverse versioni della stessa applicazione per un’utenza amica? O forse pensare ad una serie di Dark Launches (detta così sembra il gruppo Facebook di Darth Vader) per catturare il traffico dalla produzione in un segmento di cluster dove posso effettuare esperimenti senza temere ripercussioni sulle prestazioni complessive delle applicazioni?</p><p>Tutto questo è possibile, ora, con uno sforzo contenuto, grazie ai Container (<strong>Docker</strong>), agli orchestratori (<strong>Kubernetes</strong>) ed al Service Mesh (<strong>Istio</strong>).</p><p>La quasi totalità delle operazioni che avete visto in quest’articolo sono riproducibili in un cluster sul vostro PC/Mac/Linux, attraverso <a href="https://kubernetes.io/docs/tasks/tools/install-minikube/">Minikube</a>: vederlo dal vivo su di un’infrastruttura potente come OCI, in poco tempo e con regole applicabili mentre l’applicazione è in esecuzione, comunque, è divertente, educativo, e permetterà alla mia memoria di recuperare velocemente queste informazioni quando il debito mnemonico prenderà il sopravvento.</p><p>E, cioè, la settimana prossima.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdc16d7e599f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Da Trantor a Terminus con fnproject.io]]></title>
            <link>https://medium.com/@Gabba/da-trantor-a-terminus-con-fnproject-io-a63817e4cdad?source=rss-e3e79e29ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a63817e4cdad</guid>
            <category><![CDATA[fn-project]]></category>
            <category><![CDATA[function]]></category>
            <dc:creator><![CDATA[Gabriele Provinciali]]></dc:creator>
            <pubDate>Wed, 04 Apr 2018 16:19:52 GMT</pubDate>
            <atom:updated>2018-04-04T19:33:55.262Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From the point of ignition, to the final drive, the point of a journey is not to arrive (Neil Peart, 1987)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gknzk2nfjshnuHonGMkeJA.jpeg" /><figcaption>“Arrival at Trantor”, di MarkJayBee — DeviantArt</figcaption></figure><h3><strong>Cos’è un container, che tu ne prenda cura?</strong></h3><p>E’ innegabile: il numero di pubblicazioni tecniche, di esempi, di corsi online, di tecnoprofezie e di letteratura disponibile sulla Grande Rete riguardo <a href="https://it.wikipedia.org/wiki/Docker">Docker</a> — e, più in genere, sulle magiche e salubri proprietà derivanti dall’utilizzo dei <em>software container</em> — ha subìto negli ultimi tre anni un’interessante accelerazione geometrica in grado di far colpo su molti dipartimenti IT che, coraggiosi o diffidenti, sono comunque esposti al funambolistico equilibrio di framework architetturali bilanciati tra moda, efficienza operativa, impatti organizzativi e modernità.</p><p>Quasiasi presentazione, workshop, discorso, post o cinguettio sociale centrato sui microservizi e su Docker ha come base di partenza la rottura (i più gentili parlano di decomposizione — spero — funzionale) del <em>monolito applicativo:</em> metafora che incarna l’alternativa offerta da soluzioni leggere e agili e moderne rispetto alle lungaggini e peccati originali insiti nei classici macrocontainer (ad esempio, JEE) che, al confronto, sembrano vestigia di un passato innominabile.</p><p>Che sia vero oppure no, mai il termine <strong><em>monolito</em></strong> ha avuto un’accezione così inquietante dall’apparizione nel <a href="https://it.wikipedia.org/wiki/2001:_Odissea_nello_spazio">film</a> di Kubrick esattamente cinquant’anni fa.</p><p>Anche le tecnologie afferenti al <a href="https://en.wikipedia.org/wiki/Serverless_computing">Serverless Computing</a> sembrano non essere esenti da tale fenomeno: il disegno e l’utilizzo di funzioni completamente basate su Cloud (il futuro) spesso sembrano non essere completamente correlate o compatibili con lo stato dell’arte presente nei nostri Data Center (il presente). Se consideriamo il termine <em>Serverless</em> come un’astrazione delle componenti infrastrutturali e — soprattutto — delle operazioni applicabili su tale infrastruttura (provisioning, scalabilità, patching), quello che per uno sviluppatore di nuova generazione può essere considerato il Nirvana, spesso, può viceversa rappresentare una fastidiosa passeggiata lungo le rive dell’Acheronte per una persona delle <em>operations</em>.</p><p>Utilizzando — con la necessaria dose di ironia e cuor leggero, intendiamoci bene — le visioni che il “Buon Dottore” Isaac Asimov ci ha lasciato in eredità, sembra proprio di trovarsi nei capitoli iniziali di “Cronache della Galassia”, il primo libro della trilogia originale che narra l’epopea della <a href="https://it.wikipedia.org/wiki/Ciclo_della_Fondazione">Fondazione</a>.</p><p>Da un lato, il pianeta <a href="https://it.wikipedia.org/wiki/Trantor">Trantor</a>, la gigantesca e sofisticata capitale dell’Impero, dove l’automazione, la centralizzazione delle attività e la consuetudine, ottimizzata da tempo, regnano sovrane, accompagnate però dal rischio di ipertrofia. Dall’altro, il pianeta periferico <a href="https://it.wikipedia.org/wiki/Terminus_(ciclo_della_Fondazione)">Terminus</a>, la capitale della Fondazione, dell’agilità e del nuovo corso, dove però c’è ancora molto da fare in un ambiente di frontiera (forse il corrispettivo spaziale del selvaggio West).</p><p>In ogni caso, il periodo di transizione tra le due capitali (e tra due modi diversi di governare un impero) è stimata da <a href="https://it.wikipedia.org/wiki/Hari_Seldon">Hari Seldon</a>, ideatore e pioniere della psicostoria come scienza predittiva (mi domando se sarà basata su Hadoop), in mille anni. Un millennio. Tempo lungo per i singoli umani, tempo sufficientemente corto per gli umani come specie da salvare sotto guida più o meno illuminata.</p><h3><strong>Da Trantor a Terminus</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*v5DI2XHcDCNui90cAJIOTg.jpeg" /><figcaption>Asimov ritratto da Rowena Morrill</figcaption></figure><p>Un ipotetico viaggio — a carico di un’impresa o di un’amministrazione — da Trantor a Terminus, e cioè da un approccio applicativo centralizzato basato sui macrocontainer (il monolito) ad uno distribuito basato sui microservizi — è lungo 10.000 parsec (qualsiasi cosa voglia dire, è la distanza citata da Asimov tra i due pianeti immaginari) e non esente da insidie: molte delle rotte possibili passano attraverso approcci che non mi convincono completamente.</p><p>Ad esempio, l’approccio Bimodale, dove la stessa organizzazione si divide in ‘classico’ e ‘nuovo’, adottando due velocità e modus operandi differenti secondo parametri quali dimensioni dei progetti, competenze dei gruppi di lavoro e dei dipartimenti, criteri strategici.</p><p>A mio avviso, questa dicotomia non rappresenta in maniera fedele la complessità di una grande organizzazione, che probabilmente incorpora meccanismi e modelli più vicini ad un concetto MultiModale (più dimensioni di progetto, più velocità, strategie parallele, inevitabili contaminazioni tra classico e nuovo). In ogni caso, l’interazione tra classico e nuovo rimane un fatto.</p><p>Uno dei criteri di successo di Docker e — sopratttutto — di <a href="https://kubernetes.io/">Kubernetes</a> come orchestratore e schedulatore di container (in forma infrastrutturale) e di microservizi (in forma logica) è la connotazione <em>Cloud-Native</em>: nativo del Cloud, non solamente in termini di modello di deployment ma in termini di <strong>stile architetturale, </strong><em>capacità tecniche</em> e, perché no, restrizioni creative rispetto al modello classico. La popolarità dell’accoppiata Docker/Kubernetes è dovuta anche alla disponibilità e quindi flessibilità di installazione: stazione di sviluppo, modello On-Premise, Cloud Privato, Cloud Pubblico. <a href="https://kubernetes.io/docs/getting-started-guides/minikube/">Minikube</a> ne è un esempio. Come semplice mozzo o come navigatore interstellare esperto, troverò (quasi) sempre un ambiente molto vicino alle mie necessità o al mio ruolo aziendale.</p><p>Se la flessibilità è la chiave di volta per l’adozione di una infrastruttura moderna basata su microcontenitori (e, sperando che lo spirito del Buon Dottore ci perdoni, la selezione di un motore gravitazionale adatto a portarci — se lo vogliamo — da Trantor a Terminus), mi domando se tale flessibilità può essere impiegata anche nelle architetture serverless dove una pluralità non definita a priori di <a href="https://en.wikipedia.org/wiki/Function_as_a_service">funzioni</a> devono essere ampiamente disponibili durante un Click Day e gradualmente ridotte (insieme ai relativi costi) in base alla diminuzione del carico.</p><p>Insieme a questa domanda, i framework serverless ne fanno scaturire molte altre:</p><ul><li>Il modello di deployment di un framework serveless riesce a soddisfare tutte le esigenze, dalla stazione di sviluppo fino al Cloud Pubblico?</li><li>E’ facile da adottare? Dispone di strumenti adeguati per il debugging? Qual è il costo reale che permette di misurare le <em>capabilities</em> della mia organizzazione con le <em>capabilities</em> tecnologiche?</li><li>E’ poliglotta? L’importanza di supportare diversi run-time sembra essere più rilevante rispetto al passato?</li><li>E’ legato ad un fornitore specifico? Un framework serverless equivale al serveless computing?</li></ul><h3><strong>Uno dei motori gravitazionali: fnproject.io</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*0vT0CnlHfxnidZT6bq44Jg.png" /></figure><p>Il progetto <a href="http://fnproject.io/">fn</a>, un framework serverless Open Source basato su Docker, scritto in Go e gestibile anche attraverso Kubernetes, si propone di affrontare alcune di queste domande mediando la logica infrastrutturale propria dei container Docker con la facilità di sviluppo in genere attribuita al serverless computing, ed è disponibile su <a href="https://github.com/fnproject/fn">GitHub</a>. L’annuncio effettuato dal gruppo di lavoro fn durante la JavaOne 2017 ha suscitato <a href="https://blog.andresteingress.com/2017/10/12/fn-project.html">interesse</a> ed <a href="https://www.n-k.de/2017/10/fnproject-first-impressions.html">alcuni interrogativi</a> da parte della comunità: in ogni caso, non è passato inosservato.</p><p>La prima impressione, scorrendo note, documentazione e codici di esempio, è la semplicità di installazione e della logica iniziale. Il prerequisito è avere una stazione di sviluppo con Docker ed i run-time di riferimento per lo sviluppo delle funzioni. Divertente l’idea di far percepire la semplicità di installazione e di creazione della prima funzione attraverso una GIF animata:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*jBX5WpeoLY8yHHpIgpkZCA.gif" /><figcaption>Bricolage a linea di comando</figcaption></figure><p>Considerando che tutto quello che è GUI viene visto con sospetto (alle volte giustamente), la linea di comando (CLI) rappresenta la <em>lingua franca</em> di tutte le figure professionali, dallo sviluppo all’esercizio, dal millennial all’esperto investigatore tecnico che ha iniziato a smanettare nel secolo scorso. Per chi usa il Mac, il package management è offerto direttamente da <strong>brew</strong>:</p><p><strong>brew install fn</strong></p><p>o nel mio caso, <strong>brew upgrade fn </strong>per aggiornare l’installazione esistente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2pIIH1JAu3Gvo-W9Js7oA.png" /></figure><p>I sorgenti e gli eseguibili per tutte le piattaforme supportate sono disponibili al link <a href="https://github.com/fnproject/cli/releases">https://github.com/fnproject/cli/releases</a>.</p><p>Avere a disposizione i sorgenti rende il nostro viaggio iperluce molto interessante per chi (come <a href="https://medium.com/@luigi.saetta">Mr. Lightning</a>) si diletta di IoT e di piattafome per l’automazione come il Raspberry Pi: <a href="https://medium.com/@varpa89">Pavel Varchenko</a> si è cimentato in questa PoC portando l’ambiente <strong>fn</strong> nei suoi cluster <a href="https://medium.com/@varpa89/run-fn-project-on-your-raspberry-pi-fa17f5067b47">Raspberry</a>. Il modello di deployment, quindi, sembra essere sufficientemente ampio con uno spettro di copertura dalle micropiattaforme fino ad architetture complesse (ampio modello di deployment nella nostra lista: <em>check</em>!).</p><p>Il lancio di un’instanza fn è altrettanto semplice:<strong> fn start</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pXxCdSWIuC4ykm_61WDu6g.png" /></figure><p>Il set di comandi disponibili su fn sono (sufficientemente) parlanti: per creare, minimalisticamente testare e mettere in esecuzione una funzione utilizzeremo <strong>fn init</strong>, <strong>fn run</strong>, <strong>fn deploy</strong>, <strong>fn call</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WpqmK5MDNtTyq1zqP0OyyQ.png" /></figure><h3>Percorrere i primi Parsec</h3><p>La creazione di un modello di funzione è disponibile attraverso il comando <strong>fn init</strong>, a cui bisogna associare un runtime di riferimento (sì, fn è poliglotta… <em>check</em>!). In questo caso l’ambiente di runtime è <strong>node.js</strong>: il comando di inizializzazione genera il <em>boilerplate</em> della funzione che possiamo testare contestualmente alla creazione di un file di input scritto in JSON.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gqize7wJ6yG-R4UzNfANJQ.png" /></figure><p>Il comando <strong>fn start</strong> che abbiamo precedentemente eseguito ha creato una directory (<strong>data</strong>) che contiene le rotte ed i costrutti necessari a questa particolare istanza del server <strong>fn</strong>. Tutti gli altri file sono stati creati da <strong>fn init</strong>, ed includono il corpo della funzione (<strong>func.js</strong>), il descrittore YAML (<strong>func.yaml</strong>), ed un paio di file JSON (<strong>package.json</strong> e <strong>test.json</strong>).</p><p>Lo so, affrontare un viaggio interstellare con un Hello World è impresa ardua e risibile (Asimov era unico e impareggiabile, un professore di biochimica che scriveva di robotica e di imperi galattici), ma in questo modo dimostriamo che la generazione di una funzione è semplice (altro <em>check</em>! nella nostra lista), e che l’accensione dei motori gravitazionali per l’inizio del nostro viaggio rispetta il semplice paradigma di una funzione: l’accettazione di parametri di input, l’elaborazione e la restituzione di un output, in questo caso a forma di <em>Unix pipe</em> (<strong>cat payload.json | fn run</strong>).</p><p>Siamo pronti, quindi per calcolare ed affrontare i primi Parsec, e quindi effettuare il deployment della funzione nel nostro ambiente:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yo6gkFhoCaDZ2TDJsHrrAg.png" /><figcaption>I primi Parsec, in scioltezza…</figcaption></figure><p>Il comando <strong>fn deploy</strong> seguito dal nome della funzione stimola un innalzamento di versione (<em>version bump</em>, 0.0.2), il push dell’immagine al Docker Registry (con le stesse modalità di un container, riusando i layer già presenti nel mio account su DockerHub) e la creazione o aggiornamento della rotta di accesso alla funzione stessa. I comandi <strong>fn apps list</strong> e <strong>fn routes list </strong>seguito dal nome dell’app mostrano rispettivamente la funzione in esecuzione governata da questa istanza <strong>fn</strong> e la rotta disponibili per l’accesso.</p><p>Ora, verifichiamo se la funzione in esecuzione è effettivamente invocabile:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uv6ayUcpVYhxVIF5Iso5-w.png" /><figcaption>Chiamate alla funzione</figcaption></figure><p>Posso invocare la funzione attraverso il comando <strong>fn call</strong> (in questo caso senza parametri, il che mi restituisce l’output di default) oppure attraverso l’onnipresente, abusato e immarcescibile <strong>curl</strong> (più i parametri e gli argomenti necessari) utilizzando la rotta predisposta dal server fn e visibile con<strong> fn routes list</strong>:</p><p>curl -H “Content-Type: application/json” -X POST -d @payload.json \ <a href="http://localhost:8080/r/myfunction/Terminus">http://localhost:8080/r/myfunction/Terminus</a></p><p>Su GitHub il materiale disponibile è copioso, distinto per categorie, tra cui:</p><ul><li><strong>fdk</strong> (Function Development Kit), i kit di sviluppo disponibili per i linguaggi/ambienti più utilizzati (<a href="https://github.com/fnproject/fdk-node">Node</a>, <a href="https://github.com/fnproject/fdk-python">Python</a>, <a href="https://github.com/fnproject/fdk-go">Go</a>, <a href="https://github.com/fnproject/fdk-ruby">Ruby</a>, <a href="https://github.com/fnproject/fdk-java">Java</a>)</li><li><a href="https://github.com/fnproject/flow"><strong>fnflow</strong></a>, la possibilità di scrivere flussi di funzioni a lungo termine (<em>long-running</em>) in grado di governare un processo composto da più funzioni in cascata, al Load Balancing.</li><li><a href="https://github.com/fnproject/fn-helm"><strong>Helm Chart</strong></a>. <a href="https://helm.sh/">Helm</a> è un package manager per Kubernetes, molto gradito dalla comunità K8S, e il Chart disponibile su GitHub consente il deployment della piattaforma fn in un Cluster Kubernetes attraverso comandi molto semplici.</li><li>Integrazione con <strong>Prometheus</strong> e <strong>Grafana</strong>.</li></ul><h3>Un occhio al cruscotto</h3><p>L’integrazione con<strong> </strong><a href="https://prometheus.io/"><strong>Prometheus</strong></a> e <a href="https://grafana.com/"><strong>Grafana</strong></a><strong> </strong>merita un punto a parte. Il <a href="https://github.com/fnproject/tutorials/tree/master/grafana">tutorial</a> descritto su GitHub consente, in pochi minuti, di accedere alla console grafica di Grafana e monitorare, come in questo esempio, una serie di funzioni accedute da diversi client in maniera concorrente.</p><p>La ‘pila’ software che utilizzeremo è la seguente:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pcPHuFbn7Vqx3maKldwdBA.gif" /></figure><p>Neil mio caso, userò comandi <em>docker</em> e porte conosciute (e libere!) per far partire Prometheus e Grafana da linea di comando, configurandoli come descritto nel tutorial:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vSodwAPoOI72911snNhDaA.png" /><figcaption>Dalla CLI ad una GUI…</figcaption></figure><p>e per testarli stimolerò l’esecuzione concorrente di un numero di funzioni, verificando attraverso Prometheus, che espone il servizio sulla porta 9090 (http://localhost:9090), se effettivamente siano in corso di esecuzione e registrate come time series:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7VF3VHrUg6_LltB4AqdIcQ.png" /><figcaption>Prometheus (non quello di Ridley Scott, però!)</figcaption></figure><p>Grafana espone invece il proprio servizio sulla porta 3003. Una volta effettuato il login in massima sicurezza (id: <strong>admin</strong>, pw: <strong>admin</strong>), è possibile configurare Prometheus come data source:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tntRGTe-K3rnnRJpERTfuw.png" /></figure><p>e poi importare le dashboard già presenti su GitHub che opportunamente scarichiamo in locale da <a href="https://github.com/fnproject/fn/tree/master/examples/grafana">https://github.com/fnproject/fn/tree/master/examples/grafana</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yIKTbfnQY4Q8lCrKvIlCBg.png" /></figure><p>Il risultato è sicuramente funzionale ed esteticamente gradevole:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJ-P4Bqe6mr4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJ-P4Bqe6mr4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJ-P4Bqe6mr4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc0150275c9ccee822348225892ac81c/href">https://medium.com/media/dc0150275c9ccee822348225892ac81c/href</a></iframe><h3>Un lungo viaggio</h3><p>La descrizione dei motori gravitazionali di Asimov (cfr. “L’orlo della Fondazione”) è così generica e poeticamente appropriata da rendere l’intera lettura assolutamente coinvolgente: il numero di ‘salti’ previsti per il viaggio deve essere calcolato accuratamente e ricalcolato per ogni minima deviazione.</p><p>Inoltre, i ‘salti’ non posso essere utilizzati quando si è troppo vicino al pianeta di origine, a quello di destinazione o a sistemi planetari intermedi. In effetti il passaggio dai macrocontainer (<em>all-in-one</em>, più facili da gestire dai vari dipartimenti suddivisi per ruoli e competenze) ai microcontainer (<em>micrologica distribuita</em>, dove ogni gruppo incorpora tutti i ruoli che cooperano all’erogazione di un determinato servizio) ricorda un po’ la logica del viaggio interstellare: ogni salto deve essere calcolato accuratamente, senza perdere di vista l’intero percorso.</p><p>In tal senso, il viaggio è appena iniziato, e le organizzazioni chiamate a selezionare le tecnologie abilitanti devono misurarsi con strumenti in grado di essere gestiti in una pletora di ambienti (sviluppo, test, collaudo, certificazione, esercizio) incrociati con vari modelli di deployment (locale, On-Premise, Cloud Privato, Cloud Pubblico) e vari ruoli (Sviluppatori, Tester, Operations): il salto da calcolare per il prossimo passo sarà soggetto a scrutinio anche per la flessibilità con cui un framework è in grado di supportare ambienti, modelli e persone diverse.</p><p>Il viaggio sarà lungo: tra le stelle o tra vari Data Center, lungo parsec o Availability Domains, ci aspetta un interregno denso e interessante. Nel frattempo, pensare al Buon Dottore mi ha fatto venir voglia, per l’ennesima volta, di rileggere la Trilogia originale, sperando che non si palesi nessun inaspettato <a href="https://it.wikipedia.org/wiki/Il_Mulo">Mulo</a> a distruggere i miei tranquilli propositi…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a63817e4cdad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>