Commit 7ded138ccf0ef036733663024c490bf5f7219afc

Authored by Rodrigo Siqueira de Melo
1 parent a15978eb

Revisão com o Nelson

Showing 1 changed file with 146 additions and 137 deletions   Show diff stats
ieeeSW/releaseEng3/IEEE_ThemeIssue_ReleaseEng_CD.md
... ... @@ -45,25 +45,25 @@ overcome them.
45 45  
46 46 ## Introduction
47 47  
48   -We worked on a thirty-month-long Brazilian government project to modernize the
  48 +From 2014 to 2016, we were part of a team that worked on a thirty-month-long Brazilian government project to modernize the
49 49 Brazilian Public Software (SPB) portal (www.softwarepublico.gov.br) [1]. This
50   -project, started in 2014, was a partnership between the Ministry of Planning,
  50 +project was a partnership between the Ministry of Planning,
51 51 Budget, and Management and two public universities: University of Brasília and
52 52 University of São Paulo.
53 53  
54   -With this partnership, the SPB portal evolved to a Collaborative Development
  54 +During this time, the SPB portal evolved into a Collaborative Development
55 55 Environment (CDE) [2] which brought significant benefits for the government and
56   -the society. The government could minimize bureaucracy and costs of software
57   -development, encouraging the use of the same set of applications across
58   -different government agencies. The society gained a mechanism of transparency,
59   -follow government expenses, and collaboration, contribute to project
60   -communities. .
  56 +the society: The government could minimize bureaucracy and software
  57 +development costs, by reusing the same set of applications across
  58 +different government agencies; society could more transparently
  59 +follow government expenses and contribute to project
  60 +communities.
61 61  
62 62 In this article, we discuss the use of Continuous Delivery (CD) during our
63 63 experience as the academic partner in this project. We focus on how we managed
64 64 to implement CD in a large institution with traditional values and how CD
65 65 helped to build trust between the government and the university development
66   -team. CD enabled us to show our progress and earned the government’s confidence
  66 +team. CD enabled us to show our progress and to earn the government’s confidence
67 67 that we could adequately fulfill their requests, becoming an essential aspect
68 68 of our interaction with them. According to this experience, the use of CD as a
69 69 tool to build such trust relationships is yet another of its benefits [3].
... ... @@ -72,14 +72,17 @@ tool to build such trust relationships is yet another of its benefits [3].
72 72  
73 73 SPB is a governmental program created to foster sharing and collaboration on
74 74 Open Source Software (OSS) development for the Brazilian public administration.
75   -For their projects, the Ministry managed both software requirements and server
  75 +In their own projects, the Ministry managed both software requirements and server
76 76 infrastructure. However, its hierarchical and traditional processes made them
77 77 unfamiliar with new software development techniques, such as CD. Any of our
78   -requests had to pass through layers of bureaucracy before being answered,
79   -accessing their infrastructure to perform a deploy was not different.
  78 +requests had to pass through layers of bureaucracy before being answered;
  79 +accessing their infrastructure to deploy updated software was not different.
  80 +The difficulties were aggravated because the
  81 +new SPB portal is an unprecedented platform in the Brazilian government, with
  82 +a complicated deployment process.
80 83  
81   -During its lifetime, the project suffered significant interference from the
82   -board of directors because the portal represents an interface between
  84 +The project suffered significant interference from the
  85 +board of directors throughout time because the portal represents an interface between
83 86 government and society. In light of political interests, directors continually
84 87 imposed changes to the platform while ignoring our technical advice. In 2015,
85 88 the board of directors was changed and, with it, the vision of the project. New
... ... @@ -90,39 +93,41 @@ requirements previously approved.
90 93 mudar em todas as ocorrências de agents por staff, mas checar com o Fabio.
91 94 -->
92 95  
  96 +<!-- sugestão: Tira o primeiro challenge e acrescenta um texto no final desta
  97 +seção dizendo "no final deu tudo certo: construímos uma ferramenta modular
  98 +(inclui o conteúdo do parágrafo sobre o primeiro challenge) com uma equipe
  99 +heterogênea (coloca a descrição das pessoas) e chegamos a um pacote com
  100 +7 ferramentas blah blah blah
  101 +-->
  102 +
