Push Notifications: A New Feature Added to Ring Project

Push Notifications: A New Feature Added to Ring Project

Push notifications are essential part of the effective end-user experience on mobile platforms. They tend to boost the app engagement and users find them useful and handy as they ease their communications. Although push notifications are widely considered an advantage for most apps, they are regarded most useful for messaging, email and other types of communication apps in general. For this reason, our team of developers have been working hard to make sure Ring is equipped with such critical feature in lockstep with Ring users’ expectations. Today, Ring’s push notification is available for its Android and iOS versions and the users can stay informed of their accounts’ developments while their phones have been idle.

For more details, visit : https://ring.cx/en/news

For further information:

How to Create a Light and Fast-Loading Theme with Liferay?

When It Comes to Websites, Page Speed Matters!

This article is motivated by our website project accomplished by our Integration Platforms and AI Department using Liferay 7 (the latest version of Liferay Portal) for one of our clients– a large Canadian corporation in telecommunications and media industry. Alexis, our front-end developer, shares with you his first-hand experience of this project with the overarching objective to demonstrate how to create a light and fast-loading theme using Liferay portal? 

Right off the bat, we need to acknowledge the fact that, “The average online shopper expects your pages to load in two seconds or less…; after three seconds, up to 40% will abandon your site” (Gomez Inc., 2010). Thus,”page speed is increasingly important for websites” (see Lara Callender Hogan).

Thus, “page speed is increasingly important for websites.”

However, Liferay portal technology itself is not a one-size-fits-all solution. For example, in some cases, if the integrator does not develop a context-specific front-end libraries, the website will be crippled by unnecessary delays. Some experts have also suggested a mainstream recommended method which is to extend the Liferay theme by default. This, however, would result in a technical failure thereby extended web page loading time. Thus, based on the lessons learned from our past projects, i.e. experiential learning, and lucky to have the latest Liferay portal, Liferay 7, we decided to tweak the technology, develop a new module, and adapt it to unique expectations of our client. In what follows we share with you our feedback and the positive test results.

Liferay Portal: A Powerful, Yet Delicate Tool

Liferay is an Open Source Content Management System (CMS) and Portal, written in Java. Therefore, a service provider like us has flexibility to customize it as much as required to fully adapt it to the client’s needs. It provides the developers with an extensive user management, access rights and documents. However, there are some theme specific and performance issues to consider before starting a new website project. Here is a list:

  • Generally, a Liferay theme is home to a bulk of all the front-end libraries and styles needed by Liferay and its portlets. However, a big chunk of the codes and dependencies is useless for a guest visitor. In case of our client, these kinds of visitors form the majority of their users and indubitably the unnecessary code overload will cause performance issues and slow the site down.
  • Liferay imposes the presence of its Design Language, Lexicon (or rather, its only implementation: Clay). This may also cause several problems:
    • Mismatch between Design Language and the client’s design requirements can limit the project’s design feasibility.
    • This situation causes conflicts between CSS rules, therefore increasing the development time.
    • Liferay’s template bugfixes and updates can break the developed styles causing a an increase in maintenance time.
    • With content administration being on the pages, the developed styles can break the behavior of the administration styles also contributing to the increase of the development and maintenance time.

Although these issues impose challenges on a Liferay deployment project, we can offset their impact by developing front-end libraries, as you can read in what follows.

The Solution for Creating a Light and Fast-Loading Theme with Liferay

The solution to benefit from the state-of-the-art Liferay Portal while keeping in check the loading speed is to create a light theme without any Liferay front-end libraries such as senna.js, AlloyUi, Lexicon/Clay, etc.

However, in Liferay 7 this objective cannot be obtained as easy as it looks mainly due to not having the possibility to have an administration view of the site. In order to avoid this issue, we have internally developed a stand alone liferay module which is called “Theme Switcher“. This added functionality allows us to dictate the portal to display a theme according to the role of the user. Here is the link to the github repo: savoirfairelinux/liferay-theme-switcher

5 Steps Towards Setting Up a Light Theme

Here are the five steps for creating a light theme using Liferay 7. But before we get started, let’s look at this instance of a Liferay’s light theme which can be found on GitHub: savoirfairelinux/lightweight-liferay-theme. This theme is created using Maven, and if you wish to modify it you actually can. It is all open source.

Step 1 – Clean Up Your Themes

Remove the inclusions from the portal_normal.ftl file, mainly: <@liferay_util [" include "] page = top_head_include />. But also <@liferay_util [" include "] page = body_top_include /> and so on.

Step 2 – Repair the Themes

Unfortunately, the top_head_include variable does not only contain Liferay’s CSS and javascript libraries, but also many other things. It is therefore necessary to re-include the tags of the head that interest us. For some examples of the tags, consider the following:

  • The meta-tags that the user can define in each pages (keywords, description, etc.):

<@liferay_theme["meta-tags"] />

  • The definition of canonical URLs:
<#if !is_signed_in && layout.isPublicLayout() >
  <#assign completeURL = portalUtil.getCurrentCompleteURL(request) >
  <#assign canonicalURL = portalUtil.getCanonicalURL(completeURL, themeDisplay, layout) >
 
  <link href="${htmlUtil.escapeAttribute(canonicalURL)}" rel="canonical" />
 
  <#assign availableLocales = languageUtil.getAvailableLocales(themeDisplay.getSiteGroupId()) >
 
  <#if availableLocales?size gt 1 >
    <#list availableLocales as availableLocale>
      <#if availableLocale == localeUtil.getDefault() >
        <link href="${htmlUtil.escapeAttribute(canonicalURL) }" hreflang="x-default" rel="alternate" />
      </#if>
      <link href="${htmlUtil.escapeAttribute(portalUtil.getAlternateURL(canonicalURL, themeDisplay, availableLocale, layout)) }" hreflang="${localeUtil.toW3cLanguageId(availableLocale)}" rel="alternate" />
  </#list>
  </#if>
