Golang training pre-session: portfolio
Sharing our work and projects written in go.
Ayoub Bousselmi (github.com/abousselmi)
Sofiane Imadali (github.com/sofianinho)
4. When, Why and How ?
2/21/2019 Golang Skills 4
When
2016
Go version: 1.7
Why
Docker
RANaaS project: beego based Swagger API (OpenAPI)
integrations with MangoDB
fake data generator like Joke2k/faker in Python:
5. When, Why and How ?
2/21/2019 Golang Skills 5
When
2017
Go version: 1.7, 1.8, 1.9
Why
Docker with Play-with-Docker project
Wall and Wall API
VNF API to integrate Dockerized OpenAirInterface
AccessPoint API to integrate with hostapd and dhcpd
6. When, Why and How ?
2/21/2019 Golang Skills 6
When
2018
Go version: 1.8, 1.9, 1.10
Why
Docker with Play-with-Docker project
Docker-machine driver for the PlayGround (PWD)
Clutch: metrics exporter from PCP to Kafka
All exporters with Prometheus (Web, Postgres),
Alertmanager
GitTar: git clone from a repo (for CI)
8. Play-with-Docker
2/21/2019 Golang Skills 8
Goal
Ephemeral environment to play with docker
Part of the Plug’in sandbox
Implementation
Gorilla Mux: API routes and handlers
Docker SDK (official API from github)
HTML/CSS/JavaScript/WebSockets
connected to golang backend
Main libraries
gorilla/mux
docker/docker/api
prometheus/promhttp
Links
https://gitlab.forge.orange-labs.fr/lucy/playground
9. Docker Machine Driver
2/21/2019 Golang Skills 9
Goal
Use docker-machine to interact with
PlayGround
Create containers (DINDs) in the PlayGround
Implementation
Docker-machine SDK
Main libraries
docker/machine
Links
https://gitlab.forge.orange-labs.fr/lucy/playground-driver
10. VNF API
2/21/2019 Golang Skills 10
Goal
Wrap binaries and make them HTTP
attainable
Inspired by Ligato project
Implementation
Gin-gonik for swagger API
Logrus for logging
Templating for different configurations
Main libraries
sirupsen/logrus
gin-gonic/gin
savaki/swag
Links
https://www.sdxcentral.com/products/ligato/
11. Wall and Wall API
2/21/2019 Golang Skills 11
Goal
Make something like Gist (Github) for the
Sandbox users
Implementation
Jekyll + Nginx
Golang based API + Templating for posts
Main libraries
gorilla/mux + gorilla/handlers
urfave/negroni
Links
https://gitlab.forge.orange-labs.fr/lucy/wall-api
https://gitlab.forge.orange-labs.fr/lucy/wall
12. Clutch
2/21/2019 Golang Skills 12
Goal
Create small probe to extract metrics from
PCP to Kafka
Implementation
Kafka and PCP integration
Logrus for logging
Viper for configuration management
Main libraries
Shopify/sarama
sirupsen/logrus
spf13/viper
Links
https://gitlab.forge.orange-labs.fr/tqwt7730/clutch
13. Prometheus Integration
2/21/2019 Golang Skills 13
Goal
Export metrics from PlayGround to
Prometheus
Create an observable deployment on
OpenWatt
Implementation
Using official golang Http client
Rebuild Docker images from source code
Main libraries
prometheus/promhttp
Links
https://gitlab.forge.orange-labs.fr/tqwt7730/prom-bbe
14. GitTar
2/21/2019 Golang Skills 14
Goal
Clone a git project from remote repo
Use BasicAuth credentials
Implementation
Swagger REST API
Combine with AtomDocs (Sandbox) for
documentation CI/CD
Main libraries
gopkg.in/src-d/go-git.v4
gin-gonic/gin
savaki/swag
Links
https://gitlab.forge.orange-labs.fr/tqwt7730/gittar
15. Beego
2/21/2019 Golang Skills 15
Goal
Create an API for integration for the Radio
Access Network as a Service (RANaaS) project
Implementation
Generate basic REST API micro-service
skeleton
Main libraries
astaxie/beego
Links
https://beego.me/