Cloud building and deployment is done with integration with EInnovator Cloud Manager and EInnovator Cloud — a Kubernetes based cloud environment. This allows to setup a fully integrated continuous delivery practice where the development cycle is interwoven with devops operations.
With the Docker image in place, we are now fully ready to deploy the app to the cloud. We just need to make sure that the DB connection is configured appropriately also in the cloud environment. Fortunately, this is done automatically by EInnovator Cloud Manager if you specify a suitable Stack setting for the app.
TODO 3-4: Deploy the App in the Cloud with a MySQL binding
Suite / Boot
to tell the Cloud Manager, that the app is built using a Spring Boot stack, and additionally makes use of several services in EInnovator Micro-Service suite.spring.datasource.*
is set with values picked-up from the MySQL connector named superheros/root
. Make sure that the unique name of the app (superheros
) matches the name of the database.server.port
is to port mapped in the container (80 by default).http://superheros.myusername.nativex.cloud
.The default setting for the SSO Gateway server out of the blueprint https://sso.samples.sandbox.nativex.cloud
, uses a pre-deployed shared virtual server with name samples
running in Sandbox plan/mode. You want to change this, so you can have your own set of users, configure and administer the server, or even customize the look&fell of the server UI as seen by your users. There is can be done in two broad variations: your own sandbox like the samples
on, but with your owns database and a different name, or a dedicated server paid plan. With the Sandbox you are limited to a user pool of 100 users and limited request rate of 100 requests/hour, which is makes it mostly useful for early learning and exploration like following this tutorial. For real world development, you will want to upgrade to a dedicated server. The steps to follow to deploy a Sandbox or dedicated server are almost the same, but with the dedicated deployment you can obviously customize resources size like memory, number of instances, unlimited request rates, have enhanced security, and so forth.
TODO 4-1: Deploy a SSO Gateway
MyApps - dev
click on the Manage tab in the MySQL deployment, and the Database sub-tab. Create a Database named sso
by clicking on button Add Databasesso
and user root
, which should get the automatic name of sso/root
.sso
and your previouslly created domain. Keep the auto-deploy checkbox checked.Some of the great features of the SSO Gateway in EInnovator micro-service suite include the ability for different kinds customization. In other tutorial, we discuss in detail how to customize the UI, create custom UI themes, custom signup and registrations pages, branding and customization of notification templates, among other aspects — Custom Themes. In this tutorial, we focus on how to perform role based access control with custom roles.
When an application starts it registers in the SSO Gateway. Exactly what is registered can be configured in the property sso.registration
in application.yml
. In particular, we can register custom roles used to role based access control in out Superheros app, while benefinting from the role assignment and security management available in the admin UI of the SSO Gateway. Roles can be of two types Global Roles and Group Roles. In the Superheros app, we will use only Global roles. In particular, we want to define a global role Superhero Manager which is required to delete Superheros created by other users.
To improve user engagement we want the Superheros app to send notifications to users when certain events occur. In particular, we want notifications when a Superhero is updated to the user that first created the Superhero or last modified it, and to users with role SUPERHERO_MANAGER when a new Superhero is created or updated. Additionally, we want uses to receive notification via multiple channels, including email, SMS, and in app, and be able to customize their notification preferences. For this purpose, we will deploy the Notifications Hub of the EInnovator microservices suite and refactor the app to register new three new kinds of notifications on startup. A bonus point of using the Notifications Hub is that as app admins we can send newsletters and other email communications to our users (e.g. about Superheros* inside stories and news about app updates), or even perform SMS based campaigns.
TODO 7-2: Deploy the Notification Hub marketplace service.
notifications
and use (one of) your previously created domain. Keep the auto-deploy checkbox checked. Deploy the service.Superheros are usually popular and have lots of fans (and some detractors). We would like fans and detractors to be able to post comments and have discussions related to Superheros. Rather than reinventing the wheel and develop a commenting and social discussion functionality from the ground-up for specifically for the Superheros, will the more convenient approach of integrating the app with the Social Hub service from EInnovator micro-service suite. Specifically, we want to have a general Superhero discussion forum, and will want each Superhero details page to have its own dedicate discussion channel. Social Hub also support additional features like social impressions (e.g. likes and star ratings) case we decide to integrate that later.
TODO 8-1: Deploy the Social Hub marketplace service.
social
and use (one of) your previously created domains. Keep the auto-deploy checkbox checked. Deploy the service.TODO 8-2: Configure the Superhero app to use Social Hub.
Full access to generated source-code in own provided Git/VCS repositories. Round-Trip Code Generation with cross-model and language mappings. Integrated cloud builds and deployment with Integration with EInnovator Micro-Service Suite for modularity, scalable and robust distributed architectures. Integrated issue tracking for easy of coordination between developers, teach-leads, managers, and clients. Opt-in Project Ticket support. Marketplace of Solutions, Themes, Components and Widgets
Comments and Discussion