93 103 In this context, we overcame three distinct challenges: (1) finding a system
94 104 solution with which government and development team agree, (2) deconstructing
95 105 the widespread belief among government staff that any project in partnership
96 106 with a University is doomed to fail, and (3) dealing with bureaucracies
97   -involved in the deployment process by the Ministry.
  107 +involved in the deployment process.
98 108  
  109 +<!-- TODO: explicar o problema, não a solução -->
99 110 To face the first issue, we designed the SPB portal as a CDE with additional
100 111 social features. Due to the complexity of creating such a system from scratch,
101 112 we decided to adapt and integrate existing OSS tools to build a
102 113 system-of-systems [4]. We created a solution that orchestrates multiple
103   -components and allowed us to smoothly provide a unified interface for final
104   -users, including single sign-on and global searches [1]. On top of that, the
105   -new SPB portal was an unprecedented platform to the Brazilian government, with
106   -a complicated deployment process.
107   -
  114 +components and allows us to smoothly provide a unified interface for final
  115 +users, including single sign-on and global searches [1].
108 116  
109 117 Regarding the second problem, our team was not from a typical company,
110   -consisting mainly of undergraduate students coordinated by two professors. In
111   -the first year, we had a group composed of 24 undergraduate students, one
112   -designer, and two senior developers. In 2015, our team grew to 36 students, two
113   -designers, eight senior developers. In the end, due to budget constraints, our
114   -team shrinked to 20 students, one designer, and two developers. On the
  118 +consisting mainly of undergraduate students coordinated by two professors.
  119 +Accordingly, time and resources allocation, accountability, and team
  120 +continuity might be construed as "unprofessional". On the
115 121 government side, the SPB portal evolution was the first software development
116   -collaboration between university and government experienced by the Ministry
117   -staff involved in the project.
118   -
119   -Finally, our team thought software deployment differently than the Ministry. On
120   -our side, we believe that frequent deliveries are better for the project’s
121   -success. However, the Ministry works with the idea of a single deployment at
122   -the end of the project. In other words, neither the bureaucratic structure of
123   -the Ministry nor its technical abilities were conducive to this style of work.
124   -Furthermore, there was little effort to deploy new versions of the system
125   -promptly. That ended up hampering the benefits of the tool and preventing us
  122 +collaboration between universities and the Ministry
  123 +staff involved, raising disbelief.
  124 +
  125 +Finally, our team approached software deployment differently from the Ministry.
  126 +We believed frequent delivery is better for the project’s
  127 +success. In contrast, the Ministry is used to the idea of a single deployment at
  128 +the end of the project, and neither their bureaucratic structure
  129 +nor their technical expertise were conductive with this style of work.
  130 +That ended up hampering the benefits of the tool and preventing us
126 131 from showing off the fruits of the project to those responsible for evaluating
127 132 it.
128 133  
... ... @@ -131,26 +136,31 @@ particular during the first year, and alerted us to the fact that they could
131 136 finish the project at any time. The deployment limitation was the substantial
132 137 technical issue we could tackle in the short term. As a result, we worked to
133 138 deploy one version of the project onto our infrastructure and showed it to the
134   -government evaluators. This strategy proved them we could efficiently deliver
  139 +government evaluators. This strategy proved them we could efficiently provide
135 140 new features, fulfill their expectations regarding the delivery of the
136   -requirements, and incited them to demand that the latest version be deployed in
  141 +requirements, and incited them to demand the latest version to be deployed in
137 142 the Ministry infrastructure. This generated more pressure on the IT department
138 143 responsible for the deployment routines. With each CD cycle, we gradually built
139 144 a new relationship among all parties and, by the end of the project, we became
140 145 active participants in the deploy operations.
141 146  
  147 +<!--
  148 +In
  149 +the first year, we had a group composed of 24 undergraduate students, one
  150 +designer, and two senior developers. In 2015, our team grew to 36 students, two
  151 +designers, eight senior developers. In the end, due to budget constraints, our
  152 +team shrinked to 20 students, one designer, and two developers.
  153 +-->