</#if> 

In order to know what to look for, and how, you need to know the basics of jsp which is used to generate the variable top_head_include. For more information, please consult the following link.

Step 3 – Organize the Themes

One of the challenges is that liferay-theme-tasks (link) which is a gulpfile provided by Liferay may not function smoothly. The good news is that you can organize the themes the way you want; i.e. according to your team’s development standards (sass, less, es6, etc.). In case of this client, we have used and embellished the usual gulpfile to our web projects. All headed by Maven and the front-end plugins.

Step 4 – Automate the Deployment of the Themes

Step 4 is perhaps the longest one, but as soon as it is completed you have a turnkey solution at hand. To quickly deploy the light theme files you have developed, take this advice. You do not have to compile and wait for the deployment of the theme for each modification of CSS or JavaScript (the features normally present in liferay-theme-tasks). In the OSGI context of Liferay 7, it is not possible to simply access the theme files (CSS, js, templates, etc.). Thus, you have to do the trick which you can learn by looking at the gulp `deployLocal:syncTheme` task.

The main idea is to transform the deploy module in webbundledir mode instead webbundle.

Step 5 – Enjoy the Developed and Deployed Themes

You now have a Liferay theme, which contains only what you want for your project, and which is deployable like any other Liferay themes. So, it is time to just enjoy the fruit of your efforts.

Results and Robustness Checks

In order to evaluate the performance of the theme(s) created, you can conduct three tests on each page (i.e. instance) with the same content. We have tried these tests, running each one of them on a Liferay server configured for production. Below are the three instances for which we used these tests (on a serveur with 8 CPU and 28Go of RAM, with a SSD disk).

3 Instances Tested for Robustness

  1. A Liferay vanilla theme, the “Classic” theme
  2. The light theme we developed for the client’s web page project
  3. A possible “real” case scenario: the “Classic” theme with more styles and JavaScript of the theme that we have developed for the client.

To perform these 3 tests, we used a local instance of speedtest.io (6.0.3), with Chrome 62. For each test, 10 calls were made, below is the summary of the results.

Results of the Test 1: The Classic Liferay Theme

  • 52 requests
  • 1064.77 kb
  • DOMContentLoaded: 1.24s (±31.95ms)
  • Load: 2.06s** (±52.89ms)
  • SpeedIndex: 1349 (±34.99)

We deemed these results acceptable as we could not find a single glitch in the theme as far as page performance was considered. The results are significant as they pass beyond the threshold for requests. As a rule of thumb, if the number of requests go beyond 40, it is considered a large number of requests.

Results of the Test 2: The Light Theme

  • 37 requests
  • 800.38 kb
  • DOMContentLoaded: 588ms (±42.96ms)
  • Load: 1.17s** (±55.17ms)
  • SpeedIndex: 863 (±39.57)

Fewer queries were made as it was a smaller page. Thus, this custom theme is more powerful than a basic Liferay theme!

Results of the Test 3: The Classic Theme with JavaScript and CSS of the Client’s Light Theme

  • 56 requests
  • 1214.59 kb
  • DOMContentLoaded: 2.22s (±457.34ms)
  • Load: 2.97s** (±458.11ms)
  • SpeedIndex: 2475 (±456.71)

Conclusion

Creating a light theme with Liferay is advantageous as it empowers you to maintain control over your company’s image by managing all the items that are sent to the browser. Liferay technology as a tool coupled with our expertise and years of experience working with it offer your company a solution, a powerful website, to stay on top of your content management efforts signaling a positive image to clients.

Overall, this experience has been an instructive and informative one. Our client and us are genuinely happy for the results are satisfactory and in line with our expectations. It is indeed a powerful website worthy of bearing its brand name.

 

Ring Universal Communication Platform Now on Android TV!

Ring keeps surprising communication experts and enthusiasts! Ring is now available on Android TV box and other smart TVs. Ring has become the only  communication software available on the Google Play Store for Android TVs, since the discontinuation of support for the TV version of Skype in June 2016. This new release is quite different from its mainstream app which can be downloaded on a myriad of devices such as cellular phones, tablets, Mac and PCs.

Recall that Ring is a free, distributed and universal communication software, available under the GPLv3+ license. Ring users can communicate in different ways, using it as a telephone (VoIP), a media sharing tool (audio/video), a messaging system, or as a communication platform for connected devices such as the case of the Internet of Things (IoT). Ring is often seen as a free and open source alternative to Skype. Its success is based on a distributed and decentralized network that guarantees a high level of privacy and confidentiality for its users. The Ring project – which became a GNU package in 2016 – has the unwavering support of the community of developers around the world as well as the Free Software Foundation.

Rethinking Ring for the Android TV

In order to make sure you will have a satisfying and enjoyable user experience, our developers have reworked the user interface of the Android Ring application to adapt it to Android TV standards. To accomplish this task, it was necessary to rethink the ergonomics and navigation of the Ring application to ensure it functions with a remote control and graphic components offered by the platform.

In fact, the architecture pattern underlying Ring Android application allows  developers to transfer the entire dependencies and data parts of the mobile version onto the TV app so as to be able to completely focus their attention on the GUI part.

Usability constraints have led developers to focus on key features like:

  • Contact search,
  • Online audio/video calls,
  • Shared screen display from the caller.

