The presence of golang. Golang becomes pretty powerful. There are plenty of everyday golang tools. I will show you that we built infrastructure mostly consists of tools written on one language - golang. What benefits did we gain from writing an application on the language of its infrastructure. And I will describe how we use golang in production.
2. About 2GIS
International tech company, developing software for convenient city living
2GIS City Information Service (most successful product)
● combines a map with a city directory
● used by over 40 million people
● covers over 300 cities in 9 different countries
info.2gis.com/index_en.html
3. Content
1. Application written in golang
2. Ordinary infrastructure
3. Unified infrastructure
4. Gitlab CI as a glue
5. Benefits of using one language
16. Software development life cycle
SDLC
PlanningPlanning
Develop-
ment
Develop-
ment
TestingTesting
DeliveryDelivery
Mainte-
nance
Mainte-
nance
Infrastructure
is the core
of SDLC
23. Disadvantages of lots of tools
● High entry barrier
● Simultaneous studying of all this tools takes a long time
24. Disadvantages of lots of tools
● High entry barrier
● Simultaneous studying of all this tools takes a long time
● Difficult integration
25. Disadvantages of lots of tools
● High entry barrier
● Simultaneous studying of all this tools takes a long time
● Difficult integration
● Specific debugging of each tool
26. Disadvantages of lots of tools
● High entry barrier
● Simultaneous studying of all this tools takes a long time
● Difficult integration
● Specific debugging of each tool
● Human factor (sometimes forget something)
27. What if you need
to look inside a tools or
write a custom module for it?
You need to know tool’s language
28. SDLC: substage tools languages
PlanningPlanning
Develop-
ment
Develop-
ment
TestingTesting
DeliveryDelivery
Mainte-
nance
Mainte-
nance
Application
UnitDeploy
Configuring Functional
Metrics and
Alerting
Logging
Monitoring
Init and
keeping alive
SDLC
java /
heat templates yaml
ruby / python
c, php / ruby
application language /
python
javascript
c
php / scala
php /
scala /
go
php / scala
30. Disadvantages of different languages of lots of tools
● Different error reporting for each language
● Harder understanding of how the tool works
31. Disadvantages of different languages of lots of tools
● Different error reporting for each language
● Harder understanding of how the tool works
● Studying different languages to write custom modules
32. Advantages of this approach
● Wider knowledge about familiar tools
● Familiar tools help to fast build of minimum viable product
(MVP)
33. Disadvantages of this approach
● Too much support for one team
● Too much tools for building microservices
● Long everyday releases
● Expensive development process
35. Unified infrastructure
● DEIS - platform as a service that deploys and scales containers
● Docker - pack, ship and run any application as a lightweight, portable,
self-sufficient container
● Prometheus - metrics and alerting system
● Grafana - metrics visualization
36. Unified infrastructure
● DEIS - platform as a service that deploys and scales containers
● Docker - pack, ship and run any application as a lightweight, portable,
self-sufficient container
● Prometheus - metrics and alerting system
● Grafana - metrics visualization
All of them are:
● open-source
● written on go
37. Unified infrastructure
● DEIS -> DEIS 2 ( Workflow / Kubernetes )
● Docker - pack, ship and run any application as a lightweight, portable,
self-sufficient container
● Prometheus - metrics and alerting system
● Grafana - metrics visualization
All of them are:
● open-source
● written on go
38. How do we use mostly golang
infrastructure in production?
43. SDLC: substage tools languages
PlanningPlanning
Develop-
ment
Develop-
ment
TestingTesting
DeliveryDelivery
Mainte-
nance
Mainte-
nance
Application
UnitDeploy
Configuring Functional
Metrics and
Alerting
Logging
Monitoring
Init and
keeping alive
SDLC
go / gitlab-ci yaml
go / gitlab-ci yaml
go
go
go / javascript
go
go
go
go
54. Benefits of language coincidence
First official tool client goes on its native language: go
55. Benefits of language coincidence
First official tool client goes on its native language: go
Easy to read and understand tools logic
56. Benefits of language coincidence
First official tool client goes on its native language: go
Easy to read and understand tools logic
Easy to contribute in infrastructure
57. Benefits of language coincidence
First official tool client goes on its native language: go
Easy to read and understand tools logic
Easy to contribute in infrastructure
Concentrate on one language
58. Benefits of language coincidence
First official tool client goes on its native language: go
Easy to read and understand tools logic
Easy to contribute in infrastructure
Concentrate on one language
Fast maintenance reaction
59. Benefits of language coincidence
First official tool client goes on its native language: go
Easy to read and understand tools logic
Easy to contribute in infrastructure
Concentrate on one language
Fast maintenance reaction
Fast mvp
63. Docker
An open-source project that automates the deployment of Linux applications
inside software containers
Also use:
● Docker-compose
● Docker registry
64. Deis
An open-source platform as a service (PaaS) that makes it easy to deploy and
manage applications on your own servers.
Deis builds upon Docker and CoreOS to provide a lightweight PaaS with a
Heroku-inspired workflow.
Built-in:
● Logging
● Scaling
● Routing
● Fault-tolerance
65. Prometheus
An open-source metrics and alerting system:
● Implements a highly dimensional model data
● Flexible querying language
● Built-in visualisation
● Federation system
● Push or pull data mining
● Alert manager
● Many client libraries