142 154 ## Our Continuous Delivery Pipeline
143 155  
144 156 ![The SPB Deployment Pipeline](figures/pipeline_3.png)
145 157  
146 158 Figure 1 presents our CD pipeline. It follows a typical deployment pipeline
147 159 [3], adapted to the technical and organizational context of our project and the
148   -use of OSS best practices. The pipeline started when new code arrived. A new
149   -feature might require changes to more than one SPB integrated software project.
150   -Notice that each one of them could be modified independently. As the code went
151   -through each step, it was tested and improved until it finally reached the
  160 +use of OSS best practices. The pipeline started when new code arrived. As the code went
  161 +through each step, it was tested and improved until finally reaching the
152 162 production environment. At this point, we would restart the pipeline to release
153   -more versions.
  163 +new versions.
154 164  
155 165 <!---
156 166 Comentário do Fábio: A partir daqui o texto já deveria mostrar o tamanho da plataforma e trazer dados que comprovem isso.
... ... @@ -171,13 +181,16 @@ Os 5 projetos são: Colab, Noosfero, Gitlab, MailMan, and Mezuro.
171 181 -->
172 182  
173 183 The SPB portal is a system-of-systems with 5 integrated software projects. Each
174   -of them, as well as the entire platform, had to be tested. These software
175   -components have their own test suite. Colab (www.github.com/colab), a systems
176   -integration platform for web applications based on a plugin architecture,
177   -orchestrates communication among them. Therefore, we developed specific plugins
  184 +of them had to be tested with its own test suite.
  185 +This was not enough, however: we also had to test the platform as a whole. To
  186 +do this, we leveraged our choice of Colab (www.github.com/colab) as the
  187 +orchestrator in the SPB. Colab is a systems
  188 +integration platform for web applications based on a plugin architecture. In
  189 +SPB, we developed specific plugins
178 190 for each portal software component, such as Gitlab (www.gitlab.com) and
179   -Noosfero (www.noosfero.org). Each plugin also has its own test suite, working
180   -also as integration tests.
  191 +Noosfero (www.noosfero.org). Given that
  192 +the plugins also have their own test suites, these suites assume a double role as both
  193 +plugin tests and as integration tests.
181 194  
182 195 Both unit and integration tests provided us the performance and security needed
183 196 to guarantee the stability of components and the platform. If any test suite
... ... @@ -187,41 +200,41 @@ step of release preparation.
187 200  
188 201 ### Preparing a New Release
189 202  
190   -An SPB portal release was composed of all its software component releases.
191   -Each software component release had a Git tag that referred to a specific
192   -feature or bug fix. When all tests passed for a given component, we manually
193   -created a new tag for it. Therefore, a new tag on any software component
194   -yielded a new SPB portal release. More precisely, SPB had a script that
195   -produced a single release for the entire system based on each component tag. At
  203 +Each software component was hosted in a separate Git repository. A new release
  204 +of a component was tagged with a reference to a specific new
  205 +feature or bug fix. SPB, as an integration project, had its own Git repository.
  206 +An SPB portal release was an aggregate of releases of all of its components.
  207 +When a new component release passed all of the SPB
  208 +integration tests, we manually created a corresponding new tag in its repository.
  209 +Therefore, a new tag on any software component
  210 +yielded a new SPB portal release. At
196 211 the end of this process, we started packaging.
197 212  
198 213 ### Packaging
199 214  
200   -The platform runs on the CentOS 7 GNU/Linux distribution. Packaging a software
  215 +The platform runs on the CentOS 7 GNU/Linux distribution. Packaging software
201 216 for that distribution involves three steps: writing the script for the specific
202 217 environment (RPM), building the package, and uploading it to a package
203 218 repository.
204 219  
205   -We decided to create separate packages for each software component since:
206   -Packaging makes easy to manage the software on a given distribution,
207   -simplifies the deployment, follows the distribution's best practices, and
208   -enables configurations and permissions control.
  220 +We decided to create separate packages for each software component.
  221 +Packaging makes it easy to manage software in a given distribution,
  222 +simplifies deployment, follows the distribution's best practices, and
  223 +enables configuration and permission control.