These features remain small, but the development continues to offer in coming weeks, expanded use possibilities. Having been designed with the objective of simplicity, stability and user-friendliness,  Ring can serve both domestic and professional needs. It can be used on Android TVs to connect family members together, or simply replace conference phones in corporate meeting rooms.  In fact, availability of the Ring as a TV app on the Google Play Store makes it an easier-to-use communication platform, in comparison to a secondary computer or display setup.

Ring on Android TV

Help us to improve Ring!

Ring is constantly improving to offer the best of communication. As the software is in active development process, some bugs remain and many challenges still await our team of developers. The assessments provided by the community of users, testers, and developers on the quality and use of the platform are then essential to help us identify problems, resolve them, and improve the experience.

For the next release of Ring on Android TV, lot of questions are focused on the compatibility of systems and webcams, other than Logitech as well as NVHI hardware. Also, we encourage curious, free software users and enthusiasts to test Ring on different medias and different systems. Your experience was a success? or crashes remain with your TV or TV box? Send us your comments at Ring@savoirfairelinux.com. You will also contribute to the success of Ring!

Download Ring on Android TV

If you want to experience this new communication platform, just download it for free from Google Play Store!

For further information:

 

Celebrating the Next Generation of Business Digitization Talents

       

Savoir-faire Linux and ICTC celebrate the first cohorts of the successful graduates from the Small Business Digitization Initiative (SBDI).

The first students, the pioneers, started last January their six-month journey which can position them as the next generation of digitization talents. They went through an intense in-class training helping them understand how technology opens countless improvement and change opportunities. At the same time, they tackled a real business challenge in a natural work environment, thus balancing theory and practice, through a unique approach based on agile feedback.

Some students from the class of 2017

A Training to Be Seen as the Digitization Leader’s Toolkit

Students worked on projects as diverse as delivering fresh products to Nunavut, developing local retail shops promoting health, building cool brands, improving the customer experience in-store and online, and scaling the business of a micro-brewery. They touched a wide-range of technologies from beacons, communication and collaboration technologies, business applications of all sorts from sales to accounting and customer relationship management. Some of more technical students managed to build an Android mobile app, deploying an open source internal social media, developing online stores with Shopify, WordPress or Odoo, and developing a software for a local insurance company to do underwriting online. We used Odoo, and more generally a wide range of open source technologies, which could be easily accessible and useful to students to tackle business challenges. We provided students with the necessary training and skill set to apply open source projects and combine them with other technologies while solving business related problems.


Theory Face-to-Face with the Reality

We would like to congratulate every single student for their efforts, for the challenges they bravely faced, for trying to apply their theoretical learning in real-life scenarios, regardless of the success rate!

During this 6-month long program, they confronted tough decision making situations and challenges with both courage and determination. These experiences, for some, led to new job opportunities. Some others realized that they needed more training and coaching. Some candidates evolved dramatically as a result of their flexibility and adaptations to the business context. In fact, they learned that they should accept to let go of some ambitions or had to adjust them to the real context.

One thing we are sure is that all candidates received a fair amount of constructive one-on-one training and feedback. They used these feedback loops as an instrumental tool to develop business solutions and make decisions based on what they have learned in class. After all, there may be more than one technological solution to resolve the same problem. But knowing that technology is just a tool, and not the main purpose, students learned to think globally and critically of all the stakeholders being affected by every decision. Such pluralistic approach to realistic problem solving opened a range of possibilities which demanded even a more engaged and considerate decision making process. We did our best to provide all necessary tools to the best of our knowledge and capability and hopefully we left a positive and lasting mark on them.

Savoir-faire Linux’s Role in the Program

Savoir-faire Linux is a technology and innovation company. We have been involved in this program as a business as well as technology training partner of ICTC. Furthermore, we recommended a module about sustainability to be added to the curriculum, and ICTC (our client-partner) accepted our proposal. As an Open Source Software advocate and an environmentally committed company, sustainability lies at the heart of our innovation strategy.

On the technology part, we mixed and match some general culture about IT, with hands-on exercises and feedback from our past experience pool. On the business side, we decided to broach a wide range of business processes (like a mini-MBA program), and showed the students how an ERP (in our case, the Odoo solution) was an appropriate technological solution to a functional problem. The two days of sustainability were offered as an opening subject, giving students the opportunity to imagine how the future would constrain us and change our whole way of designing, optimizing, sourcing and more globally consuming. This part was well received and gave more sens to innovation and change topics. We were really happy of how well it was received by the participants.

SBDI Participants in Action

The Future of the SBDI

We are thinking about the future of the Small Business Digitization Initiative (SBDI), as we are gathering feedback from students and employers. As this initiative was never done before, we have many ideas to adapt and improve the program. Our main challenge is to strike a more consistent balance between the theory and practice based on considerations of the received feedback and the stakeholders’ rights as well as their expectations. We have developed some answers and we will realize this goal in the next program.

To conclude, we extend our gratitude to all the team members. In fact, 11 people; namely, Marc, Mickael, Carol, Daniel, Monica, Adriana, Julien, Guillaume, Quentin, Bruno and Pascal have been passionately involved in the curriculum design and preparation as well as teaching the sessions.  They are happy and content about their contribution, experience and more important of all about the invaluable lessons learned from their engagement. Today, we are confident that we can make a significant difference in the Canadian youth’ future career development and therefore look forward to other opportunities to participate in a new project of this kind.