209 224  
210 225 After creating a new tag for a component, the developers informed our DevOps
211   -[6] team, and the packaging process began. A set of scripts fully automated the
212   -three packaging steps aforementioned. When all them ran successfully, the new
213   -packages would be ready for our deployment scripts.
  226 +[6] team and the packaging process began. A set of scripts fully automated the
  227 +three packaging steps aforementioned. When all of them ran successfully, the new
  228 +packages would be ready and available for our deployment scripts.
214 229  
215 230 ### Validation Environment Deployment
216 231  
217 232 The Validation Environment (VE) is a replica of the Production Environment (PE)
218   -with its data anonymised, as well as only Ministry staffs and our DevOps team
219   -had access to it. To configure the environment, we used a configuration
220   -management tool named Chef (www.chef.io) with Chake support
221   -(www.github.com/terceiro/chake) -- a serverless configuration tool created by
222   -our team. It maintained environment consistency simplifying the deployment
223   -process. Additionally, the packages we built on the last step were readily
224   -available to the management tool.
  233 +with anonymised data, and access restricted to Ministry staff and our DevOps team.
  234 +To configure this environment, we used
  235 +Chef (www.chef.io) and Chake, a serverless configuration tool created by
  236 +our team (www.github.com/terceiro/chake). This maintained environment consistency, simplifying the deployment
  237 +process.
225 238  
226 239 The Ministry staff used the VE to validate new features and required changes.
227 240 The VE also was used to verify the integrity of the entire portal as part of
... ... @@ -229,19 +242,18 @@ the next step in the pipeline.
229 242  
230 243 ### Acceptance Tests
231 244  
232   -After we deployed a new SPB portal version in the VE, the Ministry staffs were
233   -responsible for checking the features and bug fixes they required. If the
234   -Ministry staffs identified a problem, they would notify the developers via
235   -comments on the SPB portal's issue tracker. The development team fixed the
236   -problem and the pipeline restarted. If everything was validated, we moved
237   -forward.
  245 +After a new SPB portal deployment in the VE, the Ministry were
  246 +responsible for checking the required features and bug fixes. If they
  247 +identified a problem, they would notify the developers via
  248 +comments on the SPB portal's issue tracker, prompting the team to fix
  249 +it and restart the pipeline. Otherwise, we could move forward.
238 250  
239 251 ### Production Environment Deployment
240 252  
241   -When the Ministry staff finished the VE check, we could finally begin the
242   -deployment in production. We also used our configuration management tool, the
243   -same scripts and package versions as in the VE. After the deploy was completed,
244   -both VE and PE were identical. Here was the point where new features and bug
  253 +After the VE check, we could finally begin the
  254 +deployment in the PE, with the same configuration management tool,
  255 +scripts, and package versions as in the VE. After the deploy was completed,
  256 +both VE and PE were identical. At that point, new features and bug
245 257 fixes were finally available to end users.
246 258  
247 259 ## Benefits
... ... @@ -253,56 +265,54 @@ Working with the government, we noticed the following additional benefits.
253 265  
254 266 ### Strengthening Trust in the Relationship with the Government
255 267  
256   -CD helped to strengthen trust in the relationship between developers and
257   -Ministry staffs. Before using CD, Ministry staff had access to the features
258   -developed only at the end of the release, usually every four months.
259   -
  268 +CD helped strengthen trust in the relationship between developers and
  269 +the Ministry staff. Before using CD, they had access to the features
  270 +developed only at the end of the release cycle, usually every four months.
260 271 With the implementation of CD, intermediate and candidate versions became
261   -available, allowing Ministry staffs to perform small validations over time.
  272 +available, allowing them to perform small validations over time.
262 273 Constant monitoring of the development work brought greater security to the
263   -Ministry leaders and improved the interactions with our development team.
  274 +Ministry leaders and improved the interactions with our team.
264 275  
265 276 ### Responsiveness to Change
266 277  
267 278 Responsiveness was one of the direct benefits of adopting the CD pipeline. The
268   -ability to react quickly to changes requested by the Ministry staff was vital
  279 +ability to react quickly to changes requested by the Ministry was vital