To obtain more information about the program or get involved, please contact our Director of Operations/COO: Mickael Brard through email: mickael.brard@savoirfairelinux.com or telephone: +1 514 276 5468 (#357)

More informations

Three Chief Pillars of Our Success in Liferay: Experience, Expertise, and Community Embedment

            

Since 2010, we have been training, coaching and accompanying a range of enterprises and organizations in their digital transformation based on Liferay Portal solutions. Having received a number of awards and observed the rising success of our clients, today, we have unreserved confidence in what we can offer and how we can actually transform an organization through Liferay technology. In retrospect, we believe our successful performance rests upon three chief pillars (Figure 1):

  1. Our longtime experience accumulated through working on different projects,
  2. Our expertise rooted in our engineers’ know-how of Liferay, in particular, and open source technologies in general, and
  3. Our engineer-to-engineer relationship building capability which has placed us firmly embedded in Liferay expert community.
Figure 1. Successful Liferay Implementation

Experience and Expertise: Managing the Paradox of Catch-22 Situation

When it comes to deploying Liferay Portal in an organization’s hybrid information system, two main factors: experience and expertise, play a significant role. Experience is mainly built through having years of hands-on approach to deploying Liferay on different IS platforms in a myriad of service and manufacturing industries. Expertise, on the other hand, is a matter of accessing, creating, and accumulating abstract knowledge and know-how on the related technology fields. The paradox – the catch-22 situation – therefore is, the two feed on one another. Without expertise, a team cannot deliver on project promises and obtain an enriching experience, and without actually engaging in high impact projects one cannot gain solid expertise. Learning from mistakes, learning to tackle new problems, learning to understand new business models and forecasting needs, all translate into the indispensable interdependence between experience and expertise.

At Savoir-faire Linux, the team of enterprise solutions, which is responsible for Liferay-based projects, comprises 20 highly experienced open source software consultants half of them are Liferay certified. This means that they have successfully completed Liferay training programs and passed the certifying exams. Although Liferay expertise/experience is a necessary condition to successfully complete a Liferay project, it is not sufficient. Java experience/expertise is the complementary piece. For this critical reason, we have hired, trained, nurtured, and empowered a number of experienced Java developers who know about ‘ins and outs’ of Java; namely, technical specifications, philosophy, and ecosystem.

Liferay Community: A Place for Sharing Knowledge and Experience

Liferay community comprises the following: Liferay Projects, Community Projects, Community Feature Ideas, Releases, Forums, Blogs, Wiki, User Groups, Special Activities, Upcoming Events. Each of these elements is a window to countless opportunities for developers, users, researchers and enthusiasts to engage in a meaningful conversation leading to a helpful take-away such as experience, learning, know-how, or even social capital (See Picture 1). Wining five Community Excellence Awards has been a source of pride and gratitude for us since this is a testimony to our community embedment and collaborative software R&D.

Picture 1. An Illustration of Liferay Community Knowledge and Experience Exchanges

At Savoir-faire Linux, we make sure our Liferay experts (Click here to read an example) stay connected, deeply engaged, and collaborate on online open source platforms. In fact, it is one of our core beliefs that optimal software development process depends on open scientific knowledge sharing practices, as embodied in Open Source Initiative’s definition of OS and Debian Social Contract. We also believe, we have the moral obligation to hold ourselves accountable and give back to OS communities, the same way we receive from them. Another example would be the Liferay Montreal User Group which has been a successful initiative to bring developers, clients, and users together to exchange ideas and discuss future road maps.

Picture 2. Map and Logo of the Liferay Montreal User Group Source: https://web.liferay.com/community/user-groups/montreal/welcome


Experience, Expertise, and Community Embedment… So What?

Synergy or exponential knowledge growth is an invaluable gain in open source ecosystem. The real magic happens when you have a team of engineers who know what to do, who have done it a couple of times, and when faced with the unknown, they know how to figure it out and find the missing pieces and/or co-create them in collaboration with other gurus. In business world and organizational context, the synergy of the three pillars within open source software ecosystem leads to several benefits:

  1. business need is met through digital transformation,
  2. End users are satisfied because there is a value-added innovative service to enjoy,
  3. Development costs reduce while margins increase.

Not long ago, we have completed an award winning project called HuGo for Humania Assurance. HuGo Platform has won two prestigious national and provincial recognition: Digital Transformation Award, and SME Grand Prize OCTAS 2017 Lauréat (Picture 3).

Picture 3. Awards Won by HuGo Platform Using Liferay Portal Technology

These awards are tangible artifacts that showcase abstract elements underpinning a successful case of digital transformation. The dedication of top management of Humania Assurance, the expertise, experience and community efforts of Savoir-faire Linux, as well as the accumulated know-how on open source technologies over the past decades collectively create a synergistic and pronounced result. Bottom line is easy to read. The client’s brand name strengthens as an innovative SME in insurance industry. Their end users – the source of revenue generation – enjoy seamlessly a creative service/product which facilitates their insurance policy applications painstakingly, rapidly, and easily. Savoir-faire Linux gains yet another piece of experience, circulates the expertise in-house, and solidify its commitment to progressing Liferay community platform. (read the Case Study)

Shaping the Future Ensemble

We foresee three ways to better shape the future of Liferay based digital transformation. First, we invite enthusiasts to join our Liferay Montreal User Group and participate in the events. We want you to be heard, and to this end, we organize events and invite speakers like Raymond Augé, Senior Software Architect at Liferay (@rotty3000) to make sure you receive quality responses to your queries. Second, contact us and let us know about your specific expertise and experiences. We would love to have you on our team. Third, we are currently inviting new ideas to realize in collaboration with Liferay community, you may want to consider helping us push Liferay technological boundaries forward.

Press Review Inno #2

Translation by Jacob Cook

Mobility

FireStore: The New Real-time Database from Google

By Thibault Wittemberg

Mobile developers are often confronted with a recurring puzzle when they develop apps. It is the question of how best to manage data synchronization with a server back-end in both online and offline modes?

Google provides us with a new answer to this question with its FireStore service. This service is part of the Firebase suite and is currently in beta testing. It is presented as Google’s new preferred solution for real-time data storage. The solution is based on a document-oriented storage model (NoSQL), which means that we store collections of key/value data, like JSON objects.

FireStore can transparently manage the synchronization of data between multiple mobile devices in addition to the effortless handling of lost connections. This means that, in case of a network outage or disconnection, data remains locally accessible and updates to it will be performed transparently once the connection can be re-established. Below you can find two YouTube tutorials by Brian Advent. They show how easy the integration of FireStore can be in an example of messaging application.

Two FireStore SDK integration tutorials for iOS, by Brian Advent:

Also, you can access FireStore official documentation.

RxSwift 4, with Swift 4 Support, Announces the First Release Candidate Version

With each new release of the Swift programming language, developers work feverishly to update their libraries and support the latest version. This has definitely been the case for the developers behind RxSwift, who deployed the first release candidate of RxSwift 4 on October 8th.  This version is available via the different Swift package management solutions as well as on Github. The authors of RxSwift encourage open source contributions, for which you can find the rules in the repo.

Discovering the Architecture of Model-View-Intent

I thought I knew everything I needed to know about the MVI architecture, after all the name is fairly clear. For me, an Intent = new Intent(). With this, I initially believed it would fall into an architecture pattern based on Android Intents, and I was under the impression that a lot of spaghetti code would be required to replace RX by IntentReceivers/Broadcasters. This seemed like a big step back to me. However, during Droidcon NYC, my colleagues who were present were able to participate in a presentation on MVI where they gained invaluable and cool experiences.

I rolled up my sleeves and got to work in playing with MVI. First, I found this article by Hannes Dorfmann. It explains the advantages of MVI in a very didactic way. MVI addresses a problem that is often ignored by other patterns like MVVM or MVP: the state. By implementing a Reducer, we are able to manage the state changes of the application in a deterministic fashion.

Hannes Dorfmann proposes an implementation of MVI. However, it is written in Java and uses inheritance. The next step is to propose an implementation in Kotlin by composition/protocol.

Savoir-faire Linux Announces Gold Sponsorship at Liferay Symposium North America 2017

Montreal, QC – (October 11, 2017) – Savoir-faire Linux – a Canadian leader in providing expertise on a range of open source technologies to enable digital transformation strategies – announces today its participation as a Gold Sponsor at this year’s Liferay Symposium North America, hosted by Liferay.  Liferay makes software that helps companies create digital experiences on web, mobile and connected devices.Liferay Symposium North America will take place from October 16 to 17 in Austin.

This premier event for digital business and technology leaders will include two days of customer case studies, expert sessions, hands-on workshops, networking opportunities, access to Liferay’s top executives and architects, as well as the keynotes from digital experience thought leaders.

Savoir-faire Linux is proud to be a Gold Sponsor at the Liferay Symposium North America”, said Christophe Villemer (Executive VP). “We look forward to meeting other Liferay enthusiasts and offering our expert knowledge and experience in insurance, and banking as well as other sectors such as public services, education, health, mechanical and industrial to the attendees.”

This digital business technology event will showcase the company’s experience, expertise and excellence in Liferay technology field and it is poised to unveil their expertise in other domains of open source software as well.

To obtain more information on our Liferay services, please directly contact Marat Gubaidullin (VP Integration Platforms & Artificial Intelligence) through email (marat.gubaidullin@savoirfairelinux.com) or by phone (+1 514 276 5468   ext. 162).

What Could We Expect from Upcoming LDAPCon 2017?

The LDAPCon is an international conference on LDAP technology and the issues such as identity management, authentication and empowerment.

LDAPCon is a biennial event and this year it will take place from 19 to 20 October in iconic city of Brussels, the capital of Belgium, where the business of the European Union and NATO is run. In the past, LDAPCon has been held in other interesting places such as the following:

At Savoir-faire Linux, we have a team of motivated developers who are committed to LDAP community. We have sponsored this conference once in 2015 (please read the news here), and have already renewed our commitment by being their Silver Sponsor for this year as well.

Maybe Small, but a Mighty Gathering

2017 LDAPConf brings together 19 presentations and workshops within its 2-day program. Our engineer, Clément OUDOT is among the steering committee. This year’s program will showcase some interesting talks such as:

  • ReOpenLDAP: Modification of OpenLDAP for intensive use by a telecommunications operator
  • OpenLDAP – a new LDAP server for Samba4: An update on the integration of OpenLDAP in Samba 4 in place of the native directory coded by the Samba team
  • PHP-LDAP: News of the evolution of the LDAP API in PHP, abandoned for several years but now the developments are resumed
  • What’s New In OpenLDAP: News from the OpenLDAP project by Howard Chu, the main developer

Other exciting LDAP topics such as Cloud Identity Management, Authorizations / Authentication, Single Sign-On or Supervision will be addressed in the various other presentations.

Savoir-faire Linux’s representative will update various SSO protocols (CAS, SAML and OpenID Connect) in a given intervention on Friday afternoon, just before the presentation of the FusionDirectory software. The data management software of an LDAP directory , used in our internal infrastructure and for some of our customers will be discussed in his presentation.

If you are interested in this conference, you can book your tickets online on the conference website.

Developing An Ansible Role for Nexus Repository Manager v3.x

                                              


This article aims to explain how to automate the installation as well as configuration of Nexus’s Repository Manager version 3.x with Ansible
.

Ansible is a deployment tool, which enables playbooks to automate applications and infrastructure deployments. The key advantage is its flexibility to change applications with versatility as well as apprehending them as a service. However, Ansible has some weaknesses too. Following a voluntary simple design, it functions solely as an application of parameters without taking into account information availability and security concerns, which need to be handled by other systems. That is why developers will prefer to use Ansible in combination with a stateful agent system like Puppet, or a centralized management tool like Ansible Tower.

Automation with Ansible

Ansible focuses on the application-level setup, scripting a provisioning that can be run on top of any infrastructure-supporting tool (PaaS, containers, bare-metal, vagrant, etc.). It only needs an SSH connection and a sudo account to the remote system.

Provisioning scripts in Ansible are written in a declarative style using YAML files grouped as roles. The atomic instructions in those roles are expressed using a number of core modules provided by Ansible. Please have a look at the Ansible documentation for an in-depth introduction.

Re-provisioning and Updating Configuration

One of the DevOps’ models to handle configuration updates consists of provisioning a brand new environment from scratch and completely discarding the old one (think container images). This implies a reliable management of your data lifecycle. In our particular case of Nexus’s Repository Manager, this consists of several gigs of uploaded/proxied artifacts, some audit logs, and OrientDB blobs containing the configuration. Therefore, depending on one’s environment constraints, it can make sense to be able to update the configuration of an already-provisioned Nexus instance. The declarative nature of Ansible’s core instructions is inline with this purpose, but any custom logic written in a role should be idempotent, take the “create or maybe update” path into account.

One must also note that some parts of the Nexus configuration cannot be updated. Some examples include:

  • the settings related to BlobStores
  • the admin password if you ever loose the current one (update : or maybe through this way)

How to make Nexus’s Groovy API Fit Well with Ansible

The basic steps of the installation are pretty straightforward and can all be written using simple Ansible core modules:

  • download and unpack the archive
  • create a system user/group
  • create a systemd service

(these steps are in tasks/nexus_install.yml)

And then comes the surprise: Nexus configuration is not available in a simple text file format which can be edited with the help of simple Ansible instructions. It is stored in an embedded OrientDB database that must not be altered directly. The documented way to setup Nexus is either through its web user interface, or through its Integration API.

The way the Integration API works is as follows:

  1. Write a Groovy script that handles your configuration change;
  2. Upload it to Nexus with an HTTP PUT request, creating a REST resource for this script;
  3. Call the script through its HTTP GET/POST resource.

URI Module to the Rescue!

Ansible’s uri module makes HTTP requests, providing automation to all of this.

The first step is to upload the Groovy script on Nexus. Note that the script may already be there. Therefore, on re-runs of the playbook, we try to delete it before taking any action, just in case:

Through tasks/declare_script_each.yml, follow on:

  ---
  - name: Removing (potential) previously declared Groovy script {{</span> item }}
    uri:
      url: "http://localhost:8081/service/siesta/rest/v1/script/{{ item }}"
      user: 'admin'
      password: "{{ current_nexus_admin_password }}"
      method: DELETE
      force_basic_auth: yes
      status_code: 204,404

  - name: Declaring Groovy script {{ item }}
    uri:
      url: "http://localhost:8081/service/siesta/rest/v1/script"
      user: 'admin'
      password: "{{ current_nexus_admin_password }}"
      body_format: json
      method: POST
      force_basic_auth: yes
      status_code: 204
      body:
        name: "{{ item }}"
        type: 'groovy'
        content: "{{ lookup('template', 'groovy/' + item + '.groovy') }}"

The HTTP requests are executed from inside the target host, which is why localhost is used here. force_basic_auth: yes makes the HTTP client not wait for a 401 before providing credentials, as Nexus immediately replies with 403 when no credentials are passed. status_code is the expected HTTP status replied by Nexus. Since the Groovy script may not necessarily exist at that point, we must also accept the 404 status code.

The next step is to call the Groovy script that has been created through the previous HTTP call. Most of the scripts will take some parameters as input (e.g. create user <x>), and this is where Ansible and Groovy will help. Both coming from the ages of REST things, they can speak and understand JSON fluently.

On the Groovy script side :

import groovy.json.JsonSlurper
parsed_args = new JsonSlurper().parseText(args)
security.setAnonymousAccess(Boolean.valueOf(parsed_args.anonymous_access))

And to call this script from Ansible passing arguments:

  - include: call_script.yml
    vars:
      script_name: setup_anonymous_access
      args: # this structure will be parsed by the groovy JsonSlurper above
        anonymous_access: true

with call_script.yml:

  ---
  - name: Calling Groovy script {{ script_name }}
    uri:
      url: "http://localhost:8081/service/siesta/rest/v1/script/{{ script_name }}/run"
      user: 'admin'
      password: "{{ current_nexus_admin_password }}"
      headers:
        Content-Type: "text/plain"
      method: POST
      status_code: 200,204
      force_basic_auth: yes
      body: "{{ args | to_json }}"

This allows us to cleanly pass structured parameters from Ansible to the Groovy scripts, keeping the objects’ structure, arrays and basic types.

Nexus Groovy Scripts Development Tips and Tricks

Here are some hints that can help a developer while working on the Groovy scripts.

Have a Classpath Setup in Your IDE

As described in the Nexus documentation, having Nexus scripting in your IDE’s classpath can really help you work. If you automate the Nexus setup as much as possible, you will inevitably stumble against some undocumented internal APIs. Additionally, some parts of the API do not have any source available (e.g. LDAP). In such cases, a decompiler can be useful.

Since our role on Github uses Maven with the all the necessary dependencies, you can simply open it with IntelliJ and edit the scripts in files/groovy.

Scripting API Entry Points

As documented, there are four implicit entry points to access Nexus internals from your script:

  • core
  • repository
  • blobStore
  • security

Those are useful for simple operations, but for anything more complicated you will need to resolve services more in-depth:

  • through indirection from the main entry points: blobStore.getBlobStoreManager()
  • directly by resolving an inner @Singleton from container context: container.lookup(DefaultCapabilityRegistry.class.getName())

Take Examples from Nexus’s Source Code

Some parts of Nexus (7.4%, according to Github) are also written using Groovy, containing lots of nice code examples: CoreApiImpl.groovy .

Creating HTTP requests from the configuration web interface (AJAX requests) also provides some hints about the expected data structures or parameters or values of some settings.

Last but not least, setting up a remote debugger from your IDE to a live Nexus instance can help, since there are lots of places where a very generic data structure is used (like Map<String, Object>) and only runtime inspection can quickly tell the actual needed types.

Detailed Examples

Here are some commented examples of Groovy scripts taken from the Ansible role

Setting up a Capability

Capabilities are features of Nexus that can be configured using a unified user interface. In our case, this covers:

  1. anonymous access
  2. base public URL
  3. branding (custom HTML header/footer).

Instructions:


    import groovy.json.JsonSlurper
    import org.sonatype.nexus.capability.CapabilityReference
    import org.sonatype.nexus.capability.CapabilityType
    import org.sonatype.nexus.internal.capability.DefaultCapabilityReference
    import org.sonatype.nexus.internal.capability.DefaultCapabilityRegistry

    // unmarshall the parameters as JSON
    parsed_args = new JsonSlurper().parseText(args)

    // Type casts, JSON serialization insists on keeping those as 'boolean'
    parsed_args.capability_properties['headerEnabled'] = parsed_args.capability_properties['headerEnabled'].toString()
    parsed_args.capability_properties['footerEnabled'] = parsed_args.capability_properties['footerEnabled'].toString()

    // Resolve a @Singleton from the container context
    def capabilityRegistry = container.lookup(DefaultCapabilityRegistry.class.getName())
    def capabilityType = CapabilityType.capabilityType(parsed_args.capability_typeId)

    // Try to find an existing capability to update it
    DefaultCapabilityReference existing = capabilityRegistry.all.find {
        CapabilityReference capabilityReference -&amp;amp;amp;amp;amp;amp;amp;gt;
            capabilityReference.context().descriptor().type() == capabilityType
    }

    // update
    if (existing) {
        log.info(parsed_args.typeId + ' capability updated to: {}',
                capabilityRegistry.update(existing.id(), existing.active, existing.notes(), parsed_args.capability_properties).toString()
        )
    } else { // or create
        log.info(parsed_args.typeId + ' capability created as: {}', capabilityRegistry.
                add(capabilityType, true, 'configured through api', parsed_args.capability_properties).toString()
        )
    }

Setting up a Maven Repository Proxy

    import groovy.json.JsonSlurper
    import org.sonatype.nexus.repository.config.Configuration

    // unmarshall the parameters as JSON
    parsed_args = new JsonSlurper().parseText(args)

    // The two following data structures are good examples of things to look for via runtime inspection
    // either in client Ajax calls or breakpoints in a live server

    authentication = parsed_args.remote_username == null ? null : [
            type: 'username',
            username: parsed_args.remote_username,
            password: parsed_args.remote_password
    ]

    configuration = new Configuration(
            repositoryName: parsed_args.name,
            recipeName: 'maven2-proxy',
            online: true,
            attributes: [
                    maven  : [
                            versionPolicy: parsed_args.version_policy.toUpperCase(),
                            layoutPolicy : parsed_args.layout_policy.toUpperCase()
                    ],
                    proxy  : [
                            remoteUrl: parsed_args.remote_url,
                            contentMaxAge: 1440.0,
                            metadataMaxAge: 1440.0
                    ],
                    httpclient: [
                            blocked: false,
                            autoBlock: true,
                            authentication: authentication,
                            connection: [
                                    useTrustStore: false
                            ]
                    ],
                    storage: [
                            blobStoreName: parsed_args.blob_store,
                            strictContentTypeValidation: Boolean.valueOf(parsed_args.strict_content_validation)
                    ],
                    negativeCache: [
                            enabled: true,
                            timeToLive: 1440.0
                    ]
            ]
    )

    // try to find an existing repository to update
    def existingRepository = repository.getRepositoryManager().get(parsed_args.name)

    if (existingRepository != null) {
        // repositories need to be stopped before any configuration change
        existingRepository.stop()

        // the blobStore part cannot be updated, so we keep the existing value
        configuration.attributes['storage']['blobStoreName'] = existingRepository.configuration.attributes['storage']['blobStoreName']
        existingRepository.update(configuration)

        // re-enable the repo
        existingRepository.start()
    } else {
        repository.getRepositoryManager().create(configuration)
    }

Setting up a Role

    import groovy.json.JsonSlurper
    import org.sonatype.nexus.security.user.UserManager
    import org.sonatype.nexus.security.role.NoSuchRoleException

    // unmarshall the parameters as JSON
    parsed_args = new JsonSlurper().parseText(args)

    // some indirect way to retrieve the service we need
    authManager = security.getSecuritySystem().getAuthorizationManager(UserManager.DEFAULT_SOURCE)

    // Try to locate an existing role to update
    def existingRole = null

    try {
        existingRole = authManager.getRole(parsed_args.id)
    } catch (NoSuchRoleException ignored) {
        // could not find role
    }

    // Collection-type cast in groovy, here from String[] to Set&amp;amp;amp;amp;amp;amp;amp;lt;String&amp;amp;amp;amp;amp;amp;amp;gt;
    privileges = (parsed_args.privileges == null ? new HashSet() : parsed_args.privileges.toSet())
    roles = (parsed_args.roles == null ? new HashSet() : parsed_args.roles.toSet())

    if (existingRole != null) {
        existingRole.setName(parsed_args.name)
        existingRole.setDescription(parsed_args.description)
        existingRole.setPrivileges(privileges)
        existingRole.setRoles(roles)
        authManager.updateRole(existingRole)
    } else {
        // Another collection-type cast, from Set&amp;amp;amp;amp;amp;amp;amp;lt;String&amp;amp;amp;amp;amp;amp;amp;gt; to List&amp;amp;amp;amp;amp;amp;amp;lt;String&amp;amp;amp;amp;amp;amp;amp;gt;
        security.addRole(parsed_args.id, parsed_args.name, parsed_args.description, privileges.toList(), roles.toList())
    }

The resulting role is available at Ansible Galaxy and on Github. It features the setup of :

  • Downloading and unpacking of Nexus
  • SystemD service unit
  • (optional) SSL-enabled apache reverse proxy
  • Admin password
  • LDAP
  • Privileges and roles
  • Local users
  • Blobstores
  • All types of repos
  • Base URL
  • Branding (custom HTML header & footer)
  • Automated jobs

 

DebConf17: a Successful Event, a Cherished Memory, and a Promising Future

                               

During August 5-12, we actively participated in DebConf17, in several professional capacities: platinum sponsor, presenter, workshop and career fair participant, as well as social event host.

Debconf17 is the annual Debian Developers and Contributors Conference, with over 405 people attending from all over the world, 169 events including 89 talks, 61 discussion sessions or BoFs, 6 workshops and 13 other activities, DebConf17 has been hailed as a success. Indeed, we are grateful that we could be part of this fantastic, free software community-based and scientific event and play our part in its development. In what follows we provide a snapshot of our engagement activities.


The Honor of Being Part of Sponsorship Team of DebConf17

At Savoir-faire Linux, we are committed to building a sustainable economy based on cooperation, collaboration and knowledge sharing strategy.  We strongly believe, our strength depends on the quality of our partnership with, and support of, the community projects and the actors of the free software world. In order to fulfill our commitment, we have forged strong partnerships with and supported Free Software Foundation, Linux Foundation, Debian, Python, FFmpeg, and other open and free software projects. Naturally, when we heard that annual conference of Debian was going to be held in Montreal, we were thrilled and excited to be part of this great movement. In short, we think, one cannot build a freer world without supporting free software movement. And, Debian, is one of the gems of free software world.

Our Employees Already Falling Head over Hills in Love with DebConf17

Lucas Bajolet presenting his topic Unicode: a quick overview
Lucas Bajolet presenting his topic Unicode: a quick overview

The soonest our employees learned that DebConf17 was going to be in town, they started submitting their talks, presentations and workshops. We are yet to experience such a self-motivated dynamic and joyful wave of attention towards an event like this! After submissions, we had the following list of finalists announced on the official page of DebConf17’s schedule page.

Alexandre Viau (on the left) & Andreas Traczyk (on the right)
Alexandre Viau (on the left) & Andreas Traczyk (on the right)
Amir Taherizadeh
Amir Taherizadeh

A Hot & Fun Career Fair!

Cyrille Béraud (President) engaging with free software developers at DebConf17
Cyrille Béraud (President) engaging with free software developers at DebConf17

On Saturday, Aug 5, we launched the official career connect activity. Our president, Cyrille Béraud also made himself available to personally answer questions and meet with the pool of talent. It was a very successful networking event which lasted throughout the conference. We met with amazing, highly skilled free software hackers and had wonderful technical and social discussions with them. We received many CVs and some of them are now in the pipeline to be evaluated internally.

 

The Social Event: Ring on! Mix & Mingle with Ring Team

Ring is a free and universal communication platform that preserves the users’ privacy and freedoms. It is a GNU package. It runs on multiple platforms; and, it can be used for texting, calls, and video chats more privately, more securely, and more reliably.

The Social Event: Ring on! Mix & Mingle with Ring Team
The Social Event: Ring on! Mix & Mingle with Ring Team

On July 21, we released the stable version of Ring:  Ring 1.0 – Liberté, Égalité, Fraternité. However, since DebConf17 was around the corner, we postponed the celebration to share the merry moment with the DebConf free software developers. Our plan worked well!

Ring 1.0

With the help of DebConf organizers we spread the news and in the evening of August 8 we received our guests. What a magnificent crowd!  Among our guests were Daniel Pocock (Debian), John Sullivan (Free Software Foundation), Michael Meskes (Credativ), and many other wonderful ladies and gentlemen. Cyrille Béraud made a very brief speech to thank all fre#e software developers contributing to Ring Project, and showed his special gratitude to the core development team for their countless hours put in to realize this milestone.

Stefano Zacchiroli: Debian Project Leader (on the left), Daniel Pocock from Debian (in the middle), John Sullivan from Free Software Foundation (on the right)
Stefano Zacchiroli: Debian Project Leader (on the left), Daniel Pocock from Debian (in the middle), John Sullivan from Free Software Foundation (on the right)
Amandine Gravier: Communications Manager (in the middle), Dorina Mosku: Ring Project Coordinator (on the right), Chloé Nignol from DeGama (on the left)
Amandine Gravier: Communications Manager (in the middle), Dorina Mosku: Ring Project Coordinator (on the right), Chloé Nignol from DeGama (on the left)


DebConf17 Coming to an End, but the Free Software Mission Continues!

The sad truth is that once again we had to say goodbye to another DebConf! But the word on the street is: DebConf18 is going to be even greater! No matter if one DebConf ends, because Debian Community is so great to make another great one the following year!

DebConf 2017
DebConf 2017