269 280 to the project’s survival for 30 months. Every meeting with the Ministry
270   -leaders resulted in requirements and priorities changes, several of them
271   -motivated by political needs. We observed that if we took too long to meet
272   -their demands, the Ministry would use undelivered requirements to justify cut
273   -in the financial support and cancel the project.
  281 +leaders led to changes in requirements and priorities, several of them
  282 +motivated by political interests. We noticed that if we took too long to meet
  283 +their demands, they would threaten to reduce
  284 +financial support and even cancel the project.
274 285  
275 286 CD helped us keep the PE up-to-date, even with partial versions of a feature.
276   -That way, we always had something to show on meetings, reducing anxiety in
277   -getting the platform finished. For our team, it made the developers more
  287 +Therefore, we always had something to show on meetings, easying their
  288 +concerns about the final delivery of the platform.
  289 +For our team, CD made developers more
278 290 confident that the project would last a little longer.
279 291  
280 292 ### Shared Responsibility
281 293  
282 294 According to the conventional Ministry process, the development team could not
283   -track what happened to the code after its delivery, since Ministry staff were
  295 +track what happened to the code after its delivery, since their staff were
284 296 the only ones responsible for deployment. The implementation of CD made our
285 297 development team feel equally responsible for what was getting into production
286 298 and take ownership of the project.
287 299  
288 300 Interestingly, the CD pipeline had the same effect on the Ministry staff. They
289 301 became more engaged in the whole process, opening and discussing issues during
290   -platform evolution. Additionally, developers worked to improve the CD pipeline
291   -to speed up the process of making new features available in the production
292   -environment for the Ministry staff's validation.
293   -
294   -
295   -### Synchronicity Between Government and Development
296   -
297   -The CD pipeline performance depended on the synchronicity between our
298   -development team and the Ministry staffs so that the latter were prepared to
299   -start a step as soon as the former concluded the previous step and vice versa.
300   -Initially, the agenda of the Ministry staffs did not contemplate this concern,
301   -which generated delays in the validation of new features. This situation
302   -combined with governmental bureaucracy to release access to the production
303   -environment (up to 3 days) resulted in additional delays for the deployment
304   -step begin. This problem was softened when the Ministry staff realized the
305   -impact of these delays on the final product and decided to allocate the
  302 +the evolution of the platform. Additionally, developers worked to improve the CD pipeline
  303 +and speed up the process of making new features available in the production
  304 +environment.
  305 +
  306 +### Synchronization Between Government and Development
  307 +
  308 +The CD pipeline performance depended on the synchronization between our
  309 +development team and the Ministry staff: each party had to be prepared to
  310 +take action as soon as the other concluded a given task.
  311 +Initially, the Ministry staff did not contemplate this in their schedule which,
  312 +combined with the bureaucracy in providing access to the PE
  313 +(up to 3 days), resulted in significant delays in the validation of new features.
  314 +This problem was softened when they realized the
  315 +impact of these delays on the final product and decided to allocate
306 316 revisions in their work schedule.
307 317  
308 318 <!---
... ... @@ -312,15 +322,14 @@ Fabio sugeriu Lessons Learned, mas vamos mostrar exemplos da revista para ele ol
312 322 ## Lessons Learned
313 323  
314 324 Due to the successful building of the CD pipeline, we improved the Ministry
315   -deployment process and kept the project alive. We map now lessons learned.
  325 +deployment process and kept the project alive. We now look at the lessons learned.
316 326  
317 327 ### Build CD From Scratch
318 328  
319   -Taking on responsibilities for implementing CD impacted on the whole team.
320   -Mostly, our team members did not have know-how in this approach, and we had few
321   -working hours available to allocate for building the pipeline. The construction
322   -and maintenance of the CD process were possible by taking some decisions to
323   -mature the project:
  329 +Taking on the responsibility for implementing CD impacted the whole team.
  330 +Most of our team members did not have CD know-how and we had few
  331 +working hours available to build the pipeline. The construction
  332 +and maintenance of the CD process were made possible by the key decisions to:
324 333  
325 334 <!---
326 335 pensar em generalizar/filosofar
... ... @@ -328,49 +337,49 @@ pensar em generalizar/filosofar
328 337  
329 338 1. _Select the most experienced senior developers and some advanced students of
330 339 the project to work on a specific DevOps team._These senior developers used
331   -their experiences in OSS projects to craft an initial proposal for the
  340 +their experience in OSS projects to craft an initial proposal for the
332 341 deployment process. The solution enabled us to automate the deployment, even
333 342 though the process was, initially, still rudimentary.
334 343  
335 344 2. _Interchange team members and encourage teammates to migrate to the DevOps
336   -team._ The benefits of these movements were twofold: mitigating the difficulty
337   -to transmit the knowledge between DevOps developers and feature developers, and
  345 +team._ The benefits were twofold: mitigating the difficulty
  346 +in sharing knowledge between DevOps developers and feature developers, and
338 347 evolving the process on-the-fly.
339 348  
340 349 ### Overcoming Mistrust
341 350  
342   -Taking an unfamiliar approach requires trust. In the Ministry, traditional
343   -software was the product delivered at the end of a development contract. They
344   -expected and were prepared to validate and deploy a single delivery. Because
  351 +Taking an unfamiliar approach requires trust. In the Ministry, traditionally
  352 +software was the product delivered at the end of a development contract; they
  353 +expected and were prepared to validate and deploy a single deliverable. This
  354 +was not adequate for the SPB: because
345 355 the SPB portal is a system-of-systems, the steady growth of its complexity made
346   -large deliveries unsustainable. The long time for homologation of developed
347   -features also gave the government room to change requirements and priorities.
348   -The CD approach was necessary, but how to build trust and gain autonomy to
  356 +large deliveries unsustainable; the fluid nature of how people use and interact
  357 +with it brings the need to change requirements and priorities.
  358 +Therefore, the CD approach was necessary, but how to build trust and gain autonomy to
349 359 implement a process that was not yet part of the dynamics of the Ministry?
350 360  
351 361 1. _Demonstrate actual results, do not simply tell._ Initially, we did not have
352 362 access to the Ministry infrastructure, so we created our own validation
353   -environment. Thus, we were able to follow the CD pipeline until the stage of
  363 +environment. Thus, we were able to follow the CD pipeline until
354 364 production deployment, when we faced two problems. First, our pace of
355   -intermediate deliveries to the government was faster than the deployment in
  365 +intermediate deliveries to the government was faster than the deployment to
356 366 production by the Ministry staff. Second, specific issues of the Ministry
357 367 infrastructure made some validated features not work as expected in the PE.
358   -That situation gave us arguments to negotiate access to production.
  368 +That situation gave us arguments to negotiate access to the PE.
359 369  
360 370 2. _Make project management transparent and collaborative for government
361   -staff._ Allowing the Ministry staff to follow our process for version
362   -deliveries and bug fixes, we showed them we were fulfilling our commitments.
  371 +staff._ Allowing the Ministry staff to track our development process showed them we were fulfilling our commitments.
363 372 They started to interact more actively in the generation of versions and became
364   -part of the process. After understanding the process, the Ministry staff helped
365   -us in negotiations with the Ministry leaders. Finally, they created a VE as an
366   -isolated replica of the PE and gave us access to it.
  373 +involved in the CD. After understanding it, the Ministry staff helped
  374 +us negotiate access to a VE, created as an isolated replica of the PE,
  375 +with the Ministry leaders.
367 376  
368   -3. _Gain the confidence of government staff._ With the replica of the PE, we
369   -were able to run the entire pipeline and won the trust of the Ministry staff
  377 +3. _Gain the confidence of government staff._ With the VE, we
  378 +were able to run the entire pipeline and win the trust of the Ministry staff
370 379 involved in the process. They saw the mobilization and responsiveness of our
371   -team to generate a new version package. They also recognized the quality of our
372   -packages and our deployment process. Finally, the Ministry staff then realized
373   -that it could be beneficial for the project if they granted us access to the
  380 +team to generate each new version package. They also recognized the quality of our
  381 +work and deployment process. In the end, the Ministry staff realized
  382 +that it would be beneficial for the project if they granted us access to the
374 383 infrastructure, both VE and PE.
375 384  
376 385 <!---
... ...