DLAB-000 fixed merge conflicts
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 0000000..90bc650
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,4 @@
+Apache DLab is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by The Apache Incubator.
+Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications,
+and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status
+is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 2561c5b..83162ee 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,5 @@
-                                Apache License
+
+                                 Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
 
@@ -178,7 +179,7 @@
    APPENDIX: How to apply the Apache License to your work.
 
       To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
+      boilerplate notice, with the fields enclosed by brackets "[]"
       replaced with your own identifying information. (Don't include
       the brackets!)  The text should be enclosed in the appropriate
       comment syntax for the file format. We also recommend that a
@@ -186,8 +187,7 @@
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
 
-
-   Copyright (c) 2016, EPAM SYSTEMS INC
+   Copyright [yyyy] [name of copyright owner]
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -199,4 +199,44 @@
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
-   limitations under the License.
\ No newline at end of file
+   limitations under the License.
+
+
+
+Dlab Subcomponents:
+
+Dlab project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+========================================================================
+MIT licenses
+========================================================================
+
+The following components are provided under the MIT License. See project link for details.
+
+(MIT License) Mockito (https://github.com/mockito/mockito)
+(MIT License) SLF4J (http://www.slf4j.org/)
+
+========================================================================
+Apache 2.0 licenses
+========================================================================
+
+The following components are provided under the Apache 2.0 License. See project link for details.
+
+(Apache 2.0 License) MongoDB Java Driver - org.mongodb:mongo-java-driver (http://mongodb.github.io/mongo-java-driver/3.2/driver)
+(Apache 2.0 License) Dropwizard (https://github.com/dropwizard/dropwizard)
+(Apache 2.0 License) Dropwizard Template Config (https://github.com/tkrille/dropwizard-template-config)
+(Apache 2.0 License) directory server (https://github.com/apache/directory-server)
+(Apache 2.0 License) jackson (https://github.com/FasterXML/jackson)
+(Apache 2.0 License) aws java sdk (https://github.com/aws/aws-sdk-java)
+(Apache 2.0 License) boto3 (https://github.com/boto/boto3)
+
+========================================================================
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 licenses
+========================================================================
+
+The following components are provided under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 License. See project link for details.
+
+(PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2) jython (https://github.com/jythontools/jython)
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index 1c4ead4..8458c9f 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,55 +1,5 @@
+Apache DLab (incubating)
+Copyright 2018-2019 The Apache Software Foundation
 
-
-=======================================================================
-Dlab Subcomponents:
-
-Dlab project contains subcomponents with separate copyright
-notices and license terms. Your use of the source code for the these
-subcomponents is subject to the terms and conditions of the following
-licenses.
-
-========================================================================
-MIT licenses
-========================================================================
-
-The following components are provided under the MIT License. See project link for details.
-
-(MIT License) angular2-app (https://www.npmjs.com/package/angular2-app)
-(MIT License) angular2-seed (https://www.npmjs.com/package/angular2-seed)
-(MIT License) angular2-seed-advanced (https://www.npmjs.org/package/angular2-seed-advanced)
-(MIT License) angular2-seed-n3UX (https://www.npmjs.com/package/angular2-seed-n3UX)
-(MIT License) http-status-enum (https://www.npmjs.com/package/http-status-enum)
-(MIT License) Mockito (https://github.com/mockito/mockito)
-(MIT License) ng2-translate (https://www.npmjs.com/package/ng2-translate)
-(MIT License) SLF4J (http://www.slf4j.org/)
-
-========================================================================
-Apache 2.0 licenses
-========================================================================
-
-The following components are provided under the Apache 2.0 License. See project link for details.
-
-(Apache 2.0 License) MongoDB Java Driver - org.mongodb:mongo-java-driver (http://mongodb.github.io/mongo-java-driver/3.2/driver)
-(Apache 2.0 License) Dropwizard (https://github.com/dropwizard/dropwizard)
-(Apache 2.0 License) Dropwizard Template Config (https://github.com/tkrille/dropwizard-template-config)
-(Apache 2.0 License) directory server (https://github.com/apache/directory-server)
-(Apache 2.0 License) jackson (https://github.com/FasterXML/jackson)
-(Apache 2.0 License) aws java sdk (https://github.com/aws/aws-sdk-java)
-(Apache 2.0 License) boto3 (https://github.com/boto/boto3)
-
-========================================================================
-CCDL licenses
-========================================================================
-
-The following components are provided under the CCDL License. See project link for details.
-
-(CCDL 1.1) Jersey (https://github.com/jersey/jersey)
-
-
-========================================================================
-PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 licenses
-========================================================================
-
-The following components are provided under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 License. See project link for details.
-
-(PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2) jython (https://github.com/jythontools/jython)
\ No newline at end of file
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/README.md b/README.md
index a5fe346..8a3db02 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,8 @@
 
 [DLab Deployment](#DLab_Deployment)
 
+        [Preparing environment for DLab deployment](#Env_for_DLab)
+
         [Structure of main DLab directory](#DLab_directory)
 
         [Structure of log directory](#log_directory)
@@ -136,12 +138,14 @@
 
 -   Jupyter
 -   RStudio
--   Zeppelin
+-   Apache Zeppelin
 -   TensorFlow + Jupyter
 -   Deep Learning + Jupyter
 
 Apache Spark is also installed for each of the analytical tools above.
 
+**Note:** terms 'Apache Zeppelin' and 'Apache Spark' hereinafter may be referred to as 'Zeppelin' and 'Spark' respectively or may have original reference.
+
 ## Data engine cluster
 
 After deploying Notebook node, user can create one of the cluster for it:
@@ -151,6 +155,31 @@
 ----------------------
 # DLab Deployment <a name="DLab_Deployment"></a>
 
+## Preparing environment for DLab deployment <a name="Env_for_DLab"></a>
+
+#### In Amazon cloud
+If you want to deploy DLab from inside of your AWS account, you can use the following instruction:
+
+- Create an EC2 instance with the following settings:
+    - Shape of the instance shouldn't be less than t2.medium
+    - The instance should have access to Internet in order to install required prerequisites 
+    - The instance should have access to further DLab installation
+    - AMI - Ubuntu 16.04
+    - IAM role with [policy](#AWS_SSN_policy) should be assigned to the instance
+- Connect to the instance via SSH and run the following commands:
+```
+    sudo su
+    apt-get update
+    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
+    add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
+    apt-get update
+    apt-cache policy docker-ce
+    apt-get install -y docker-ce=17.06.2~ce-0~ubuntu
+    usermod -a -G docker ubuntu
+    pip install fabric==1.14.0
+```
+- Clone DLab repository and run deploy script.
+
 ## Structure of main DLab directory <a name="DLab_directory"></a>
 
 DLab’s SSN node main directory structure is as follows:
@@ -207,110 +236,68 @@
  - SSH key for EC2 instances. This key could be created through Amazon Console.
  - IAM user
  - AWS access key ID and secret access key
- - VPC ID
- - Subnet ID
- - The following permissions should be assigned either for IAM user or EC2 instance:
+ - The following permissions should be assigned for IAM user:
+ <a name="AWS_SSN_policy"></a>
 ```
 {
-    "Version": "2012-10-17",
-    "Statement": [
-        {
-            "Action": [
-                "iam:CreatePolicy",
-                "iam:AttachRolePolicy",
-                "iam:DetachRolePolicy",
-                "iam:DeletePolicy",
-                "iam:DeleteRolePolicy",
-                "iam:GetRolePolicy",
-                "iam:GetPolicy",
-                "iam:GetUser",
-                "iam:ListUsers",
-                "iam:ListAccessKeys",
-                "iam:ListUserPolicies",
-                "iam:ListAttachedRolePolicies",
-                "iam:ListPolicies",
-                "iam:ListRolePolicies",
-                "iam:ListRoles",
-                "iam:CreateRole",
-                "iam:CreateInstanceProfile",
-                "iam:PutRolePolicy",
-                "iam:AddRoleToInstanceProfile",
-                "iam:PassRole",
-                "iam:GetInstanceProfile",
-                "iam:ListInstanceProfilesForRole",
-                "iam:RemoveRoleFromInstanceProfile",
-                "iam:DeleteInstanceProfile",
-                "iam:ListInstanceProfiles",
-                "iam:DeleteRole",
-                "iam:GetRole"
-            ],
-            "Effect": "Allow",
-            "Resource": "*"
-        },
-        {
-            "Action": [
-                "ec2:AuthorizeSecurityGroupEgress",
-                "ec2:AuthorizeSecurityGroupIngress",
-                "ec2:DeleteRouteTable",
-                "ec2:DeleteSubnet",
-                "ec2:DeleteTags",
-                "ec2:DescribeSubnets",
-                "ec2:DescribeVpcs",
-                "ec2:DescribeInstanceStatus",
-                "ec2:ModifyInstanceAttribute",
-                "ec2:RevokeSecurityGroupIngress",
-                "ec2:DescribeImages",
-                "ec2:CreateTags",
-                "ec2:DescribeRouteTables",
-                "ec2:CreateRouteTable",
-                "ec2:AssociateRouteTable",
-                "ec2:DescribeVpcEndpoints",
-                "ec2:CreateVpcEndpoint",
-                "ec2:ModifyVpcEndpoint",
-                "ec2:DescribeInstances",
-                "ec2:RunInstances",
-                "ec2:DescribeAddresses",
-                "ec2:AllocateAddress",
-                "ec2:AssociateAddress",
-                "ec2:DisassociateAddress",
-                "ec2:ReleaseAddress",
-                "ec2:TerminateInstances",
-                "ec2:AuthorizeSecurityGroupIngress",
-                "ec2:AuthorizeSecurityGroupEgress",
-                "ec2:DescribeSecurityGroups",
-                "ec2:CreateSecurityGroup",
-                "ec2:DeleteSecurityGroup",
-                "ec2:RevokeSecurityGroupEgress"
-                
-            ],
-            "Effect": "Allow",
-            "Resource": "*"
-        },
-        {
-            "Action": [
-                "s3:GetBucketLocation",
-                "s3:PutBucketPolicy",
-                "s3:GetBucketPolicy",
-                "s3:DeleteBucket",
-                "s3:DeleteObject",
-                "s3:GetObject",
-                "s3:ListBucket",
-                "s3:PutEncryptionConfiguration"
-                "s3:ListAllMyBuckets",
-                "s3:CreateBucket",
-                "s3:PutBucketTagging",
-                "s3:GetBucketTagging"
-            ],
-            "Effect": "Allow",
-            "Resource": "*"
-        }
-    ]
+	"Version": "2012-10-17",
+	"Statement": [
+		{
+			"Action": [
+				"iam:ListRoles",
+				"iam:CreateRole",
+				"iam:CreateInstanceProfile",
+				"iam:PutRolePolicy",
+				"iam:AddRoleToInstanceProfile",
+				"iam:PassRole",
+				"iam:GetInstanceProfile",
+				"iam:ListInstanceProfilesForRole"
+				"iam:RemoveRoleFromInstanceProfile",
+				"iam:DeleteInstanceProfile"
+			],
+			"Effect": "Allow",
+			"Resource": "*"
+		},
+		{
+			"Action": [
+				"ec2:DescribeImages",
+				"ec2:CreateTags",
+				"ec2:DescribeRouteTables",
+				"ec2:CreateRouteTable",
+				"ec2:AssociateRouteTable",
+				"ec2:DescribeVpcEndpoints",
+				"ec2:CreateVpcEndpoint",
+				"ec2:ModifyVpcEndpoint",
+				"ec2:DescribeInstances",
+				"ec2:RunInstances",
+				"ec2:DescribeAddresses",
+				"ec2:AllocateAddress",
+				"ec2:DescribeInstances",
+				"ec2:AssociateAddress",
+				"ec2:DisassociateAddress",
+				"ec2:ReleaseAddress",
+				"ec2:TerminateInstances"
+			],
+			"Effect": "Allow",
+			"Resource": "*"
+		},
+		{
+			"Action": [
+				"s3:ListAllMyBuckets",
+				"s3:CreateBucket",
+				"s3:PutBucketTagging",
+				"s3:GetBucketTagging"
+			],
+			"Effect": "Allow",
+			"Resource": "*"
+		}
+	]
 }
 ```
 
 To build SSN node, following steps should be executed:
 
-1.  Clone Git repository and make sure that all [pre-requisites](#Pre-requisites) are installed.
+1.  Clone Git repository and make sure that all following [pre-requisites](#Pre-requisites) are installed.
 2.  Go to *dlab* directory.
 3.  Execute following script:
 ```
@@ -328,8 +315,9 @@
 | aws\_secret\_access\_key  | AWS user secret access key                                                              |
 | aws\_region               | AWS region                                                                              |
 | conf\_os\_family          | Name of the Linux distributive family, which is supported by DLab (Debian/RedHat)       |
-| conf\_cloud\_provider     | Name of the cloud provider, which is supported by DLab (AWS)                            |
-| aws\_vpc\_id              | ID of the Virtual Private Cloud (VPC)                                                   |
+| conf\_cloud\_provider     | Name of the cloud provider, which is supported by DLab (AWS) 
+| conf\_duo\_vpc\_enable    | "true" - for installing DLab into two Virtual Private Clouds (VPCs) or "false" - for installing DLab into one VPC. Also this parameter isn't required when deploy DLab in one VPC
+| aws\_vpc\_id              | ID of the VPC                                                   |
 | aws\_subnet\_id           | ID of the public subnet                                                                 |
 | aws\_security\_groups\_ids| One or more ID\`s of AWS Security Groups, which will be assigned to SSN node            |
 | key\_path                 | Path to admin key (without key name)                                                    |
@@ -338,7 +326,8 @@
 | aws\_account\_id          | The The ID of Amazon account                                                            |
 | aws\_billing\_bucket      | The name of S3 bucket where billing reports will be placed                              |
 | aws\_report\_path         | The path to billing reports directory in S3 bucket. This parameter isn't required when billing reports are placed in the root of S3 bucket. |
-| action                    | In case of SSN node creation, this parameter should be set to “create”                  |
+| action                    | In case of SSN node creation, this parameter should be set to “create”
+| workspace\_path           | Path to DLab sources root
 
 **Note:** If the following parameters are not specified, they will be created automatically:
 -   aws\_vpc\_id
@@ -375,7 +364,7 @@
 
 To build SSN node, following steps should be executed:
 
-1.  Clone Git repository and make sure that all [pre-requisites](#Pre-requisites) are installed
+1.  Clone Git repository and make sure that all following [pre-requisites](#Pre-requisites) are installed
 2.  Go to *dlab* directory
 3.  To have working billing functionality please review Billing configuration note and use proper parameters for SSN node deployment
 4.  To use Data Lake Store please review Azure Data Lake usage pre-requisites note and use proper parameters for SSN node deployment
@@ -458,7 +447,7 @@
   
 To build SSN node, following steps should be executed:
 
-1.  Clone Git repository and make sure that all [pre-requisites](#Pre-requisites) are installed.
+1.  Clone Git repository and make sure that all following [pre-requisites](#Pre-requisites) are installed.
 2.  Go to *dlab* directory.
 3.  Execute following script:
 ```
@@ -567,7 +556,7 @@
 
 ### Create
 
-In order to create Edge node using DLab Web UI – login and, click on the button “Upload”. Choose user’s SSH public key and after that click on the button “Create”. Edge node will be deployed and corresponding instance (virtual machine) will be started.
+In order to create Edge node using DLab Web UI – login and, click on the button “Upload” (Depending on authorization provider that was chosen on deployment stage, user may be taken from [LDAP](#LDAP_Authentication) or from [Azure AD (Oauth2)](#Azure_OAuth2_Authentication)). Choose user’s SSH public key and after that click on the button “Create”. Edge node will be deployed and corresponding instance (virtual machine) will be started.
 
 #### In Amazon
 
@@ -1671,7 +1660,7 @@
 | --dlab\_path   | Path to DLab. Default: /opt/dlab/                                                                                       |
 | --configs      | Comma separated names of config files, like "security.yml", etc. Default: all                                           |
 | --keys         | Comma separated names of keys, like "user_name.pub". Default: all                                                       |
-| --certs        | Comma separated names of SSL certificates and keys, like "dlab-selfsigned.crt", etc. Also available: skip. Default: all |
+| --certs        | Comma separated names of SSL certificates and keys, like "dlab.crt", etc. Also available: skip. Default: all |
 | --jars         | Comma separated names of jar application, like "self-service" (without .jar), etc. Also available: all. Default: skip   |
 | --db           | Mongo DB. Key without arguments. Default: disable                                                                       |
 | --logs         | All logs (include docker). Key without arguments. Default: disable                                                      |
@@ -1683,7 +1672,7 @@
 | --dlab\_path   | Path to DLab. Default: /opt/dlab/                                                                                       |
 | --configs      | Comma separated names of config files, like "security.yml", etc. Default: all                                           |
 | --keys         | Comma separated names of keys, like "user_name.pub". Default: all                                                       |
-| --certs        | Comma separated names of SSL certificates and keys, like "dlab-selfsigned.crt", etc. Also available: skip. Default: all |
+| --certs        | Comma separated names of SSL certificates and keys, like "dlab.crt", etc. Also available: skip. Default: all |
 | --jars         | Comma separated names of jar application, like "self-service" (without .jar), etc. Also available: all. Default: skip   |
 | --db           | Mongo DB. Key without arguments. Default: disable                                                                       |
 | --file         | Full or relative path to backup file or folder. Required field                                                          |
@@ -1744,6 +1733,7 @@
 docker build --build-arg OS=<os_family> --file general/files/<cloud_provider>/rstudio_Dockerfile -t docker.dlab-rstudio .
 docker build --build-arg OS=<os_family> --file general/files/<cloud_provider>/zeppelin_Dockerfile -t docker.dlab-zeppelin .
 docker build --build-arg OS=<os_family> --file general/files/<cloud_provider>/tensor_Dockerfile -t docker.dlab-tensor .
+docker build --build-arg OS=<os_family> --file general/files/<cloud_provider>/tensor-rstudio_Dockerfile -t docker.dlab-tensor-rstudio .
 docker build --build-arg OS=<os_family> --file general/files/<cloud_provider>/deeplearning_Dockerfile -t docker.dlab-deeplearning .
 docker build --build-arg OS=<os_family> --file general/files/<cloud_provider>/dataengine_Dockerfile -t docker.dlab-dataengine .
 ```
@@ -1779,16 +1769,8 @@
 In order to start development of Front-end Web UI part of DLab - Git repository should be cloned and the following packages should be installed:
 
 -   Git 1.7 or higher
--   Maven 3.3 or higher
--   Python 2.7
--   Mongo DB 3.0 or higher
+-   Python 2.7 with library Fabric v1.14.0
 -   Docker 1.12 - Infrastructure provisioning
--   Java Development Kit 8 – Back-end
--   Node.js 6.x & 7.x - WebUI
--   Angular CLI v1.0.0-rc.1 or higher - WebUI
--   TypeScript v2.0 or higher - WebUI
--   Angular2 v2.4 – WebUI
--   Development IDE (Eclipse or Intellij IDEA)
 
 ## Java back-end services <a name="Java_back_end_services"></a>
 
@@ -1847,7 +1829,7 @@
 LDAP only provides with authentication end point that allows to verify authenticity of users against LDAP instance. 
 If you use AWS cloud provider LDAP + AWS authentication could be useful as it allows to combine LDAP authentication and verification if user has any role in AWS account
 
-DLab provides OAuth2(client credentials and authorization code flow) security authorization mechanism for Azure users. This kind of authentication is required when you are going to use Data Lake. If Data Lake is not enabled you have two options LDAP ot OAuth2
+DLab provides OAuth2(client credentials and authorization code flow) security authorization mechanism for Azure users. This kind of authentication is required when you are going to use Data Lake. If Data Lake is not enabled you have two options LDAP or OAuth2
 If OAuth2 is in use security-service validates user's permissions to configured permission scope(resource in Azure). 
 If Data Lake is enabled default permission scope(can be configured manually after deploy DLab) is Data Lake Store account so only if user has any role in scope of Data Lake Store Account resource he/she will be allowed to log in
 If Data Lake is disabled but Azure OAuth2 is in use default permission scope will be Resource Group where DLab is created and only users who have any roles in the resource group will be allowed to log in.
@@ -2334,10 +2316,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Jupyter notebook 5.2.0",
+      "template_name": "Jupyter notebook 5.7.4",
       "description": "Base image with jupyter node creation routines",
       "environment_type": "exploratory",
-      "version": "jupyter_notebook-5.2.0",
+      "version": "jupyter_notebook-5.7.4",
       "vendor": "Azure"
     }
   ]
@@ -2403,7 +2385,6 @@
 ### Properties overview
 
 There are just a few properties based in which the customization could be done:
-
 - **ldapBindTemplate: uid=%s,ou=People,dc=example,dc=com**
 - **ldapBindAttribute: uid**
 - **ldapSearchAttribute: uid**
@@ -2412,6 +2393,12 @@
 - **ldapBindTemplate** is a user`s DN template which should be filed with custom value. Here the template could be changed: uid=%s,ou=People,dc=example,dc=com -> cn=%s,ou=People,dc=example,dc=com.
 - **ldapBindAttribute** - this is a major attribute, on which the DN is based on. Usually it is any of: uid or cn, or email.
 - **ldapSearchAttribute** - another attribute, based on which users will be looked up in LDAP.
+
+Additional parameters that are populated during deployment and may be changed in future are:
+- **ldapConnectionConfig.name: ldap user name**
+- **ldapConnectionConfig.ldapHost: ldap host**
+- **ldapConnectionConfig.ldapPort: ldap port**
+- **ldapConnectionConfig.credentials: ldap credentials**
  
 ### Scripts overview
 
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index ee0df2b..c4f0f9e 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,28 +1,78 @@
 # DLab is Self-service, Fail-safe Exploratory Environment for Collaborative Data Science Workflow
 
-## Bug fixes in v2.0.3
-- upgraded jackson library to eliminate https://nvd.nist.gov/vuln/detail/CVE-2018-7489 bug 
-
-
-## Known issues in v2.0.3
+## New features in v2.1
 **All Cloud platforms:**
-- remote kernel list for Data Engine is not updated after stop/start Data Engine
+- implemented tuning Apache Spark standalone cluster and local spark configurations from WEB UI (except for Apache Zeppelin)
+- added a reminder after user logged in notifying that corresponding resources are about to be stopped/terminated
+- implemented SSN load monitor: CPU, Memory, HDD
+- updated versions of installed software:
+    * Jupyter 5.7.4
+    * RStudio 1.1.463
+    * Apache Zeppelin 0.8.0
+    * Apache Spark 2.3.2 for standalone cluster 
+    * Scala 2.12.8
+    * CNTK 2.3.1
+    * Keras 2.1.6 (except for DeepLearning - 2.0.8)
+    * MXNET 1.3.1
+    * Theano 1.0.3
+    * ungit 1.4.36
+
+**AWS:**
+- implemented tuning Data Engine Service from WEB UI (except for Apache Zeppelin)
+- added support of new version of Data Engine Service (AWS EMR) 5.19.0
+
+**MS azure and AWS:**
+- implemented ability to manage total billing quota for DLab as well as billing quota per user
+
+## Improvements in v2.1
+
+**All Cloud platforms:**
+- added ability to configure instance size/shape (CPU, RAM) from DLab UI for different user groups
+- added possibility to install Java dependencies from DLab UI
+- added alternative way to access analytical notebooks just by clicking on notebook's direct URL.
+    * added LDAP authorization in Squid (user should provide his LDAP credentials when accessing notebooks/Data Engine/Data Engine Service via browser)
+- improved error handling for various scenarios on UI side 
+- added support of installing DLab into two VPCs
+
+**MS Azure:**
+- it is now possible to install DLab only with private IP’s 
+
+## Bug fixes in v2.1
+**AWS:**
+- fixed pricing retrieval logic to optimize RAM usage on SSN for small instances
+**GCP:**
+- fixed a bug when DeepLearning creation was failing
+- fixed a bug which caused shared bucket to be deleted in case Edge node creation failed for new users
+
+## Known issues in v2.1
+**All Cloud platforms:**
+- remote kernel list for Data Engine is not updated after stop/start Data Engine 
 - following links can be opened via tunnel for Data Engine/Data Engine: service: worker/application ID, application detail UI, event timeline, logs for Data Engine
+- if Apache Zeppelin is created from AMI with different instance shape, spark memory size is the same as in created AMI.
+- sparklyr library (r package) can not be installed on RStudio, RStudio with TensorFlow notebooks
+- Spark default configuration for Apache Zeppelin can not be changed from DLab UI.  Currently it can be done directly through Apache Zeppelin interpreter menu.
+For more details please refer for Apache Zeppelin official documentation: https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/overview.html
+- shell interpreter for Apache Zeppelin is missed for some instance shapes 
+- executor memory is not allocated depending on notebook instance shape for local spark
+
 
 **AWS**
 - can not open master application URL on resource manager page, issue known for Data Engine Service v.5.12.0
+- java library installation fails on DLab UI on Data Engine Service in case when it is installed together with libraries from other groups.
 
 **GCP:**
 - storage permissions aren't differentiated by users via Dataproc permissions (all users have R/W access to other users buckets)
 - Data Engine Service creation is failing after environment has been recreated
-- it is temporarily not possible to run playbooks using remote kernel of Data Engine (dependencies issue)
-- DeepLearning creation fails 
+- It is temporarily not possible to run playbooks using remote kernel of Data Engine (dependencies issue)
+- Data Engine creation fails for DeepLearning template
+- Jupyter does not start successfully after Data Engine Service creation (create Jupyter -> create Data Engine -> stop Jupyter -> Jupyter fails) 
 
 **Microsoft Azure:**
-- creation of Zeppelin from custom image fails on the step when cluster kernels are removing
-- start Notebook by scheduler does not work when Data Lake is enabled 
+- creation of Zeppelin or RStudio from custom image fails on the step when cluster kernels are removing
+- start Notebook by scheduler does not work when Data Lake is enabled
+- playbook running on Apache Zeppelin fails due to impossible connection to blob via wasbs protocol 
 
-## Known issues caused by cloud provider limitations in v2.0.3
+## Known issues caused by cloud provider limitations in v2.1
 
 **Microsoft Azure:**
 - resource name length should not exceed 80 chars
diff --git a/USER_GUIDE.md b/USER_GUIDE.md
index 3aec701..4a221a9 100644
--- a/USER_GUIDE.md
+++ b/USER_GUIDE.md
@@ -18,13 +18,15 @@
 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Manage libraries](#manage_libraries)
 
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Create image](#create_image)
+
 &nbsp; &nbsp; &nbsp; &nbsp; [Stop Notebook server](#notebook_stop)
 
 &nbsp; &nbsp; &nbsp; &nbsp; [Terminate Notebook server](#notebook_terminate)
 
 &nbsp; &nbsp; &nbsp; &nbsp; [Deploy Computational resource](#computational_deploy)
 
-&nbsp; &nbsp; &nbsp; &nbsp; [Stop Spark cluster](#spark_stop)
+&nbsp; &nbsp; &nbsp; &nbsp; [Stop Apache Spark cluster](#spark_stop)
 
 &nbsp; &nbsp; &nbsp; &nbsp; [Terminate Computational resource](#computational_terminate)
 
@@ -36,6 +38,14 @@
 
 [DLab Health Status Page](#health_page)
 
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Backup](#backup)
+
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Manage environment](#manage_environment)
+
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Manage roles](#manage_roles)
+
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [SSN monitor](#ssn_monitor)
+
 [DLab billing report](#billing_page)
 
 [DLab Environment Management Page](#environment_management)
@@ -66,6 +76,16 @@
 
 To stop working with DLab - click on Log Out link at the top right corner of DLab.
 
+After login user will see warning in case of exceeding quota or close to this limit.
+
+<p align="center" class="facebox-popup"> 
+    <img src="doc/exceeded quota.png" alt="Exceeded quota" width="400">
+</p>
+
+<p align="center" class="facebox-popup"> 
+    <img src="doc/close to limit.png" alt="Close to limit" width="400">
+</p>
+
 ----------------------------------
 # Setup a Gateway/Edge node <a name="setup_edge_node"></a>
 
@@ -73,13 +93,13 @@
 
 To do this click on “Upload” button on “Create initial infrastructure”, select your personal public key and hit “Create” button or click on "Generate" button on “Create initial infrastructure” and save your private key.
 
-<p align="center"> 
+<p align="center" class="facebox-popup"> 
     <img src="doc/upload_or_generate_user_key.png" alt="Upload or generate user key" width="400">
 </p>
 
 Please note that you need to have a key pair combination (public and private key) to work with DLab. To figure out how to create public and private key, please click on “Where can I get public key?” on “Create initial infrastructure” dialog. DLab build-in wiki page will guide Windows, MasOS and Linux on how to generate SSH key pairs quickly.
 
-After you hit Create or Generate button, creation of Edge node will start. This process is a one-time operation for each Data Scientist and it might take up-to 10 minutes for DLab to setup initial infrastructure for you. During this process, you will see following popup in your browser:
+After you hit "Create" or "Generate" button, creation of Edge node will start. This process is a one-time operation for each Data Scientist and it might take up-to 10 minutes for DLab to setup initial infrastructure for you. During this process, you will see following popup in your browser:
 
 <p align="center"> 
     <img src="doc/loading_key.png" alt="Loading user key" width="350">
@@ -95,20 +115,21 @@
 ----------------------
 ## Create notebook server <a name="notebook_create"></a>
 
-To create new analytical environment from “List of Resources” page click on Create new button.
+To create new analytical environment from “List of Resources” page click on "Create new" button.
 
 “Create analytical tool” popup will show-up. Data Scientist can choose a preferable analytical tool to be setup. Adding new analytical tools is supported by architecture, so you can expect new templates to show up in upcoming releases.
 
 Currently by means of DLab, Data Scientists can select between any of the following templates:
 
 -   Jupyter
--   Zeppelin
+-   Apache Zeppelin
 -   RStudio
--   TensorFlow (Jupyter + TensorFlow)
+-   RStudio with TensorFlow
+-   Jupyter with TensorFlow
 -   Deep Learning (Jupyter + MXNet, Caffe, Caffe2, TensorFlow, CNTK, Theano, Torch and Keras)
 
 <p align="center"> 
-    <img src="doc/notebook_create.png" alt="Create notebook" width="480">
+    <img src="doc/notebook_create.png" alt="Create notebook" width="574">
 </p>
 
 After specifying desired template, you should fill in the “Name” and “Instance shape”.
@@ -125,7 +146,9 @@
 
 \* Please refer to official documentation from Amazon that will help you understand what [instance shapes](https://aws.amazon.com/ec2/instance-types/) would be most preferable in your particular DLAB setup. Also, you can use [AWS calculator](https://calculator.s3.amazonaws.com/index.html) to roughly estimate the cost of your environment.
 
-After you Select the template, fill in the Name and choose needed instance shape - you need to click on Create button for your instance to start creating. Corresponding record will show up in your dashboard:
+You can override the default configurations for local spark. The configuration object is referenced as a JSON file. To tune spark configuration check off "Spark configurations" check box and insert JSON format in text box.
+
+After you Select the template, fill in the Name and choose needed instance shape - you need to click on "Create" button for your instance to start creating. Corresponding record will show up in your dashboard:
 
 ![Dashboard](doc/main_page2.png)
 
@@ -136,7 +159,7 @@
 When you click on the name of your Analytical tool in the dashboard – analytical tool popup will show up:
 
 <p align="center"> 
-    <img src="doc/notebook_info.png" alt="Notebook info" width="400">
+    <img src="doc/notebook_info.png" alt="Notebook info" width="574">
 </p>
 
 In the header you will see version of analytical tool, its status and shape.
@@ -149,11 +172,17 @@
 -   Shared bucket for all users
 -   Bucket that has been provisioned for your needs
 
-To access analytical tool Web UI – you need to configure SOCKS proxy. Please follow the steps described on “Read instruction how to create the tunnel” page to configure SOCKS proxy for Windows/MAC/Linux machines.
+To access analytical tool Web UI you proceed with one of the options:
+
+-   use direct URL's to access notebooks (your access will be established via reverse proxy, so you don't need to have Edge node tunnel up and running)
+-   SOCKS proxy based URL's to access notebooks (via tunnel to Edge node)
+
+If you use direct urls you don't need to open tunnel for Edge node and set SOCKS proxy.
+If you use indirect urls you need to configure SOCKS proxy and open tunnel for Edge node. Please follow the steps described on “Read instruction how to create the tunnel” page to configure SOCKS proxy for Windows/MAC/Linux machines. “Read instruction how to create the tunnel” is available on DLab notebook popup.
 
 ### Manage libraries <a name="manage_libraries"></a>
 
-On every analytical tool instance you can install additional libraries by clicking on gear icon ![gear](doc/gear_icon.png) in the Actions column for a needed Notebook and hit Manage libraries:
+On every analytical tool instance you can install additional libraries by clicking on gear icon <img src="doc/gear_icon.png" alt="gear" width="20"> in the Actions column for a needed Notebook and hit Manage libraries:
 
 <p align="center"> 
     <img src="doc/notebook_menu_manage_libraries.png" alt="Notebook manage_libraries" width="150">
@@ -161,8 +190,8 @@
 
 After clicking you will see the window with 3 fields:
 -   Field for selecting an active resource to install libraries on
--   Field for selecting group of packages (apt/yum, Python 2, Python 3, R, Others)
--   Field for search available packages with autocomplete function
+-   Field for selecting group of packages (apt/yum, Python 2, Python 3, R, Java, Others)
+-   Field for search available packages with autocomplete function except for Java. java library you should enter using the next format: "groupID:artifactID:versionID"
 
 ![Install libraries dialog](doc/install_libs_form.png)
 
@@ -186,12 +215,40 @@
 
 **Note:** If package can't be installed you will see "Failed" in status column and button to retry installation.
 
+### Create image <a name="create_image"></a>
+
+Out of each analytical tool instance you can create an AMI image (notebook should be in Running status), including all libraries, which have been installed on it. You can use that AMI to speed-up provisioining of further analytical tool, if you would like to re-use existing configuration. To create an AMI click on a gear icon <img src="doc/gear_icon.png" alt="gear" width="20"> in the Actions menu for a needed Notebook and hit "Create AMI":
+
+<p align="center"> 
+    <img src="doc/notebook_menu_create_ami.png" alt="Notebook create_ami" width="150">
+</p>
+
+On Create AMI popup you will be asked to fill in:
+-   text box for an AMI name (mandatory)
+-   text box for an AMI description (optional)
+
+<p align="center"> 
+    <img src="doc/create_ami.png" alt="Create AMI" width="480">
+</p>
+
+After clicking on "Assign" button the Notebook status will change to Creating AMI. Once an image is created the Notebook status changes back to Running.
+
+To create new analytical environment from custom image click "Create new" button on “List of Resources” page. 
+
+“Create analytical tool” popup will show-up. Choose a template of a Notebook for which the custom image is created:
+
+<p align="center"> 
+    <img src="doc/create_notebook_from_ami.png" alt="Create notebook from AMI" width="560">
+</p>
+
+Before clicking "Create" button you should choose the image from "Select AMI" and fill in the "Name" and "Instance shape".
+
 --------------------------
 ## Stop Notebook server <a name="notebook_stop"></a>
 
 Once you have stopped working with an analytical tool and you would like to release cloud resources for the sake of the costs, you might want to Stop the notebook. You will be able to Start the notebook again after a while and proceed with your analytics.
 
-To Stop the Notebook click on a gear icon ![gear](doc/gear_icon.png) in the Actions column for a needed Notebook and hit Stop:
+To Stop the Notebook click on a gear icon <img src="doc/gear_icon.png" alt="gear" width="20"> in the Actions column for a needed Notebook and hit Stop:
 
 <p align="center"> 
     <img src="doc/notebook_menu_stop.png" alt="Notebook stopping" width="150">
@@ -212,7 +269,7 @@
 
 Once you have finished working with an analytical tool and you would like to release cloud resources for the sake of the costs, you might want to Terminate the notebook. You will not be able to Start the notebook which has been Terminated. Instead, you will have to create new Notebook server if you will need to proceed your analytical activities.
 
-To Terminate the Notebook click on a gear icon ![gear](doc/gear_icon.png) in the Actions column for a needed Notebook and hit Terminate:
+To Terminate the Notebook click on a gear icon <img src="doc/gear_icon.png" alt="gear" width="20"> in the Actions column for a needed Notebook and hit Terminate:
 
 **NOTE:** if any Computational resources have been linked to your notebook server – they will be automatically terminated if you stop the notebook.
 
@@ -244,15 +301,22 @@
 
 This picture shows menu for creating Computational resource for AWS:
 <p align="center"> 
-    <img src="doc/emr_create.png" alt="Create Computational resource on AWS" width="450">
+    <img src="doc/emr_create.png" alt="Create Computational resource on AWS" width="760">
+</p>
+
+You can override the default configurations for applications by supplying a configuration object for applications when you create a cluster (this functionality is only available for Amazon EMR cluster ). The configuration object is referenced as a JSON file.
+To tune computational resource configuration check off "Cluster configurations" check box and insert JSON format in text box:
+
+<p align="center"> 
+    <img src="doc/emr_create_configuration.png" alt="Create Custom Computational resource on AWS" width="760">
 </p>
 
 This picture shows menu for creating Computational resource for Azure:
 <p align="center"> 
-    <img src="doc/dataengine_creating_menu.png" alt="Create Computational resource on Azure" width="450">
+    <img src="doc/dataengine_creating_menu.png" alt="Create Computational resource on Azure" width="760">
 </p>
 
-If you click on Create button Computational resource creation will kick off. You will see corresponding record on DLab Web UI in status **Creating**:
+If you click on "Create" button Computational resource creation will kick off. You will see corresponding record on DLab Web UI in status **Creating**:
 
 ![Creating Computational resource](doc/emr_creating.png)
 
@@ -261,9 +325,11 @@
 Clicking on Computational resource name in DLab dashboard will open Computational resource details popup:
 
 <p align="center"> 
-    <img src="doc/emr_info.png" alt="Computational resource info" width="400">
+    <img src="doc/emr_info.png" alt="Computational resource info" width="480">
 </p>
 
+Also you can go to computational resource master UI via link "Apache Spark Master' or "EMR Master" (this functionality is only available for AWS cloud).
+
 Since Computational resource is up and running - you are now able to leverage cluster computational power to run your analytical jobs on.
 
 To do that open any of the analytical tools and select proper kernel/interpreter:
@@ -288,19 +354,19 @@
 ![RStudio](doc/rstudio.png)
 
 ---------------
-## Stop Spark cluster <a name="spark_stop"></a>
+## Stop  Apache Spark cluster <a name="spark_stop"></a>
 
-Once you have stopped working with a spark cluster and you would like to release cloud resources for the sake of the costs, you might want to Stop the spark cluster. You will be able to Start the spark cluster again after a while and proceed with your analytics.
+Once you have stopped working with a spark cluster and you would like to release cloud resources for the sake of the costs, you might want to Stop Apache Spark cluster. You will be able to Start apache Spark cluster again after a while and proceed with your analytics.
 
-To Stop the spark cluster click on ![stop](doc/stop_icon.png) button close to spark cluster alias.
+To Stop Apache Spark cluster click on <img src="doc/stop_icon.png" alt="stop" width="20"> button close to spark cluster alias.
 
-Hit YES in confirmation popup.
+Hit "YES" in confirmation popup.
 
 <p align="center"> 
     <img src="doc/spark_stop_confirm.png" alt="Spark stop confirm" width="400">
 </p>
 
-After you confirm your intent to Stop the spark cluster - the status will be changed to Stopping and will become Stopped in a while.
+After you confirm your intent to Apache Spark cluster - the status will be changed to Stopping and will become Stopped in a while.
 
 ------------------
 ## Terminate Computational resource <a name="computational_terminate"></a>
@@ -323,7 +389,7 @@
 When you click on the button "Git credentials" – following popup will show up:
 
 <p align="center"> 
-    <img src="doc/git_creds_window.png" alt="Git_creds_window" width="600">
+    <img src="doc/git_creds_window.png" alt="Git_creds_window" width="760">
 </p>
 
 In this window you need to add:
@@ -338,7 +404,7 @@
 Clicking on "Apply changes" button, your credentials will be sent to all running instances with analytical tools. It takes a few seconds for changes to be applied.
 
 <p align="center"> 
-    <img src="doc/git_creds_window2.png" alt="Git_creds_window1" width="600">
+    <img src="doc/git_creds_window2.png" alt="Git_creds_window1" width="760">
 </p>
 
 On this tab you can also edit your credentials (click on pen icon) or delete (click on bin icon).
@@ -348,7 +414,7 @@
 On every analytical tool instance you can see Git UI tool (ungit):
 
 <p align="center"> 
-    <img src="doc/git_ui_link.png" alt="Git_ui_link" width="400">
+    <img src="doc/notebook_info.png" alt="Git_ui_link" width="520">
 </p>
 
 Before start working with git repositories, you need to change working directory on the top of window to:
@@ -367,7 +433,7 @@
 
 On the top of window in the red field UI show us changed or new files to commit. You can uncheck or add some files to gitignore.
 
-**Note:** Git always checks you credentials. If this is your first commit after adding/changing credentials and after clicking on "Commit" button nothing happened - just click on Commit button again.
+**Note:** Git always checks you credentials. If this is your first commit after adding/changing credentials and after clicking on "Commit" button nothing happened - just click on "Commit" button again.
 
 On the right pane of window you also can see buttons to fetch last changes of repository, add upstreams and switch between branches.
 
@@ -400,13 +466,13 @@
 
 ![Health_status](doc/health_status.png)
 
-To Stop Edge Node please click on actions icon on Health Status page and hit Stop.
+To Stop Edge Node please click on actions icon on Health Status page and hit "Stop".
 
 <p align="center"> 
     <img src="doc/edge_stop.png" alt="EDGE stop" width="150">
 </p>
 
-Confirm you want to stop Edge node by clicking Yes:
+Confirm you want to stop Edge node by clicking "Yes":
 
 <p align="center"> 
     <img src="doc/edge_stop_confirm.png" alt="EDGE stop confirm" width="400">
@@ -414,23 +480,27 @@
 
 In case you Edge node is Stopped or Terminated – you will have to Start or Recreate it correspondingly to proceed working with DLab. This can done as well via context actions menu.
 
+### Backup <a name="backup"></a>
+
 Administrator can use backup functionality. In order to do it click Backup button. "Backup options" popup will show-up. You can choose a preferable option to be backed up.
 
 <p align="center"> 
-    <img src="doc/backup_options.png" alt="Backup options" width="515">
+    <img src="doc/backup_options.png" alt="Backup options" width="400">
 </p>
 
-Confirm you want to do backup by clicking Apply.
+Confirm you want to do backup by clicking "Apply".
+
+### Manage environment <a name="manage_environment"></a>
 
 Administrator can manage users environment clicking on Manage environment button. "Manage environment" popup will show-up. All users environments will be shown which at least one instance has Running status:
 
 <p align="center"> 
-    <img src="doc/manage_environment.png" alt="Manage environment" width="580">
+    <img src="doc/manage_environment.png" alt="Manage environment" width="520">
 </p>
 
-If Administrator hit Stop button all running instances except for dataengine service will be stopped and dataengine service will be terminated. User will be able to Start instances again except for dataengine service after a while and proceed with his analytics.
+If Administrator hit "Stop" icon <img src="doc/stop_icon_env.png" alt="stop" width="22"> all running instances except for dataengine service will be stopped and dataengine service will be terminated. User will be able to Start instances again except for dataengine service after a while and proceed with his analytics.
 
-If Administrator hit Terminate button all running and stopped instances will be terminated. User will not be able to Start the inctance which has been Terminated. Instead, user will have to Upload his personal public key or Generate ssh key pairs.
+If Administrator hit "Terminate" icon <img src="doc/terminate_icon_env.png" alt="terminate" width="22"> all running and stopped instances will be terminated. User will not be able to Start the inctance which has been Terminated. Instead, user will have to Upload his personal public key or Generate ssh key pairs.
 
 Administrator should confirm user environment stopping or termination by clicking Yes:
 
@@ -438,6 +508,44 @@
     <img src="doc/manage_env_confirm.png" alt="Manage environment confirm" width="550">
 </p>
 
+Administrator can manage total billing quota for DLab as well as billing quota per user(s).To do this enter appropriate number in text box(es) per user(s) or/and total budget. Hit "Apply" button.
+
+### Manage roles <a name="manage_roles"></a>
+
+Administrator can choose what instance shape(s) and notebook(s) can be allowed for certain group(s) or user(s).
+To do it click on "Manage roles" button. "Manage roles" popup will show-up:
+
+<p align="center"> 
+    <img src="doc/manage_role.png" alt="Manage roles" width="780">
+</p>
+
+To add group enter group name, choose certain action which should be allowed for group and also you can add discrete user(s) (not mandatory) and then click "Create" button.
+New group will be added and appears on "Manage roles" popup.
+
+Administrator can remove group or user. For that you should only click on "Delete group" button for certain group or click on delete icon <img src="doc/cross_icon.png" alt="delete" width="16"> for particular user. After that Hit "Yes" in confirmation popup.
+
+<p align="center"> 
+    <img src="doc/delete_group.png" alt="Delete group" width="780">
+</p>
+
+### SSN monitor <a name="ssn_monitor"></a>
+
+Administrator can monitor SSN HDD, Memory and CPU. 
+Clicking on "SSN monitor button" will open "SSN monitor" popup. 
+There are three tabs on  'SSN monitor' popup: CPU, HDD, Memory:
+
+<p align="center"> 
+    <img src="doc/cpu.png" alt="SSN CPU" width="480">
+</p>
+
+<p align="center"> 
+    <img src="doc/memory.png" alt="SSN memory" width="480">
+</p>
+
+<p align="center"> 
+    <img src="doc/hdd.png" alt="SSN HDD" width="480">
+</p>
+
 --------------------------------
 # DLab Billing report <a name="billing_page"></a>
 
@@ -456,7 +564,7 @@
     <img src="doc/billing_datepicker.png" alt="Billing datepicker" width="400">
 </p>
 
-You can save billing report in csv format hitting Export button.
+You can save billing report in csv format hitting "Export" button.
 
 You can also filter data by each column:
 
@@ -469,7 +577,7 @@
 --------------------------------
 # DLab Environment Management Page <a name="environment_management"></a>
 
-DLab Environment Management page is an administration page allowing admins to show the list of all users` environments and to stop/terminate all of hem of separate specific resource.
+DLab Environment Management page is an administration page allowing admins to show the list of all users` environments and to stop/terminate all of them of separate specific resource.
 
 To access Environment management page either navigate to it via main menu:
 
@@ -504,11 +612,11 @@
 
 --------------------------------
 
-# Web UI filters <a name="filters"></a>
+# Web UI filters <a name="filter"></a>
 
 You can leverage functionality of build-in UI filter to quickly manage the analytical tools and computational resources, which you only want to see in your dashboard.
 
-To do this, simply click on icon ![filter](doc/filter_icon.png) in dashboard header and filter your list by any of:
+To do this, simply click on icon <img src="doc/filter_icon.png" alt="filter" width="16"> in dashboard header and filter your list by any of:
 
 -   environment name (input field);
 -   status (multiple choice);
@@ -517,8 +625,7 @@
 
 ![Main page filter](doc/main_page_filter.png)
 
-Once your list of filtered by any of the columns, icon ![filter](doc/filter_icon.png) changes to
-![filter](doc/sort_icon.png) for a filtered columns only.
+Once your list of filtered by any of the columns, icon <img src="doc/filter_icon.png" alt="filter" width="16"> changes to <img src="doc/sort_icon.png" alt="filter" width="16"> for a filtered columns only.
 
 There is also an option for quick and easy way to filter out all inactive instances (Failed and Terminated) by clicking on “Show active” button in the ribbon. To switch back to the list of all resources, click on “Show all”.
 
@@ -528,7 +635,7 @@
 - notebook scheduler;
 - data engine scheduler (currently spark cluster only);
 
-To create scheduler for a notebook click on a ![gear](doc/gear_icon.png) icon in the Actions column for a needed Notebook and hit Scheduler:
+To create scheduler for a notebook click on a <img src="doc/gear_icon.png" alt="gear" width="20"> icon in the Actions column for a needed Notebook and hit Scheduler:
 
 <p align="center"> 
     <img src="doc/notebook_menu_scheduler.png" alt="Notebook scheduler action" width="150">
@@ -560,12 +667,18 @@
 Once any scheduler is set up, notebook/spark cluster will be started/stopped automatically.
 Please also note that if notebook is configured to be stopped, all running data engines assosiated with it will be stopped (for spark cluster) or terminated (for data engine serice) with notebook.
 
+After login user will be notified  that corresponding resources are about to be stopped/terminated in some time.
+
+<p align="center"> 
+    <img src="doc/scheduler reminder.png" alt="Scheduler reminder" width="400">
+</p>
+
 # Key reupload <a name="key_reupload"></a>
 In case when user private key was corrupted, lost etc. DLAB provide a possibility to reupload user public key.
 It can be done on manage environment page using ACTIONS menu on edge instance:
 
 <p align="center"> 
-    <img src="doc/reupload_key_action.png" alt="Reupload key action" width="400">
+    <img src="doc/reupload_key_action.png" alt="Reupload key action" width="200">
 </p>
 
 After that similar to create initial environment dialog appeared where you can upload new key or generate new key-pair:
diff --git a/build.properties b/build.properties
index 237962e..5ab4a3d 100644
--- a/build.properties
+++ b/build.properties
@@ -1 +1,19 @@
-dlab.version=2.0.3
\ No newline at end of file
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+dlab.version=2.1
\ No newline at end of file
diff --git a/doc/.DS_Store b/doc/.DS_Store
index 75779ba..3a993d5 100644
--- a/doc/.DS_Store
+++ b/doc/.DS_Store
Binary files differ
diff --git a/doc/azure_dlab_arch.png b/doc/azure_dlab_arch.png
index f9f7e07..60e19f6 100644
--- a/doc/azure_dlab_arch.png
+++ b/doc/azure_dlab_arch.png
Binary files differ
diff --git a/doc/azure_offer_number.png b/doc/azure_offer_number.png
old mode 100755
new mode 100644
index 7cce409..1536fed
--- a/doc/azure_offer_number.png
+++ b/doc/azure_offer_number.png
Binary files differ
diff --git a/doc/backup_options.png b/doc/backup_options.png
index cf8ffe5..c7a6ed7 100644
--- a/doc/backup_options.png
+++ b/doc/backup_options.png
Binary files differ
diff --git a/doc/billing_datepicker.png b/doc/billing_datepicker.png
index 12932b0..8810423 100644
--- a/doc/billing_datepicker.png
+++ b/doc/billing_datepicker.png
Binary files differ
diff --git a/doc/billing_filter.png b/doc/billing_filter.png
index 6949160..09a0acd 100644
--- a/doc/billing_filter.png
+++ b/doc/billing_filter.png
Binary files differ
diff --git a/doc/billing_page.png b/doc/billing_page.png
index cd6b392..cc08102 100644
--- a/doc/billing_page.png
+++ b/doc/billing_page.png
Binary files differ
diff --git a/doc/close to limit.png b/doc/close to limit.png
new file mode 100644
index 0000000..ad6fd0a
--- /dev/null
+++ b/doc/close to limit.png
Binary files differ
diff --git a/doc/computational_scheduler.png b/doc/computational_scheduler.png
index 33981cd..b00c626 100644
--- a/doc/computational_scheduler.png
+++ b/doc/computational_scheduler.png
Binary files differ
diff --git a/doc/computational_scheduler_create.png b/doc/computational_scheduler_create.png
index 70044d4..463351d 100644
--- a/doc/computational_scheduler_create.png
+++ b/doc/computational_scheduler_create.png
Binary files differ
diff --git a/doc/cpu.png b/doc/cpu.png
new file mode 100644
index 0000000..01df805
--- /dev/null
+++ b/doc/cpu.png
Binary files differ
diff --git a/doc/create_ami.png b/doc/create_ami.png
new file mode 100644
index 0000000..60bd7ff
--- /dev/null
+++ b/doc/create_ami.png
Binary files differ
diff --git a/doc/create_notebook_from_ami.png b/doc/create_notebook_from_ami.png
new file mode 100644
index 0000000..7e4453e
--- /dev/null
+++ b/doc/create_notebook_from_ami.png
Binary files differ
diff --git a/doc/cross_icon.png b/doc/cross_icon.png
index f648177..8f598f0 100644
--- a/doc/cross_icon.png
+++ b/doc/cross_icon.png
Binary files differ
diff --git a/doc/dataengine_creating_menu.png b/doc/dataengine_creating_menu.png
index 7764f57..e5294f0 100644
--- a/doc/dataengine_creating_menu.png
+++ b/doc/dataengine_creating_menu.png
Binary files differ
diff --git a/doc/delete_group.png b/doc/delete_group.png
new file mode 100644
index 0000000..d5c38e3
--- /dev/null
+++ b/doc/delete_group.png
Binary files differ
diff --git a/doc/edge_stop.png b/doc/edge_stop.png
index 3073666..7f5bf6a 100644
--- a/doc/edge_stop.png
+++ b/doc/edge_stop.png
Binary files differ
diff --git a/doc/edge_stop_confirm.png b/doc/edge_stop_confirm.png
index fc2e869..20ff9a4 100644
--- a/doc/edge_stop_confirm.png
+++ b/doc/edge_stop_confirm.png
Binary files differ
diff --git a/doc/emr_create.png b/doc/emr_create.png
index 6a23c99..2e74bb0 100644
--- a/doc/emr_create.png
+++ b/doc/emr_create.png
Binary files differ
diff --git a/doc/emr_create_configuration.png b/doc/emr_create_configuration.png
new file mode 100644
index 0000000..61c1a2a
--- /dev/null
+++ b/doc/emr_create_configuration.png
Binary files differ
diff --git a/doc/emr_creating.png b/doc/emr_creating.png
index dcdcd14..7fb7fde 100644
--- a/doc/emr_creating.png
+++ b/doc/emr_creating.png
Binary files differ
diff --git a/doc/emr_info.png b/doc/emr_info.png
index e2a4df1..860cb74 100644
--- a/doc/emr_info.png
+++ b/doc/emr_info.png
Binary files differ
diff --git a/doc/environment_management.png b/doc/environment_management.png
index 3f4d11e..e4c2cda 100644
--- a/doc/environment_management.png
+++ b/doc/environment_management.png
Binary files differ
diff --git a/doc/exceeded quota.png b/doc/exceeded quota.png
new file mode 100644
index 0000000..4ba7a18
--- /dev/null
+++ b/doc/exceeded quota.png
Binary files differ
diff --git a/doc/filter_icon.png b/doc/filter_icon.png
index 2ba675c..e0c2a3e 100644
--- a/doc/filter_icon.png
+++ b/doc/filter_icon.png
Binary files differ
diff --git a/doc/gear_icon.png b/doc/gear_icon.png
index 85fe52c..b4c7c57 100644
--- a/doc/gear_icon.png
+++ b/doc/gear_icon.png
Binary files differ
diff --git a/doc/git_ui_link.png b/doc/git_ui_link.png
deleted file mode 100644
index 5d89653..0000000
--- a/doc/git_ui_link.png
+++ /dev/null
Binary files differ
diff --git a/doc/hdd.png b/doc/hdd.png
new file mode 100644
index 0000000..b0f95da
--- /dev/null
+++ b/doc/hdd.png
Binary files differ
diff --git a/doc/health_status.png b/doc/health_status.png
index 102939a..c5bbf36 100644
--- a/doc/health_status.png
+++ b/doc/health_status.png
Binary files differ
diff --git a/doc/icon_scheduler_computational.png b/doc/icon_scheduler_computational.png
index 376526f..04f2b25 100644
--- a/doc/icon_scheduler_computational.png
+++ b/doc/icon_scheduler_computational.png
Binary files differ
diff --git a/doc/install_libs_form.png b/doc/install_libs_form.png
index ab80fae..2cf09f6 100644
--- a/doc/install_libs_form.png
+++ b/doc/install_libs_form.png
Binary files differ
diff --git a/doc/jupiter.png b/doc/jupiter.png
index 15ebbe0..2db0289 100644
--- a/doc/jupiter.png
+++ b/doc/jupiter.png
Binary files differ
diff --git a/doc/logical_architecture.png b/doc/logical_architecture.png
index 89dc7eb..2ec30cc 100644
--- a/doc/logical_architecture.png
+++ b/doc/logical_architecture.png
Binary files differ
diff --git a/doc/main_menu.png b/doc/main_menu.png
index af4e63e..dd891ba 100644
--- a/doc/main_menu.png
+++ b/doc/main_menu.png
Binary files differ
diff --git a/doc/main_menu_env.png b/doc/main_menu_env.png
index a4dcb7a..41690d3 100644
--- a/doc/main_menu_env.png
+++ b/doc/main_menu_env.png
Binary files differ
diff --git a/doc/main_page_filter.png b/doc/main_page_filter.png
index 018a1de..5818548 100644
--- a/doc/main_page_filter.png
+++ b/doc/main_page_filter.png
Binary files differ
diff --git a/doc/manage_env_actions.png b/doc/manage_env_actions.png
index 7d56fb7..3d8c0a0 100644
--- a/doc/manage_env_actions.png
+++ b/doc/manage_env_actions.png
Binary files differ
diff --git a/doc/manage_env_confirm.png b/doc/manage_env_confirm.png
index 3a2f474..91f3d30 100644
--- a/doc/manage_env_confirm.png
+++ b/doc/manage_env_confirm.png
Binary files differ
diff --git a/doc/manage_env_confirm2.png b/doc/manage_env_confirm2.png
index a7a75eb..c0dd80a 100644
--- a/doc/manage_env_confirm2.png
+++ b/doc/manage_env_confirm2.png
Binary files differ
diff --git a/doc/manage_environment.png b/doc/manage_environment.png
index 0291331..ead01e1 100644
--- a/doc/manage_environment.png
+++ b/doc/manage_environment.png
Binary files differ
diff --git a/doc/manage_role.png b/doc/manage_role.png
new file mode 100644
index 0000000..152cf7c
--- /dev/null
+++ b/doc/manage_role.png
Binary files differ
diff --git a/doc/managemanage_resource_actions.png b/doc/managemanage_resource_actions.png
index efad660..23c58d4 100644
--- a/doc/managemanage_resource_actions.png
+++ b/doc/managemanage_resource_actions.png
Binary files differ
diff --git a/doc/memory.png b/doc/memory.png
new file mode 100644
index 0000000..72c90cf
--- /dev/null
+++ b/doc/memory.png
Binary files differ
diff --git a/doc/notebook_create.png b/doc/notebook_create.png
index 8930841..18a674b 100644
--- a/doc/notebook_create.png
+++ b/doc/notebook_create.png
Binary files differ
diff --git a/doc/notebook_info.png b/doc/notebook_info.png
index 74cb4d9..4cc01a2 100644
--- a/doc/notebook_info.png
+++ b/doc/notebook_info.png
Binary files differ
diff --git a/doc/notebook_libs_status.png b/doc/notebook_libs_status.png
index 13e4ba4..5f49722 100644
--- a/doc/notebook_libs_status.png
+++ b/doc/notebook_libs_status.png
Binary files differ
diff --git a/doc/notebook_list_libs.png b/doc/notebook_list_libs.png
index bc5d180..fea4d47 100644
--- a/doc/notebook_list_libs.png
+++ b/doc/notebook_list_libs.png
Binary files differ
diff --git a/doc/notebook_menu.png b/doc/notebook_menu.png
index 6a82dc4..4a2c426 100644
--- a/doc/notebook_menu.png
+++ b/doc/notebook_menu.png
Binary files differ
diff --git a/doc/notebook_menu_create_ami.png b/doc/notebook_menu_create_ami.png
new file mode 100644
index 0000000..49f101d
--- /dev/null
+++ b/doc/notebook_menu_create_ami.png
Binary files differ
diff --git a/doc/notebook_menu_manage_libraries.png b/doc/notebook_menu_manage_libraries.png
index 11b0515..1db4614 100644
--- a/doc/notebook_menu_manage_libraries.png
+++ b/doc/notebook_menu_manage_libraries.png
Binary files differ
diff --git a/doc/notebook_menu_scheduler.png b/doc/notebook_menu_scheduler.png
index 4d0cc36..b842fa8 100644
--- a/doc/notebook_menu_scheduler.png
+++ b/doc/notebook_menu_scheduler.png
Binary files differ
diff --git a/doc/notebook_menu_stop.png b/doc/notebook_menu_stop.png
index 3f0460d..9907bcc 100644
--- a/doc/notebook_menu_stop.png
+++ b/doc/notebook_menu_stop.png
Binary files differ
diff --git a/doc/notebook_scheduler.png b/doc/notebook_scheduler.png
index 19f1a11..31bd9ac 100644
--- a/doc/notebook_scheduler.png
+++ b/doc/notebook_scheduler.png
Binary files differ
diff --git a/doc/notebook_select_lib.png b/doc/notebook_select_lib.png
index bc5f052..610524f 100644
--- a/doc/notebook_select_lib.png
+++ b/doc/notebook_select_lib.png
Binary files differ
diff --git a/doc/notebook_selected_libs.png b/doc/notebook_selected_libs.png
index 3762ebc..f38afeb 100644
--- a/doc/notebook_selected_libs.png
+++ b/doc/notebook_selected_libs.png
Binary files differ
diff --git a/doc/notebook_stop_confirm.png b/doc/notebook_stop_confirm.png
index 25b9d1a..49adc3c 100644
--- a/doc/notebook_stop_confirm.png
+++ b/doc/notebook_stop_confirm.png
Binary files differ
diff --git a/doc/notebook_terminated.png b/doc/notebook_terminated.png
index ba20af5..fb6399b 100644
--- a/doc/notebook_terminated.png
+++ b/doc/notebook_terminated.png
Binary files differ
diff --git a/doc/notebook_terminating.png b/doc/notebook_terminating.png
index a4eec73..d20b967 100644
--- a/doc/notebook_terminating.png
+++ b/doc/notebook_terminating.png
Binary files differ
diff --git a/doc/physical_architecture.png b/doc/physical_architecture.png
index be8f28e..879e6cf 100644
--- a/doc/physical_architecture.png
+++ b/doc/physical_architecture.png
Binary files differ
diff --git a/doc/reupload_key_action.png b/doc/reupload_key_action.png
index fff823f..b188eed 100644
--- a/doc/reupload_key_action.png
+++ b/doc/reupload_key_action.png
Binary files differ
diff --git a/doc/reupload_key_dialog.png b/doc/reupload_key_dialog.png
index e46b40e..12ba0e4 100644
--- a/doc/reupload_key_dialog.png
+++ b/doc/reupload_key_dialog.png
Binary files differ
diff --git a/doc/rstudio.png b/doc/rstudio.png
index 028a7c0..6f98092 100644
--- a/doc/rstudio.png
+++ b/doc/rstudio.png
Binary files differ
diff --git a/doc/scheduler reminder.png b/doc/scheduler reminder.png
new file mode 100644
index 0000000..d62bebc
--- /dev/null
+++ b/doc/scheduler reminder.png
Binary files differ
diff --git a/doc/select_shape.png b/doc/select_shape.png
index 7ef4ae4..989dcac 100644
--- a/doc/select_shape.png
+++ b/doc/select_shape.png
Binary files differ
diff --git a/doc/sort_icon.png b/doc/sort_icon.png
index 5510432..95cb5d8 100644
--- a/doc/sort_icon.png
+++ b/doc/sort_icon.png
Binary files differ
diff --git a/doc/spark_stop_confirm.png b/doc/spark_stop_confirm.png
index cc0596b..59b6bf9 100644
--- a/doc/spark_stop_confirm.png
+++ b/doc/spark_stop_confirm.png
Binary files differ
diff --git a/doc/status_icon_error.png b/doc/status_icon_error.png
index b5c11a3..93b2ffb 100644
--- a/doc/status_icon_error.png
+++ b/doc/status_icon_error.png
Binary files differ
diff --git a/doc/status_icon_ok.png b/doc/status_icon_ok.png
index 645329d..61836b7 100644
--- a/doc/status_icon_ok.png
+++ b/doc/status_icon_ok.png
Binary files differ
diff --git a/doc/stop_icon.png b/doc/stop_icon.png
index 507cf3a..c7a25c0 100644
--- a/doc/stop_icon.png
+++ b/doc/stop_icon.png
Binary files differ
diff --git a/doc/stop_icon_env.png b/doc/stop_icon_env.png
new file mode 100644
index 0000000..2627c93
--- /dev/null
+++ b/doc/stop_icon_env.png
Binary files differ
diff --git a/doc/terminate_icon_env.png b/doc/terminate_icon_env.png
new file mode 100644
index 0000000..6ead5cc
--- /dev/null
+++ b/doc/terminate_icon_env.png
Binary files differ
diff --git a/doc/test.png b/doc/test.png
deleted file mode 100644
index 024730a..0000000
--- a/doc/test.png
+++ /dev/null
Binary files differ
diff --git a/doc/ungit_changes.png b/doc/ungit_changes.png
old mode 100755
new mode 100644
index 1ada06b..84f5d7b
--- a/doc/ungit_changes.png
+++ b/doc/ungit_changes.png
Binary files differ
diff --git a/doc/ungit_push.png b/doc/ungit_push.png
old mode 100755
new mode 100644
index 36dced6..aa7fa9f
--- a/doc/ungit_push.png
+++ b/doc/ungit_push.png
Binary files differ
diff --git a/doc/ungit_window.png b/doc/ungit_window.png
old mode 100755
new mode 100644
index a5c857d..13b886f
--- a/doc/ungit_window.png
+++ b/doc/ungit_window.png
Binary files differ
diff --git a/doc/ungit_work.png b/doc/ungit_work.png
old mode 100755
new mode 100644
index d9d24b0..b11340d
--- a/doc/ungit_work.png
+++ b/doc/ungit_work.png
Binary files differ
diff --git a/doc/upload_or_generate_user_key.png b/doc/upload_or_generate_user_key.png
index 9254b4c..2766334 100644
--- a/doc/upload_or_generate_user_key.png
+++ b/doc/upload_or_generate_user_key.png
Binary files differ
diff --git a/doc/zeppelin.png b/doc/zeppelin.png
index 9e56e40..6f4052f 100644
--- a/doc/zeppelin.png
+++ b/doc/zeppelin.png
Binary files differ
diff --git a/infrastructure-provisioning/scripts/deploy_dlab.py b/infrastructure-provisioning/scripts/deploy_dlab.py
index bc8e87d..23576ff 100644
--- a/infrastructure-provisioning/scripts/deploy_dlab.py
+++ b/infrastructure-provisioning/scripts/deploy_dlab.py
@@ -1,18 +1,22 @@
 #!/usr/bin/python
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#    http://www.apache.org/licenses/LICENSE-2.0
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -23,12 +27,19 @@
 
 parser = argparse.ArgumentParser()
 parser.add_argument('--conf_service_base_name', type=str, help='unique name for DLab environment')
-parser.add_argument('--conf_network_type', type=str, default='', help='Define in which network DLab will be deployed. Possible options: public|private')
+parser.add_argument('--conf_network_type', type=str, default='', help='Define in which network DLab will be deployed. '
+                                                                      'Possible options: public|private')
 parser.add_argument('--conf_vpc_cidr', type=str, default='', help='CIDR of VPC')
-parser.add_argument('--conf_allowed_ip_cidr', type=str, default='', help='CIDR of IPs which will have access to SSN')
-parser.add_argument('--conf_user_subnets_range', type=str, default='', help='Range of subnets which will be using for users environments. For example: 10.10.0.0/24 - 10.10.10.0/24')
-parser.add_argument('--conf_additional_tags', type=str, default='', help='Additional tags in format "Key1:Value1;Key2:Value2"')
-parser.add_argument('--aws_user_predefined_s3_policies', type=str, default='', help='Predefined policies for users instances')
+parser.add_argument('--conf_vpc2_cidr', type=str, default='', help='CIDR of secondary VPC')
+parser.add_argument('--conf_allowed_ip_cidr', type=str, default='', help='Comma-separated CIDR of IPs which will have '
+                                                                         'access to SSN')
+parser.add_argument('--conf_user_subnets_range', type=str, default='', help='Range of subnets which will be using for '
+                                                                            'users environments. For example: '
+                                                                            '10.10.0.0/24 - 10.10.10.0/24')
+parser.add_argument('--conf_additional_tags', type=str, default='', help='Additional tags in format '
+                                                                         '"Key1:Value1;Key2:Value2"')
+parser.add_argument('--aws_user_predefined_s3_policies', type=str, default='', help='Predefined policies for users '
+                                                                                    'instances')
 parser.add_argument('--aws_access_key', type=str, default='', help='AWS Access Key ID')
 parser.add_argument('--aws_secret_access_key', type=str, default='', help='AWS Secret Access Key')
 parser.add_argument('--aws_region', type=str, default='', help='AWS region')
@@ -39,15 +50,28 @@
                     help='Operating system type. Available options: debian, redhat')
 parser.add_argument('--conf_cloud_provider', type=str, default='',
                     help='Where DLab should be deployed. Available options: aws, azure, gcp')
+parser.add_argument('--ssn_hosted_zone_name', type=str, default='', help='Name of hosted zone')
+parser.add_argument('--ssn_hosted_zone_id', type=str, default='', help='ID of hosted zone')
+parser.add_argument('--ssn_subdomain', type=str, default='', help='Subdomain name')
+parser.add_argument('--ssn_assume_role_arn', type=str, default='', help='Role ARN for creating Route53 record in '
+                                                                        'different AWS account')
+parser.add_argument('--ssl_cert_path', type=str, default='', help='Full path to SSL certificate')
+parser.add_argument('--ssl_key_path', type=str, default='', help='Full path to SSL certificate')
 parser.add_argument('--aws_vpc_id', type=str, default='', help='AWS VPC ID')
+parser.add_argument('--conf_duo_vpc_enable', type=str, default='false', help='Duo VPC scheme enable(true|false)')
+parser.add_argument('--aws_vpc2_id', type=str, default='', help='Secondary AWS VPC ID')
+parser.add_argument('--aws_peering_id', type=str, default='', help='Amazon peering connection id')
 parser.add_argument('--azure_vpc_name', type=str, default='', help='Azure VPC Name')
 parser.add_argument('--gcp_vpc_name', type=str, default='', help='GCP VPC Name')
 parser.add_argument('--aws_subnet_id', type=str, default='', help='AWS Subnet ID')
 parser.add_argument('--azure_subnet_name', type=str, default='', help='Azure Subnet Name')
 parser.add_argument('--gcp_subnet_name', type=str, default='', help='GCP Subnet Name')
-parser.add_argument('--aws_security_groups_ids', type=str, default='', help='One of more comma-separated Security groups IDs for SSN')
-parser.add_argument('--azure_security_group_name', type=str, default='', help='One of more comma-separated Security groups names for SSN')
-parser.add_argument('--gcp_firewall_name', type=str, default='', help='One of more comma-separated GCP Firewall rules for SSN')
+parser.add_argument('--aws_security_groups_ids', type=str, default='', help='One of more comma-separated Security '
+                                                                            'groups IDs for SSN')
+parser.add_argument('--azure_security_group_name', type=str, default='', help='One of more comma-separated Security '
+                                                                              'groups names for SSN')
+parser.add_argument('--gcp_firewall_name', type=str, default='', help='One of more comma-separated GCP Firewall rules '
+                                                                      'for SSN')
 parser.add_argument('--key_path', type=str, default='', help='Path to admin key (WITHOUT KEY NAME)')
 parser.add_argument('--conf_key_name', type=str, default='', help='Admin key name (WITHOUT ".pem")')
 parser.add_argument('--workspace_path', type=str, default='', help='Admin key name (WITHOUT ".pem")')
@@ -56,9 +80,12 @@
 parser.add_argument('--azure_ssn_instance_size', type=str, default='Standard_DS2_v2', help='The SSN instance shape')
 parser.add_argument('--gcp_ssn_instance_size', type=str, default='n1-standard-2', help='The SSN instance shape')
 parser.add_argument('--aws_account_id', type=str, default='', help='The ID of Amazon account')
-parser.add_argument('--aws_billing_bucket', type=str, default='', help='The name of S3 bucket where billing reports will be placed.')
-parser.add_argument('--aws_job_enabled', type=str, default='false', help='Billing format. Available options: true (aws), false(epam)')
-parser.add_argument('--aws_report_path', type=str, default='', help='The path to billing reports directory in S3 bucket')
+parser.add_argument('--aws_billing_bucket', type=str, default='', help='The name of S3 bucket where billing reports '
+                                                                       'will be placed.')
+parser.add_argument('--aws_job_enabled', type=str, default='false', help='Billing format. Available options: '
+                                                                         'true (aws), false(epam)')
+parser.add_argument('--aws_report_path', type=str, default='', help='The path to billing reports directory in S3 '
+                                                                    'bucket')
 parser.add_argument('--azure_resource_group_name', type=str, default='', help='Name of Resource group in Azure')
 parser.add_argument('--azure_auth_path', type=str, default='', help='Full path to Azure credentials JSON file')
 parser.add_argument('--azure_datalake_enable', type=str, default='', help='Provision DataLake storage account')
@@ -67,24 +94,36 @@
 parser.add_argument('--azure_currency', type=str, default='', help='Azure currency code')
 parser.add_argument('--azure_locale', type=str, default='', help='Azure locale')
 parser.add_argument('--azure_application_id', type=str, default='', help='Azure login application ID')
-parser.add_argument('--azure_validate_permission_scope', type=str, default='true', help='Azure permission scope validation(true|false).')
+parser.add_argument('--azure_validate_permission_scope', type=str, default='true', help='Azure permission scope '
+                                                                                        'validation(true|false).')
 parser.add_argument('--azure_oauth2_enabled', type=str, default='false', help='Using OAuth2 for logging in DLab')
 parser.add_argument('--azure_region_info', type=str, default='', help='Azure region info')
+parser.add_argument('--azure_source_vpc_name', type=str, default='', help='Azure VPC source Name')
+parser.add_argument('--azure_source_resource_group_name', type=str, default='', help='Azure source resource group')
 parser.add_argument('--gcp_project_id', type=str, default='', help='The project ID in Google Cloud Platform')
 parser.add_argument('--gcp_service_account_path', type=str, default='', help='The project ID in Google Cloud Platform')
-parser.add_argument('--dlab_id', type=str, default="'user:user:tag'", help='Column name in report file that contains dlab id tag')
-parser.add_argument('--usage_date', type=str, default='UsageStartDate', help='Column name in report file that contains usage date tag')
-parser.add_argument('--product', type=str, default='ProductName', help='Column name in report file that contains product name tag')
-parser.add_argument('--usage_type', type=str, default='UsageType', help='Column name in report file that contains usage type tag')
-parser.add_argument('--usage', type=str, default='UsageQuantity', help='Column name in report file that contains usage tag')
+parser.add_argument('--dlab_id', type=str, default="'user:user:tag'", help='Column name in report file that contains '
+                                                                           'dlab id tag')
+parser.add_argument('--usage_date', type=str, default='UsageStartDate', help='Column name in report file that contains '
+                                                                             'usage date tag')
+parser.add_argument('--product', type=str, default='ProductName', help='Column name in report file that contains '
+                                                                       'product name tag')
+parser.add_argument('--usage_type', type=str, default='UsageType', help='Column name in report file that contains '
+                                                                        'usage type tag')
+parser.add_argument('--usage', type=str, default='UsageQuantity', help='Column name in report file that contains '
+                                                                       'usage tag')
 parser.add_argument('--cost', type=str, default='BlendedCost', help='Column name in report file that contains cost tag')
-parser.add_argument('--resource_id', type=str, default='ResourceId', help='Column name in report file that contains dlab resource id tag')
-parser.add_argument('--ldap_hostname', type=str, default='', help='Ldap instance hostname')
-parser.add_argument('--ldap_dn', type=str, default='', help='Ldap distinguished name (dc=example,dc=com)')
-parser.add_argument('--ldap_ou', type=str, default='', help='Ldap organisation unit (ou=People)')
-parser.add_argument('--ldap_service_username', type=str, default='', help='Ldap admin user name')
-parser.add_argument('--ldap_service_password', type=str, default='', help='Ldap password for admin user')
-parser.add_argument('--tags', type=str, default='Operation,ItemDescription', help='Column name in report file that contains tags')
+parser.add_argument('--resource_id', type=str, default='ResourceId', help='Column name in report file that contains '
+                                                                          'dlab resource id tag')
+parser.add_argument('--ldap_hostname', type=str, default='localhost', help='Ldap instance hostname')
+parser.add_argument('--ldap_dn', type=str, default='dc=example,dc=com',
+                    help='Ldap distinguished name')
+parser.add_argument('--ldap_ou', type=str, default='ou=People', help='Ldap organisation unit')
+parser.add_argument('--ldap_service_username', type=str, default='cn=service-user', help='Ldap service user name')
+parser.add_argument('--ldap_service_password', type=str, default='service-user-password',
+                    help='Ldap password for admin user')
+parser.add_argument('--tags', type=str, default='Operation,ItemDescription', help='Column name in report file that '
+                                                                                  'contains tags')
 parser.add_argument('--action', required=True, type=str, default='', choices=['build', 'deploy', 'create', 'terminate'],
                     help='Available options: build, deploy, create, terminate')
 args = parser.parse_args()
@@ -93,15 +132,23 @@
 def generate_docker_command():
     docker_command = ''
     command = []
-    command.append('sudo docker run -i -v {0}{1}.pem:/root/keys/{1}.pem -v {2}/web_app:/root/web_app '.
-                   format(args.key_path, args.conf_key_name, args.workspace_path))
+    if args.action == 'terminate':
+        command.append('sudo docker run -i ')
+    else:
+        command.append('sudo docker run -i -v {0}{1}.pem:/root/keys/{1}.pem -v {2}/web_app:/root/web_app '.
+                       format(args.key_path, args.conf_key_name, args.workspace_path))
     if args.conf_cloud_provider == 'azure':
         command.append('-v {}:/root/azure_auth.json '.format(args.azure_auth_path))
     elif args.conf_cloud_provider == 'gcp':
         command.append('-v {}:/root/service_account.json '.format(args.gcp_service_account_path))
+    if args.ssl_cert_path != '' and args.ssl_key_path != '':
+        command.append('-v {}:/root/certs/dlab.crt -v {}:/root/certs/dlab.key '.format(args.ssl_cert_path,
+                                                                                       args.ssl_key_path))
     attrs = vars(args)
+    skipped_parameters = ['action', 'key_path', 'workspace_path', 'gcp_service_account_path', 'ssl_cert_path',
+                          'ssl_key_path']
     for i in attrs:
-        if attrs[i] and i != 'action' and i != 'key_path' and i != 'workspace_path' and i != 'gcp_service_account_path':
+        if attrs[i] and i not in skipped_parameters:
             command.append("-e '{}={}' ".format(i, attrs[i]))
     command.append('-e "conf_resource=ssn" ')
     command.append('docker.dlab-ssn ')
@@ -109,62 +156,17 @@
     return docker_command.join(command)
 
 
-def build_front_end(args):
-    # Building front-end
-    with lcd(args.workspace_path + '/services/self-service/src/main/resources/webapp/'):
-        local('sed -i "s|CLOUD_PROVIDER|{}|g" src/dictionary/global.dictionary.ts'.format(args.conf_cloud_provider))
-
-        if args.conf_cloud_provider == 'azure' and args.azure_datalake_enable == 'true':
-            local('sed -i "s|\'use_ldap\': true|{}|g" src/dictionary/azure.dictionary.ts'.format('\'use_ldap\': false'))
-
-        local('npm install')
-        local('npm run build.prod')
-        local('sudo chown -R {} {}/*'.format(os.environ['USER'], args.workspace_path))
-
-
-def build_services():
-    # Building provisioning-service, security-service, self-service, billing
-    local('mvn -P{} -DskipTests package'.format(args.conf_cloud_provider))
-
-
 def build_docker_images(args):
     # Building base and ssn docker images
-    with lcd(args.workspace_path + '/infrastructure-provisioning/src/'):
-        local('sudo docker build --build-arg OS={0} --file general/files/{1}/base_Dockerfile '
-              '-t docker.dlab-base .'.format(args.conf_os_family, args.conf_cloud_provider))
-        local('sudo docker build --build-arg OS={0} --file general/files/{1}/ssn_Dockerfile '
-              '-t docker.dlab-ssn .'.format(args.conf_os_family, args.conf_cloud_provider))
+    with lcd(args.workspace_path):
+        local('sudo docker build --build-arg OS={0} --build-arg SRC_PATH="infrastructure-provisioning/src/" --file '
+              'infrastructure-provisioning/src/general/files/{1}/'
+              'base_Dockerfile -t docker.dlab-base .'.format(args.conf_os_family, args.conf_cloud_provider))
+        local('sudo docker build --build-arg OS={0} --file infrastructure-provisioning/src/general/files/{1}/'
+              'ssn_Dockerfile -t docker.dlab-ssn .'.format(args.conf_os_family, args.conf_cloud_provider))
 
 
 def deploy_dlab(args):
-    # Preparing files for deployment
-
-    local('mkdir -p {}/web_app'.format(args.workspace_path))
-    local('mkdir -p {}/web_app/provisioning-service/'.format(args.workspace_path))
-    local('mkdir -p {}/web_app/security-service/'.format(args.workspace_path))
-    local('mkdir -p {}/web_app/self-service/'.format(args.workspace_path))
-    local('mkdir -p {}/web_app/billing/'.format(args.workspace_path))
-    local('cp {0}/services/self-service/self-service.yml {0}/web_app/self-service/'.format(args.workspace_path))
-    local('cp {0}/services/self-service/target/self-service-*.jar {0}/web_app/self-service/'.
-        format(args.workspace_path))
-    local('cp {0}/services/provisioning-service/provisioning.yml {0}/web_app/provisioning-service/'.
-        format(args.workspace_path))
-    local('cp {0}/services/provisioning-service/target/provisioning-service-*.jar {0}/web_app/provisioning-service/'.
-        format(args.workspace_path))
-    local('cp {0}/services/security-service/security.yml {0}/web_app/security-service/'.format(args.workspace_path))
-    local('cp {0}/services/security-service/target/security-service-*.jar {0}/web_app/security-service/'.
-        format(args.workspace_path))
-
-    if args.conf_cloud_provider == 'azure':
-        local('cp {0}/services/billing-azure/billing.yml {0}/web_app/billing/'.format(args.workspace_path))
-        local('cp {0}/services/billing-azure/target/billing-azure*.jar {0}/web_app/billing/'.format(args.workspace_path))
-    elif args.conf_cloud_provider == 'aws':
-        local('cp {0}/services/billing-aws/billing.yml {0}/web_app/billing/'.format(args.workspace_path))
-        local('cp {0}/services/billing-aws/target/billing-aws*.jar {0}/web_app/billing/'.format(args.workspace_path))
-    elif args.conf_cloud_provider == 'gcp':
-        local('cp {0}/services/billing-gcp/billing.yml {0}/web_app/billing/'.format(args.workspace_path))
-        local('cp {0}/services/billing-gcp/target/billing-gcp*.jar {0}/web_app/billing/'.format(args.workspace_path))
-
     # Creating SSN node
     docker_command = generate_docker_command()
     local(docker_command)
@@ -181,14 +183,10 @@
         print("Workspace path isn't set, using current directory: {}".format(os.environ['PWD']))
         args.workspace_path = os.environ['PWD']
     if args.action == 'build':
-        build_front_end(args)
-        build_services()
         build_docker_images(args)
     elif args.action == 'deploy':
         deploy_dlab(args)
     elif args.action == 'create':
-        build_front_end(args)
-        build_services()
         build_docker_images(args)
         deploy_dlab(args)
     elif args.action == 'terminate':
diff --git a/infrastructure-provisioning/src/base/entrypoint.py b/infrastructure-provisioning/src/base/entrypoint.py
index 9aa3985..7bb848d 100644
--- a/infrastructure-provisioning/src/base/entrypoint.py
+++ b/infrastructure-provisioning/src/base/entrypoint.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -44,6 +47,7 @@
     else:
         return "{}"
 
+
 if __name__ == "__main__":
     # Get request ID as if it will need everywhere
     request_id = 'ssn'
@@ -103,7 +107,8 @@
         pass
 
     with hide('running'):
-        local('chmod 600 /root/keys/*.pem')
+        if args.action != 'terminate':
+            local('chmod 600 /root/keys/*.pem')
 
     if dry_run:
         with open("/response/{}.json".format(request_id), 'w') as response_file:
@@ -168,4 +173,8 @@
 
     elif args.action == 'terminate_image':
         with hide('running'):
-            local("/bin/terminate_image.py")
\ No newline at end of file
+            local("/bin/terminate_image.py")
+
+    elif args.action == 'reconfigure_spark':
+        with hide('running'):
+            local("/bin/reconfigure_spark.py")
diff --git a/infrastructure-provisioning/src/base/scripts/create_ssh_user.py b/infrastructure-provisioning/src/base/scripts/create_ssh_user.py
index efd9acc..482eb2c 100644
--- a/infrastructure-provisioning/src/base/scripts/create_ssh_user.py
+++ b/infrastructure-provisioning/src/base/scripts/create_ssh_user.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/base/scripts/install_prerequisites.py b/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
index 7ad6554..661efb3 100644
--- a/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
+++ b/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -60,13 +63,13 @@
         change_pkg_repos()
         create_china_pip_conf_file()
 
+    print("Updating hosts file")
+    update_hosts_file(args.user)
+
     print("Updating repositories and installing requested tools.")
-    if not ensure_pkg(args.user):
-        sys.exit(1)
+    ensure_pkg(args.user)
 
     print("Installing python packages: {}".format(args.pip_packages))
-    if not ensure_pip(args.pip_packages):
-        sys.exit(1)
+    ensure_pip(args.pip_packages)
 
-    sys.exit(0)
 
diff --git a/infrastructure-provisioning/src/base/scripts/install_user_key.py b/infrastructure-provisioning/src/base/scripts/install_user_key.py
index 3c92e39..d026a0b 100644
--- a/infrastructure-provisioning/src/base/scripts/install_user_key.py
+++ b/infrastructure-provisioning/src/base/scripts/install_user_key.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -64,11 +67,7 @@
         sys.exit(2)
 
     print("Ensuring safest ssh ciphers")
-    try:
-        ensure_ciphers()
-    except:
-        print("Failed ensure ciphers")
-        sys.exit(1)
+    ensure_ciphers()
 
     print("Installing users key...")
     try:
diff --git a/infrastructure-provisioning/src/dataengine-service/fabfile.py b/infrastructure-provisioning/src/dataengine-service/fabfile.py
index 7a63f01..c21555b 100644
--- a/infrastructure-provisioning/src/dataengine-service/fabfile.py
+++ b/infrastructure-provisioning/src/dataengine-service/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/dataengine/fabfile.py b/infrastructure-provisioning/src/dataengine/fabfile.py
index 9cfe9b4..319c6f1 100644
--- a/infrastructure-provisioning/src/dataengine/fabfile.py
+++ b/infrastructure-provisioning/src/dataengine/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -127,4 +130,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed terminating Data Engine.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for Data Engine
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('dataengine_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Data Engine.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py b/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py
index 16d7c51..9a4fb29 100644
--- a/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py
+++ b/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -147,7 +150,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir, '')
+    configure_local_spark(jars_dir, templates_dir, '')
 
     # INSTALL TENSORFLOW AND OTHER DEEP LEARNING LIBRARIES
     if os.environ['application'] in ('tensor', 'tensor-rstudio', 'deeplearning'):
diff --git a/infrastructure-provisioning/src/deeplearning/fabfile.py b/infrastructure-provisioning/src/deeplearning/fabfile.py
index a026c01..b1f8df8 100644
--- a/infrastructure-provisioning/src/deeplearning/fabfile.py
+++ b/infrastructure-provisioning/src/deeplearning/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -202,4 +205,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed to create image from notebook node.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for notebook
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('notebook_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Notebook node.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py b/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
index c277282..ec188ed 100644
--- a/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
+++ b/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -34,7 +37,6 @@
 parser.add_argument('--os_user', type=str, default='')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--jupyter_version', type=str, default='')
-parser.add_argument('--tensorflow_version', type=str, default='')
 parser.add_argument('--scala_version', type=str, default='')
 parser.add_argument('--spark_version', type=str, default='')
 parser.add_argument('--hadoop_version', type=str, default='')
@@ -53,13 +55,13 @@
 cmake_version = os.environ['notebook_cmake_version']
 cntk_version = os.environ['notebook_cntk_version']
 mxnet_version = os.environ['notebook_mxnet_version']
-keras_version = os.environ['notebook_keras_version']
+keras_version = '2.0.8'
 theano_version = os.environ['notebook_theano_version']
-
-cuda_version = os.environ['notebook_cuda_version']
-cuda_file_name = os.environ['notebook_cuda_file_name']
-cudnn_version = os.environ['notebook_cudnn_version']
-cudnn_file_name = os.environ['notebook_cudnn_file_name']
+tensorflow_version = '1.4.0'
+cuda_version = '8.0'
+cuda_file_name = 'cuda_8.0.44_linux-run'
+cudnn_version = '6.0'
+cudnn_file_name = 'cudnn-8.0-linux-x64-v6.0.tgz'
 
 if args.region == 'cn-north-1':
     spark_link = "http://mirrors.hust.edu.cn/apache/spark/spark-" + spark_version + "/spark-" + spark_version + \
@@ -113,7 +115,7 @@
     # INSTALL TENSORFLOW AND OTHER DEEP LEARNING LIBRARIES AND FRAMEWORKS
     print("Install TensorFlow")
     install_tensor(args.os_user, cuda_version, cuda_file_name,
-                   cudnn_version, cudnn_file_name, args.tensorflow_version,
+                   cudnn_version, cudnn_file_name, tensorflow_version,
                    templates_dir, nvidia_version)
     print("Install Theano")
     install_theano(args.os_user, theano_version)
@@ -140,7 +142,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir)
+    configure_local_spark(jars_dir, templates_dir)
 
     # INSTALL JUPYTER KERNELS
     print("Install pyspark local kernel for Jupyter")
diff --git a/infrastructure-provisioning/src/edge/fabfile.py b/infrastructure-provisioning/src/edge/fabfile.py
index 92cf771..6700117 100644
--- a/infrastructure-provisioning/src/edge/fabfile.py
+++ b/infrastructure-provisioning/src/edge/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/edge/scripts/configure_http_proxy.py b/infrastructure-provisioning/src/edge/scripts/configure_http_proxy.py
index 159bb5d..bad50ad 100644
--- a/infrastructure-provisioning/src/edge/scripts/configure_http_proxy.py
+++ b/infrastructure-provisioning/src/edge/scripts/configure_http_proxy.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -46,7 +49,4 @@
         sys.exit(2)
 
     print("Installing proxy for notebooks.")
-    if configure_http_proxy_server(deeper_config):
-        sys.exit(0)
-    else:
-        sys.exit(1)
+    configure_http_proxy_server(deeper_config)
diff --git a/infrastructure-provisioning/src/edge/scripts/configure_nginx_reverse_proxy.py b/infrastructure-provisioning/src/edge/scripts/configure_nginx_reverse_proxy.py
index 2d1815f..b7123a3 100644
--- a/infrastructure-provisioning/src/edge/scripts/configure_nginx_reverse_proxy.py
+++ b/infrastructure-provisioning/src/edge/scripts/configure_nginx_reverse_proxy.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/edge/scripts/reupload_ssh_key.py b/infrastructure-provisioning/src/edge/scripts/reupload_ssh_key.py
index d7b8e22..b853af5 100644
--- a/infrastructure-provisioning/src/edge/scripts/reupload_ssh_key.py
+++ b/infrastructure-provisioning/src/edge/scripts/reupload_ssh_key.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/edge/templates/conf.d/proxy.conf b/infrastructure-provisioning/src/edge/templates/conf.d/proxy.conf
index 5dee3b4..3c46029 100644
--- a/infrastructure-provisioning/src/edge/templates/conf.d/proxy.conf
+++ b/infrastructure-provisioning/src/edge/templates/conf.d/proxy.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 server {
     listen 80;
     server_name EDGE_IP;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/emr.conf b/infrastructure-provisioning/src/edge/templates/locations/emr.conf
index 88d88d4..56f1a29 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/emr.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/emr.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location /{{ CLUSTER_NAME }}/ {
     rewrite ^/{{ CLUSTER_NAME }}/{{ CLUSTER_NAME }}/(.*)$ /$1 break;
     rewrite ^/{{ CLUSTER_NAME }}/(.*)$ /$1 break;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/jupyter.conf b/infrastructure-provisioning/src/edge/templates/locations/jupyter.conf
index eac56be..56f98ed 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/jupyter.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/jupyter.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location ~* /{{ NAME }}/.* {
     proxy_pass http://{{ IP }}:8888;
     proxy_set_header Host $http_host;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/rstudio.conf b/infrastructure-provisioning/src/edge/templates/locations/rstudio.conf
index 9fd7b3e..4c63f97 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/rstudio.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/rstudio.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location /{{ NAME }}/ {
       rewrite ^/{{ NAME }}/(.*)$ /$1 break;
       proxy_pass http://{{ IP }}:8787;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/spark.conf b/infrastructure-provisioning/src/edge/templates/locations/spark.conf
index 6b15620..554de78 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/spark.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/spark.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location /{{ CLUSTER_NAME }}/ {
     rewrite ^/{{ CLUSTER_NAME }}/(.*)$ /$1 break;
     proxy_pass http://{{ MASTER_IP }}:8080;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/tensor.conf b/infrastructure-provisioning/src/edge/templates/locations/tensor.conf
index 96bee2a..f6df456 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/tensor.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/tensor.conf
@@ -1,4 +1,23 @@
-
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location /{{ NAME }}-tensor/ {
     rewrite ^/{{ NAME }}-tensor/(.*)$ /$1 break;
     proxy_pass http://{{ IP }}:6006;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/ungit.conf b/infrastructure-provisioning/src/edge/templates/locations/ungit.conf
index af31911..5b7b3ed 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/ungit.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/ungit.conf
@@ -1,4 +1,23 @@
-
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location ~* /{{ NAME }}-ungit/.* {
     proxy_pass http://{{ IP }}:8085;
     proxy_set_header Host $http_host;
diff --git a/infrastructure-provisioning/src/edge/templates/locations/zeppelin.conf b/infrastructure-provisioning/src/edge/templates/locations/zeppelin.conf
index 61537d5..231045e 100644
--- a/infrastructure-provisioning/src/edge/templates/locations/zeppelin.conf
+++ b/infrastructure-provisioning/src/edge/templates/locations/zeppelin.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 location /{{ NAME }}/ {
     rewrite ^/{{ NAME }}/(.*)$ /$1 break;
     proxy_pass http://{{ IP }}:8080;
diff --git a/infrastructure-provisioning/src/edge/templates/nginx.conf b/infrastructure-provisioning/src/edge/templates/nginx.conf
index 09ba937..b952858 100644
--- a/infrastructure-provisioning/src/edge/templates/nginx.conf
+++ b/infrastructure-provisioning/src/edge/templates/nginx.conf
@@ -1,3 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 user nginx;
 worker_processes auto;
 error_log /var/log/nginx/error.log;
diff --git a/infrastructure-provisioning/src/edge/templates/nginx_debian b/infrastructure-provisioning/src/edge/templates/nginx_debian
index 6205c5d..997bec9 100644
--- a/infrastructure-provisioning/src/edge/templates/nginx_debian
+++ b/infrastructure-provisioning/src/edge/templates/nginx_debian
@@ -1,4 +1,24 @@
 #!/bin/sh
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 
 ### BEGIN INIT INFO
 # Provides:       nginx
diff --git a/infrastructure-provisioning/src/edge/templates/nginx_redhat b/infrastructure-provisioning/src/edge/templates/nginx_redhat
index 67c260d..8f2c4c9 100644
--- a/infrastructure-provisioning/src/edge/templates/nginx_redhat
+++ b/infrastructure-provisioning/src/edge/templates/nginx_redhat
@@ -1,6 +1,27 @@
 #!/bin/sh
+# *****************************************************************************
 #
-# nginx - this script starts and stops the nginx daemin
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+#
+# nginx - this script starts and stops the nginx daemon
 #
 # chkconfig:   - 85 15
 # description:  Nginx is an HTTP(S) server, HTTP(S) reverse \
diff --git a/infrastructure-provisioning/src/edge/templates/squid.conf b/infrastructure-provisioning/src/edge/templates/squid.conf
index e17e39b..0129e00 100644
--- a/infrastructure-provisioning/src/edge/templates/squid.conf
+++ b/infrastructure-provisioning/src/edge/templates/squid.conf
@@ -1,15 +1,35 @@
-acl localhost src 127.0.0.1/32 ::1
-acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 
-acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
-acl localnet src PROXY_SUBNET  # RFC1918 possible internal network
-acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
-acl localnet src fc00::/7       # RFC 4193 local private network range
-acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
+auth_param basic program LDAP_AUTH_PATH -b "LDAP_DN" -D "LDAP_SERVICE_USERNAME,LDAP_DN" -w LDAP_SERVICE_PASSWORD -f uid=%s LDAP_HOST
+
+acl DLab_user_src_subnet src PROXY_SUBNET
+VPC_CIDRS
+ALLOWED_CIDRS
+
 
 acl SSL_ports port 443
 acl Safe_ports port 80          # http
 acl Safe_ports port 21          # ftp
+acl Safe_ports port 22          # ssh
 acl Safe_ports port 443         # https
 acl Safe_ports port 70          # gopher
 acl Safe_ports port 210         # wais
@@ -20,18 +40,23 @@
 acl Safe_ports port 777         # multiling http
 acl CONNECT method CONNECT
 
-http_access allow manager localhost localnet
-http_access deny manager
+acl ldap-auth proxy_auth EDGE_USER_NAME
+
 http_access deny !Safe_ports
-http_access deny CONNECT !SSL_ports
-http_access allow localnet
+http_access allow localhost manager
+http_access deny manager
+http_access allow DLab_user_src_subnet
+http_access allow AllowedCIDRS ldap-auth
 http_access allow localhost
 http_access deny all
 
 http_port 3128
 
+cache deny all
+cache_dir null /tmp
 coredump_dir /var/spool/squid
+
 refresh_pattern ^ftp:           1440    20%     10080
 refresh_pattern ^gopher:        1440    0%      1440
 refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
-refresh_pattern .               0       20%     4320
\ No newline at end of file
+refresh_pattern .               0       20%     4320
diff --git a/infrastructure-provisioning/src/general/api/configure.py b/infrastructure-provisioning/src/general/api/configure.py
index 6103d7f..9c917a4 100644
--- a/infrastructure-provisioning/src/general/api/configure.py
+++ b/infrastructure-provisioning/src/general/api/configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/create.py b/infrastructure-provisioning/src/general/api/create.py
index 6a1c288..3be59d7 100644
--- a/infrastructure-provisioning/src/general/api/create.py
+++ b/infrastructure-provisioning/src/general/api/create.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/create_image.py b/infrastructure-provisioning/src/general/api/create_image.py
index dcb2c04..7e96c5d 100644
--- a/infrastructure-provisioning/src/general/api/create_image.py
+++ b/infrastructure-provisioning/src/general/api/create_image.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/git_creds.py b/infrastructure-provisioning/src/general/api/git_creds.py
index 7aea2f4..1e001e7 100644
--- a/infrastructure-provisioning/src/general/api/git_creds.py
+++ b/infrastructure-provisioning/src/general/api/git_creds.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/install_libs.py b/infrastructure-provisioning/src/general/api/install_libs.py
index e683f0b..abbe252 100644
--- a/infrastructure-provisioning/src/general/api/install_libs.py
+++ b/infrastructure-provisioning/src/general/api/install_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/list_libs.py b/infrastructure-provisioning/src/general/api/list_libs.py
index 82c5736..e5e7c41 100644
--- a/infrastructure-provisioning/src/general/api/list_libs.py
+++ b/infrastructure-provisioning/src/general/api/list_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/reconfigure_spark.py b/infrastructure-provisioning/src/general/api/reconfigure_spark.py
new file mode 100644
index 0000000..b7458dc
--- /dev/null
+++ b/infrastructure-provisioning/src/general/api/reconfigure_spark.py
@@ -0,0 +1,66 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+import os
+import json
+import sys
+from fabric.api import local
+
+
+if __name__ == "__main__":
+    success = True
+    try:
+        local('cd /root; fab reconfigure_spark')
+    except:
+        success = False
+
+    reply = dict()
+    reply['request_id'] = os.environ['request_id']
+    if success:
+        reply['status'] = 'ok'
+    else:
+        reply['status'] = 'err'
+
+    reply['response'] = dict()
+
+    try:
+        with open("/root/result.json") as f:
+            reply['response']['result'] = json.loads(f.read())
+    except:
+        reply['response']['result'] = {"error": "Failed to open result.json"}
+
+    reply['response']['log'] = "/var/log/dlab/{0}/{0}_{1}_{2}.log".format(os.environ['conf_resource'],
+                                                                          os.environ['edge_user_name'],
+                                                                          os.environ['request_id'])
+
+    with open("/response/{}_{}_{}.json".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id']), 'w') as response_file:
+        response_file.write(json.dumps(reply))
+
+    try:
+        local('chmod 666 /response/*')
+    except:
+        success = False
+
+    if not success:
+        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/api/recreate.py b/infrastructure-provisioning/src/general/api/recreate.py
index 57f3341..4d7d3fc 100644
--- a/infrastructure-provisioning/src/general/api/recreate.py
+++ b/infrastructure-provisioning/src/general/api/recreate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/reupload_key.py b/infrastructure-provisioning/src/general/api/reupload_key.py
index aa0405d..771abae 100644
--- a/infrastructure-provisioning/src/general/api/reupload_key.py
+++ b/infrastructure-provisioning/src/general/api/reupload_key.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/start.py b/infrastructure-provisioning/src/general/api/start.py
index 7c51265..3358588 100644
--- a/infrastructure-provisioning/src/general/api/start.py
+++ b/infrastructure-provisioning/src/general/api/start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/status.py b/infrastructure-provisioning/src/general/api/status.py
index 9fbcf2a..0b007b9 100644
--- a/infrastructure-provisioning/src/general/api/status.py
+++ b/infrastructure-provisioning/src/general/api/status.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/stop.py b/infrastructure-provisioning/src/general/api/stop.py
index 5bbd0c2..a92c674 100644
--- a/infrastructure-provisioning/src/general/api/stop.py
+++ b/infrastructure-provisioning/src/general/api/stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/terminate.py b/infrastructure-provisioning/src/general/api/terminate.py
index f4df1e7..783e366 100644
--- a/infrastructure-provisioning/src/general/api/terminate.py
+++ b/infrastructure-provisioning/src/general/api/terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/api/terminate_image.py b/infrastructure-provisioning/src/general/api/terminate_image.py
index d09504b..b24462d 100644
--- a/infrastructure-provisioning/src/general/api/terminate_image.py
+++ b/infrastructure-provisioning/src/general/api/terminate_image.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/conf/dlab.ini b/infrastructure-provisioning/src/general/conf/dlab.ini
index be0ce3c..58175fd 100644
--- a/infrastructure-provisioning/src/general/conf/dlab.ini
+++ b/infrastructure-provisioning/src/general/conf/dlab.ini
@@ -1,3 +1,24 @@
+## *****************************************************************************
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+## ******************************************************************************
+
 #---- List of all dlab parameters (commented ones are passing from UI/Jenkins) ----#
 
 
@@ -27,15 +48,23 @@
 shared_image_enabled = true
 ### CIDR of VPC
 vpc_cidr = '172.31.0.0/16'
+### CIDR of second VPC
+vpc2_cidr = '172.32.0.0/16'
+### Enable or disable duo VPC mode(true|false)
+duo_vpc_enable = false
 ### Range of subnets which will be using for user's environments
 # user_subnets_range =
-### CIDR of IPs which will have access to SSN and Edge nodes
+### Comma-separated CIDR of IPs which will have access to SSN and Edge nodes
 allowed_ip_cidr = '0.0.0.0/0'
 ### Type of network. Define in which network DLab will be deployed. Possible options: public|private
 network_type = public
 ### Additional tags in format 'Key1:Value1;Key2:Value2'
 # additional_tags =
 pip_version = 9.0.3
+### Billing tag key
+billing_tag_key = product
+### Billing tag value
+billing_tag_value = dlab
 
 #--- [aws] section contains all common parameters related to Amazon ---#
 [aws]
@@ -47,8 +76,14 @@
 # security_groups_ids =
 ### Id of the subnet for SSN and EDGE provisioning
 # subnet_id =
+### Id of the subnet for notebooks and compute engines
+# subnet2_id =
 ### Id of the vpc for whole dlab provisioning
 # vpc_id =
+### Id of the secondary vpc for notebooks and compute engines
+# vpc2_id =
+### Amazon peering connection id
+# peering_id =
 ### Amazon iam user name
 # iam_user =
 ### EC2 instance type for notebook
@@ -62,7 +97,7 @@
 ### Amazon region name for whole dlab provisioning
 region = us-west-2
 ### Amazon ami name based on debian conf_os_family for all dlab instances
-debian_image_name = ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20160907.1
+debian_image_name = ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20190212
 ### Amazon ami name based on RedHat conf_os_family for all dlab instances
 redhat_image_name = RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2
 ### Amazon account ID
@@ -74,6 +109,7 @@
 ### Predefined policies for users instances
 # user_predefined_s3_policies =
 
+
 #--- [azure] section contains all common parameters related to Azure ---#
 [azure]
 ### Region
@@ -153,6 +189,14 @@
 # elastic_ip =
 ### Version of Docker to be installed on SSN
 docker_version = 17.06.2
+### Name of hosted zone for Route53
+# hosted_zone_name =
+### ID of hosted zone
+# hosted_zone_id =
+### Subdomain name
+# subdomain =
+### Role ARN for creating Route53 record
+# assume_role_arn =
 
 #--- [edge] section contains all parameters that are using for edge node provisioning ---#
 [edge]
@@ -168,19 +212,19 @@
 ### Size of the additional volume for notebook instance
 disk_size = 30
 ### Version of Apache Spark to be installed on notebook
-spark_version = 2.2.1
+spark_version = 2.3.2
 ### Version of Apache Hadoop to be installed on notebook
 hadoop_version = 2.7
 ### Version of Jupyter to be installed on notebook
-jupyter_version = 5.2.0
+jupyter_version = 5.7.4
 ### Version of TensorFlow to be installed on notebook
-tensorflow_version = 1.4.0
+tensorflow_version = 1.8.0
 ### Version of Zeppelin to be installed on notebook
-zeppelin_version = 0.7.3
+zeppelin_version = 0.8.0
 ### Version of Rstudio to be installed on notebook
-rstudio_version = 1.1.383
+rstudio_version = 1.1.463
 ### Version of Scala to be installed on notebook
-scala_version = 2.11.8
+scala_version = 2.12.8
 ### Version of Livy top be installed on notebook
 livy_version = 0.3.0
 ### If it is true, Livy will be used on Zeppelin notebook
@@ -188,7 +232,7 @@
 ### R China mirror
 r_mirror = http://mirror.lzu.edu.cn/CRAN/
 ### NVidia driver version for Tensor/DeepLearning notebooks
-nvidia_version = 390.48
+nvidia_version = 418.43
 ### Caffe library version for DeepLearning notebook
 caffe_version = 1.0
 ### Caffe2 library version for DeepLearning notebook
@@ -196,30 +240,33 @@
 ### Cmake version for DeepLearning notebook
 cmake_version = 3.11.3
 ### CNTK library version for DeepLearning notebook
-cntk_version = 2.1
+### All releases 2.4+ officially only support Ubuntu 16.04.
+cntk_version = 2.3.1
 ### MXNet library version for DeepLearning notebook
-mxnet_version = 1.0.0
+mxnet_version = 1.3.1
 ### Keras library version for Tensor/DeepLearning notebook
-keras_version = 2.0.8
+keras_version = 2.1.6
 ### Theano library version for Tensor/DeepLearning notebook
-theano_version = 0.9.0
+theano_version = 1.0.3
 ### Version of CUDA
-cuda_version = 8.0
+cuda_version = 9.0
 ### Name of CUDA file
-cuda_file_name = cuda_8.0.44_linux-run
+cuda_file_name = cuda_9.0.176_384.81_linux-run
 ### Version of CUDNN
-cudnn_version = 6.0
+cudnn_version = 7.1.4
 ### Name of CUDNN file
-cudnn_file_name = cudnn-8.0-linux-x64-v6.0.tgz
+cudnn_file_name = cudnn-9.0-linux-x64-v7.1.tgz
 ### R enabled on Jupyter/Zeppelin notebook
 r_enabled = true
 ### Temporary fixed python libraries due to dependencies
 tornado_version = 4.5.3
 ipykernel_version = 4.8.2
 ### Version of ungit if previous needed. Use latest as default.
-ungit_version = 1.4.31
+ungit_version = 1.4.36
 ### Numpy version
 numpy_version = 1.14.3
+### Apache Ivy version
+ivy_version = 2.4.0
 
 #--- [emr] section contains all parameters that are using for emr provisioning ---#
 [emr]
@@ -256,7 +303,7 @@
 os_memory = 75
 ### Explicit allocation RAM for an operating system
 os_expl_memory = 3500
-### Depending on RAM size on instance, this paremetr determines size of RAM when explicit allocation RAM is used
+### Depending on RAM size on instance, this parameter determines size of RAM when explicit allocation RAM is used
 expl_instance_memory = 8000
 
 #--- [ldap] ldap parameters ---#
diff --git a/infrastructure-provisioning/src/general/files/aws/base_Dockerfile b/infrastructure-provisioning/src/general/files/aws/base_Dockerfile
index 5ecdbae..a86d64f 100644
--- a/infrastructure-provisioning/src/general/files/aws/base_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/base_Dockerfile
@@ -1,23 +1,27 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
 FROM ubuntu:16.04
 ARG OS
+ARG SRC_PATH
 
 # Install any .deb dependecies
 RUN	apt-get update && \
@@ -56,15 +60,16 @@
     mkdir -p /usr/lib/python2.7/dlab && \
     mkdir -p /root/keys/.ssh
 
-COPY base/ /root
-COPY general/conf/* /root/conf/
-COPY general/api/*.py /bin/
-COPY general/scripts/aws/common_* /root/scripts/
-COPY general/lib/aws/* /usr/lib/python2.7/dlab/
-COPY general/lib/os/${OS}/common_lib.py /usr/lib/python2.7/dlab/common_lib.py
-COPY general/lib/os/fab.py /usr/lib/python2.7/dlab/fab.py
-COPY general/files/os/${OS}/sources.list /root/files/
-COPY edge/templates/locations/ /root/locations/
+COPY ${SRC_PATH}base/ /root
+COPY ${SRC_PATH}general/conf/* /root/conf/
+COPY ${SRC_PATH}general/api/*.py /bin/
+COPY ${SRC_PATH}general/scripts/aws/common_* /root/scripts/
+COPY ${SRC_PATH}general/lib/aws/* /usr/lib/python2.7/dlab/
+COPY ${SRC_PATH}general/lib/os/${OS}/common_lib.py /usr/lib/python2.7/dlab/common_lib.py
+COPY ${SRC_PATH}general/lib/os/fab.py /usr/lib/python2.7/dlab/fab.py
+COPY ${SRC_PATH}general/files/os/${OS}/sources.list /root/files/
+COPY ${SRC_PATH}general/files/os/ivysettings.xml /root/templates/
+COPY ${SRC_PATH}edge/templates/locations/ /root/locations/
 
 RUN chmod a+x /root/*.py && \
     chmod a+x /root/scripts/* && \
diff --git a/infrastructure-provisioning/src/general/files/aws/dataengine-service_Dockerfile b/infrastructure-provisioning/src/general/files/aws/dataengine-service_Dockerfile
index d1d4a59..c78ad9f 100644
--- a/infrastructure-provisioning/src/general/files/aws/dataengine-service_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/dataengine-service_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/dataengine-service_description.json b/infrastructure-provisioning/src/general/files/aws/dataengine-service_description.json
index f818b09..7caee2a 100644
--- a/infrastructure-provisioning/src/general/files/aws/dataengine-service_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/dataengine-service_description.json
@@ -1,5 +1,5 @@
 {
-  "template_name": "EMR cluster",
+  "template_name": "AWS EMR cluster",
   "description": "Image for EMR provisioning",
   "environment_type": "computational",
   "computation_resources_shapes":
@@ -24,7 +24,7 @@
     },
   "templates":
   [
-    {"version":"emr-5.6.0", "applications": [{"Name":"Hadoop", "Version": "2.7.3"}, {"Name":"Spark", "Version": "2.1.0"}, {"Name":"Hive", "Version": "2.1.1"}]},
-    {"version":"emr-5.12.0", "applications": [{"Name":"Hadoop", "Version": "2.8.3"}, {"Name":"Spark", "Version": "2.2.1"}, {"Name":"Hive", "Version": "2.3.2"}]}
+    {"version":"emr-5.12.0", "applications": [{"Name":"Hadoop", "Version": "2.8.3"}, {"Name":"Spark", "Version": "2.2.1"}, {"Name":"Hive", "Version": "2.3.2"}]},
+    {"version":"emr-5.19.0", "applications": [{"Name":"Hadoop", "Version": "2.8.5"}, {"Name":"Spark", "Version": "2.3.2"}, {"Name":"Hive", "Version": "2.3.3"}]}
   ]
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/files/aws/dataengine_Dockerfile b/infrastructure-provisioning/src/general/files/aws/dataengine_Dockerfile
index ce08781..cbc5e74 100644
--- a/infrastructure-provisioning/src/general/files/aws/dataengine_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/dataengine_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -22,11 +25,13 @@
 
 COPY dataengine/ /root/
 COPY general/scripts/os/dataengine_* /root/scripts/
+COPY general/scripts/os/reconfigure_spark.py /root/scripts/
 COPY general/scripts/os/install_additional_libs.py /root/scripts/install_additional_libs.py
 COPY general/scripts/os/get_list_available_pkgs.py /root/scripts/get_list_available_pkgs.py
 COPY general/lib/os/${OS}/notebook_lib.py /usr/lib/python2.7/dlab/notebook_lib.py
 COPY general/scripts/os/common_* /root/scripts/
 COPY general/scripts/aws/dataengine_* /root/scripts/
+COPY general/scripts/os/notebook_reconfigure_dataengine_spark.py /root/scripts/
 COPY general/templates/os/notebook_spark-defaults_local.conf /root/templates/
 COPY general/templates/os/tensorboard.service /root/templates/
 COPY general/templates/os/${OS}/spark-* /root/templates/
diff --git a/infrastructure-provisioning/src/general/files/aws/dataengine_description.json b/infrastructure-provisioning/src/general/files/aws/dataengine_description.json
index 1ca2bd6..3594e96 100644
--- a/infrastructure-provisioning/src/general/files/aws/dataengine_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/dataengine_description.json
@@ -1,6 +1,6 @@
 {
-  "template_name": "Spark cluster",
-  "description": "Spark standalone cluster",
+  "template_name": "Apache Spark standalone cluster",
+  "description": "Apache Spark standalone cluster",
   "environment_type": "computational",
     "computation_resources_shapes":
     {
diff --git a/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile b/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile
index a2b7e17..20bfe77 100644
--- a/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/deeplearning_description.json b/infrastructure-provisioning/src/general/files/aws/deeplearning_description.json
index e8fe00a..da6f79d 100644
--- a/infrastructure-provisioning/src/general/files/aws/deeplearning_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/deeplearning_description.json
@@ -8,10 +8,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Deep Learning  1.9",
+      "template_name": "Deep Learning  2.1",
       "description": "Base image with Deep Learning and Jupyter",
       "environment_type": "exploratory",
-      "version": "deeplearning-1.9",
+      "version": "deeplearning-2.1",
       "vendor": "AWS"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/aws/edge_Dockerfile b/infrastructure-provisioning/src/general/files/aws/edge_Dockerfile
index 675a60b..143eee6 100644
--- a/infrastructure-provisioning/src/general/files/aws/edge_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/edge_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile b/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile
index cfb40be..a7f4093 100644
--- a/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/jupyter_description.json b/infrastructure-provisioning/src/general/files/aws/jupyter_description.json
index 1d59285..9b14a9f 100644
--- a/infrastructure-provisioning/src/general/files/aws/jupyter_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/jupyter_description.json
@@ -19,10 +19,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Jupyter notebook 5.2.0",
+      "template_name": "Jupyter notebook 5.7.4",
       "description": "Base image with Jupyter node creation routines",
       "environment_type": "exploratory",
-      "version": "jupyter_notebook-5.2.0",
+      "version": "jupyter_notebook-5.7.4",
       "vendor": "AWS"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/aws/rstudio_Dockerfile b/infrastructure-provisioning/src/general/files/aws/rstudio_Dockerfile
index 131aa09..db55b45 100644
--- a/infrastructure-provisioning/src/general/files/aws/rstudio_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/rstudio_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/rstudio_description.json b/infrastructure-provisioning/src/general/files/aws/rstudio_description.json
index 618e165..e23e275 100644
--- a/infrastructure-provisioning/src/general/files/aws/rstudio_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/rstudio_description.json
@@ -19,10 +19,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "RStudio 1.1.383",
+      "template_name": "RStudio 1.1.463",
       "description": "Base image with RStudio node creation routines",
       "environment_type": "exploratory",
-      "version": "RStudio-1.1.383",
+      "version": "RStudio-1.1.463",
       "vendor": "AWS"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/aws/ssn_Dockerfile b/infrastructure-provisioning/src/general/files/aws/ssn_Dockerfile
index 0dead1d..7bb561e 100644
--- a/infrastructure-provisioning/src/general/files/aws/ssn_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/ssn_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -20,11 +23,11 @@
 
 ARG OS
 
-COPY ssn/ /root/
-COPY general/scripts/aws/ssn_* /root/scripts/
-COPY general/lib/os/${OS}/ssn_lib.py /usr/lib/python2.7/dlab/ssn_lib.py
-COPY general/files/aws/ssn_policy.json /root/files/
-COPY general/templates/aws/jenkins_jobs /root/templates/jenkins_jobs
+COPY infrastructure-provisioning/src/ssn/ /root/
+COPY infrastructure-provisioning/src/general/scripts/aws/ssn_* /root/scripts/
+COPY infrastructure-provisioning/src/general/lib/os/${OS}/ssn_lib.py /usr/lib/python2.7/dlab/ssn_lib.py
+COPY infrastructure-provisioning/src/general/files/aws/ssn_policy.json /root/files/
+COPY infrastructure-provisioning/src/general/templates/aws/jenkins_jobs /root/templates/jenkins_jobs
 
 RUN chmod a+x /root/fabfile.py; \
     chmod a+x /root/scripts/*
diff --git a/infrastructure-provisioning/src/general/files/aws/ssn_policy.json b/infrastructure-provisioning/src/general/files/aws/ssn_policy.json
index 58a14df..1d43c00 100644
--- a/infrastructure-provisioning/src/general/files/aws/ssn_policy.json
+++ b/infrastructure-provisioning/src/general/files/aws/ssn_policy.json
@@ -40,6 +40,7 @@
                 "ec2:CreateSubnet",
                 "ec2:CreateTags",
                 "ec2:CreateImage",
+                "ec2:CreateRoute",
                 "ec2:DeregisterImage",
                 "ec2:DescribeImages",
                 "ec2:DescribeAddresses",
@@ -109,6 +110,13 @@
             ],
             "Effect": "Allow",
             "Resource": "*"
+        },
+        {
+            "Action": [
+                "pricing:GetProducts"
+            ],
+            "Effect": "Allow",
+            "Resource": "*"
         }
     ]
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_Dockerfile b/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_Dockerfile
index 87a3141..620d99c 100644
--- a/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_description.json b/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_description.json
index f7f4c76..b838f67 100644
--- a/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/tensor-rstudio_description.json
@@ -8,7 +8,7 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Rstudio with TensorFlow 1.8.0",
+      "template_name": "RStudio with TensorFlow 1.8.0",
       "description": "Base image with TensorFlow and RStudio node creation routines",
       "environment_type": "exploratory",
       "version": "tensorflow_gpu-1.8.0",
diff --git a/infrastructure-provisioning/src/general/files/aws/tensor_Dockerfile b/infrastructure-provisioning/src/general/files/aws/tensor_Dockerfile
index 653e270..321d57c 100644
--- a/infrastructure-provisioning/src/general/files/aws/tensor_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/tensor_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/aws/tensor_description.json b/infrastructure-provisioning/src/general/files/aws/tensor_description.json
index 2b9cf28..a07341d 100644
--- a/infrastructure-provisioning/src/general/files/aws/tensor_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/tensor_description.json
@@ -8,7 +8,7 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Jupyter with TensorFlow 1.4.0",
+      "template_name": "Jupyter with TensorFlow 1.8.0",
       "description": "Base image with TensorFlow and Jupyter node creation routines",
       "environment_type": "exploratory",
       "version": "tensorflow_gpu-1.4.0",
diff --git a/infrastructure-provisioning/src/general/files/aws/zeppelin_Dockerfile b/infrastructure-provisioning/src/general/files/aws/zeppelin_Dockerfile
index b4d4a1e..9d9b7e9 100644
--- a/infrastructure-provisioning/src/general/files/aws/zeppelin_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/zeppelin_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -27,11 +30,11 @@
 COPY general/lib/os/${OS}/notebook_lib.py /usr/lib/python2.7/dlab/notebook_lib.py
 COPY general/templates/aws/interpreter_livy.json /root/templates/
 COPY general/templates/aws/interpreter_spark.json /root/templates/
+COPY general/templates/aws/dataengine-service_interpreter_* /root/templates/
 COPY general/templates/os/dataengine_interpreter_livy.json /root/templates/
 COPY general/templates/os/dataengine_interpreter_spark.json /root/templates/
 COPY general/templates/os/${OS}/ungit.service /root/templates/
 COPY general/templates/os/notebook_spark-defaults_local.conf /root/templates/
-COPY general/templates/aws/dataengine-service_interpreter_* /root/templates/
 
 RUN chmod a+x /root/fabfile.py; \
     chmod a+x /root/scripts/*
diff --git a/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json b/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
index f621460..31cb86d 100644
--- a/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
+++ b/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
@@ -19,10 +19,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Zeppelin 0.7.3",
-      "description": "Base image with Zeppelin node creation routines",
+      "template_name": "Apache Zeppelin 0.8.0",
+      "description": "Base image with Apache Zeppelin node creation routines",
       "environment_type": "exploratory",
-      "version": "zeppelin-0.7.2",
+      "version": "zeppelin-0.8.0",
       "vendor": "AWS"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/azure/base_Dockerfile b/infrastructure-provisioning/src/general/files/azure/base_Dockerfile
index fc44713..e3c47b2 100644
--- a/infrastructure-provisioning/src/general/files/azure/base_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/base_Dockerfile
@@ -1,23 +1,27 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
 FROM ubuntu:16.04
 ARG OS
+ARG SRC_PATH
 
 # Install any .deb dependecies
 RUN apt-get update && \
@@ -55,14 +59,15 @@
     mkdir -p /usr/lib/python2.7/dlab && \
     mkdir -p /root/keys/.ssh
 
-COPY base/ /root
-COPY general/conf/* /root/conf/
-COPY general/api/*.py /bin/
-COPY general/scripts/azure/common_* /root/scripts/
-COPY general/lib/azure/* /usr/lib/python2.7/dlab/
-COPY general/lib/os/${OS}/common_lib.py /usr/lib/python2.7/dlab/common_lib.py
-COPY general/lib/os/fab.py /usr/lib/python2.7/dlab/fab.py
-COPY general/files/os/${OS}/sources.list /root/files/
+COPY ${SRC_PATH}base/ /root
+COPY ${SRC_PATH}general/conf/* /root/conf/
+COPY ${SRC_PATH}general/api/*.py /bin/
+COPY ${SRC_PATH}general/scripts/azure/common_* /root/scripts/
+COPY ${SRC_PATH}general/lib/azure/* /usr/lib/python2.7/dlab/
+COPY ${SRC_PATH}general/lib/os/${OS}/common_lib.py /usr/lib/python2.7/dlab/common_lib.py
+COPY ${SRC_PATH}general/lib/os/fab.py /usr/lib/python2.7/dlab/fab.py
+COPY ${SRC_PATH}general/files/os/${OS}/sources.list /root/files/
+COPY ${SRC_PATH}general/files/os/ivysettings.xml /root/templates/
 
 RUN chmod a+x /root/*.py && \
     chmod a+x /root/scripts/* && \
diff --git a/infrastructure-provisioning/src/general/files/azure/dataengine_Dockerfile b/infrastructure-provisioning/src/general/files/azure/dataengine_Dockerfile
index 701eb5d..fbc0bdd 100644
--- a/infrastructure-provisioning/src/general/files/azure/dataengine_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/dataengine_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -23,9 +26,11 @@
 COPY dataengine/ /root/
 COPY general/lib/os/${OS}/notebook_lib.py /usr/lib/python2.7/dlab/notebook_lib.py
 COPY general/scripts/os/dataengine_* /root/scripts/
+COPY general/scripts/os/reconfigure_spark.py /root/scripts/
 COPY general/scripts/os/install_additional_libs.py /root/scripts/install_additional_libs.py
 COPY general/scripts/os/get_list_available_pkgs.py /root/scripts/get_list_available_pkgs.py
 COPY general/scripts/os/common_* /root/scripts/
+COPY general/scripts/os/notebook_reconfigure_dataengine_spark.py /root/scripts/
 COPY general/scripts/azure/dataengine_* /root/scripts/
 COPY general/templates/os/notebook_spark-defaults_local.conf /root/templates/
 COPY general/templates/os/tensorboard.service /root/templates/
diff --git a/infrastructure-provisioning/src/general/files/azure/dataengine_description.json b/infrastructure-provisioning/src/general/files/azure/dataengine_description.json
index 8fed875..a4fcf70 100644
--- a/infrastructure-provisioning/src/general/files/azure/dataengine_description.json
+++ b/infrastructure-provisioning/src/general/files/azure/dataengine_description.json
@@ -1,6 +1,6 @@
 {
-  "template_name": "Spark cluster",
-  "description": "Spark standalone cluster",
+  "template_name": "Apache Spark standalone cluster",
+  "description": "Apache Spark standalone cluster",
   "environment_type": "computational",
     "computation_resources_shapes":
     {
diff --git a/infrastructure-provisioning/src/general/files/azure/deeplearning_Dockerfile b/infrastructure-provisioning/src/general/files/azure/deeplearning_Dockerfile
index 39b8db0..dc8c371 100644
--- a/infrastructure-provisioning/src/general/files/azure/deeplearning_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/deeplearning_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/azure/deeplearning_description.json b/infrastructure-provisioning/src/general/files/azure/deeplearning_description.json
index b9fdaef..704ba7d 100644
--- a/infrastructure-provisioning/src/general/files/azure/deeplearning_description.json
+++ b/infrastructure-provisioning/src/general/files/azure/deeplearning_description.json
@@ -8,10 +8,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Deep Learning  1.9",
+      "template_name": "Deep Learning  2.1",
       "description": "Base image with Deep Learning and Jupyter",
       "environment_type": "exploratory",
-      "version": "deeplearning-1.9",
+      "version": "deeplearning-2.1",
       "vendor": "Azure"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/azure/edge_Dockerfile b/infrastructure-provisioning/src/general/files/azure/edge_Dockerfile
index 329372f..5ad24cd 100644
--- a/infrastructure-provisioning/src/general/files/azure/edge_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/edge_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/azure/jupyter_Dockerfile b/infrastructure-provisioning/src/general/files/azure/jupyter_Dockerfile
index 59d4ff8..550aefc 100644
--- a/infrastructure-provisioning/src/general/files/azure/jupyter_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/jupyter_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/azure/jupyter_description.json b/infrastructure-provisioning/src/general/files/azure/jupyter_description.json
index 24bc1ed..638531e 100644
--- a/infrastructure-provisioning/src/general/files/azure/jupyter_description.json
+++ b/infrastructure-provisioning/src/general/files/azure/jupyter_description.json
@@ -15,10 +15,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Jupyter notebook 5.2.0",
+      "template_name": "Jupyter notebook 5.7.4",
       "description": "Base image with Jupyter node creation routines",
       "environment_type": "exploratory",
-      "version": "jupyter_notebook-5.2.0",
+      "version": "jupyter_notebook-5.7.4",
       "vendor": "Azure"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/azure/rstudio_Dockerfile b/infrastructure-provisioning/src/general/files/azure/rstudio_Dockerfile
index bab912c..eb2da2d 100644
--- a/infrastructure-provisioning/src/general/files/azure/rstudio_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/rstudio_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/azure/rstudio_description.json b/infrastructure-provisioning/src/general/files/azure/rstudio_description.json
index 74fa5f1..8457197 100644
--- a/infrastructure-provisioning/src/general/files/azure/rstudio_description.json
+++ b/infrastructure-provisioning/src/general/files/azure/rstudio_description.json
@@ -15,10 +15,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "RStudio 1.1.383",
+      "template_name": "RStudio 1.1.463",
       "description": "Base image with RStudio node creation routines",
       "environment_type": "exploratory",
-      "version": "RStudio-1.1.383",
+      "version": "RStudio-1.1.463",
       "vendor": "Azure"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/azure/ssn_Dockerfile b/infrastructure-provisioning/src/general/files/azure/ssn_Dockerfile
index 5522285..a28ec36 100644
--- a/infrastructure-provisioning/src/general/files/azure/ssn_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/ssn_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -20,10 +23,10 @@
 
 ARG OS
 
-COPY ssn/ /root/
-COPY general/scripts/azure/ssn_* /root/scripts/
-COPY general/lib/os/${OS}/ssn_lib.py /usr/lib/python2.7/dlab/ssn_lib.py
-COPY general/templates/azure/jenkins_jobs /root/templates/jenkins_jobs
+COPY infrastructure-provisioning/src/ssn/ /root/
+COPY infrastructure-provisioning/src/general/scripts/azure/ssn_* /root/scripts/
+COPY infrastructure-provisioning/src/general/lib/os/${OS}/ssn_lib.py /usr/lib/python2.7/dlab/ssn_lib.py
+COPY infrastructure-provisioning/src/general/templates/azure/jenkins_jobs /root/templates/jenkins_jobs
 
 RUN chmod a+x /root/fabfile.py; \
     chmod a+x /root/scripts/*
diff --git a/infrastructure-provisioning/src/general/files/azure/tensor_Dockerfile b/infrastructure-provisioning/src/general/files/azure/tensor_Dockerfile
index 216de14..daccbf6 100644
--- a/infrastructure-provisioning/src/general/files/azure/tensor_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/tensor_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/azure/tensor_description.json b/infrastructure-provisioning/src/general/files/azure/tensor_description.json
index b759ac1..06f67c7 100644
--- a/infrastructure-provisioning/src/general/files/azure/tensor_description.json
+++ b/infrastructure-provisioning/src/general/files/azure/tensor_description.json
@@ -8,7 +8,7 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "TensorFlow 1.4.0",
+      "template_name": "TensorFlow 1.8.0",
       "description": "Base image with TensorFlow and Jupyter node creation routines",
       "environment_type": "exploratory",
       "version": "tensorflow_gpu-1.4.0",
diff --git a/infrastructure-provisioning/src/general/files/azure/zeppelin_Dockerfile b/infrastructure-provisioning/src/general/files/azure/zeppelin_Dockerfile
index 4b743fd..272f106 100644
--- a/infrastructure-provisioning/src/general/files/azure/zeppelin_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/azure/zeppelin_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json b/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
index 2f18dea..499d3ff 100644
--- a/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
+++ b/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
@@ -15,10 +15,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Zeppelin 0.7.3",
-      "description": "Base image with Zeppelin node creation routines",
+      "template_name": "Apache Zeppelin 0.8.0",
+      "description": "Base image with Apache Zeppelin node creation routines",
       "environment_type": "exploratory",
-      "version": "zeppelin-0.7.2",
+      "version": "zeppelin-0.8.0",
       "vendor": "Azure"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile
index 67cd9be..826de75 100644
--- a/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile
@@ -1,23 +1,27 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
 FROM ubuntu:16.04
 ARG OS
+ARG SRC_PATH
 
 # Install any .deb dependecies
 RUN	apt-get update && \
@@ -56,14 +60,15 @@
     mkdir -p /usr/lib/python2.7/dlab && \
     mkdir -p /root/keys/.ssh
 
-COPY base/ /root
-COPY general/conf/* /root/conf/
-COPY general/api/*.py /bin/
-COPY general/scripts/gcp/common_* /root/scripts/
-COPY general/lib/gcp/* /usr/lib/python2.7/dlab/
-COPY general/lib/os/${OS}/common_lib.py /usr/lib/python2.7/dlab/common_lib.py
-COPY general/lib/os/fab.py /usr/lib/python2.7/dlab/fab.py
-COPY general/files/os/${OS}/sources.list /root/files/
+COPY ${SRC_PATH}base/ /root
+COPY ${SRC_PATH}general/conf/* /root/conf/
+COPY ${SRC_PATH}general/api/*.py /bin/
+COPY ${SRC_PATH}general/scripts/gcp/common_* /root/scripts/
+COPY ${SRC_PATH}general/lib/gcp/* /usr/lib/python2.7/dlab/
+COPY ${SRC_PATH}general/lib/os/${OS}/common_lib.py /usr/lib/python2.7/dlab/common_lib.py
+COPY ${SRC_PATH}general/lib/os/fab.py /usr/lib/python2.7/dlab/fab.py
+COPY ${SRC_PATH}general/files/os/${OS}/sources.list /root/files/
+COPY ${SRC_PATH}general/files/os/ivysettings.xml /root/templates/
 
 RUN chmod a+x /root/*.py && \
     chmod a+x /root/scripts/* && \
diff --git a/infrastructure-provisioning/src/general/files/gcp/dataengine-service_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/dataengine-service_Dockerfile
index c366ada..1f3e640 100644
--- a/infrastructure-provisioning/src/general/files/gcp/dataengine-service_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/dataengine-service_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/dataengine_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/dataengine_Dockerfile
index b0c31c5..8d05fdc 100644
--- a/infrastructure-provisioning/src/general/files/gcp/dataengine_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/dataengine_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -22,9 +25,11 @@
 
 COPY dataengine/ /root/
 COPY general/scripts/os/dataengine_* /root/scripts/
+COPY general/scripts/os/reconfigure_spark.py /root/scripts/
 COPY general/scripts/os/install_additional_libs.py /root/scripts/install_additional_libs.py
 COPY general/scripts/os/get_list_available_pkgs.py /root/scripts/get_list_available_pkgs.py
 COPY general/lib/os/${OS}/notebook_lib.py /usr/lib/python2.7/dlab/notebook_lib.py
+COPY general/scripts/os/notebook_reconfigure_dataengine_spark.py /root/scripts/
 COPY general/scripts/os/common_configure_proxy.py /root/scripts/
 COPY general/scripts/gcp/dataengine_* /root/scripts/
 COPY general/templates/os/notebook_spark-defaults_local.conf /root/templates/
diff --git a/infrastructure-provisioning/src/general/files/gcp/dataengine_description.json b/infrastructure-provisioning/src/general/files/gcp/dataengine_description.json
index abeae50..bbbd487 100644
--- a/infrastructure-provisioning/src/general/files/gcp/dataengine_description.json
+++ b/infrastructure-provisioning/src/general/files/gcp/dataengine_description.json
@@ -1,6 +1,6 @@
 {
-  "template_name": "Spark cluster",
-  "description": "Spark standalone cluster",
+  "template_name": "Apache Spark standalone cluster",
+  "description": "Apache Spark standalone cluster",
   "environment_type": "computational",
   "computation_resources_shapes":
   {
diff --git a/infrastructure-provisioning/src/general/files/gcp/deeplearning_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/deeplearning_Dockerfile
index 343c95e..6979f41 100644
--- a/infrastructure-provisioning/src/general/files/gcp/deeplearning_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/deeplearning_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/deeplearning_description.json b/infrastructure-provisioning/src/general/files/gcp/deeplearning_description.json
index 9e0bfb6..ceaebc2 100644
--- a/infrastructure-provisioning/src/general/files/gcp/deeplearning_description.json
+++ b/infrastructure-provisioning/src/general/files/gcp/deeplearning_description.json
@@ -10,10 +10,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Deep Learning  1.9",
+      "template_name": "Deep Learning  2.1",
       "description": "Base image with Deep Learning and Jupyter",
       "environment_type": "exploratory",
-      "version": "deeplearning-1.9",
+      "version": "deeplearning-2.1",
       "vendor": "GCP"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/gcp/edge_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/edge_Dockerfile
index daf74fa..f60f409 100644
--- a/infrastructure-provisioning/src/general/files/gcp/edge_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/edge_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/jupyter_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/jupyter_Dockerfile
index 9f2766f..89cf37c 100644
--- a/infrastructure-provisioning/src/general/files/gcp/jupyter_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/jupyter_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/jupyter_description.json b/infrastructure-provisioning/src/general/files/gcp/jupyter_description.json
index 4812532..7a18b6a 100644
--- a/infrastructure-provisioning/src/general/files/gcp/jupyter_description.json
+++ b/infrastructure-provisioning/src/general/files/gcp/jupyter_description.json
@@ -24,10 +24,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Jupyter notebook 5.2.0",
+      "template_name": "Jupyter notebook 5.7.4",
       "description": "Base image with jupyter node creation routines",
       "environment_type": "exploratory",
-      "version": "jupyter_notebook-5.2.0",
+      "version": "jupyter_notebook-5.7.4",
       "vendor": "GCP"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/gcp/rstudio_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/rstudio_Dockerfile
index 7f29c0b..5c13de5 100644
--- a/infrastructure-provisioning/src/general/files/gcp/rstudio_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/rstudio_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/rstudio_description.json b/infrastructure-provisioning/src/general/files/gcp/rstudio_description.json
index 7962c78..95d83fa 100644
--- a/infrastructure-provisioning/src/general/files/gcp/rstudio_description.json
+++ b/infrastructure-provisioning/src/general/files/gcp/rstudio_description.json
@@ -24,10 +24,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "RStudio 1.1.383",
+      "template_name": "RStudio 1.1.463",
       "description": "Base image with rstudio node creation routines",
       "environment_type": "exploratory",
-      "version": "RStudio-1.1.383",
+      "version": "RStudio-1.1.463",
       "vendor": "GCP"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/gcp/ssn_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/ssn_Dockerfile
index 370a859..7ec7575 100644
--- a/infrastructure-provisioning/src/general/files/gcp/ssn_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/ssn_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -20,12 +23,12 @@
 
 ARG OS
 
-COPY ssn/ /root/
-COPY general/scripts/gcp/ssn_* /root/scripts/
-COPY general/lib/os/${OS}/ssn_lib.py /usr/lib/python2.7/dlab/ssn_lib.py
-COPY general/files/gcp/ssn_policy.json /root/files/
-COPY general/files/gcp/ssn_roles.json /root/files/
-COPY general/templates/gcp/jenkins_jobs /root/templates/jenkins_jobs
+COPY infrastructure-provisioning/src/ssn/ /root/
+COPY infrastructure-provisioning/src/general/scripts/gcp/ssn_* /root/scripts/
+COPY infrastructure-provisioning/src/general/lib/os/${OS}/ssn_lib.py /usr/lib/python2.7/dlab/ssn_lib.py
+COPY infrastructure-provisioning/src/general/files/gcp/ssn_policy.json /root/files/
+COPY infrastructure-provisioning/src/general/files/gcp/ssn_roles.json /root/files/
+COPY infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs /root/templates/jenkins_jobs
 
 RUN chmod a+x /root/fabfile.py; \
     chmod a+x /root/scripts/*
diff --git a/infrastructure-provisioning/src/general/files/gcp/ssn_roles.json b/infrastructure-provisioning/src/general/files/gcp/ssn_roles.json
index af9aa8c..9cc2af5 100644
--- a/infrastructure-provisioning/src/general/files/gcp/ssn_roles.json
+++ b/infrastructure-provisioning/src/general/files/gcp/ssn_roles.json
@@ -5,5 +5,6 @@
     "dataproc.editor",
     "resourcemanager.projectIamAdmin",
     "iam.roleAdmin",
-    "compute.instanceAdmin"
+    "compute.instanceAdmin",
+    "bigquery.dataViewer"
 ]
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/files/gcp/tensor_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/tensor_Dockerfile
index be190dd..ed15d89 100644
--- a/infrastructure-provisioning/src/general/files/gcp/tensor_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/tensor_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/tensor_description.json b/infrastructure-provisioning/src/general/files/gcp/tensor_description.json
index 4a593e6..9ed1b87 100644
--- a/infrastructure-provisioning/src/general/files/gcp/tensor_description.json
+++ b/infrastructure-provisioning/src/general/files/gcp/tensor_description.json
@@ -10,7 +10,7 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "TensorFlow 1.4.0",
+      "template_name": "TensorFlow 1.8.0",
       "description": "Base image with TensorFlow  and Jupyter node creation routines",
       "environment_type": "exploratory",
       "version": "tensorflow_gpu-1.4.0",
diff --git a/infrastructure-provisioning/src/general/files/gcp/zeppelin_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/zeppelin_Dockerfile
index 13d4ba1..0f6bd7a 100644
--- a/infrastructure-provisioning/src/general/files/gcp/zeppelin_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/zeppelin_Dockerfile
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json b/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
index 495864a..ccb152a 100644
--- a/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
+++ b/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
@@ -24,10 +24,10 @@
   "exploratory_environment_versions" :
   [
     {
-      "template_name": "Zeppelin 0.7.3",
-      "description": "Base image with zeppelin node creation routines",
+      "template_name": "Apache Zeppelin 0.8.0",
+      "description": "Base image with Apache Zeppelin node creation routines",
       "environment_type": "exploratory",
-      "version": "zeppelin-0.7.2",
+      "version": "zeppelin-0.8.0",
       "vendor": "GCP"
     }
   ]
diff --git a/infrastructure-provisioning/src/general/files/os/debian/sources.list b/infrastructure-provisioning/src/general/files/os/debian/sources.list
index c363815..3b3e80a 100644
--- a/infrastructure-provisioning/src/general/files/os/debian/sources.list
+++ b/infrastructure-provisioning/src/general/files/os/debian/sources.list
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
 # newer versions of the distribution.
 
diff --git a/infrastructure-provisioning/src/general/files/os/ivysettings.xml b/infrastructure-provisioning/src/general/files/os/ivysettings.xml
new file mode 100644
index 0000000..228310f
--- /dev/null
+++ b/infrastructure-provisioning/src/general/files/os/ivysettings.xml
@@ -0,0 +1,36 @@
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<ivysettings>
+
+    <settings defaultResolver="maven"/>
+
+    <property name="maven" value="https://repo1.maven.org/maven2/"/>
+    <property name="maven-mirror" value="http://uk.maven.org/maven2/"/>
+    <!--<property name="confluent" value="http://packages.confluent.io/maven/"/>
+    <property name="nexus" value="https://oss.sonatype.org/content/groups/public/"/>-->
+    <resolvers>
+        <ibiblio name="maven" m2compatible="true" root="${maven}"/>
+        <ibiblio name="maven-mirror" m2compatible="true" root="${maven-mirror}"/>
+        <!--<ibiblio name="confluent" m2compatible="true" root="${confluent}"/>
+        <ibiblio name="nexus" m2compatible="true" root="${nexus}"/>-->
+    </resolvers>
+
+</ivysettings>
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/files/os/redhat/sources.list b/infrastructure-provisioning/src/general/files/os/redhat/sources.list
index 6a278f8..fe5549c 100644
--- a/infrastructure-provisioning/src/general/files/os/redhat/sources.list
+++ b/infrastructure-provisioning/src/general/files/os/redhat/sources.list
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 # CentOS-Base.repo
 #
 # The mirror system uses the connecting IP address of the client and the
diff --git a/infrastructure-provisioning/src/general/files/os/toree-assembly-0.2.0.jar b/infrastructure-provisioning/src/general/files/os/toree-assembly-0.2.0.jar
deleted file mode 100644
index 812e4e7..0000000
--- a/infrastructure-provisioning/src/general/files/os/toree-assembly-0.2.0.jar
+++ /dev/null
Binary files differ
diff --git a/infrastructure-provisioning/src/general/files/os/toree_kernel.tar.gz b/infrastructure-provisioning/src/general/files/os/toree_kernel.tar.gz
deleted file mode 100644
index 7f5b462..0000000
--- a/infrastructure-provisioning/src/general/files/os/toree_kernel.tar.gz
+++ /dev/null
Binary files differ
diff --git a/infrastructure-provisioning/src/general/lib/aws/__init__.py b/infrastructure-provisioning/src/general/lib/aws/__init__.py
index e69de29..04cd33e 100644
--- a/infrastructure-provisioning/src/general/lib/aws/__init__.py
+++ b/infrastructure-provisioning/src/general/lib/aws/__init__.py
@@ -0,0 +1,20 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index 32c9a97..f39f64e 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -34,7 +37,8 @@
 import urllib2
 import meta_lib
 import dlab.fab
-
+import uuid
+import ast
 
 def backoff_log(err):
     logging.info("Unable to create Tag: " + \
@@ -79,6 +83,7 @@
         tags.append(tag)
         tags.append({'Key': os.environ['conf_tag_resource_id'], 'Value': os.environ['conf_service_base_name'] + ':' +
                                                                          bucket_name})
+        tags.append({'Key': os.environ['conf_billing_tag_key'], 'Value': os.environ['conf_billing_tag_value']})
         if 'conf_additional_tags' in os.environ:
             for tag in os.environ['conf_additional_tags'].split(';'):
                 tags.append(
@@ -155,6 +160,12 @@
                 'Value': os.environ['conf_service_base_name'] + ':' + resource_name
             }
         )
+        tags_list.append(
+            {
+                'Key': os.environ['conf_billing_tag_key'],
+                'Value': os.environ['conf_billing_tag_value']
+            }
+        )
     if 'conf_additional_tags' in os.environ:
         for tag in os.environ['conf_additional_tags'].split(';'):
             tags_list.append(
@@ -168,7 +179,22 @@
         Tags=tags_list
     )
 
-
+def create_product_tag(resource):
+    print('Tag product for the resource {} will be created'.format(resource))
+    tags_list = list()
+    ec2 = boto3.client('ec2')
+    if type(resource) != list:
+        resource = [resource]
+    tags_list.append(
+        {
+            'Key': os.environ['conf_billing_tag_key'],
+            'Value': os.environ['conf_billing_tag_value']
+        }
+    )
+    ec2.create_tags(
+        Resources=resource,
+        Tags=tags_list
+    )
 
 def remove_emr_tag(emr_id, tag):
     try:
@@ -180,7 +206,7 @@
         traceback.print_exc(file=sys.stdout)
 
 
-def create_rt(vpc_id, infra_tag_name, infra_tag_value):
+def create_rt(vpc_id, infra_tag_name, infra_tag_value, secondary):
     try:
         tag = {"Key": infra_tag_name, "Value": infra_tag_value}
         route_table = []
@@ -190,13 +216,14 @@
         route_table.append(rt_id)
         print('Created Route-Table with ID: {}'.format(rt_id))
         create_tag(route_table, json.dumps(tag))
-        ig = ec2.create_internet_gateway()
-        ig_id = ig.get('InternetGateway').get('InternetGatewayId')
-        route_table = []
-        route_table.append(ig_id)
-        create_tag(route_table, json.dumps(tag))
-        ec2.attach_internet_gateway(InternetGatewayId=ig_id, VpcId=vpc_id)
-        ec2.create_route(DestinationCidrBlock='0.0.0.0/0', RouteTableId=rt_id, GatewayId=ig_id)
+        if not secondary:
+            ig = ec2.create_internet_gateway()
+            ig_id = ig.get('InternetGateway').get('InternetGatewayId')
+            route_table = []
+            route_table.append(ig_id)
+            create_tag(route_table, json.dumps(tag))
+            ec2.attach_internet_gateway(InternetGatewayId=ig_id, VpcId=vpc_id)
+            ec2.create_route(DestinationCidrBlock='0.0.0.0/0', RouteTableId=rt_id, GatewayId=ig_id)
         return rt_id
     except Exception as err:
         logging.info("Unable to create Route Table: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
@@ -218,19 +245,111 @@
 
 
 def create_security_group(security_group_name, vpc_id, security_group_rules, egress, tag):
-    ec2 = boto3.resource('ec2')
-    group = ec2.create_security_group(GroupName=security_group_name, Description='security_group_name', VpcId=vpc_id)
-    time.sleep(10)
-    create_tag(group.id, tag)
     try:
-        group.revoke_egress(IpPermissions=[{"IpProtocol": "-1", "IpRanges": [{"CidrIp": "0.0.0.0/0"}], "UserIdGroupPairs": [], "PrefixListIds": []}])
-    except:
-        print("Mentioned rule does not exist")
-    for rule in security_group_rules:
-        group.authorize_ingress(IpPermissions=[rule])
-    for rule in egress:
-        group.authorize_egress(IpPermissions=[rule])
-    return group.id
+        ec2 = boto3.resource('ec2')
+        group = ec2.create_security_group(GroupName=security_group_name, Description='security_group_name', VpcId=vpc_id)
+        time.sleep(10)
+        create_tag(group.id, tag)
+        try:
+            group.revoke_egress(IpPermissions=[{"IpProtocol": "-1", "IpRanges": [{"CidrIp": "0.0.0.0/0"}], "UserIdGroupPairs": [], "PrefixListIds": []}])
+        except:
+            print("Mentioned rule does not exist")
+        for rule in security_group_rules:
+            group.authorize_ingress(IpPermissions=[rule])
+        for rule in egress:
+            group.authorize_egress(IpPermissions=[rule])
+        return group.id
+    except Exception as err:
+        logging.info("Unable to create security group: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+        append_result(str({"error": "Unable to create security group", "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
+def create_route_by_id(subnet_id, vpc_id, peering_id, another_cidr):
+    client = boto3.client('ec2')
+    try:
+        table_id = client.describe_route_tables(Filters=[{'Name': 'association.subnet-id', 'Values': [subnet_id]}]).get(
+            'RouteTables')
+        if table_id:
+            final_id = table_id[0]['Associations'][0]['RouteTableId']
+        else:
+            table_id = client.describe_route_tables(
+                Filters=[{'Name': 'vpc-id', 'Values': [vpc_id]}, {'Name': 'association.main', 'Values': ['true']}]).get(
+                'RouteTables')
+            final_id = table_id[0]['Associations'][0]['RouteTableId']
+        for table in table_id:
+            routes = table.get('Routes')
+            routeExists = False
+            for route in routes:
+                if route.get('DestinationCidrBlock') == another_cidr:
+                    routeExists = True
+            if not routeExists:
+                client.create_route(
+                    DestinationCidrBlock = another_cidr,
+                    VpcPeeringConnectionId = peering_id,
+                    RouteTableId = final_id)
+    except Exception as err:
+        logging.info("Unable to create route: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+        append_result(str({"error": "Unable to create route",
+                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
+def create_peer_routes(peering_id, service_base_name):
+    client = boto3.client('ec2')
+    try:
+        route_tables = client.describe_route_tables(
+            Filters=[{'Name': 'tag:{}-Tag'.format(service_base_name), 'Values': ['{}'.format(service_base_name)]}]).get('RouteTables')
+        route_tables2 = client.describe_route_tables(Filters=[
+            {'Name': 'tag:{}-secondary-Tag'.format(service_base_name), 'Values': ['{}'.format(service_base_name)]}]).get('RouteTables')
+        for table in route_tables:
+            routes = table.get('Routes')
+            routeExists=False
+            for route in routes:
+                if route.get('DestinationCidrBlock')==os.environ['conf_vpc2_cidr'].replace("'", ""):
+                    routeExists = True
+            if not routeExists:
+                client.create_route(
+                    DestinationCidrBlock=os.environ['conf_vpc2_cidr'].replace("'", ""),
+                    VpcPeeringConnectionId=peering_id,
+                    RouteTableId=table.get('RouteTableId'))
+        for table in route_tables2:
+            routeExists=False
+            for route in routes:
+                if route.get('DestinationCidrBlock')==os.environ['conf_vpc2_cidr'].replace("'", ""):
+                    routeExists = True
+            if not routeExists:
+                client.create_route(
+                    DestinationCidrBlock=os.environ['conf_vpc_cidr'].replace("'", ""),
+                    VpcPeeringConnectionId=peering_id,
+                    RouteTableId=table.get('RouteTableId'))
+    except Exception as err:
+        logging.info("Unable to create route: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+        append_result(str({"error": "Unable to create route",
+                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
+
+def create_peering_connection(vpc_id, vpc2_id, service_base_name):
+    try:
+        ec2 = boto3.resource('ec2')
+        client = boto3.client('ec2')
+        tag = {"Key": service_base_name + '-Tag', "Value": service_base_name}
+        peering = ec2.create_vpc_peering_connection(PeerVpcId=vpc_id, VpcId=vpc2_id)
+        client.accept_vpc_peering_connection(VpcPeeringConnectionId=peering.id)
+        client.modify_vpc_peering_connection_options(
+            AccepterPeeringConnectionOptions={
+                'AllowDnsResolutionFromRemoteVpc': True,
+            },
+            RequesterPeeringConnectionOptions={
+                'AllowDnsResolutionFromRemoteVpc': True,
+            },
+            VpcPeeringConnectionId=peering.id
+        )
+        create_tag(peering.id, json.dumps(tag))
+        return peering.id
+    except Exception as err:
+        logging.info("Unable to create peering connection: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+        append_result(str({"error": "Unable to create peering connection", "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
 
 
 def enable_auto_assign_ip(subnet_id):
@@ -239,8 +358,7 @@
         client.modify_subnet_attribute(MapPublicIpOnLaunch={'Value': True}, SubnetId=subnet_id)
     except Exception as err:
         logging.info("Unable to create Subnet: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
-        append_result(str({"error": "Unable to create Subnet",
-                   "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        append_result(str({"error": "Unable to create Subnet", "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
         traceback.print_exc(file=sys.stdout)
 
 
@@ -428,6 +546,97 @@
         traceback.print_exc(file=sys.stdout)
 
 
+def create_route_53_record(hosted_zone_id, hosted_zone_name, subdomain, ip_address):
+    try:
+        if 'ssn_assume_role_arn' in os.environ:
+            role_session_name = str(uuid.uuid4()).split('-')[0]
+            sts_client = boto3.client('sts')
+            credentials = sts_client.assume_role(
+                RoleArn=os.environ['ssn_assume_role_arn'],
+                RoleSessionName=role_session_name
+            ).get('Credentials')
+            route53_client = boto3.client('route53',
+                                          aws_access_key_id=credentials.get('AccessKeyId'),
+                                          aws_secret_access_key=credentials.get('SecretAccessKey'),
+                                          aws_session_token=credentials.get('SessionToken')
+                                          )
+        else:
+            route53_client = boto3.client('route53')
+        route53_client.change_resource_record_sets(
+            HostedZoneId=hosted_zone_id,
+            ChangeBatch={
+                'Changes': [
+                    {
+                        'Action': 'CREATE',
+                        'ResourceRecordSet': {
+                            'Name': "{}.{}".format(subdomain, hosted_zone_name),
+                            'Type': 'A',
+                            'TTL': 300,
+                            'ResourceRecords': [
+                                {
+                                    'Value': ip_address
+                                }
+                            ]
+                        }
+                    }
+                ]
+            }
+        )
+    except Exception as err:
+        logging.info("Unable to create Route53 record: " + str(err) + "\n Traceback: " + traceback.print_exc(
+            file=sys.stdout))
+        append_result(str({"error": "Unable to create Route53 record",
+                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
+
+def remove_route_53_record(hosted_zone_id, hosted_zone_name, subdomain):
+    try:
+        if 'ssn_assume_role_arn' in os.environ:
+            role_session_name = str(uuid.uuid4()).split('-')[0]
+            sts_client = boto3.client('sts')
+            credentials = sts_client.assume_role(
+                RoleArn=os.environ['ssn_assume_role_arn'],
+                RoleSessionName=role_session_name
+            ).get('Credentials')
+            route53_client = boto3.client('route53',
+                                          aws_access_key_id=credentials.get('AccessKeyId'),
+                                          aws_secret_access_key=credentials.get('SecretAccessKey'),
+                                          aws_session_token=credentials.get('SessionToken')
+                                          )
+        else:
+            route53_client = boto3.client('route53')
+        for record_set in route53_client.list_resource_record_sets(HostedZoneId=hosted_zone_id).get('ResourceRecordSets'):
+            if record_set['Name'] == "{}.{}.".format(subdomain, hosted_zone_name):
+                for record in record_set['ResourceRecords']:
+                    route53_client.change_resource_record_sets(
+                        HostedZoneId=hosted_zone_id,
+                        ChangeBatch={
+                            'Changes': [
+                                {
+                                    'Action': 'DELETE',
+                                    'ResourceRecordSet': {
+                                        'Name': record_set['Name'],
+                                        'Type': 'A',
+                                        'TTL': 300,
+                                        'ResourceRecords': [
+                                            {
+                                                'Value': record['Value']
+                                            }
+                                        ]
+                                    }
+                                }
+                            ]
+                        }
+                    )
+    except Exception as err:
+        logging.info("Unable to remove Route53 record: " + str(err) + "\n Traceback: " + traceback.print_exc(
+            file=sys.stdout))
+        append_result(str({"error": "Unable to remove Route53 record",
+                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
+
 def allocate_elastic_ip():
     try:
         client = boto3.client('ec2')
@@ -761,12 +970,20 @@
         ec2 = boto3.resource('ec2')
         client = boto3.client('ec2')
         tag_name = os.environ['conf_service_base_name'] + '-Tag'
+        tag2_name = os.environ['conf_service_base_name'] + '-secondary-Tag'
         subnets = ec2.subnets.filter(
             Filters=[{'Name': 'tag:{}'.format(tag_name), 'Values': [tag_value]}])
-        if subnets:
-            for subnet in subnets:
-                client.delete_subnet(SubnetId=subnet.id)
-                print("The subnet {} has been deleted successfully".format(subnet.id))
+        subnets2 = ec2.subnets.filter(
+            Filters=[{'Name': 'tag:{}'.format(tag2_name), 'Values': [tag_value]}])
+        if subnets or subnets2:
+            if subnets:
+                for subnet in subnets:
+                    client.delete_subnet(SubnetId=subnet.id)
+                    print("The subnet {} has been deleted successfully".format(subnet.id))
+            if subnets2:
+                for subnet in subnets2:
+                    client.delete_subnet(SubnetId=subnet.id)
+                    print("The subnet {} has been deleted successfully".format(subnet.id))
         else:
             print("There are no private subnets to delete")
     except Exception as err:
@@ -775,6 +992,25 @@
         traceback.print_exc(file=sys.stdout)
 
 
+def remove_peering(tag_value):
+    try:
+        client = boto3.client('ec2')
+        tag_name = os.environ['conf_service_base_name'] + '-Tag'
+        if os.environ['conf_duo_vpc_enable']=='true':
+            peering_id = client.describe_vpc_peering_connections(Filters=[{'Name': 'tag-key', 'Values': [tag_name]}, {'Name': 'tag-value', 'Values': [tag_value]},
+                                                                   {'Name': 'status-code', 'Values': ['active']}]).get('VpcPeeringConnections')[0].get('VpcPeeringConnectionId')
+            if peering_id:
+                client.delete_vpc_peering_connection(VpcPeeringConnectionId=peering_id)
+                print("Peering connection {} has been deleted successfully".format(peering_id))
+            else:
+                print("There are no peering connections to delete")
+        else:
+            print("There are no peering connections to delete because duo vpc option is disabled")
+    except Exception as err:
+        logging.info("Unable to remove peering connection: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+        append_result(str({"error": "Unable to remove peering connection", "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
 def remove_sgroups(tag_value):
     try:
         ec2 = boto3.resource('ec2')
@@ -861,7 +1097,7 @@
         traceback.print_exc(file=sys.stdout)
 
 
-def remove_kernels(emr_name, tag_name, nb_tag_value, ssh_user, key_path, emr_version):
+def remove_kernels(emr_name, tag_name, nb_tag_value, ssh_user, key_path, emr_version, computational_name=''):
     try:
         ec2 = boto3.resource('ec2')
         inst = ec2.instances.filter(
@@ -917,7 +1153,7 @@
                     sudo('sleep 5')
                     sudo('rm -rf /home/{}/.ensure_dir/dataengine-service_{}_interpreter_ensured'.format(ssh_user, emr_name))
                 if exists('/home/{}/.ensure_dir/rstudio_dataengine-service_ensured'.format(ssh_user)):
-                    dlab.fab.remove_rstudio_dataengines_kernel(emr_name, ssh_user)
+                    dlab.fab.remove_rstudio_dataengines_kernel(computational_name, ssh_user)
                 sudo('rm -rf  /opt/' + emr_version + '/' + emr_name + '/')
                 print("Notebook's {} kernels were removed".format(env.hosts))
         else:
@@ -992,6 +1228,7 @@
 def create_image_from_instance(tag_name='', instance_name='', image_name='', tags=''):
     try:
         ec2 = boto3.resource('ec2')
+        client = boto3.client('ec2')
         instances = ec2.instances.filter(
             Filters=[{'Name': 'tag:{}'.format(tag_name), 'Values': [instance_name]},
                      {'Name': 'instance-state-name', 'Values': ['running']}])
@@ -1004,6 +1241,11 @@
                 local("echo Waiting for image creation; sleep 20")
                 image.load()
             tag = {'Key': 'Name', 'Value': os.environ['conf_service_base_name']}
+            response = client.describe_images(ImageIds=[image.id]).get('Images')[0].get('BlockDeviceMappings')
+            for ebs in response:
+                if ebs.get('Ebs'):
+                    snapshot_id = ebs.get('Ebs').get('SnapshotId')
+                    create_tag(snapshot_id, tag)
             create_tag(image.id, tag)
             if tags:
                 all_tags = json.loads(tags)
@@ -1117,7 +1359,8 @@
         logging.info(local("chmod 550 " + aws_user_dir+" 2>&1", capture=True))
 
         return True
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -1213,49 +1456,79 @@
         endpoint_url = "https://s3.{}.amazonaws.com.cn".format(args.region)
     else:
         endpoint_url = 'https://s3-' + args.region + '.amazonaws.com'
-    local("""bash -c 'echo "spark.hadoop.fs.s3a.endpoint    """ + endpoint_url + """" >> """ + spark_def_path + """'""")
+    local("""bash -c 'echo "spark.hadoop.fs.s3a.endpoint    """ + endpoint_url + """ " >> """ + spark_def_path + """'""")
     local('echo "spark.hadoop.fs.s3a.server-side-encryption-algorithm   AES256" >> {}'.format(spark_def_path))
 
 
 def ensure_local_jars(os_user, jars_dir):
     if not exists('/home/{}/.ensure_dir/local_jars_ensured'.format(os_user)):
         try:
-            sudo('mkdir -p ' + jars_dir)
-            sudo('wget http://central.maven.org/maven2/org/apache/hadoop/hadoop-aws/2.7.4/hadoop-aws-2.7.4.jar -O ' +
-                 jars_dir + 'hadoop-aws-2.7.4.jar')
-            sudo('wget http://central.maven.org/maven2/com/amazonaws/aws-java-sdk/1.7.4/aws-java-sdk-1.7.4.jar -O ' +
-                 jars_dir + 'aws-java-sdk-1.7.4.jar')
-            sudo('wget http://maven.twttr.com/com/hadoop/gplcompression/hadoop-lzo/0.4.20/hadoop-lzo-0.4.20.jar -O ' +
-                 jars_dir + 'hadoop-lzo-0.4.20.jar')
+            sudo('mkdir -p {0}'.format(jars_dir))
+            sudo('wget https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/{0}/hadoop-aws-{0}.jar -O \
+                    {1}hadoop-aws-{0}.jar'.format('2.7.4', jars_dir))
+            sudo('wget https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk/{0}/aws-java-sdk-{0}.jar -O \
+                    {1}aws-java-sdk-{0}.jar'.format('1.7.4', jars_dir))
+            sudo('wget https://maven.twttr.com/com/hadoop/gplcompression/hadoop-lzo/{0}/hadoop-lzo-{0}.jar -O \
+                    {1}hadoop-lzo-{0}.jar'.format('0.4.20', jars_dir))
             sudo('touch /home/{}/.ensure_dir/local_jars_ensured'.format(os_user))
         except:
             sys.exit(1)
 
 
-def configure_local_spark(os_user, jars_dir, region, templates_dir, memory_type='driver'):
-    if not exists('/home/{}/.ensure_dir/local_spark_configured'.format(os_user)):
-        try:
-            if region == 'us-east-1':
-                endpoint_url = 'https://s3.amazonaws.com'
-            elif region == 'cn-north-1':
-                endpoint_url = "https://s3.{}.amazonaws.com.cn".format(region)
-            else:
-                endpoint_url = 'https://s3-' + region + '.amazonaws.com'
-            put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/notebook_spark-defaults_local.conf')
-            sudo('echo "spark.hadoop.fs.s3a.endpoint     {}" >> /tmp/notebook_spark-defaults_local.conf'.format(endpoint_url))
-            sudo('echo "spark.hadoop.fs.s3a.server-side-encryption-algorithm   AES256" >> /tmp/notebook_spark-defaults_local.conf')
-            if os.environ['application'] == 'zeppelin':
-                sudo('echo \"spark.jars $(ls -1 ' + jars_dir + '* | tr \'\\n\' \',\')\" >> /tmp/notebook_spark-defaults_local.conf')
-            sudo('\cp /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
-            sudo('touch /home/{}/.ensure_dir/local_spark_configured'.format(os_user))
-        except:
-            sys.exit(1)
+def configure_local_spark(jars_dir, templates_dir, memory_type='driver'):
     try:
+        # Checking if spark.jars parameter was generated previously
+        spark_jars_paths = None
+        if exists('/opt/spark/conf/spark-defaults.conf'):
+            try:
+                spark_jars_paths = sudo('cat /opt/spark/conf/spark-defaults.conf | grep -e "^spark.jars " ')
+            except:
+                spark_jars_paths = None
+        region = sudo('curl http://169.254.169.254/latest/meta-data/placement/availability-zone')[:-1]
+        if region == 'us-east-1':
+            endpoint_url = 'https://s3.amazonaws.com'
+        elif region == 'cn-north-1':
+            endpoint_url = "https://s3.{}.amazonaws.com.cn".format(region)
+        else:
+            endpoint_url = 'https://s3-' + region + '.amazonaws.com'
+        put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/notebook_spark-defaults_local.conf')
+        sudo('echo "spark.hadoop.fs.s3a.endpoint     {}" >> /tmp/notebook_spark-defaults_local.conf'.format(
+            endpoint_url))
+        sudo('echo "spark.hadoop.fs.s3a.server-side-encryption-algorithm   AES256" >> '
+             '/tmp/notebook_spark-defaults_local.conf')
+        if os.environ['application'] == 'zeppelin':
+            sudo('echo \"spark.jars $(ls -1 ' + jars_dir + '* | tr \'\\n\' \',\')\" >> '
+                                                           '/tmp/notebook_spark-defaults_local.conf')
+        sudo('\cp -f /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
         if memory_type == 'driver':
             spark_memory = dlab.fab.get_spark_memory()
             sudo('sed -i "/spark.*.memory/d" /opt/spark/conf/spark-defaults.conf')
-            sudo('echo "spark.{0}.memory {1}m" >> /opt/spark/conf/spark-defaults.conf'.format(memory_type, spark_memory))
-    except:
+            sudo('echo "spark.{0}.memory {1}m" >> /opt/spark/conf/spark-defaults.conf'.format(memory_type,
+                                                                                              spark_memory))
+        if 'spark_configurations' in os.environ:
+            spark_configurations = ast.literal_eval(os.environ['spark_configurations'])
+            new_spark_defaults = list()
+            spark_defaults = sudo('cat /opt/spark/conf/spark-defaults.conf')
+            current_spark_properties = spark_defaults.split('\n')
+            for param in current_spark_properties:
+                for config in spark_configurations:
+                    if config['Classification'] == 'spark-defaults':
+                        for property in config['Properties']:
+                            if property == param.split(' ')[0]:
+                                param = property + ' ' + config['Properties'][property]
+                            else:
+                                new_spark_defaults.append(property + ' ' + config['Properties'][property])
+                new_spark_defaults.append(param)
+            new_spark_defaults = set(new_spark_defaults)
+            sudo('echo "" > /opt/spark/conf/spark-defaults.conf')
+            for prop in new_spark_defaults:
+                prop = prop.rstrip()
+                sudo('echo "{}" >> /opt/spark/conf/spark-defaults.conf'.format(prop))
+            sudo('sed -i "/^\s*$/d" /opt/spark/conf/spark-defaults.conf')
+            if spark_jars_paths:
+                sudo('echo "{}" >> /opt/spark/conf/spark-defaults.conf'.format(spark_jars_paths))
+    except Exception as err:
+        print('Error:', str(err))
         sys.exit(1)
     
 
@@ -1270,24 +1543,26 @@
             python_version = f.read()
         python_version = python_version[0:5]
         livy_port = ''
-        livy_path = '/opt/' + emr_version + '/' + cluster_name + '/livy/'
-        spark_libs = "/opt/" + emr_version + "/jars/usr/share/aws/aws-java-sdk/aws-java-sdk-core*.jar /opt/" + \
-                     emr_version + "/jars/usr/lib/hadoop/hadoop-aws*.jar /opt/" + emr_version + \
-                     "/jars/usr/share/aws/aws-java-sdk/aws-java-sdk-s3-*.jar /opt/" + emr_version + \
-                     "/jars/usr/lib/hadoop-lzo/lib/hadoop-lzo-*.jar"
+        livy_path = '/opt/{0}/{1}/livy/'.format(emr_version, cluster_name)
+        spark_libs = "/opt/{0}/jars/usr/share/aws/aws-java-sdk/aws-java-sdk-core*.jar /opt/{0}/jars/usr/lib/hadoop/hadoop-aws*.jar /opt/" + \
+                     "{0}/jars/usr/share/aws/aws-java-sdk/aws-java-sdk-s3-*.jar /opt/{0}" + \
+                     "/jars/usr/lib/hadoop-lzo/lib/hadoop-lzo-*.jar".format(emr_version)
+        #fix due to: Multiple py4j files found under ..../spark/python/lib
+        #py4j-0.10.7-src.zip still in folder. Versions may varies.
+        local('rm /opt/{0}/{1}/spark/python/lib/py4j-src.zip'.format(emr_version, cluster_name))
+
         local('echo \"Configuring emr path for Zeppelin\"')
-        local('sed -i \"s/^export SPARK_HOME.*/export SPARK_HOME=\/opt\/' + emr_version + '\/' +
-              cluster_name + '\/spark/\" /opt/zeppelin/conf/zeppelin-env.sh')
-        local('sed -i \"s/^export HADOOP_CONF_DIR.*/export HADOOP_CONF_DIR=\/opt\/' + emr_version + '\/' +
-              cluster_name + '\/conf/\" /opt/' + emr_version + '/' + cluster_name +
-              '/spark/conf/spark-env.sh')
-        local('echo \"spark.jars $(ls ' + spark_libs + ' | tr \'\\n\' \',\')\" >> /opt/' + emr_version + '/' +
-              cluster_name + '/spark/conf/spark-defaults.conf')
-        local('sed -i "/spark.executorEnv.PYTHONPATH/d" /opt/' + emr_version + '/' + cluster_name +
-              '/spark/conf/spark-defaults.conf')
-        local('sed -i "/spark.yarn.dist.files/d" /opt/' + emr_version + '/' + cluster_name +
-              '/spark/conf/spark-defaults.conf')
-        local('sudo chown ' + os_user + ':' + os_user + ' -R /opt/zeppelin/')
+        local('sed -i \"s/^export SPARK_HOME.*/export SPARK_HOME=\/opt\/{0}\/{1}\/spark/\" /opt/zeppelin/conf/zeppelin-env.sh'.
+              format(emr_version, cluster_name))
+        local('sed -i "s/^export HADOOP_CONF_DIR.*/export HADOOP_CONF_DIR=' + \
+              '\/opt\/{0}\/{1}\/conf/" /opt/{0}/{1}/spark/conf/spark-env.sh'.format(emr_version, cluster_name))
+        local('echo \"spark.jars $(ls {0} | tr \'\\n\' \',\')\" >> /opt/{1}/{2}/spark/conf/spark-defaults.conf'
+              .format(spark_libs, emr_version, cluster_name))
+        local('sed -i "/spark.executorEnv.PYTHONPATH/d" /opt/{0}/{1}/spark/conf/spark-defaults.conf'
+              .format(emr_version, cluster_name))
+        local('sed -i "/spark.yarn.dist.files/d" /opt/{0}/{1}/spark/conf/spark-defaults.conf'
+              .format(emr_version, cluster_name))
+        local('sudo chown {0}:{0} -R /opt/zeppelin/'.format(os_user))
         local('sudo systemctl daemon-reload')
         local('sudo service zeppelin-notebook stop')
         local('sudo service zeppelin-notebook start')
@@ -1309,15 +1584,13 @@
                     port_number_found = True
                 else:
                     default_port += 1
-            local('sudo echo "livy.server.port = ' + str(livy_port) + '" >> ' + livy_path + 'conf/livy.conf')
-            local('sudo echo "livy.spark.master = yarn" >> ' + livy_path + 'conf/livy.conf')
-            if os.path.exists(livy_path + 'conf/spark-blacklist.conf'):
-                local('sudo sed -i "s/^/#/g" ' + livy_path + 'conf/spark-blacklist.conf')
-            local(''' sudo echo "export SPARK_HOME=''' + spark_dir + '''" >> ''' + livy_path + '''conf/livy-env.sh''')
-            local(''' sudo echo "export HADOOP_CONF_DIR=''' + yarn_dir + '''" >> ''' + livy_path +
-                  '''conf/livy-env.sh''')
-            local(''' sudo echo "export PYSPARK3_PYTHON=python''' + python_version[0:3] + '''" >> ''' +
-                  livy_path + '''conf/livy-env.sh''')
+            local('sudo echo "livy.server.port = {0}" >> {1}conf/livy.conf'.format(str(livy_port), livy_path))
+            local('sudo echo "livy.spark.master = yarn" >> {}conf/livy.conf'.format(livy_path))
+            if os.path.exists('{}conf/spark-blacklist.conf'.format(livy_path)):
+                local('sudo sed -i "s/^/#/g" {}conf/spark-blacklist.conf'.format(livy_path))
+            local(''' sudo echo "export SPARK_HOME={0}" >> {1}conf/livy-env.sh'''.format(spark_dir, livy_path))
+            local(''' sudo echo "export HADOOP_CONF_DIR={0}" >> {1}conf/livy-env.sh'''.format(yarn_dir, livy_path))
+            local(''' sudo echo "export PYSPARK3_PYTHON=python{0}" >> {1}conf/livy-env.sh'''.format(python_version[0:3], livy_path))
             template_file = "/tmp/dataengine-service_interpreter.json"
             fr = open(template_file, 'r+')
             text = fr.read()
@@ -1335,16 +1608,16 @@
                     break
                 except:
                     local('sleep 5')
-            local('sudo cp /opt/livy-server-cluster.service /etc/systemd/system/livy-server-' + str(livy_port) +
-                  '.service')
-            local("sudo sed -i 's|OS_USER|" + os_user + "|' /etc/systemd/system/livy-server-" + str(livy_port) +
-                  '.service')
-            local("sudo sed -i 's|LIVY_PATH|" + livy_path + "|' /etc/systemd/system/livy-server-" + str(livy_port)
-                  + '.service')
-            local('sudo chmod 644 /etc/systemd/system/livy-server-' + str(livy_port) + '.service')
+            local('sudo cp /opt/livy-server-cluster.service /etc/systemd/system/livy-server-{}.service'
+                  .format(str(livy_port)))
+            local("sudo sed -i 's|OS_USER|{0}|' /etc/systemd/system/livy-server-{1}.service"
+                  .format(os_user, str(livy_port)))
+            local("sudo sed -i 's|LIVY_PATH|{0}|' /etc/systemd/system/livy-server-{1}.service"
+                  .format(livy_path, str(livy_port)))
+            local('sudo chmod 644 /etc/systemd/system/livy-server-{}.service'.format(str(livy_port)))
             local("sudo systemctl daemon-reload")
-            local("sudo systemctl enable livy-server-" + str(livy_port))
-            local('sudo systemctl start livy-server-' + str(livy_port))
+            local("sudo systemctl enable livy-server-{}".format(str(livy_port)))
+            local('sudo systemctl start livy-server-{}'.format(str(livy_port)))
         else:
             template_file = "/tmp/dataengine-service_interpreter.json"
             p_versions = ["2", python_version[:3]]
@@ -1357,7 +1630,7 @@
                 text = text.replace('PYTHONVER_SHORT', p_version[:1])
                 text = text.replace('ENDPOINTURL', endpoint_url)
                 text = text.replace('DATAENGINE-SERVICE_VERSION', emr_version)
-                tmp_file = "/tmp/emr_spark_py" + p_version + "_interpreter.json"
+                tmp_file = "/tmp/emr_spark_py{}_interpreter.json".format(p_version)
                 fw = open(tmp_file, 'w')
                 fw.write(text)
                 fw.close()
@@ -1371,21 +1644,52 @@
                         local('sleep 5')
         local('touch /home/' + os_user + '/.ensure_dir/dataengine-service_' + cluster_name + '_interpreter_ensured')
     except:
-            sys.exit(1)
+        sys.exit(1)
 
 
-def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, region, datalake_enabled):
-    local("jar_list=`find {0} -name '*.jar' | tr '\\n' ','` ; echo \"spark.jars   $jar_list\" >> \
+def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, datalake_enabled, spark_configs=''):
+    local("jar_list=`find {0} -name '*.jar' | tr '\\n' ',' | sed 's/,$//'` ; echo \"spark.jars   $jar_list\" >> \
           /tmp/{1}/notebook_spark-defaults_local.conf".format(jars_dir, cluster_name))
+    region = local('curl http://169.254.169.254/latest/meta-data/placement/availability-zone', capture=True)[:-1]
     if region == 'us-east-1':
         endpoint_url = 'https://s3.amazonaws.com'
     elif region == 'cn-north-1':
         endpoint_url = "https://s3.{}.amazonaws.com.cn".format(region)
     else:
         endpoint_url = 'https://s3-' + region + '.amazonaws.com'
-    local("""bash -c 'echo "spark.hadoop.fs.s3a.endpoint    """ + endpoint_url + """" >> /tmp/{}/notebook_spark-defaults_local.conf'""".format(cluster_name))
-    local('echo "spark.hadoop.fs.s3a.server-side-encryption-algorithm   AES256" >> /tmp/{}/notebook_spark-defaults_local.conf'.format(cluster_name))
-    local('mv /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name, cluster_dir))
+    local("""bash -c 'echo "spark.hadoop.fs.s3a.endpoint    """ + endpoint_url +
+          """" >> /tmp/{}/notebook_spark-defaults_local.conf'""".format(cluster_name))
+    local('echo "spark.hadoop.fs.s3a.server-side-encryption-algorithm   AES256" >> '
+          '/tmp/{}/notebook_spark-defaults_local.conf'.format(cluster_name))
+    if os.path.exists('{0}spark/conf/spark-defaults.conf'.format(cluster_dir)):
+        additional_spark_properties = local('diff --changed-group-format="%>" --unchanged-group-format="" '
+                                            '/tmp/{0}/notebook_spark-defaults_local.conf '
+                                            '{1}spark/conf/spark-defaults.conf | grep -v "^#"'.format(
+            cluster_name, cluster_dir), capture=True)
+        for property in additional_spark_properties.split('\n'):
+            local('echo "{0}" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(property, cluster_name))
+    local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
+                                                                                                        cluster_dir))
+    if spark_configs:
+        spark_configurations = ast.literal_eval(spark_configs)
+        new_spark_defaults = list()
+        spark_defaults = local('cat {0}spark/conf/spark-defaults.conf'.format(cluster_dir), capture=True)
+        current_spark_properties = spark_defaults.split('\n')
+        for param in current_spark_properties:
+            for config in spark_configurations:
+                if config['Classification'] == 'spark-defaults':
+                    for property in config['Properties']:
+                        if property == param.split(' ')[0]:
+                            param = property + ' ' + config['Properties'][property]
+                        else:
+                            new_spark_defaults.append(property + ' ' + config['Properties'][property])
+            new_spark_defaults.append(param)
+        new_spark_defaults = set(new_spark_defaults)
+        local('echo "" > {0}/spark/conf/spark-defaults.conf'.format(cluster_dir))
+        for prop in new_spark_defaults:
+            prop = prop.rstrip()
+            local('echo "{0}" >> {1}/spark/conf/spark-defaults.conf'.format(prop, cluster_dir))
+        local('sed -i "/^\s*$/d" {0}/spark/conf/spark-defaults.conf'.format(cluster_dir))
 
 
 def remove_dataengine_kernels(tag_name, notebook_name, os_user, key_path, cluster_name):
@@ -1438,7 +1742,7 @@
             sudo('sleep 5')
             sudo('rm -rf /home/{}/.ensure_dir/dataengine_{}_interpreter_ensured'.format(os_user, cluster_name))
         if exists('/home/{}/.ensure_dir/rstudio_dataengine_ensured'.format(os_user)):
-            dlab.fab.remove_rstudio_dataengines_kernel(cluster_name, os_user)
+            dlab.fab.remove_rstudio_dataengines_kernel(os.environ['computational_name'], os_user)
         sudo('rm -rf  /opt/' + cluster_name + '/')
         print("Notebook's {} kernels were removed".format(env.hosts))
     except Exception as err:
@@ -1470,7 +1774,8 @@
             sudo('mv /opt/spark-' + spark_version + '-bin-hadoop' + hadoop_version + ' ' + local_spark_path)
             sudo('chown -R ' + os_user + ':' + os_user + ' ' + local_spark_path)
             sudo('touch /home/' + os_user + '/.ensure_dir/local_spark_ensured')
-        except:
+        except Exception as err:
+            print('Error:', str(err))
             sys.exit(1)
 
 
@@ -1479,3 +1784,21 @@
     local('tar -zxvf /tmp/' + cluster_name + '/spark-' + spark_version + '-bin-hadoop' + hadoop_version + '.tgz -C /opt/' + cluster_name)
     local('mv /opt/' + cluster_name + '/spark-' + spark_version + '-bin-hadoop' + hadoop_version + ' ' + cluster_dir + 'spark/')
     local('chown -R ' + os_user + ':' + os_user + ' ' + cluster_dir + 'spark/')
+
+
+def find_des_jars(all_jars, des_path):
+    try:
+        default_jars = ['hadoop-aws', 'hadoop-lzo', 'aws-java-sdk']
+        for i in default_jars:
+            for j in all_jars:
+                if i in j:
+                    print('Remove default cloud jar: {0}'.format(j))
+                    all_jars.remove(j)
+        additional_jars = ['hadoop-aws', 'aws-java-sdk-s3', 'hadoop-lzo', 'aws-java-sdk-core']
+        aws_filter = '\|'.join(additional_jars)
+        aws_jars = sudo('find {0} -name *.jar | grep "{1}"'.format(des_path, aws_filter)).split('\r\n')
+        all_jars.extend(aws_jars)
+        return all_jars
+    except Exception as err:
+        print('Error:', str(err))
+        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/lib/aws/meta_lib.py b/infrastructure-provisioning/src/general/lib/aws/meta_lib.py
index cff5428..883c89e 100644
--- a/infrastructure-provisioning/src/general/lib/aws/meta_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/meta_lib.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -316,6 +319,17 @@
                    "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
         traceback.print_exc(file=sys.stdout)
 
+def get_cidr_by_vpc(vpc_id):
+    try:
+        client = boto3.client('ec2')
+        cidr = client.describe_vpcs(VpcIds=[vpc_id]).get('Vpcs')[0].get('CidrBlock')
+        return cidr
+    except Exception as err:
+        logging.error("Error with getting VPC CidrBlock by id: " + str(err) + "\n Traceback: " + traceback.print_exc(
+            file=sys.stdout))
+        append_result(str({"error": "Error with getting VPC CidrBlock by id",
+                   "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
 
 def get_vpc_by_tag(tag_name, tag_value):
     try:
@@ -330,6 +344,35 @@
                    "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
         traceback.print_exc(file=sys.stdout)
 
+def get_peering_by_tag(tag_name, tag_value):
+    try:
+        client = boto3.client('ec2')
+        peering_id = client.describe_vpc_peering_connections(Filters=[{'Name': 'tag-key', 'Values': [tag_name]}, {'Name': 'tag-value', 'Values': [tag_value]},
+                                                                   {'Name': 'status-code', 'Values': ['active']}]).get('VpcPeeringConnections')[0].get('VpcPeeringConnectionId')
+        return peering_id
+    except Exception as err:
+        logging.error("Error with getting peering connection ID by tag: " + str(err) + "\n Traceback: " + traceback.print_exc(
+            file=sys.stdout))
+        append_result(str({"error": "Error with getting peering connection ID by tag",
+                   "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
+def get_vpc_cidr_by_id(vpc_id):
+    try:
+        cidr_list = list()
+        ec2 = boto3.client('ec2')
+        for vpc in ec2.describe_vpcs(VpcIds=[vpc_id]).get('Vpcs'):
+            for cidr_set in vpc.get('CidrBlockAssociationSet'):
+                cidr_list.append(cidr_set.get('CidrBlock'))
+            return cidr_list
+        return ''
+    except Exception as err:
+        logging.error("Error with getting VPC CIDR by ID: " + str(err) + "\n Traceback: " + traceback.print_exc(
+            file=sys.stdout))
+        append_result(str({"error": "Error with getting VPC CIDR by ID",
+                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
 
 def get_emr_info(id, key=''):
     try:
@@ -748,24 +791,62 @@
 
 def get_ec2_price(instance_shape, region):
     try:
-        regions = {'us-west-2': 'Oregon', 'us-east-1': 'N. Virginia', 'us-east-2': 'Ohio', 'us-west-1': 'N. California',
-                   'ca-central-1': 'Central', 'eu-west-1': 'Ireland', 'eu-central-1': 'Frankfurt',
-                   'eu-west-2': 'London', 'ap-northeast-1': 'Tokyo', 'ap-northeast-2': 'Seoul',
-                   'ap-southeast-1': 'Singapore', 'ap-southeast-2': 'Sydney', 'ap-south-1': 'Mumbai',
-                   'sa-east-1': 'Sao Paulo'}
-        response = urllib2.urlopen(
-            'https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json')
-        price_json = response.read()
-        pricing = json.loads(price_json)
-        for i in pricing.get('products'):
-            if pricing.get('products').get(i).get('attributes').get('instanceType') == instance_shape\
-                    and pricing.get('products').get(i).get('attributes').get('operatingSystem') == 'Linux' \
-                    and regions.get(region) in pricing.get('products').get(i).get('attributes').get('location') \
-                    and pricing.get('products').get(i).get('attributes').get('tenancy') == 'Shared':
-                for j in pricing.get('terms').get('OnDemand').get(i):
-                    for h in pricing.get('terms').get('OnDemand').get(i).get(j).get('priceDimensions'):
-                        return float(pricing.get('terms').get('OnDemand').get(i).get(j).get('priceDimensions').get(h).
-                                     get('pricePerUnit').get('USD'))
+        price = '0.001'
+        # Price API endpoints: us-east-1, ap-south-1
+        client = boto3.client('pricing', 'us-east-1')
+        # Price API require full name of region, for example: eu-west-1 -> 'EU (Ireland)'
+        # endpoints will be loaded from: botocore/botocore/data/endpoints.json
+        data = client._loader._cache.get(('load_data', 'endpoints'))
+        standard_partition = filter(lambda x: 'AWS Standard' == x['partitionName'], data['partitions'])[0]
+        region_description = standard_partition['regions'][region]['description']
+
+        response = client.get_products(
+            ServiceCode='AmazonEC2',
+            Filters=[
+                {
+                    'Type': 'TERM_MATCH',
+                    'Field': 'instanceType',
+                    'Value': '{0}'.format(instance_shape)
+                },
+                {
+                    'Type': 'TERM_MATCH',
+                    'Field': 'operatingSystem',
+                    'Value': 'Linux'
+                },
+                {
+                    'Type': 'TERM_MATCH',
+                    'Field': 'tenancy',
+                    'Value': 'Shared'
+                },
+                {
+                    'Type': 'TERM_MATCH',
+                    'Field': 'location',
+                    'Value': '{0}'.format(region_description)
+                },
+                {
+                    'Type': 'TERM_MATCH',
+                    'Field': 'preInstalledSw',
+                    'Value': 'NA'
+                },
+                {
+                    'Type': 'TERM_MATCH',
+                    'Field': 'capacityStatus',
+                    'Value': 'UnusedCapacityReservation'
+                }
+            ],
+            FormatVersion='aws_v1',
+            NextToken='',
+            MaxResults=1
+        )
+
+        data = json.loads(response['PriceList'][0])
+        ondemand = data['terms']['OnDemand']
+        for offer in ondemand:
+            if (data['product']['sku'] in offer):
+                for i in ondemand[offer]['priceDimensions'].keys():
+                    price = ondemand[offer]['priceDimensions'][i]['pricePerUnit']['USD']
+
+        return price
     except Exception as err:
         logging.error("Error with getting EC2 price: " + str(err) + "\n Traceback: " +
                       traceback.print_exc(file=sys.stdout))
@@ -803,7 +884,7 @@
         ec2 = boto3.client('ec2')
         node_list = ec2.describe_instances(Filters=[
             {'Name': 'instance-state-name', 'Values': ['running']},
-            {'Name': 'tag:Name', 'Values': [cluster_name + '*']}]).get('Reservations')
+            {'Name': 'tag:Name', 'Values': [cluster_name + '-*']}]).get('Reservations')
         result = len(node_list)
         return result
     except Exception as err:
@@ -827,7 +908,7 @@
         elif conf_type == 'computational_resource':
             group_tag_name = os.environ['conf_service_base_name'] + ':' + instance_id
             print(group_tag_name)
-            instance_list = get_ec2_list('user:tag', group_tag_name)
+            instance_list = get_ec2_list(os.environ['conf_tag_resource_id'], group_tag_name)
             for instance in instance_list:
                 private_list_ip.append(
                     get_instance_ip_address_by_id(instance.id).get('Private'))
@@ -839,3 +920,28 @@
                            "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
         traceback.print_exc(file=sys.stdout)
 
+
+def format_sg(sg_rules):
+    try:
+        formatted_sg_rules = list()
+        for rule in sg_rules:
+            if rule['IpRanges']:
+                for ip_range in rule['IpRanges']:
+                    formatted_rule = dict()
+                    for key in rule.keys():
+                        if key == 'IpRanges':
+                            formatted_rule['IpRanges'] = [ip_range]
+                        else:
+                            formatted_rule[key] = rule[key]
+                    if formatted_rule not in formatted_sg_rules:
+                        formatted_sg_rules.append(formatted_rule)
+            else:
+                formatted_sg_rules.append(rule)
+        return formatted_sg_rules
+    except Exception as err:
+        logging.error("Error with formatting SG rules: " + str(err) + "\n Traceback: " +
+                      traceback.print_exc(file=sys.stdout))
+        append_result(str({"error": "Error with formatting SG rules",
+                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+        traceback.print_exc(file=sys.stdout)
+
diff --git a/infrastructure-provisioning/src/general/lib/azure/__init__.py b/infrastructure-provisioning/src/general/lib/azure/__init__.py
index e69de29..04cd33e 100644
--- a/infrastructure-provisioning/src/general/lib/azure/__init__.py
+++ b/infrastructure-provisioning/src/general/lib/azure/__init__.py
@@ -0,0 +1,20 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
index f6dd832..bf43464 100644
--- a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -31,6 +34,7 @@
 import azure.common.exceptions as AzureExceptions
 from fabric.api import *
 from fabric.contrib.files import exists
+import backoff
 import urllib2
 import meta_lib
 import logging
@@ -39,6 +43,7 @@
 import os, json
 import dlab.fab
 import dlab.common_lib
+import ast
 
 
 class AzureActions:
@@ -101,7 +106,8 @@
                 {
                     'location': region,
                     'tags': {
-                        'Name': vpc_name
+                        'Name': vpc_name,
+                        os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']
                     },
                     'address_space': {
                         'address_prefixes': [vpc_cidr]
@@ -117,6 +123,33 @@
                                    file=sys.stdout)}))
             traceback.print_exc(file=sys.stdout)
 
+    def create_virtual_network_peerings(self, resource_group_name,
+                                        virtual_network_name,
+                                        virtual_network_peering_name,
+                                        vnet_id
+                                        ):
+        try:
+            result = self.network_client.virtual_network_peerings.create_or_update(
+                resource_group_name,
+                virtual_network_name,
+                virtual_network_peering_name,
+                {
+                    "allow_virtual_network_access": True,
+                    "allow_forwarded_traffic": True,
+                    "remote_virtual_network": {
+                        "id": vnet_id
+                    }
+                }
+            ).wait(60)
+            return result
+        except Exception as err:
+            logging.info(
+                "Unable to create Virtual Network peering: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+            append_result(str({"error": "Unable to create Virtual Network peering",
+                               "error_message": str(err) + "\n Traceback: " + traceback.print_exc(
+                                   file=sys.stdout)}))
+            traceback.print_exc(file=sys.stdout)
+
     def remove_vpc(self, resource_group_name, vpc_name):
         try:
             result = self.network_client.virtual_networks.delete(
@@ -842,11 +875,14 @@
                                    file=sys.stdout)}))
             traceback.print_exc(file=sys.stdout)
 
+    @backoff.on_exception(backoff.expo,
+                          TypeError,
+                          max_tries=5)
     def create_network_if(self, resource_group_name, vpc_name, subnet_name, interface_name, region, security_group_name,
                           tags, public_ip_name="None"):
         try:
             subnet_cidr = meta_lib.AzureMeta().get_subnet(resource_group_name, vpc_name, subnet_name).address_prefix.split('/')[0]
-            private_ip = meta_lib.AzureMeta().check_free_ip(resource_group_name, vpc_name, subnet_cidr).available_ip_addresses[0]
+            private_ip = meta_lib.AzureMeta().check_free_ip(resource_group_name, vpc_name, subnet_cidr)
             subnet_id = meta_lib.AzureMeta().get_subnet(resource_group_name, vpc_name, subnet_name).id
             security_group_id = meta_lib.AzureMeta().get_security_group(resource_group_name, security_group_name).id
             if public_ip_name == "None":
@@ -884,8 +920,12 @@
                     },
                     "ip_configurations": ip_params
                 }
-            )
-            return result._operation.resource.id
+            ).wait()
+            network_interface_id = meta_lib.AzureMeta().get_network_interface(
+                resource_group_name,
+                interface_name
+            ).id
+            return network_interface_id
         except Exception as err:
             logging.info(
                 "Unable to create network interface: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
@@ -956,7 +996,7 @@
                 sudo('sleep 5')
                 sudo('rm -rf /home/{}/.ensure_dir/dataengine_{}_interpreter_ensured'.format(os_user, cluster_name))
             if exists('/home/{}/.ensure_dir/rstudio_dataengine_ensured'.format(os_user)):
-                dlab.fab.remove_rstudio_dataengines_kernel(cluster_name, os_user)
+                dlab.fab.remove_rstudio_dataengines_kernel(os.environ['computational_name'], os_user)
             sudo('rm -rf  /opt/' + cluster_name + '/')
             print("Notebook's {} kernels were removed".format(env.hosts))
         except Exception as err:
@@ -1033,8 +1073,15 @@
             traceback.print_exc(file=sys.stdout)
 
 
-def configure_local_spark(os_user, jars_dir, region, templates_dir, memory_type='driver'):
+def configure_local_spark(jars_dir, templates_dir, memory_type='driver'):
     try:
+        # Checking if spark.jars parameter was generated previously
+        spark_jars_paths = None
+        if exists('/opt/spark/conf/spark-defaults.conf'):
+            try:
+                spark_jars_paths = sudo('cat /opt/spark/conf/spark-defaults.conf | grep -e "^spark.jars " ')
+            except:
+                spark_jars_paths = None
         user_storage_account_tag = os.environ['conf_service_base_name'] + '-' + (os.environ['edge_user_name']).\
             replace('_', '-') + '-storage'
         shared_storage_account_tag = os.environ['conf_service_base_name'] + '-shared-storage'
@@ -1056,7 +1103,7 @@
         sudo('sed -i "s|USER_ACCOUNT_KEY|{}|g" /tmp/core-site.xml'.format(user_storage_account_key))
         sudo('sed -i "s|SHARED_ACCOUNT_KEY|{}|g" /tmp/core-site.xml'.format(shared_storage_account_key))
         if os.environ['azure_datalake_enable'] == 'true':
-            client_id = os.environ['azure_client_id']
+            client_id = os.environ['azure_application_id']
             refresh_token = os.environ['azure_user_refresh_token']
             sudo('sed -i "s|CLIENT_ID|{}|g" /tmp/core-site.xml'.format(client_id))
             sudo('sed -i "s|REFRESH_TOKEN|{}|g" /tmp/core-site.xml'.format(refresh_token))
@@ -1066,36 +1113,78 @@
         else:
             sudo('rm -f /opt/hadoop/etc/hadoop/core-site.xml')
             sudo('mv /tmp/core-site.xml /opt/hadoop/etc/hadoop/core-site.xml')
-        if not exists('/home/{}/.ensure_dir/local_spark_configured'.format(os_user)):
-            put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/notebook_spark-defaults_local.conf')
-            sudo("jar_list=`find {} -name '*.jar' | tr '\\n' ','` ; echo \"spark.jars   $jar_list\" >> \
-                  /tmp/notebook_spark-defaults_local.conf".format(jars_dir))
-            sudo('\cp /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
-            sudo('touch /home/{}/.ensure_dir/local_spark_configured'.format(os_user))
-    except Exception as err:
-        logging.info(
-            "Unable to configure Spark: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
-        append_result(str({"error": "Unable to configure Spark",
-                           "error_message": str(err) + "\n Traceback: " + traceback.print_exc(
-                               file=sys.stdout)}))
-        traceback.print_exc(file=sys.stdout)
-    try:
+        put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/notebook_spark-defaults_local.conf')
+        sudo("jar_list=`find {} -name '*.jar' | tr '\\n' ','` ; echo \"spark.jars   $jar_list\" >> \
+              /tmp/notebook_spark-defaults_local.conf".format(jars_dir))
+        sudo('\cp -f /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
         if memory_type == 'driver':
             spark_memory = dlab.fab.get_spark_memory()
             sudo('sed -i "/spark.*.memory/d" /opt/spark/conf/spark-defaults.conf')
-            sudo('echo "spark.{0}.memory {1}m" >> /opt/spark/conf/spark-defaults.conf'.format(memory_type, spark_memory))
-    except:
+            sudo('echo "spark.{0}.memory {1}m" >> /opt/spark/conf/spark-defaults.conf'.format(memory_type,
+                                                                                              spark_memory))
+        if 'spark_configurations' in os.environ:
+            spark_configurations = ast.literal_eval(os.environ['spark_configurations'])
+            new_spark_defaults = list()
+            spark_defaults = sudo('cat /opt/spark/conf/spark-defaults.conf')
+            current_spark_properties = spark_defaults.split('\n')
+            for param in current_spark_properties:
+                for config in spark_configurations:
+                    if config['Classification'] == 'spark-defaults':
+                        for property in config['Properties']:
+                            if property == param.split(' ')[0]:
+                                param = property + ' ' + config['Properties'][property]
+                            else:
+                                new_spark_defaults.append(property + ' ' + config['Properties'][property])
+                new_spark_defaults.append(param)
+            new_spark_defaults = set(new_spark_defaults)
+            sudo('echo "" > /opt/spark/conf/spark-defaults.conf')
+            for prop in new_spark_defaults:
+                prop = prop.rstrip()
+                sudo('echo "{}" >> /opt/spark/conf/spark-defaults.conf'.format(prop))
+            sudo('sed -i "/^\s*$/d" /opt/spark/conf/spark-defaults.conf')
+            if spark_jars_paths:
+                sudo('echo "{}" >> /opt/spark/conf/spark-defaults.conf'.format(spark_jars_paths))
+    except Exception as err:
+        print('Error:', str(err))
         sys.exit(1)
 
 
-def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, region, datalake_enabled):
-    local("jar_list=`find {0} -name '*.jar' | tr '\\n' ','` ; echo \"spark.jars   $jar_list\" >> \
+def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, datalake_enabled, spark_configs=''):
+    local("jar_list=`find {0} -name '*.jar' | tr '\\n' ',' | sed 's/,$//'` ; echo \"spark.jars   $jar_list\" >> \
           /tmp/{1}/notebook_spark-defaults_local.conf".format(jars_dir, cluster_name))
-    local('mv /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name, cluster_dir))
+    if os.path.exists('{0}spark/conf/spark-defaults.conf'.format(cluster_dir)):
+        additional_spark_properties = local('diff --changed-group-format="%>" --unchanged-group-format="" '
+                                            '/tmp/{0}/notebook_spark-defaults_local.conf '
+                                            '{1}spark/conf/spark-defaults.conf | grep -v "^#"'.format(
+            cluster_name, cluster_dir), capture=True)
+        for property in additional_spark_properties.split('\n'):
+            local('echo "{0}" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(property, cluster_name))
+    local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
+                                                                                                        cluster_dir))
     if datalake_enabled == 'false':
-        local('cp /opt/spark/conf/core-site.xml {}spark/conf/'.format(cluster_dir))
+        local('cp -f /opt/spark/conf/core-site.xml {}spark/conf/'.format(cluster_dir))
     else:
         local('cp -f /opt/hadoop/etc/hadoop/core-site.xml {}hadoop/etc/hadoop/core-site.xml'.format(cluster_dir))
+    if spark_configs:
+        spark_configurations = ast.literal_eval(spark_configs)
+        new_spark_defaults = list()
+        spark_defaults = local('cat {0}spark/conf/spark-defaults.conf'.format(cluster_dir), capture=True)
+        current_spark_properties = spark_defaults.split('\n')
+        for param in current_spark_properties:
+            for config in spark_configurations:
+                if config['Classification'] == 'spark-defaults':
+                    for property in config['Properties']:
+                        if property == param.split(' ')[0]:
+                            param = property + ' ' + config['Properties'][property]
+                        else:
+                            new_spark_defaults.append(property + ' ' + config['Properties'][property])
+            new_spark_defaults.append(param)
+        new_spark_defaults = set(new_spark_defaults)
+        local('echo "" > {0}/spark/conf/spark-defaults.conf'.format(cluster_dir))
+        for prop in new_spark_defaults:
+            prop = prop.rstrip()
+            local('echo "{0}" >> {1}/spark/conf/spark-defaults.conf'.format(prop, cluster_dir))
+        local('sed -i "/^\s*$/d" {0}/spark/conf/spark-defaults.conf'.format(cluster_dir))
 
 
 def remount_azure_disk(creds=False, os_user='', hostname='', keyfile=''):
@@ -1144,14 +1233,14 @@
             else:
                 # Downloading Spark without Hadoop
                 sudo('wget https://archive.apache.org/dist/spark/spark-{0}/spark-{0}-bin-without-hadoop.tgz -O /tmp/spark-{0}-bin-without-hadoop.tgz'
-                     .format(spark_version))
+                    .format(spark_version))
                 sudo('tar -zxvf /tmp/spark-{}-bin-without-hadoop.tgz -C /opt/'.format(spark_version))
                 sudo('mv /opt/spark-{}-bin-without-hadoop {}'.format(spark_version, local_spark_path))
                 sudo('chown -R {0}:{0} {1}'.format(os_user, local_spark_path))
                 # Downloading Hadoop
                 hadoop_version = '3.0.0'
                 sudo('wget https://archive.apache.org/dist/hadoop/common/hadoop-{0}/hadoop-{0}.tar.gz -O /tmp/hadoop-{0}.tar.gz'
-                     .format(hadoop_version))
+                    .format(hadoop_version))
                 sudo('tar -zxvf /tmp/hadoop-{0}.tar.gz -C /opt/'.format(hadoop_version))
                 sudo('mv /opt/hadoop-{0} /opt/hadoop/'.format(hadoop_version))
                 sudo('chown -R {0}:{0} /opt/hadoop/'.format(os_user))
@@ -1165,7 +1254,8 @@
                 sudo('echo "export SPARK_DIST_CLASSPATH={}" >> /opt/spark/conf/spark-env.sh'.format(
                     spark_dist_classpath))
                 sudo('touch /home/{}/.ensure_dir/local_spark_ensured'.format(os_user))
-        except:
+        except Exception as err:
+            print('Error:', str(err))
             sys.exit(1)
 
 
@@ -1201,3 +1291,12 @@
                 spark_dist_classpath, cluster_dir))
     except:
         sys.exit(1)
+
+
+def find_des_jars(all_jars, des_path):
+    try:
+        # Use this method to filter cloud jars (see an example in aws method)
+        return all_jars
+    except Exception as err:
+        print('Error:', str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/lib/azure/meta_lib.py b/infrastructure-provisioning/src/general/lib/azure/meta_lib.py
index a333e12..cfc03a8 100644
--- a/infrastructure-provisioning/src/general/lib/azure/meta_lib.py
+++ b/infrastructure-provisioning/src/general/lib/azure/meta_lib.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -337,7 +340,10 @@
                 vpc_name,
                 ip_address
             )
-            return result
+            if not result.available:
+                return self.check_free_ip(resource_group_name, vpc_name, result.available_ip_addresses[0])
+            if result.available:
+                return ip_address
         except Exception as err:
             logging.info(
                 "Unable to check private ip: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
@@ -408,6 +414,21 @@
                                    file=sys.stdout)}))
             traceback.print_exc(file=sys.stdout)
 
+    def get_network_peering_status(self, resource_group_name,
+                                   virtual_network_name,
+                                   virtual_network_peering_name):
+        try:
+            result = self.network_client.virtual_network_peerings.get(resource_group_name,
+                                                                        virtual_network_name,
+                                                                        virtual_network_peering_name)
+            return result.peering_state
+        except Exception as err:
+            logging.info(
+                "Unable to get peering status: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
+            append_result(str({"error": "Unable to get peering status", "error_message": str(
+                err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)}))
+            traceback.print_exc(file=sys.stdout)
+
     def get_disk(self, resource_group_name, disk_name):
         try:
             result = self.compute_client.disks.get(resource_group_name, disk_name)
@@ -584,8 +605,9 @@
         node_list = []
         resource_group_name = os.environ['azure_resource_group_name']
         for node in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            if cluster_name == node.tags["Name"]:
-                node_list.append(node.name)
+            if "Name" in node.tags:
+                if cluster_name == node.tags["Name"]:
+                    node_list.append(node.name)
         result = len(node_list)
         return result
     except Exception as err:
diff --git a/infrastructure-provisioning/src/general/lib/gcp/__init__.py b/infrastructure-provisioning/src/general/lib/gcp/__init__.py
index e69de29..04cd33e 100644
--- a/infrastructure-provisioning/src/general/lib/gcp/__init__.py
+++ b/infrastructure-provisioning/src/general/lib/gcp/__init__.py
@@ -0,0 +1,20 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
index 250a6ce..23a3941 100644
--- a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,6 +38,7 @@
 import dlab.fab
 import dlab.common_lib
 import backoff
+import ast
 
 
 class GCPActions:
@@ -963,7 +967,7 @@
         local(""" sudo bash -c " sed -i 's/STANDALONE_SPARK_MASTER_HOST.*/STANDALONE_SPARK_MASTER_HOST={0}-m/g' {1}" """.format(args.cluster_name, spark_def_path))
         local(""" sudo bash -c " sed -i 's|/hadoop_gcs_connector_metadata_cache|/tmp/hadoop_gcs_connector_metadata_cache|g' /opt/{0}/{1}/conf/core-site.xml" """.format(args.dataproc_version, args.cluster_name))
 
-    def remove_kernels(self, notebook_name, dataproc_name, dataproc_version, ssh_user, key_path):
+    def remove_kernels(self, notebook_name, dataproc_name, dataproc_version, ssh_user, key_path, computational_name):
         try:
             notebook_ip = meta_lib.GCPMeta().get_private_ip_address(notebook_name)
             env.hosts = "{}".format(notebook_ip)
@@ -1010,7 +1014,7 @@
                 sudo('sleep 5')
                 sudo('rm -rf /home/{}/.ensure_dir/dataengine-service_{}_interpreter_ensured'.format(ssh_user, dataproc_name))
             if exists('/home/{}/.ensure_dir/rstudio_dataengine-service_ensured'.format(ssh_user)):
-                dlab.fab.remove_rstudio_dataengines_kernel(dataproc_name, ssh_user)
+                dlab.fab.remove_rstudio_dataengines_kernel(computational_name, ssh_user)
             sudo('rm -rf  /opt/{0}/{1}/'.format(dataproc_version, dataproc_name))
             print("Notebook's {} kernels were removed".format(env.hosts))
         except Exception as err:
@@ -1175,7 +1179,8 @@
                 sudo('echo \"spark.jars $(ls -1 ' + jars_dir + '* | tr \'\\n\' \',\')\" >> /tmp/notebook_spark-defaults_local.conf')
             sudo('\cp /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
             sudo('touch /home/{}/.ensure_dir/gs_kernel_ensured'.format(os_user))
-        except:
+        except Exception as err:
+            print('Error:', str(err))
             sys.exit(1)
 
 
@@ -1214,26 +1219,53 @@
             sudo('mv /opt/spark-' + spark_version + '-bin-hadoop' + hadoop_version + ' ' + local_spark_path)
             sudo('chown -R ' + os_user + ':' + os_user + ' ' + local_spark_path)
             sudo('touch /home/' + os_user + '/.ensure_dir/local_spark_ensured')
-        except:
+        except Exception as err:
+            print('Error:', str(err))
             sys.exit(1)
 
 
-def configure_local_spark(os_user, jars_dir, region, templates_dir, memory_type='driver'):
-    if not exists('/home/{}/.ensure_dir/local_spark_configured'.format(os_user)):
-        try:
-            put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/notebook_spark-defaults_local.conf')
-            if os.environ['application'] == 'zeppelin':
-                sudo('echo \"spark.jars $(ls -1 ' + jars_dir + '* | tr \'\\n\' \',\')\" >> /tmp/notebook_spark-defaults_local.conf')
-            sudo('\cp /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
-            sudo('touch /home/{}/.ensure_dir/local_spark_configured'.format(os_user))
-        except:
-            sys.exit(1)
+def configure_local_spark(jars_dir, templates_dir, memory_type='driver'):
     try:
+        # Checking if spark.jars parameter was generated previously
+        spark_jars_paths = None
+        if exists('/opt/spark/conf/spark-defaults.conf'):
+            try:
+                spark_jars_paths = sudo('cat /opt/spark/conf/spark-defaults.conf | grep -e "^spark.jars " ')
+            except:
+                spark_jars_paths = None
+        put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/notebook_spark-defaults_local.conf')
+        if os.environ['application'] == 'zeppelin':
+            sudo('echo \"spark.jars $(ls -1 ' + jars_dir + '* | tr \'\\n\' \',\')\" >> /tmp/notebook_spark-defaults_local.conf')
+        sudo('\cp -f /tmp/notebook_spark-defaults_local.conf /opt/spark/conf/spark-defaults.conf')
         if memory_type == 'driver':
             spark_memory = dlab.fab.get_spark_memory()
             sudo('sed -i "/spark.*.memory/d" /opt/spark/conf/spark-defaults.conf')
-            sudo('echo "spark.{0}.memory {1}m" >> /opt/spark/conf/spark-defaults.conf'.format(memory_type, spark_memory))
-    except:
+            sudo('echo "spark.{0}.memory {1}m" >> /opt/spark/conf/spark-defaults.conf'.format(memory_type,
+                                                                                              spark_memory))
+        if 'spark_configurations' in os.environ:
+            spark_configurations = ast.literal_eval(os.environ['spark_configurations'])
+            new_spark_defaults = list()
+            spark_defaults = sudo('cat /opt/spark/conf/spark-defaults.conf')
+            current_spark_properties = spark_defaults.split('\n')
+            for param in current_spark_properties:
+                for config in spark_configurations:
+                    if config['Classification'] == 'spark-defaults':
+                        for property in config['Properties']:
+                            if property == param.split(' ')[0]:
+                                param = property + ' ' + config['Properties'][property]
+                            else:
+                                new_spark_defaults.append(property + ' ' + config['Properties'][property])
+                new_spark_defaults.append(param)
+            new_spark_defaults = set(new_spark_defaults)
+            sudo('echo "" > /opt/spark/conf/spark-defaults.conf')
+            for prop in new_spark_defaults:
+                prop = prop.rstrip()
+                sudo('echo "{}" >> /opt/spark/conf/spark-defaults.conf'.format(prop))
+            sudo('sed -i "/^\s*$/d" /opt/spark/conf/spark-defaults.conf')
+            if spark_jars_paths:
+                sudo('echo "{}" >> /opt/spark/conf/spark-defaults.conf'.format(spark_jars_paths))
+    except Exception as err:
+        print('Error:', str(err))
         sys.exit(1)
 
 
@@ -1287,7 +1319,7 @@
             sudo('sleep 5')
             sudo('rm -rf /home/{}/.ensure_dir/dataengine_{}_interpreter_ensured'.format(os_user, cluster_name))
         if exists('/home/{}/.ensure_dir/rstudio_dataengine_ensured'.format(os_user)):
-            dlab.fab.remove_rstudio_dataengines_kernel(cluster_name, os_user)
+            dlab.fab.remove_rstudio_dataengines_kernel(os.environ['computational_name'], os_user)
         sudo('rm -rf  /opt/' + cluster_name + '/')
         print("Notebook's {} kernels were removed".format(env.hosts))
     except Exception as err:
@@ -1305,9 +1337,45 @@
     local('chown -R ' + os_user + ':' + os_user + ' ' + cluster_dir + 'spark/')
 
 
-def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, region, datalake_enabled):
-    local("jar_list=`find {0} -name '*.jar' | tr '\\n' ','` ; echo \"spark.jars   $jar_list\" >> \
-          /tmp/{1}notebook_spark-defaults_local.conf".format(jars_dir, cluster_name))
-    local('mv /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name, cluster_dir))
-    local('cp /opt/spark/conf/core-site.xml {}spark/conf/'.format(cluster_dir))
+def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, datalake_enabled, spark_configs=''):
+    local("jar_list=`find {0} -name '*.jar' | tr '\\n' ',' | sed 's/,$//'` ; echo \"spark.jars $jar_list\" >> \
+    	          /tmp/{1}/notebook_spark-defaults_local.conf".format(jars_dir, cluster_name))
+    if os.path.exists('{0}spark/conf/spark-defaults.conf'.format(cluster_dir)):
+        additional_spark_properties = local('diff --changed-group-format="%>" --unchanged-group-format="" '
+                                            '/tmp/{0}/notebook_spark-defaults_local.conf '
+                                            '{1}spark/conf/spark-defaults.conf | grep -v "^#"'.format(
+            cluster_name, cluster_dir), capture=True)
+        for property in additional_spark_properties.split('\n'):
+            local('echo "{0}" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(property, cluster_name))
+    local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
+                                                                                                        cluster_dir))
+    local('cp -f /opt/spark/conf/core-site.xml {}spark/conf/'.format(cluster_dir))
+    if spark_configs:
+        spark_configurations = ast.literal_eval(spark_configs)
+        new_spark_defaults = list()
+        spark_defaults = local('cat {0}spark/conf/spark-defaults.conf'.format(cluster_dir), capture=True)
+        current_spark_properties = spark_defaults.split('\n')
+        for param in current_spark_properties:
+            for config in spark_configurations:
+                if config['Classification'] == 'spark-defaults':
+                    for property in config['Properties']:
+                        if property == param.split(' ')[0]:
+                            param = property + ' ' + config['Properties'][property]
+                        else:
+                            new_spark_defaults.append(property + ' ' + config['Properties'][property])
+            new_spark_defaults.append(param)
+        new_spark_defaults = set(new_spark_defaults)
+        local('echo "" > {0}/spark/conf/spark-defaults.conf'.format(cluster_dir))
+        for prop in new_spark_defaults:
+            prop = prop.rstrip()
+            local('echo "{0}" >> {1}/spark/conf/spark-defaults.conf'.format(prop, cluster_dir))
+        local('sed -i "/^\s*$/d" {0}/spark/conf/spark-defaults.conf'.format(cluster_dir))
 
+
+def find_des_jars(all_jars, des_path):
+    try:
+        # Use this method to filter cloud jars (see an example in aws method)
+        return all_jars
+    except Exception as err:
+        print('Error:', str(err))
+        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/lib/gcp/meta_lib.py b/infrastructure-provisioning/src/general/lib/gcp/meta_lib.py
index 26015d5..9181d68 100644
--- a/infrastructure-provisioning/src/general/lib/gcp/meta_lib.py
+++ b/infrastructure-provisioning/src/general/lib/gcp/meta_lib.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -502,6 +505,23 @@
                 data.append(host)
         return data
 
+    def get_cluster(self, cluster_name):
+        try:
+            request = self.dataproc.projects().regions().clusters().get(projectId=self.project,
+                                                                        region=os.environ['gcp_region'],
+                                                                        clusterName=cluster_name)
+            result = request.execute()
+            return result
+        except Exception as err:
+            logging.info(
+                "Unable to get Dataproc: " + str(err) + "\n Traceback: " + traceback.print_exc(
+                    file=sys.stdout))
+            append_result(str({"error": "Unable to get Dataproc",
+                               "error_message": str(err) + "\n Traceback: " + traceback.print_exc(
+                                   file=sys.stdout)}))
+            traceback.print_exc(file=sys.stdout)
+            return ''
+
     def get_dataproc_job_status(self, job_id):
         request = self.dataproc.projects().regions().jobs().get(projectId=self.project,
                                                                 region=os.environ['gcp_region'],
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index 8f7d7f4..2bc7b9b 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -2,31 +2,35 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
 from fabric.api import *
 from fabric.contrib.files import exists
 import sys
+import os
 
 
 def ensure_pkg(user, requisites='linux-headers-generic python-pip python-dev '
                                 'groff gcc vim less git wget sysv-rc-conf '
                                 'libssl-dev unattended-upgrades nmap '
-                                'libffi-dev unzip libxml2-dev'):
+                                'libffi-dev unzip libxml2-dev haveged'):
     try:
         if not exists('/home/{}/.ensure_dir/pkg_upgraded'.format(user)):
             print("Updating repositories "
@@ -36,9 +40,12 @@
             sudo('unattended-upgrades -v')
             sudo('export LC_ALL=C')
             sudo('touch /home/{}/.ensure_dir/pkg_upgraded'.format(user))
-        return True
+            sudo('systemctl enable haveged')
+            sudo('systemctl start haveged')
+            if os.environ['conf_cloud_provider'] == 'aws':
+                sudo('apt-get -y install --install-recommends linux-aws-hwe')
     except:
-        return False
+        sys.exit(1)
 
 
 def renew_gpg_key():
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
index 99fa5e9..6bae640 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -30,20 +33,33 @@
             sudo('apt-get -y install squid')
             template_file = config['template_file']
             proxy_subnet = config['exploratory_subnet']
-            with open("/tmp/tmpsquid.conf", 'w') as out:
-                with open(template_file) as tpl:
-                    for line in tpl:
-                        out.write(line.replace('PROXY_SUBNET', proxy_subnet))
-            put('/tmp/tmpsquid.conf', '/tmp/squid.conf')
+            put(template_file, '/tmp/squid.conf')
             sudo('\cp /tmp/squid.conf /etc/squid/squid.conf')
+            sudo('sed -i "s|PROXY_SUBNET|{}|g" /etc/squid/squid.conf'.format(proxy_subnet))
+            sudo('sed -i "s|EDGE_USER_NAME|{}|g" /etc/squid/squid.conf'.format(config['edge_user_name']))
+            sudo('sed -i "s|LDAP_HOST|{}|g" /etc/squid/squid.conf'.format(config['ldap_host']))
+            sudo('sed -i "s|LDAP_DN|{}|g" /etc/squid/squid.conf'.format(config['ldap_dn']))
+            sudo('sed -i "s|LDAP_SERVICE_USERNAME|{}|g" /etc/squid/squid.conf'.format(config['ldap_user']))
+            sudo('sed -i "s|LDAP_SERVICE_PASSWORD|{}|g" /etc/squid/squid.conf'.format(config['ldap_password']))
+            sudo('sed -i "s|LDAP_AUTH_PATH|{}|g" /etc/squid/squid.conf'.format('/usr/lib/squid/basic_ldap_auth'))
+            replace_string = ''
+            for cidr in config['vpc_cidrs']:
+                replace_string += 'acl AWS_VPC_CIDR dst {}\\n'.format(cidr)
+            sudo('sed -i "s|VPC_CIDRS|{}|g" /etc/squid/squid.conf'.format(replace_string))
+            replace_string = ''
+            for cidr in config['allowed_ip_cidr']:
+                replace_string += 'acl AllowedCIDRS src {}\\n'.format(cidr)
+            sudo('sed -i "s|ALLOWED_CIDRS|{}|g" /etc/squid/squid.conf'.format(replace_string))
             sudo('service squid reload')
             sudo('sysv-rc-conf squid on')
             sudo('touch /tmp/http_proxy_ensured')
-        return True
-    except:
-        return False
+    except Exception as err:
+        print("Failed to install and configure squid: " + str(err))
+        sys.exit(1)
 
-def install_nginx_ldap(edge_ip, nginx_version, ldap_ip, ldap_dn, ldap_ou, ldap_service_pass, ldap_service_username, ldap_user):
+
+def install_nginx_ldap(edge_ip, nginx_version, ldap_ip, ldap_dn, ldap_ou, ldap_service_pass, ldap_service_username,
+                       ldap_user):
     try:
         if not os.path.exists('/tmp/nginx_installed'):
             sudo('apt-get install -y wget')
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
index 425a870..ecb5f02 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -60,6 +63,10 @@
             sudo('sed -i "s|SP_VER|' + spark_version + '|g" /tmp/r_template.json')
             sudo('\cp -f /tmp/r_template.json {}/ir/kernel.json'.format(kernels_dir))
             sudo('ln -s /opt/spark/ /usr/local/spark')
+            try:
+                sudo('cd /usr/local/spark/R/lib/SparkR; R -e "install.packages(\'roxygen2\',repos=\'http://cran.us.r-project.org\')" R -e "devtools::check(\'.\')"')
+            except:
+                pass
             sudo('cd /usr/local/spark/R/lib/SparkR; R -e "devtools::install(\'.\')"')
             sudo('chown -R ' + os_user + ':' + os_user + ' /home/' + os_user + '/.local')
             sudo('touch /home/' + os_user + '/.ensure_dir/r_local_kernel_ensured')
@@ -95,7 +102,7 @@
             except:
                 sudo('R -e "options(download.file.method = "wget");library(\'devtools\');install_github(\'IRkernel/repr\');install_github(\'IRkernel/IRdisplay\');install_github(\'IRkernel/IRkernel\');"')
             if os.environ['application'] == 'tensor-rstudio':
-                sudo('R -e "library(\'devtools\');install_github(\'rstudio/keras\');"')
+                sudo('R -e "library(\'devtools\');install_version(\'keras\', version = \'{}\', repos = \'{}\');"'.format(os.environ['notebook_keras_version'],r_repository))
             sudo('R -e "install.packages(\'RJDBC\',repos=\'{}\',dep=TRUE)"'.format(r_repository))
             sudo('touch /home/' + os_user + '/.ensure_dir/r_ensured')
         except:
@@ -143,6 +150,8 @@
 def ensure_matplot(os_user):
     if not exists('/home/' + os_user + '/.ensure_dir/matplot_ensured'):
         try:
+            sudo("sudo sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list")
+            sudo('sudo apt-get update')
             sudo('apt-get build-dep -y python-matplotlib')
             sudo('pip2 install matplotlib==2.0.2 --no-cache-dir')
             sudo('pip3 install matplotlib==2.0.2 --no-cache-dir')
@@ -273,10 +282,10 @@
             sudo('apt-get -y install dkms')
             kernel_version = run('uname -r | tr -d "[..0-9-]"')
             if kernel_version == 'azure':
-                sudo('apt-get -y install linux-modules-extra-`uname -r`')
+                sudo('apt-get -y install linux-modules-`uname -r`')
             else:
                 #legacy support for old kernels
-                sudo('if [[ $(apt-cache search linux-image-extra-`uname -r`) ]]; then apt-get -y install linux-image-extra-`uname -r`; else apt-get -y install linux-modules-extra-`uname -r`; fi;')
+                sudo('if [[ $(apt-cache search linux-image-`uname -r`) ]]; then apt-get -y install linux-image-`uname -r`; else apt-get -y install linux-modules-`uname -r`; fi;')
             sudo('wget http://us.download.nvidia.com/XFree86/Linux-x86_64/{0}/NVIDIA-Linux-x86_64-{0}.run -O /home/{1}/NVIDIA-Linux-x86_64-{0}.run'.format(nvidia_version, os_user))
             sudo('/bin/bash /home/{0}/NVIDIA-Linux-x86_64-{1}.run -s --dkms'.format(os_user, nvidia_version))
             sudo('rm -f /home/{0}/NVIDIA-Linux-x86_64-{1}.run'.format(os_user, nvidia_version))
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
index b6aafd1..2b2c075 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -2,27 +2,33 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
+from fabric.api import *
 import crypt
 import yaml
 from dlab.fab import *
 from dlab.meta_lib import *
 import os
+import traceback
+import sys
 
 
 def ensure_docker_daemon(dlab_path, os_user, region):
@@ -52,9 +58,10 @@
             sudo('update-rc.d nginx defaults')
             sudo('update-rc.d nginx enable')
             sudo('touch ' + dlab_path + 'tmp/nginx_ensured')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to ensure Nginx: ', str(err))
+        sys.exit(1)
 
 
 def ensure_jenkins(dlab_path):
@@ -66,9 +73,10 @@
             sudo('apt-get -y install openjdk-8-jdk')
             sudo('apt-get -y install jenkins')
             sudo('touch ' + dlab_path + 'tmp/jenkins_ensured')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to ensure Jenkins: ', str(err))
+        sys.exit(1)
 
 
 def configure_jenkins(dlab_path, os_user, config, tag_resource_id):
@@ -86,9 +94,10 @@
             sudo('service jenkins start')
             sudo('touch ' + dlab_path + '/tmp/jenkins_configured')
             sudo('echo "jenkins ALL = NOPASSWD:ALL" >> /etc/sudoers')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to configure Jenkins: ', str(err))
+        sys.exit(1)
 
 
 def configure_nginx(config, dlab_path, hostname):
@@ -102,8 +111,10 @@
             sudo('\cp ' + dlab_path + 'tmp/nginx_proxy.conf /etc/nginx/conf.d/')
             sudo('mkdir -p /etc/nginx/locations')
             sudo('rm -f /etc/nginx/sites-enabled/default')
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to configure Nginx: ', str(err))
+        sys.exit(1)
 
     try:
         if not exists("/etc/nginx/locations/proxy_location_jenkins.conf"):
@@ -117,7 +128,7 @@
             sudo('mv /tmp/proxy_location_jenkins.conf ' + os.environ['ssn_dlab_path'] + 'tmp/')
             sudo('\cp ' + os.environ['ssn_dlab_path'] + 'tmp/proxy_location_jenkins.conf /etc/nginx/locations/')
             sudo("echo 'engineer:" + crypt.crypt(nginx_password, id_generator()) + "' > /etc/nginx/htpasswd")
-            with open('jenkins_crids.txt', 'w+') as f:
+            with open('jenkins_creds.txt', 'w+') as f:
                 f.write("Jenkins credentials: engineer  / " + nginx_password)
     except:
         return False
@@ -136,9 +147,10 @@
             sudo('update-rc.d supervisor defaults')
             sudo('update-rc.d supervisor enable')
             sudo('touch ' + os.environ['ssn_dlab_path'] + 'tmp/superv_ensured')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to install Supervisor: ', str(err))
+        sys.exit(1)
 
 
 def ensure_mongo():
@@ -149,9 +161,10 @@
             sudo('apt-get -y --allow-unauthenticated install mongodb-org')
             sudo('systemctl enable mongod.service')
             sudo('touch ' + os.environ['ssn_dlab_path'] + 'tmp/mongo_ensured')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to install MongoDB: ', str(err))
+        sys.exit(1)
 
 
 def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
@@ -171,8 +184,8 @@
             local('sed -i "s|KEYSTORE_PASSWORD|{}|g" /root/templates/ssn.yml'.format(keystore_passwd))
             local('sed -i "s|CLOUD_PROVIDER|{}|g" /root/templates/ssn.yml'.format(cloud_provider))
             local('sed -i "s|\${JRE_HOME}|' + java_path + '|g" /root/templates/ssn.yml')
-            local('sed -i "s|KEYNAME|{}|g" /root/web_app/provisioning-service/provisioning.yml'.
-                  format(os.environ['conf_key_name']))
+            sudo('sed -i "s|KEYNAME|{}|g" {}/webapp/provisioning-service/conf/provisioning.yml'.
+                 format(os.environ['conf_key_name'], dlab_path))
             put('/root/templates/ssn.yml', '/tmp/ssn.yml')
             sudo('mv /tmp/ssn.yml ' + os.environ['ssn_dlab_path'] + 'conf/')
             put('/root/templates/proxy_location_webapp_template.conf', '/tmp/proxy_location_webapp_template.conf')
@@ -184,19 +197,17 @@
                 f.write(text)
             put('/root/templates/supervisor_svc.conf', '/tmp/supervisor_svc.conf')
             sudo('mv /tmp/supervisor_svc.conf ' + os.environ['ssn_dlab_path'] + 'tmp/')
-            sudo('cp ' + os.environ['ssn_dlab_path'] + 'tmp/proxy_location_webapp_template.conf /etc/nginx/locations/proxy_location_webapp.conf')
+            sudo('cp ' + os.environ['ssn_dlab_path'] +
+                 'tmp/proxy_location_webapp_template.conf /etc/nginx/locations/proxy_location_webapp.conf')
             sudo('cp ' + os.environ['ssn_dlab_path'] + 'tmp/supervisor_svc.conf {}'.format(supervisor_conf))
             sudo('sed -i \'s=WEB_APP_DIR={}=\' {}'.format(web_path, supervisor_conf))
             try:
                 sudo('mkdir -p /var/log/application')
                 run('mkdir -p /tmp/yml_tmp/')
                 for service in ['self-service', 'security-service', 'provisioning-service', 'billing']:
-                    sudo('mkdir -p {0}{1}/'.format(web_path, service))
-                    sudo('chown -R {0}:{0} {1}{2}'.format(os_user, web_path, service))
-                    local('scp -r -i {0} /root/web_app/{3}/*.jar {1}:{2}{3}/'.format(keyfile, host_string, web_path, service))
-                    jar = sudo('cd {0}{1}; find {1}*.jar -type f'.format(web_path, service))
-                    sudo('ln -s {0}{2}/{1} {0}{2}/{2}.jar '.format(web_path, jar, service))
-                    local('scp -r -i {0} /root/web_app/{2}/*.yml {1}:/tmp/yml_tmp/'.format(keyfile, host_string, service))
+                    jar = sudo('cd {0}{1}/lib/; find {1}*.jar -type f'.format(web_path, service))
+                    sudo('ln -s {0}{2}/lib/{1} {0}{2}/{2}.jar '.format(web_path, jar, service))
+                    sudo('cp {0}/webapp/{1}/conf/*.yml /tmp/yml_tmp/'.format(dlab_path, service))
                 if cloud_provider == 'azure':
                     for config in ['self-service', 'security']:
                         sudo('sed -i "s|<LOGIN_USE_LDAP>|{1}|g" /tmp/yml_tmp/{0}.yml'.format(config, ldap_login))
@@ -213,14 +224,13 @@
                         sudo('sed -i "s|<LOGIN_PAGE>|{1}|g" /tmp/yml_tmp/{0}.yml'.format(config, hostname))
                     if os.environ['azure_datalake_enable'] == 'true':
                         permission_scope = 'subscriptions/{}/resourceGroups/{}/providers/Microsoft.DataLakeStore/accounts/{}/providers/Microsoft.Authorization/'.format(
-                            subscription_id, service_base_name, data_lake_name
-                        )
+                            subscription_id, service_base_name, data_lake_name)
                     else:
                         permission_scope = 'subscriptions/{}/resourceGroups/{}/providers/Microsoft.Authorization/'.format(
                             subscription_id, service_base_name
                         )
                     sudo('sed -i "s|<PERMISSION_SCOPE>|{}|g" /tmp/yml_tmp/security.yml'.format(permission_scope))
-                sudo('mv /tmp/yml_tmp/* ' + os.environ['ssn_dlab_path'] + 'conf/')
+                sudo('mv /tmp/yml_tmp/* ' + dlab_conf_dir)
                 sudo('rmdir /tmp/yml_tmp/')
             except:
                 append_result("Unable to upload webapp jars")
@@ -286,7 +296,27 @@
             sudo('service nginx restart')
             sudo('service supervisor restart')
             sudo('touch ' + os.environ['ssn_dlab_path'] + 'tmp/ss_started')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to start Self-service: ', str(err))
+        sys.exit(1)
 
+
+def install_build_dep():
+    try:
+        if not exists('{}tmp/build_dep_ensured'.format(os.environ['ssn_dlab_path'])):
+            maven_version = '3.5.4'
+            sudo('apt-get install -y openjdk-8-jdk git wget unzip')
+            with cd('/opt/'):
+                sudo('wget http://mirrors.sonic.net/apache/maven/maven-{0}/{1}/binaries/apache-maven-{1}-bin.zip'.format(
+                    maven_version.split('.')[0], maven_version))
+                sudo('unzip apache-maven-{}-bin.zip'.format(maven_version))
+                sudo('mv apache-maven-{} maven'.format(maven_version))
+            sudo('bash -c "curl --silent --location https://deb.nodesource.com/setup_8.x | bash -"')
+            sudo('apt-get install -y nodejs')
+            sudo('npm config set unsafe-perm=true')
+            sudo('touch {}tmp/build_dep_ensured'.format(os.environ['ssn_dlab_path']))
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to install build dependencies for UI: ', str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index fc4a4df..fc287c9 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -28,6 +31,7 @@
 from dlab.actions_lib import *
 import dlab.actions_lib
 import re
+import traceback
 
 
 def ensure_pip(requisites):
@@ -38,9 +42,8 @@
             sudo('pip install -UI pip=={} --no-cache-dir'.format(os.environ['conf_pip_version']))
             sudo('pip install -U {} --no-cache-dir'.format(requisites))
             sudo('touch /home/{}/.ensure_dir/pip_path_added'.format(os.environ['conf_os_user']))
-        return True
     except:
-        return False
+        sys.exit(1)
 
 
 def dataengine_dir_prepare(cluster_dir):
@@ -147,17 +150,17 @@
             sudo('pip2 install jupyter --no-cache-dir')
             sudo('pip3.5 install notebook=={} --no-cache-dir'.format(jupyter_version))
             sudo('pip3.5 install jupyter --no-cache-dir')
-            sudo('rm -rf ' + jupyter_conf_file)
-            run('jupyter notebook --generate-config --config ' + jupyter_conf_file)
+            sudo('rm -rf {}'.format(jupyter_conf_file))
+            run('jupyter notebook --generate-config --config {}'.format(jupyter_conf_file))
             with cd('/home/{}'.format(os_user)):
                 run('mkdir -p ~/.jupyter/custom/')
                 run('echo "#notebook-container { width: auto; }" > ~/.jupyter/custom/custom.css')
-            sudo('echo "c.NotebookApp.ip = \'*\'" >> ' + jupyter_conf_file)
+            sudo('echo "c.NotebookApp.ip = \'0.0.0.0\'" >> {}'.format(jupyter_conf_file))
             sudo('echo "c.NotebookApp.base_url = \'/{0}/\'" >> {1}'.format(exploratory_name, jupyter_conf_file))
-            sudo('echo c.NotebookApp.open_browser = False >> ' + jupyter_conf_file)
-            sudo('echo \'c.NotebookApp.cookie_secret = b"' + id_generator() + '"\' >> ' + jupyter_conf_file)
-            sudo('''echo "c.NotebookApp.token = u''" >> ''' + jupyter_conf_file)
-            sudo('echo \'c.KernelSpecManager.ensure_native_kernel = False\' >> ' + jupyter_conf_file)
+            sudo('echo c.NotebookApp.open_browser = False >> {}'.format(jupyter_conf_file))
+            sudo('echo \'c.NotebookApp.cookie_secret = b"{0}"\' >> {1}'.format(id_generator(), jupyter_conf_file))
+            sudo('''echo "c.NotebookApp.token = u''" >> {}'''.format(jupyter_conf_file))
+            sudo('echo \'c.KernelSpecManager.ensure_native_kernel = False\' >> {}'.format(jupyter_conf_file))
             put(templates_dir + 'jupyter-notebook.service', '/tmp/jupyter-notebook.service')
             sudo("chmod 644 /tmp/jupyter-notebook.service")
             if os.environ['application'] == 'tensor':
@@ -271,14 +274,19 @@
 
 
 def ensure_ciphers():
-    sudo('echo -e "\nKexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" >> /etc/ssh/sshd_config')
-    sudo('echo -e "Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr" >> /etc/ssh/sshd_config')
-    sudo('echo -e "\tKexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" >> /etc/ssh/ssh_config')
-    sudo('echo -e "\tCiphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr" >> /etc/ssh/ssh_config')
     try:
-        sudo('service ssh restart')
-    except:
-        sudo('service sshd restart')
+        sudo('echo -e "\nKexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" >> /etc/ssh/sshd_config')
+        sudo('echo -e "Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr" >> /etc/ssh/sshd_config')
+        sudo('echo -e "\tKexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" >> /etc/ssh/ssh_config')
+        sudo('echo -e "\tCiphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr" >> /etc/ssh/ssh_config')
+        try:
+            sudo('service ssh reload')
+        except:
+            sudo('service sshd reload')
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to ensure ciphers: ', str(err))
+        sys.exit(1)
 
 
 def install_r_pkg(requisites):
@@ -302,31 +310,70 @@
     except:
         return "Fail to install R packages"
 
+
+def update_spark_jars(jars_dir='/opt/jars'):
+    try:
+        configs = sudo('find /opt/ /etc/ /usr/lib/ -name spark-defaults.conf -type f').split('\r\n')
+        if exists(jars_dir):
+            for conf in filter(None, configs):
+                des_path = ''
+                all_jars = sudo('find {0} -name "*.jar"'.format(jars_dir)).split('\r\n')
+                if ('-des-' in conf):
+                    des_path = '/'.join(conf.split('/')[:3])
+                    all_jars = find_des_jars(all_jars, des_path)
+                sudo('''sed -i '/^# Generated\|^spark.jars/d' {0}'''.format(conf))
+                sudo('echo "# Generated spark.jars by DLab from {0}\nspark.jars {1}" >> {2}'
+                     .format(','.join(filter(None, [jars_dir, des_path])), ','.join(all_jars), conf))
+                # sudo("sed -i 's/^[[:space:]]*//' {0}".format(conf))
+        else:
+            print("Can't find directory {0} with jar files".format(jars_dir))
+    except Exception as err:
+        append_result("Failed to update spark.jars parameter", str(err))
+        print("Failed to update spark.jars parameter")
+        sys.exit(1)
+
+
 def install_java_pkg(requisites):
     status = list()
-    full_pkg = [a + ":" + b for a, b in zip(requisites[::2], requisites[1::2])]
-    error_parser = "ERROR|error|No such|no such|Please run|requires"
-    work_dir = "/opt/dlab/java_libs"
+    error_parser = "ERROR|error|No such|no such|Please run|requires|module not found"
+    templates_dir = '/root/templates/'
+    ivy_dir = '/opt/ivy'
+    ivy_cache_dir = '{0}/cache/'.format(ivy_dir)
+    ivy_settings = 'ivysettings.xml'
+    dest_dir = '/opt/jars/java'
     try:
-        if not exists(work_dir):
-            sudo('mkdir -p {}'.format(work_dir))
-        for java_pkg in full_pkg:
-            splitted_pkg = java_pkg.split(":")
-            name_pkg = splitted_pkg[1] + '-' + splitted_pkg[2] + '.jar'
-            sudo('wget -O {5}/{3} https://search.maven.org/classic/remotecontent?filepath={0}/{1}/{2}/{3} 2>&1 | tee /tmp/tee.tmp; \
-                  if ! grep -w -E  "({4})" /tmp/tee.tmp >  /tmp/install_{3}.log; \
-                  then  echo "" > /tmp/install_{3}.log;fi'.format(splitted_pkg[0].replace(".","/"), splitted_pkg[1], splitted_pkg[2],name_pkg, error_parser, work_dir))
-            sudo('jar tf {2}/{0} 2>&1 |if ! grep -w -E "({1})" > /tmp/install_{0}.list; then  echo "" > /tmp/install_{0}.list;fi'.format(name_pkg, error_parser, work_dir))
-            err = sudo('cat /tmp/install_{0}.log'.format(name_pkg)).replace('"', "'")
-            res = sudo('cat /tmp/install_{0}.list'.format(name_pkg))
+        ivy_jar = sudo('find /opt /usr -name "*ivy-{0}.jar" | head -n 1'.format(os.environ['notebook_ivy_version']))
+        sudo('mkdir -p {0} {1}'.format(ivy_dir, dest_dir))
+        put('{0}{1}'.format(templates_dir, ivy_settings), '{0}/{1}'.format(ivy_dir, ivy_settings), use_sudo=True)
+        proxy_string = sudo('cat /etc/profile | grep http_proxy | cut -f2 -d"="')
+        proxy_re = '(?P<proto>http.*)://(?P<host>[^:/ ]+):(?P<port>[0-9]*)'
+        proxy_find = re.search(proxy_re, proxy_string)
+        java_proxy = "export _JAVA_OPTIONS='-Dhttp.proxyHost={0} -Dhttp.proxyPort={1} \
+            -Dhttps.proxyHost={0} -Dhttps.proxyPort={1}'".format(proxy_find.group('host'), proxy_find.group('port'))
+        for java_pkg in requisites:
+            sudo('rm -rf {0}'.format(ivy_cache_dir))
+            sudo('mkdir -p {0}'.format(ivy_cache_dir))
+            group, artifact, version, override = java_pkg
+            print("Installing package (override: {3}): {0}:{1}:{2}".format(group, artifact, version, override))
+            sudo('{8}; java -jar {0} -settings {1}/{2} -cache {3} -dependency {4} {5} {6} 2>&1 | tee /tmp/tee.tmp; \
+                if ! grep -w -E  "({7})" /tmp/tee.tmp > /tmp/install_{5}.log; then echo "" > /tmp/install_{5}.log;fi'
+                 .format(ivy_jar, ivy_dir, ivy_settings, ivy_cache_dir, group, artifact, version, error_parser, java_proxy))
+            err = sudo('cat /tmp/install_{0}.log'.format(artifact)).replace('"', "'").strip()
+            sudo('find {0} -name "{1}*.jar" | head -n 1 | rev | cut -f1 -d "/" | rev | \
+                if ! grep -w -i {1} > /tmp/install_{1}.list; then echo "" > /tmp/install_{1}.list;fi'.format(ivy_cache_dir, artifact))
+            res = sudo('cat /tmp/install_{0}.list'.format(artifact))
             if res:
-                err+=' jar tf results:' + sudo('cat /tmp/install_{0}.list'.format(name_pkg))
-                status.append({"group": "java", "name": splitted_pkg[0]+':'+splitted_pkg[1], "status": "failed", "error_message": err})
+                sudo('cp -f $(find {0} -name "*.jar" | xargs) {1}'.format(ivy_cache_dir, dest_dir))
+                status.append({"group": "java", "name": "{0}:{1}".format(group, artifact), "version": version, "status": "installed"})
             else:
-                status.append({"group": "java", "name": splitted_pkg[0]+':'+splitted_pkg[1], "version": splitted_pkg[2], "status": "installed"})
+                status.append({"group": "java", "name": "{0}:{1}".format(group, artifact), "status": "failed", "error_message": err})
+        update_spark_jars()
         return status
-    except Exception as errr:
-        return "Fail to install Java packages: " + str(errr)
+    except Exception as err:
+        append_result("Failed to install {} packages".format(requisites), str(err))
+        print("Failed to install {} packages".format(requisites))
+        sys.exit(1)
+
 
 def get_available_r_pkgs():
     try:
@@ -470,10 +517,15 @@
 
 def remove_rstudio_dataengines_kernel(cluster_name, os_user):
     try:
+        cluster_re = ['-{}"'.format(cluster_name),
+                      '-{}-'.format(cluster_name),
+                      '-{}/'.format(cluster_name)]
         get('/home/{}/.Rprofile'.format(os_user), 'Rprofile')
         data = open('Rprofile').read()
-        conf = [i for i in data.split('\n') if i != '']
-        conf = [i for i in conf if cluster_name not in i]
+        conf = filter(None, data.split('\n'))
+        # Filter config from any math of cluster_name in line,
+        # separated by defined symbols to avoid partly matches
+        conf = [i for i in conf if not any(x in i for x in cluster_re)]
         comment_all = lambda x: x if x.startswith('#master') else '#{}'.format(x)
         uncomment = lambda x: x[1:] if not x.startswith('#master') else x
         conf =[comment_all(i) for i in conf]
@@ -488,10 +540,12 @@
         put('.Rprofile', '/home/{}/.Rprofile'.format(os_user))
         get('/home/{}/.Renviron'.format(os_user), 'Renviron')
         data = open('Renviron').read()
-        conf = [i for i in data.split('\n') if i != '']
+        conf = filter(None, data.split('\n'))
         comment_all = lambda x: x if x.startswith('#') else '#{}'.format(x)
         conf = [comment_all(i) for i in conf]
-        conf = [i for i in conf if cluster_name not in i]
+        # Filter config from any math of cluster_name in line,
+        # separated by defined symbols to avoid partly matches
+        conf = [i for i in conf if not any(x in i for x in cluster_re)]
         if active_cluster:
             activate_cluster = lambda x: x[1:] if active_cluster in x else x
             conf = [activate_cluster(i) for i in conf]
@@ -628,3 +682,13 @@
     except Exception as err:
         print('Failed to update Zeppelin interpreters', str(err))
         sys.exit(1)
+
+
+def update_hosts_file(os_user):
+    try:
+        if not exists('/home/{}/.ensure_dir/hosts_file_updated'.format(os_user)):
+            sudo('sed -i "s/^127.0.0.1 localhost/127.0.0.1 localhost localhost.localdomain/g" /etc/hosts')
+            sudo('touch /home/{}/.ensure_dir/hosts_file_updated'.format(os_user))
+    except Exception as err:
+        print('Failed to update hosts file', str(err))
+        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/common_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/common_lib.py
index 10dfa87..e99c64c 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/common_lib.py
@@ -2,24 +2,28 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
 from fabric.api import *
 from fabric.contrib.files import exists
+import sys
 
 
 def ensure_pkg(user, requisites='git vim gcc python-devel openssl-devel nmap libffi libffi-devel unzip'):
@@ -50,9 +54,8 @@
             sudo('export LC_ALL=C')
             sudo('yum -y install ' + requisites)
             sudo('touch /home/{}/.ensure_dir/pkg_upgraded'.format(user))
-        return True
     except:
-        return False
+        sys.exit(1)
 
 
 def change_pkg_repos():
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py
index c61814d..1b92581 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/edge_lib.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -23,26 +26,40 @@
 from fabric.api import *
 from fabric.contrib.files import exists
 
+
 def configure_http_proxy_server(config):
     try:
         if not exists('/tmp/http_proxy_ensured'):
             sudo('yum -y install squid')
             template_file = config['template_file']
             proxy_subnet = config['exploratory_subnet']
-            with open("/tmp/tmpsquid.conf", 'w') as out:
-                with open(template_file) as tpl:
-                    for line in tpl:
-                        out.write(line.replace('PROXY_SUBNET', proxy_subnet))
-            put('/tmp/tmpsquid.conf', '/tmp/squid.conf')
+            put(template_file, '/tmp/squid.conf')
             sudo('\cp /tmp/squid.conf /etc/squid/squid.conf')
+            sudo('sed -i "s|PROXY_SUBNET|{}|g" /etc/squid/squid.conf'.format(proxy_subnet))
+            sudo('sed -i "s|EDGE_USER_NAME|{}|g" /etc/squid/squid.conf'.format(config['edge_user_name']))
+            sudo('sed -i "s|LDAP_HOST|{}|g" /etc/squid/squid.conf'.format(config['ldap_host']))
+            sudo('sed -i "s|LDAP_DN|{}|g" /etc/squid/squid.conf'.format(config['ldap_dn']))
+            sudo('sed -i "s|LDAP_SERVICE_USERNAME|{}|g" /etc/squid/squid.conf'.format(config['ldap_user']))
+            sudo('sed -i "s|LDAP_SERVICE_PASSWORD|{}|g" /etc/squid/squid.conf'.format(config['ldap_password']))
+            sudo('sed -i "s|LDAP_AUTH_PATH|{}|g" /etc/squid/squid.conf'.format('/usr/lib64/squid/basic_ldap_auth'))
+            replace_string = ''
+            for cidr in config['vpc_cidrs']:
+                replace_string += 'acl AWS_VPC_CIDR dst {}\\n'.format(cidr)
+            sudo('sed -i "s|VPC_CIDRS|{}|g" /etc/squid/squid.conf'.format(replace_string))
+            replace_string = ''
+            for cidr in config['allowed_ip_cidr']:
+                replace_string += 'acl AllowedCIDRS src {}\\n'.format(cidr)
+            sudo('sed -i "s|ALLOWED_CIDRS|{}|g" /etc/squid/squid.conf'.format(replace_string))
             sudo('systemctl restart squid')
             sudo('chkconfig squid on')
             sudo('touch /tmp/http_proxy_ensured')
-        return True
-    except:
-        return False
+    except Exception as err:
+        print("Failed to install and configure squid: " + str(err))
+        sys.exit(1)
 
-def install_nginx_ldap(edge_ip, nginx_version, ldap_ip, ldap_dn, ldap_ou, ldap_service_pass, ldap_service_username, ldap_user):
+
+def install_nginx_ldap(edge_ip, nginx_version, ldap_ip, ldap_dn, ldap_ou, ldap_service_pass, ldap_service_username,
+                       ldap_user):
     try:
         if not os.path.exists('/tmp/nginx_installed'):
             sudo('yum install -y wget')
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
index 7f12776..d03710d 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -61,6 +64,10 @@
             sudo('chown -R ' + os_user + ':' + os_user + ' /home/' + os_user + '/.local')
             run('R -e "IRkernel::installspec()"')
             sudo('ln -s /opt/spark/ /usr/local/spark')
+            try:
+                sudo('cd /usr/local/spark/R/lib/SparkR; R -e "install.packages(\'roxygen2\',repos=\'http://cran.us.r-project.org\')" R -e "devtools::check(\'.\')"')
+            except:
+                pass
             sudo('cd /usr/local/spark/R/lib/SparkR; R -e "devtools::install(\'.\')"')
             r_version = sudo("R --version | awk '/version / {print $3}'")
             put(templates_dir + 'r_template.json', '/tmp/r_template.json')
@@ -91,7 +98,7 @@
                 sudo('R -e "install.packages(\'{}\',repos=\'{}\')"'.format(i, r_repository))
             sudo('R -e "library(\'devtools\');install.packages(repos=\'{}\',c(\'rzmq\',\'repr\',\'digest\',\'stringr\',\'RJSONIO\',\'functional\',\'plyr\'))"'.format(r_repository))
             sudo('R -e "library(\'devtools\');install_github(\'IRkernel/repr\');install_github(\'IRkernel/IRdisplay\');install_github(\'IRkernel/IRkernel\');"')
-            sudo('R -e "library(\'devtools\');install_github(\'rstudio/keras\');"')
+            sudo('R -e "library(\'devtools\');install_version(\'keras\', version = \'{}\', repos = \'{}\');"'.format(os.environ['notebook_keras_version'],r_repository))
             sudo('R -e "install.packages(\'RJDBC\',repos=\'{}\',dep=TRUE)"'.format(r_repository))
             sudo('touch /home/{}/.ensure_dir/r_ensured'.format(os_user))
         except:
@@ -259,7 +266,7 @@
             sudo('dracut --force')
             with settings(warn_only=True):
                 reboot(wait=150)
-            sudo('yum -y install dkms gcc kernel-devel-$(uname -r) kernel-headers-$(uname -r)')
+            sudo('yum -y install libglvnd-opengl libglvnd-devel dkms gcc kernel-devel-$(uname -r) kernel-headers-$(uname -r)')
             sudo('wget http://us.download.nvidia.com/XFree86/Linux-x86_64/{0}/NVIDIA-Linux-x86_64-{0}.run -O /home/{1}/NVIDIA-Linux-x86_64-{0}.run'.format(nvidia_version, os_user))
             sudo('/bin/bash /home/{0}/NVIDIA-Linux-x86_64-{1}.run -s --dkms'.format(os_user, nvidia_version))
             sudo('rm -f /home/{0}/NVIDIA-Linux-x86_64-{1}.run'.format(os_user, nvidia_version))
@@ -330,7 +337,8 @@
 
 def install_nodejs(os_user):
     if not exists('/home/{}/.ensure_dir/nodejs_ensured'.format(os_user)):
-        sudo('yum install -y npm nodejs')
+        sudo('curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -')
+        sudo('yum install -y nodejs')
         sudo('touch /home/{}/.ensure_dir/nodejs_ensured'.format(os_user))
 
 
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
index 543db01..164dfc5 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
@@ -2,27 +2,33 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
+from fabric.api import *
 import crypt
 import yaml
 from dlab.fab import *
 from dlab.meta_lib import *
 import os
+import sys
+import traceback
 
 
 def ensure_docker_daemon(dlab_path, os_user, region):
@@ -60,9 +66,10 @@
             sudo('systemctl restart nginx.service')
             sudo('chkconfig nginx on')
             sudo('touch {}tmp/nginx_ensured'.format(dlab_path))
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to ensure Nginx: ', str(err))
+        sys.exit(1)
 
 
 def ensure_jenkins(dlab_path):
@@ -77,9 +84,10 @@
             sudo('yum -y install jenkins')
             sudo('yum -y install policycoreutils-python')
             sudo('touch {}tmp/jenkins_ensured'.format(dlab_path))
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to ensure Jenkins: ', str(err))
+        sys.exit(1)
 
 
 def configure_jenkins(dlab_path, os_user, config, tag_resource_id):
@@ -101,9 +109,10 @@
             sudo('systemctl start jenkins.service')
             sudo('echo "jenkins ALL = NOPASSWD:ALL" >> /etc/sudoers')
             sudo('touch {}tmp/jenkins_configured'.format(dlab_path))
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to configure Jenkins: ', str(err))
+        sys.exit(1)
 
 
 def configure_nginx(config, dlab_path, hostname):
@@ -119,8 +128,10 @@
             sudo('\cp ' + dlab_path + 'tmp/nginx_proxy.conf /etc/nginx/conf.d/')
             sudo('mkdir -p /etc/nginx/locations')
             sudo('rm -f /etc/nginx/sites-enabled/default')
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to configure Nginx: ', str(err))
+        sys.exit(1)
 
     try:
         if not exists("/etc/nginx/locations/proxy_location_jenkins.conf"):
@@ -130,10 +141,11 @@
                 with open(template_file) as tpl:
                     for line in tpl:
                         out.write(line)
-            put("/tmp/%s-tmpproxy_location_jenkins_template.conf" % random_file_part, '/tmp/proxy_location_jenkins.conf')
+            put("/tmp/%s-tmpproxy_location_jenkins_template.conf" % random_file_part,
+                '/tmp/proxy_location_jenkins.conf')
             sudo('\cp /tmp/proxy_location_jenkins.conf /etc/nginx/locations/')
             sudo("echo 'engineer:" + crypt.crypt(nginx_password, id_generator()) + "' > /etc/nginx/htpasswd")
-            with open('jenkins_crids.txt', 'w+') as f:
+            with open('jenkins_creds.txt', 'w+') as f:
                 f.write("Jenkins credentials: engineer  / " + nginx_password)
     except:
         return False
@@ -153,9 +165,10 @@
             sudo('chkconfig supervisord on')
             sudo('systemctl start supervisord')
             sudo('touch {}tmp/superv_ensured'.format(os.environ['ssn_dlab_path']))
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to install supervisor: ', str(err))
+        sys.exit(1)
 
 
 def ensure_mongo():
@@ -174,9 +187,10 @@
             sudo('sudo systemd-tmpfiles --create mongodb.conf')
             sudo('systemctl start mongod.service')
             sudo('touch {}tmp/mongo_ensured'.format(os.environ['ssn_dlab_path']))
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to install MongoDB: ', str(err))
+        sys.exit(1)
 
 
 def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
@@ -196,8 +210,8 @@
             local('sed -i "s|KEYSTORE_PASSWORD|{}|g" /root/templates/ssn.yml'.format(keystore_passwd))
             local('sed -i "s|CLOUD_PROVIDER|{}|g" /root/templates/ssn.yml'.format(cloud_provider))
             local('sed -i "s|\${JRE_HOME}|' + java_path + '|g" /root/templates/ssn.yml')
-            local('sed -i "s|KEYNAME|{}|g" /root/web_app/provisioning-service/provisioning.yml'.
-                  format(os.environ['conf_key_name']))
+            sudo('sed -i "s|KEYNAME|{}|g" {}/webapp/provisioning-service/conf/provisioning.yml'.
+                  format(os.environ['conf_key_name'], dlab_path))
             put('/root/templates/ssn.yml', '/tmp/ssn.yml')
             sudo('mv /tmp/ssn.yml ' + os.environ['ssn_dlab_path'] + 'conf/')
             put('/root/templates/proxy_location_webapp_template.conf', '/tmp/proxy_location_webapp_template.conf')
@@ -209,19 +223,17 @@
                 f.write(text)
             put('/root/templates/supervisor_svc.ini', '/tmp/supervisor_svc.ini')
             sudo('mv /tmp/supervisor_svc.ini ' + os.environ['ssn_dlab_path'] + 'tmp/')
-            sudo('cp ' + os.environ['ssn_dlab_path'] + 'tmp/proxy_location_webapp_template.conf /etc/nginx/locations/proxy_location_webapp.conf')
+            sudo('cp ' + os.environ['ssn_dlab_path'] +
+                 'tmp/proxy_location_webapp_template.conf /etc/nginx/locations/proxy_location_webapp.conf')
             sudo('cp ' + os.environ['ssn_dlab_path'] + 'tmp/supervisor_svc.ini {}'.format(supervisor_conf))
             sudo('sed -i \'s=WEB_APP_DIR={}=\' {}'.format(web_path, supervisor_conf))
             try:
                 sudo('mkdir -p /var/log/application')
                 run('mkdir -p /tmp/yml_tmp/')
                 for service in ['self-service', 'security-service', 'provisioning-service', 'billing']:
-                    sudo('mkdir -p {0}{1}/'.format(web_path, service))
-                    sudo('chown -R {0}:{0} {1}{2}'.format(os_user, web_path, service))
-                    local('scp -r -i {0} /root/web_app/{3}/*.jar {1}:{2}{3}/'.format(keyfile, host_string, web_path, service))
-                    jar = sudo('cd {0}{1}; find {1}*.jar -type f'.format(web_path, service))
-                    sudo('ln -s {0}{2}/{1} {0}{2}/{2}.jar '.format(web_path, jar, service))
-                    local('scp -r -i {0} /root/web_app/{2}/*.yml {1}:/tmp/yml_tmp/'.format(keyfile, host_string, service))
+                    jar = sudo('cd {0}{1}/lib/; find {1}*.jar -type f'.format(web_path, service))
+                    sudo('ln -s {0}{2}/lib/{1} {0}{2}/{2}.jar '.format(web_path, jar, service))
+                    sudo('cp {0}/webapp/{1}/conf/*.yml /tmp/yml_tmp/'.format(dlab_path, service))
                 if os.environ['conf_cloud_provider'] == 'azure':
                     for config in ['self-service', 'security']:
                         sudo('sed -i "s|<LOGIN_USE_LDAP>|{1}|g" /tmp/yml_tmp/{0}.yml'.format(config, ldap_login))
@@ -253,7 +265,8 @@
                 sys.exit(1)
 
             if billing_enabled:
-                local('scp -i {} /root/scripts/configure_billing.py {}:/tmp/configure_billing.py'.format(keyfile, host_string))
+                local('scp -i {} /root/scripts/configure_billing.py {}:/tmp/configure_billing.py'.format(keyfile,
+                                                                                                         host_string))
                 params = '--cloud_provider {} ' \
                          '--infrastructure_tag {} ' \
                          '--tag_resource_id {} ' \
@@ -301,7 +314,8 @@
                 sudo('python /tmp/configure_billing.py {}'.format(params))
             try:
                 sudo('keytool -genkeypair -alias dlab -keyalg RSA -validity 730 -storepass {1} -keypass {1} \
-                     -keystore /home/{0}/keys/dlab.keystore.jks -keysize 2048 -dname "CN=localhost"'.format(os_user, keystore_passwd))
+                     -keystore /home/{0}/keys/dlab.keystore.jks -keysize 2048 -dname "CN=localhost"'.format(
+                    os_user, keystore_passwd))
                 sudo('keytool -exportcert -alias dlab -storepass {1} -file /home/{0}/keys/dlab.crt \
                      -keystore /home/{0}/keys/dlab.keystore.jks'.format(os_user, keystore_passwd))
                 sudo('keytool -importcert -trustcacerts -alias dlab -file /home/{0}/keys/dlab.crt -noprompt \
@@ -312,6 +326,27 @@
             sudo('systemctl restart supervisord')
             sudo('service nginx restart')
             sudo('touch ' + os.environ['ssn_dlab_path'] + 'tmp/ss_started')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to start Self-service: ', str(err))
+        sys.exit(1)
+
+
+def install_build_dep():
+    try:
+        if not exists('{}tmp/build_dep_ensured'.format(os.environ['ssn_dlab_path'])):
+            maven_version = '3.5.4'
+            sudo('yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel git wget unzip')
+            with cd('/opt/'):
+                sudo('wget http://mirrors.sonic.net/apache/maven/maven-{0}/{1}/binaries/apache-maven-{1}-bin.zip'.format(
+                    maven_version.split('.')[0], maven_version))
+                sudo('unzip apache-maven-{}-bin.zip'.format(maven_version))
+                sudo('mv apache-maven-{} maven'.format(maven_version))
+            sudo('bash -c "curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -"')
+            sudo('yum install -y nodejs')
+            sudo('npm config set unsafe-perm=true')
+            sudo('touch {}tmp/build_dep_ensured'.format(os.environ['ssn_dlab_path']))
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to install build dependencies for UI: ', str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_collect_data.py b/infrastructure-provisioning/src/general/scripts/aws/common_collect_data.py
index 19cc85c..e63a63f 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_collect_data.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_collect_data.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_bucket.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_bucket.py
index 87e23a9..c14c8f4 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_bucket.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_bucket.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -34,7 +37,6 @@
 
 
 if __name__ == "__main__":
-    success = False
     tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value}
     if args.bucket_name != '':
         try:
@@ -45,14 +47,9 @@
             else:
                 print("REQUESTED BUCKET ALREADY EXISTS")
             print("BUCKET_NAME {}".format(bucket))
-            success = True
-        except:
-            success = False
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_instance.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_instance.py
index 99873fa..ecf46be 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_instance.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_instance.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,7 +46,6 @@
 
 
 if __name__ == "__main__":
-    success = False
     instance_tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value}
     if args.node_name != '':
         try:
@@ -57,14 +59,9 @@
             print("Instance_id {}".format(instance_id))
             print("Public_hostname {}".format(get_instance_attr(instance_id, 'public_dns_name')))
             print("Private_hostname {}".format(get_instance_attr(instance_id, 'private_dns_name')))
-            success = True
-        except:
-            success = False
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_notebook_image.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_notebook_image.py
index ba17059..d50b0ba 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_notebook_image.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -44,7 +47,8 @@
                               "SBN": image_conf['service_base_name'],
                               "User": image_conf['user_name'],
                               "Image": image_conf['image_name'],
-                              "FIN": image_conf['full_image_name']}
+                              "FIN": image_conf['full_image_name'],
+                              os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
 
         ami_id = get_ami_id_by_name(image_conf['full_image_name'])
         if ami_id == '':
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_policy.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_policy.py
index a2ae3f2..02b2fd7 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_policy.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_policy.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -38,7 +41,6 @@
 
 
 if __name__ == "__main__":
-    success = False
     if args.bucket_name:
         try:
             handler = open('/root/templates/edge_s3_policy.json', 'r')
@@ -50,7 +52,7 @@
                 policy = policy.replace('aws', 'aws-cn')
         except OSError:
             print("Failed to open policy template")
-            success = False
+            sys.exit(1)
 
         list_policies_arn = []
         if args.user_predefined_s3_policies != 'None':
@@ -87,18 +89,12 @@
                     iam.attach_role_policy(RoleName=args.notebook_role_name, PolicyArn=arn)
                     print('POLICY "{0}" has been attached to role "{1}"'.format(arn, args.notebook_role_name))
                     time.sleep(5)
-                success = True
             except botocore.exceptions.ClientError as e:
                 print(e.response['Error']['Message'])
-                success = False
-        except Exception as ex:
-            print(ex)
-            success = False
+                sys.exit(1)
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py
index 82e4c32..06739f3 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -34,7 +37,6 @@
 
 
 if __name__ == "__main__":
-    success = False
     if args.role_name != '':
         try:
             role_name = get_role_by_name(args.role_name)
@@ -57,15 +59,8 @@
                     for bit in policy_arn_bits:
                         attach_policy(args.role_name, bit)
             print("POLICY {} created".format(args.policy_name))
-            success = True
-        except:
-            success = False
+        except Exception as err:
+            print('Error: {0}'.format(err))
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
-
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_security_group.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_security_group.py
index 236dd26..c6928cc 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_security_group.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_security_group.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -41,11 +44,11 @@
 
 
 if __name__ == "__main__":
-    success = False
     try:
         rules = json.loads(args.security_group_rules)
         egress = json.loads(args.egress)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
     tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value}
     nb_sg_id = get_security_group_by_name(args.nb_sg_name + '-SG')
@@ -74,14 +77,8 @@
             if args.ssn:
                 with open('/tmp/ssn_sg_id', 'w') as f:
                     f.write(security_group_id)
-            success = True
-        except:
-            success = False
+        except Exception as err:
+            print('Error: {0}'.format(err))
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py
index 9e1de78..bd18cdc 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,7 +43,6 @@
 
 
 if __name__ == "__main__":
-    success = False
     if args.ssn:
         tag = {"Key": args.infra_tag_name, "Value": "{}-subnet".format(args.infra_tag_value)}
     else:
@@ -128,10 +130,15 @@
         if not args.ssn:
             print("Associating route_table with the subnet")
             ec2 = boto3.resource('ec2')
-            rt = get_route_table_by_tag(args.infra_tag_name, args.infra_tag_value)
+            if os.environ['conf_duo_vpc_enable'] == 'true':
+                rt = get_route_table_by_tag(args.infra_tag_value + '-secondary-Tag', args.infra_tag_value)
+            else:
+                rt = get_route_table_by_tag(args.infra_tag_name, args.infra_tag_value)
             route_table = ec2.RouteTable(rt)
             try:
                 route_table.associate_with_subnet(SubnetId=subnet_id)
+                if os.environ['conf_duo_vpc_enable'] == 'true':
+                    create_peer_routes(os.environ['aws_peering_id'], args.infra_tag_value)
             except exceptions.ClientError as err:
                 if 'Resource.AlreadyAssociated' in str(err):
                     print('Other route table is already associted with this subnet. Skipping...')
@@ -143,11 +150,6 @@
             route_table.associate_with_subnet(SubnetId=subnet_id)
             with open('/tmp/ssn_subnet_id', 'w') as f:
                 f.write(subnet_id)
-        success = True
-    except:
-        success = False
-
-    if success:
-        sys.exit(0)
-    else:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_download_git_certfile.py b/infrastructure-provisioning/src/general/scripts/aws/common_download_git_certfile.py
index c6dad74..e670d83 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_download_git_certfile.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_download_git_certfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py b/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py
index 4740651..413ccbf 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine-service.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -82,6 +85,30 @@
         sys.exit(1)
 
     try:
+        logging.info('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        print('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        params = "--hostname {0} " \
+                 "--keyfile {1} " \
+                 "--os_user {2} " \
+            .format(notebook_config['notebook_ip'],
+                    notebook_config['key_path'],
+                    os.environ['conf_os_user'])
+        try:
+            local("~/scripts/{0}.py {1}".format('common_configure_spark', params))
+            remove_emr_tag(notebook_config['cluster_id'], ['State'])
+            tag_emr_volume(notebook_config['cluster_id'], notebook_config['cluster_name'], os.environ['conf_tag_resource_id'])
+        except:
+            traceback.print_exc()
+            raise Exception
+    except Exception as err:
+        append_result("Failed to configure Spark.", str(err))
+        emr_id = get_emr_id_by_name(notebook_config['cluster_name'])
+        terminate_emr(emr_id)
+        remove_kernels(notebook_config['cluster_name'], notebook_config['tag_name'], os.environ['notebook_instance_name'],
+                       os.environ['conf_os_user'], notebook_config['key_path'], os.environ['emr_version'])
+        sys.exit(1)
+
+    try:
         with open("/root/result.json", 'w') as result:
             res = {"notebook_name": notebook_config['notebook_name'],
                    "Tag_name": notebook_config['tag_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine.py b/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine.py
index 943f3b0..f84520b 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_notebook_configure_dataengine.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -67,7 +70,8 @@
                 notebook_config['tag_name'], notebook_config['master_node_name'])
             notebook_config['notebook_ip'] = get_instance_private_ip_address(
                 notebook_config['tag_name'], notebook_config['notebook_name'])
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
         notebook_config['spark_master_url'] = 'spark://{}:7077'.format(notebook_config['spark_master_ip'])
 
@@ -100,6 +104,30 @@
         sys.exit(1)
 
     try:
+        logging.info('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        print('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        params = "--hostname {0} " \
+                 "--keyfile {1} " \
+                 "--os_user {2} " \
+                 "--cluster_name {3}" \
+            .format(notebook_config['notebook_ip'],
+                    notebook_config['key_path'],
+                    notebook_config['dlab_ssh_user'],
+                    notebook_config['cluster_name'])
+        try:
+            local("~/scripts/{0}.py {1}".format('common_configure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+    except Exception as err:
+        remove_ec2(notebook_config['tag_name'], notebook_config['master_node_name'])
+        for i in range(notebook_config['instance_count'] - 1):
+            slave_name = notebook_config['slave_node_name'] + '{}'.format(i + 1)
+            remove_ec2(notebook_config['tag_name'], slave_name)
+        append_result("Failed to configure Spark.", str(err))
+        sys.exit(1)
+
+    try:
         with open("/root/result.json", 'w') as result:
             res = {"notebook_name": notebook_config['notebook_name'],
                    "Action": "Configure notebook server"}
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
index 9d56cf3..eecfae6 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_put_to_bucket.py b/infrastructure-provisioning/src/general/scripts/aws/common_put_to_bucket.py
index 0d4352a..8f433fe 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_put_to_bucket.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_put_to_bucket.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_remove_remote_kernels.py b/infrastructure-provisioning/src/general/scripts/aws/common_remove_remote_kernels.py
index e643238..826bff4 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_remove_remote_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_remove_remote_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_reupload_key.py b/infrastructure-provisioning/src/general/scripts/aws/common_reupload_key.py
index c094954..3fd8adf 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_reupload_key.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_reupload_key.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -24,7 +27,6 @@
 from dlab.actions_lib import *
 from dlab.meta_lib import *
 from dlab.fab import *
-import traceback
 import json
 
 parser = argparse.ArgumentParser()
@@ -45,6 +47,6 @@
             args.os_user, ip, args.keyfile, args.additional_config)
         try:
             local("~/scripts/{}.py {}".format('install_user_key', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_start_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_start_notebook.py
index 653eda9..bfef46a 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_start_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_start_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py
index 1a4324d..3d6ed46 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -39,16 +42,20 @@
         clusters_list = get_emr_list(nb_tag_value, 'Value')
         if clusters_list:
             for cluster_id in clusters_list:
+                computational_name = ''
                 client = boto3.client('emr')
                 cluster = client.describe_cluster(ClusterId=cluster_id)
                 cluster = cluster.get("Cluster")
                 emr_name = cluster.get('Name')
                 emr_version = cluster.get('ReleaseLabel')
+                for tag in cluster.get('Tags'):
+                    if tag.get('Key') == 'ComputationalName':
+                        computational_name = tag.get('Value')
                 s3_cleanup(bucket_name, emr_name, os.environ['edge_user_name'])
                 print("The bucket {} has been cleaned successfully".format(bucket_name))
                 terminate_emr(cluster_id)
                 print("The EMR cluster {} has been terminated successfully".format(emr_name))
-                remove_kernels(emr_name, tag_name, nb_tag_value, ssh_user, key_path, emr_version)
+                remove_kernels(emr_name, tag_name, nb_tag_value, ssh_user, key_path, emr_version, computational_name)
                 print("{} kernels have been removed from notebook successfully".format(emr_name))
         else:
             print("There are no EMR clusters to terminate.")
@@ -103,6 +110,7 @@
         stop_notebook(notebook_config['notebook_name'], notebook_config['bucket_name'], notebook_config['tag_name'],
                       os.environ['conf_os_user'], notebook_config['key_path'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop notebook.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py
index 876bd99..c1e6bf7 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook_image.py b/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook_image.py
index 34d9e68..ce76a1e 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_terminate_notebook_image.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py
index 6d41712..9f10d41 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -50,6 +53,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create dlab ssh user.", str(err))
         terminate_emr(emr_conf['cluster_id'])
         sys.exit(1)
@@ -68,6 +72,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         terminate_emr(emr_conf['cluster_id'])
         sys.exit(1)
@@ -85,6 +90,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure dataengine service.", str(err))
         terminate_emr(emr_conf['cluster_id'])
         sys.exit(1)
@@ -126,6 +132,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed edge reverse proxy template", str(err))
         terminate_emr(emr_conf['cluster_id'])
         sys.exit(1)
@@ -142,6 +149,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key", str(err))
         terminate_emr(emr_conf['cluster_id'])
         sys.exit(1)
@@ -180,6 +188,7 @@
     emr_conf['instance_count'] = os.environ['emr_instance_count']
     emr_conf['notebook_ip'] = get_instance_ip_address(emr_conf['tag_name'],
                                                       os.environ['notebook_instance_name']).get('Private')
+    emr_conf['network_type'] = os.environ['conf_network_type']
     emr_conf['role_service_name'] = os.environ['emr_service_role']
     emr_conf['role_ec2_name'] = os.environ['emr_ec2_role']
     emr_conf['tags'] = 'Name=' + emr_conf['service_base_name'] + '-' + os.environ['edge_user_name'] + '-des-' + \
@@ -208,8 +217,12 @@
     emr_conf['edge_instance_name'] = emr_conf['service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     emr_conf['edge_instance_hostname'] = get_instance_private_ip_address(emr_conf['tag_name'],
                                                                          emr_conf['edge_instance_name'])
-    emr_conf['edge_instance_ip'] = get_instance_ip_address(emr_conf['tag_name'],
-                                                                         emr_conf['edge_instance_name']).get('Public')
+    if emr_conf['network_type'] == 'private':
+        emr_conf['edge_instance_ip'] = get_instance_ip_address(emr_conf['tag_name'],
+                                                               emr_conf['edge_instance_name']).get('Private')
+    else:
+        emr_conf['edge_instance_ip'] = get_instance_ip_address(emr_conf['tag_name'],
+                                                                             emr_conf['edge_instance_name']).get('Public')
     emr_conf['user_keyname'] = os.environ['edge_user_name']
     emr_conf['os_user'] = os.environ['conf_os_user']
     emr_conf['initial_user'] = 'ec2-user'
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_create.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_create.py
index b992d0a..f9f9bc4 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_create.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_create.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -30,6 +33,7 @@
 import json
 import traceback
 import logging
+import ast
 
 parser = argparse.ArgumentParser()
 # parser.add_argument('--id', type=str, default='')
@@ -74,7 +78,7 @@
 elif args.region == 'cn-north-1':
     endpoint_url = "https://s3.{}.amazonaws.com.cn".format(args.region)
 else:
-    endpoint_url = 'https://s3-' + args.region + '.amazonaws.com'
+    endpoint_url = 'https://s3-{}.amazonaws.com'.format(args.region)
 
 cp_config = "Name=CUSTOM_JAR, Args=aws " \
             "s3 cp /etc/hive/conf/hive-site.xml s3://{0}/{4}/{5}/config/hive-site.xml " \
@@ -197,6 +201,7 @@
                      str(err) + "\n Traceback: " +
                      traceback.print_exc(file=sys.stdout))
 
+
 def get_instance_by_ip(ip):
     try:
         ec2 = boto3.resource('ec2')
@@ -278,15 +283,6 @@
         return ["True", state]
 
 
-def read_json(path):
-    try:
-        with open(path) as json_data:
-            data = json.load(json_data)
-    except:
-        data = []
-    return data
-
-
 def build_emr_cluster(args):
     try:
         # Parse applications
@@ -302,7 +298,9 @@
             key, value = i.split("=")
             tags.append({"Value": value, "Key": key})
         tags.append({'Key': os.environ['conf_tag_resource_id'],
-                     'Value': args.service_base_name + ':' + args.name})
+                     'Value': '{}:{}'.format(args.service_base_name, args.name)})
+        tags.append({'Key': os.environ['conf_billing_tag_key'],
+                     'Value': os.environ['conf_billing_tag_value']})
         if 'conf_additional_tags' in os.environ:
             for tag in os.environ['conf_additional_tags'].split(';'):
                 tags.append(
@@ -372,7 +370,7 @@
                     VisibleToAllUsers=not args.auto_terminate,
                     JobFlowRole=args.ec2_role,
                     ServiceRole=args.service_role,
-                    Configurations=read_json(args.configurations))
+                    Configurations=ast.literal_eval(args.configurations))
             else:
                 result = socket.run_job_flow(
                     Name=args.name,
@@ -399,7 +397,7 @@
                     VisibleToAllUsers=not args.auto_terminate,
                     JobFlowRole=args.ec2_role,
                     ServiceRole=args.service_role,
-                    Configurations=read_json(args.configurations))
+                    Configurations=ast.literal_eval(args.configurations))
             print("Cluster_id {}".format(result.get('JobFlowId')))
             return result.get('JobFlowId')
     except Exception as err:
@@ -477,4 +475,3 @@
                 terminate_emr(cluster_id)
             s3_cleanup(args.s3_bucket, args.name, args.edge_user_name)
             sys.exit(1)
-    sys.exit(0)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_install_libs.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_install_libs.py
index ae0ef33..946910b 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_install_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_install_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -64,6 +67,7 @@
             data_engine['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
             data_engine['libs'] = os.environ['libs']
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to get parameter.", str(err))
             sys.exit(1)
         try:
@@ -81,5 +85,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to install additional libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_jars_parser.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_jars_parser.py
index 7bc0a8d..f011e6a 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_jars_parser.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_jars_parser.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_key_importer.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_key_importer.py
index 4d7d5a3..8d5efd4 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_key_importer.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_key_importer.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_list_libs.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_list_libs.py
index 1be1b81..4c11795 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_list_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_list_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -60,5 +63,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to get available libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py
index 2019dfc..ef9b067 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -74,13 +77,12 @@
         emr_conf['computational_name'] = ''
     emr_conf['apps'] = 'Hadoop Hive Hue Spark'
     emr_conf['service_base_name'] = os.environ['conf_service_base_name']
-    emr_conf['tag_name'] = emr_conf['service_base_name'] + '-Tag'
+    emr_conf['tag_name'] = '{0}-Tag'.format(emr_conf['service_base_name'])
     emr_conf['key_name'] = os.environ['conf_key_name']
     emr_conf['region'] = os.environ['aws_region']
     emr_conf['release_label'] = os.environ['emr_version']
-    emr_conf['edge_instance_name'] = emr_conf['service_base_name'] + \
-                                     "-" + os.environ['edge_user_name'] + '-edge'
-    emr_conf['edge_security_group_name'] = emr_conf['edge_instance_name'] + '-SG'
+    emr_conf['edge_instance_name'] = '{0}-{1}-edge'.format(emr_conf['service_base_name'], os.environ['edge_user_name'])
+    emr_conf['edge_security_group_name'] = '{0}-SG'.format(emr_conf['edge_instance_name'])
     emr_conf['master_instance_type'] = os.environ['emr_master_instance_type']
     emr_conf['slave_instance_type'] = os.environ['emr_slave_instance_type']
     emr_conf['instance_count'] = os.environ['emr_instance_count']
@@ -88,44 +90,40 @@
         emr_conf['tag_name'], os.environ['notebook_instance_name']).get('Private')
     emr_conf['role_service_name'] = os.environ['emr_service_role']
     emr_conf['role_ec2_name'] = os.environ['emr_ec2_role']
-    emr_conf['tags'] = 'Name=' + \
-                       emr_conf['service_base_name'] + '-' + \
-                       os.environ['edge_user_name'] + '-des-' + \
-                       emr_conf['exploratory_name'] + '-' + \
-                       emr_conf['computational_name'] + '-' + \
-                       args.uuid + ', ' + \
-                       emr_conf['service_base_name'] + '-Tag=' + \
-                       emr_conf['service_base_name'] + '-' + \
-                       os.environ['edge_user_name'] + '-des-' + \
-                       emr_conf['exploratory_name'] + '-' + \
-                       emr_conf['computational_name'] + '-' + \
-                       args.uuid + ', Notebook=' + \
-                       os.environ['notebook_instance_name'] + \
-                       ', State=not-configured'
-    emr_conf['cluster_name'] = emr_conf['service_base_name'] + \
-                               '-' + os.environ['edge_user_name'] + \
-                               '-des-' + emr_conf['exploratory_name'] + \
-                               '-' + emr_conf['computational_name'] + \
-                               '-' + args.uuid
-    emr_conf['bucket_name'] = (emr_conf['service_base_name'] +
-                               '-ssn-bucket').lower().replace('_', '-')
+    emr_conf['tags'] = 'Name={0}-{1}-des-{2}-{3},' \
+                       '{0}-Tag={0}-{1}-des-{2}-{3},' \
+                       'Notebook={4},' \
+                       'State=not-configured,' \
+                       'ComputationalName={3}' \
+        .format(emr_conf['service_base_name'],
+                os.environ['edge_user_name'],
+                emr_conf['exploratory_name'],
+                emr_conf['computational_name'],
+                os.environ['notebook_instance_name'])
+    emr_conf['cluster_name'] = '{0}-{1}-des-{2}-{3}-{4}'\
+        .format(emr_conf['service_base_name'],
+                os.environ['edge_user_name'],
+                emr_conf['exploratory_name'],
+                emr_conf['computational_name'],
+                args.uuid)
+    emr_conf['bucket_name'] = '{0}-ssn-bucket'.format(emr_conf['service_base_name']).lower().replace('_', '-')
+    emr_conf['configurations'] = '[]'
+    if 'emr_configurations' in os.environ:
+        emr_conf['configurations'] = os.environ['emr_configurations']
 
     tag = {"Key": "{}-Tag".format(emr_conf['service_base_name']),
            "Value": "{}-{}-subnet".format(emr_conf['service_base_name'],
                                           os.environ['edge_user_name'])}
     emr_conf['subnet_cidr'] = get_subnet_by_tag(tag)
-    emr_conf['key_path'] = os.environ['conf_key_dir'] + \
-                           os.environ['conf_key_name'] + '.pem'
+    emr_conf['key_path'] = '{0}{1}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
     emr_conf['all_ip_cidr'] = '0.0.0.0/0'
-    emr_conf['additional_emr_sg_name'] = \
-        '{}-{}-de-se-additional-sg'.format(emr_conf['service_base_name'],
-                                           os.environ['edge_user_name'])
+    emr_conf['additional_emr_sg_name'] = '{}-{}-de-se-additional-sg'\
+        .format(emr_conf['service_base_name'], os.environ['edge_user_name'])
     emr_conf['vpc_id'] = os.environ['aws_vpc_id']
+    emr_conf['vpc2_id'] = os.environ['aws_notebook_vpc_id']
     if os.environ['emr_slave_instance_spot'] == 'True':
-        emr_conf['slave_bid_price'] = (
-                                          float(get_ec2_price(
-            emr_conf['slave_instance_type'], emr_conf['region'])) *
-                                       int(os.environ['emr_slave_instance_spot_pct_price']))/100
+        ondemand_price = float(get_ec2_price(emr_conf['slave_instance_type'], emr_conf['region']))
+        emr_conf['slave_bid_price'] = (ondemand_price * int(os.environ['emr_slave_instance_spot_pct_price'])) / 100
     else:
         emr_conf['slave_bid_price'] = 0
 
@@ -162,7 +160,7 @@
     print("[CREATING ADDITIONAL SECURITY GROUPS FOR EMR]")
     try:
         edge_group_id = check_security_group(emr_conf['edge_security_group_name'])
-        cluster_sg_ingress = [
+        cluster_sg_ingress = format_sg([
             {
                 "IpProtocol": "-1",
                 "IpRanges": [{"CidrIp": emr_conf['subnet_cidr']}],
@@ -183,8 +181,8 @@
                 "UserIdGroupPairs": [],
                 "PrefixListIds": []
             }
-        ]
-        cluster_sg_egress = [
+        ])
+        cluster_sg_egress = format_sg([
             {
                 "IpProtocol": "-1",
                 "IpRanges": [{"CidrIp": emr_conf['subnet_cidr']}],
@@ -213,7 +211,7 @@
                 "UserIdGroupPairs": [],
                 "PrefixListIds": [],
             }
-        ]
+        ])
 
         params = "--name {} " \
                  "--vpc_id {} " \
@@ -223,7 +221,7 @@
                  "--infra_tag_value {} " \
                  "--force {}". \
             format(emr_conf['additional_emr_sg_name'],
-                   emr_conf['vpc_id'],
+                   emr_conf['vpc2_id'],
                    json.dumps(cluster_sg_ingress),
                    json.dumps(cluster_sg_egress),
                    emr_conf['service_base_name'],
@@ -234,6 +232,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create sg.", str(err))
         sys.exit(1)
 
@@ -242,28 +241,29 @@
     try:
         logging.info('[Creating EMR Cluster]')
         print('[Creating EMR Cluster]')
-        params = "--name {} " \
-                 "--applications '{}' " \
-                 "--master_instance_type {} " \
-                 "--slave_instance_type {} " \
-                 "--instance_count {} " \
-                 "--ssh_key {} " \
-                 "--release_label {} " \
-                 "--emr_timeout {} " \
-                 "--subnet {} " \
-                 "--service_role {} " \
-                 "--ec2_role {} " \
-                 "--nbs_ip {} " \
-                 "--nbs_user {} " \
-                 "--s3_bucket {} " \
-                 "--region {} " \
-                 "--tags '{}' " \
-                 "--key_dir {} " \
-                 "--edge_user_name {} " \
-                 "--slave_instance_spot {} " \
-                 "--bid_price {} " \
-                 "--service_base_name {} " \
-                 "--additional_emr_sg {}"\
+        params = "--name {0} " \
+                 "--applications '{1}' " \
+                 "--master_instance_type {2} " \
+                 "--slave_instance_type {3} " \
+                 "--instance_count {4} " \
+                 "--ssh_key {5} " \
+                 "--release_label {6} " \
+                 "--emr_timeout {7} " \
+                 "--subnet {8} " \
+                 "--service_role {9} " \
+                 "--ec2_role {10} " \
+                 "--nbs_ip {11} " \
+                 "--nbs_user {12} " \
+                 "--s3_bucket {13} " \
+                 "--region {14} " \
+                 "--tags '{15}' " \
+                 "--key_dir {16} " \
+                 "--edge_user_name {17} " \
+                 "--slave_instance_spot {18} " \
+                 "--bid_price {19} " \
+                 "--service_base_name {20} " \
+                 "--additional_emr_sg {21} " \
+                 "--configurations \"{22}\" "\
             .format(emr_conf['cluster_name'],
                     emr_conf['apps'],
                     emr_conf['master_instance_type'],
@@ -285,7 +285,8 @@
                     os.environ['emr_slave_instance_spot'],
                     str(emr_conf['slave_bid_price']),
                     emr_conf['service_base_name'],
-                    emr_conf['additional_emr_sg_name'])
+                    emr_conf['additional_emr_sg_name'],
+                    emr_conf['configurations'])
         try:
             local("~/scripts/{}.py {}".format('dataengine-service_create', params))
         except:
@@ -296,9 +297,9 @@
         keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], emr_conf['key_name'])
         local('rm /response/.emr_creating_{}'.format(os.environ['exploratory_name']))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create EMR Cluster.", str(err))
         local('rm /response/.emr_creating_{}'.format(os.environ['exploratory_name']))
         emr_id = get_emr_id_by_name(emr_conf['cluster_name'])
         terminate_emr(emr_id)
         sys.exit(1)
-    sys.exit(0)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py
index e45c4cb..a08b865 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine-service_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,18 +35,22 @@
         clusters_list = get_emr_list(emr_name, 'Value')
         if clusters_list:
             for cluster_id in clusters_list:
+                computational_name = ''
                 client = boto3.client('emr')
                 cluster = client.describe_cluster(ClusterId=cluster_id)
                 cluster = cluster.get("Cluster")
                 emr_name = cluster.get('Name')
                 emr_version = cluster.get('ReleaseLabel')
+                for tag in cluster.get('Tags'):
+                    if tag.get('Key') == 'ComputationalName':
+                        computational_name = tag.get('Value')
                 s3_cleanup(bucket_name, emr_name, os.environ['edge_user_name'])
                 print("The bucket {} has been cleaned successfully".format(bucket_name))
                 terminate_emr(cluster_id)
                 print("The EMR cluster {} has been terminated successfully".format(emr_name))
                 print("Removing EMR kernels from notebook")
                 remove_kernels(emr_name, tag_name, nb_tag_value, ssh_user, key_path,
-                               emr_version)
+                               emr_version, computational_name)
         else:
             print("There are no EMR clusters to terminate.")
     except:
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine_configure.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine_configure.py
index 0247709..57e66fd 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,6 +51,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -66,6 +70,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -86,6 +91,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -104,6 +110,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -125,6 +132,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -156,6 +164,7 @@
         data_engine['tag_name'] = data_engine['service_base_name'] + '-Tag'
         data_engine['key_name'] = os.environ['conf_key_name']
         data_engine['region'] = os.environ['aws_region']
+        data_engine['network_type'] = os.environ['conf_network_type']
         data_engine['cluster_name'] = data_engine['service_base_name'] + '-' + os.environ['edge_user_name'] + \
                                       '-de-' + data_engine['exploratory_name'] + '-' + \
                                       data_engine['computational_name']
@@ -180,7 +189,10 @@
         keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
         edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
         edge_instance_hostname = get_instance_hostname(data_engine['tag_name'], edge_instance_name)
-        edge_instance_ip = get_instance_ip_address(data_engine['tag_name'], edge_instance_name).get('Public')
+        if data_engine['network_type'] == 'private':
+            edge_instance_ip = get_instance_ip_address(data_engine['tag_name'], edge_instance_name).get('Private')
+        else:
+            edge_instance_ip = get_instance_ip_address(data_engine['tag_name'], edge_instance_name).get('Public')
 
         if os.environ['conf_os_family'] == 'debian':
             initial_user = 'ubuntu'
@@ -216,6 +228,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -234,6 +247,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -254,6 +268,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -272,6 +287,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -293,6 +309,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure master node", str(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
@@ -312,6 +329,7 @@
             if job.exitcode != 0:
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -349,6 +367,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -374,9 +393,9 @@
                    "key_name": data_engine['key_name'],
                    "Action": "Create new Data Engine",
                    "computational_url": [
-                       {"description": "SPARK Master",
+                       {"description": "Apache Spark Master",
                         "url": spark_master_acces_url},
-                       #{"description": "SPARK Master (via tunnel)",
+                       #{"description": "Apache Spark Master (via tunnel)",
                         #"url": spark_master_url}
                    ]}
             print(json.dumps(res))
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine_prepare.py
index ff17e61..511cad3 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -90,6 +93,8 @@
         data_engine['cluster_nodes_resource_tag'] = {"Key": os.environ['conf_tag_resource_id'],
                                                      "Value": data_engine['service_base_name'] + ':' +
                                                               data_engine['cluster_name']}
+        data_engine['cluster_nodes_billing_tag'] = {"Key": os.environ['conf_billing_tag_key'],
+                                                     "Value": os.environ['conf_billing_tag_value']}
         data_engine['primary_disk_size'] = '30'
         data_engine['instance_class'] = 'dataengine'
 
@@ -132,11 +137,13 @@
             data_engine['master_id'] = get_instance_by_name(data_engine['tag_name'], data_engine['master_node_name'])
             create_tag(data_engine['master_id'], data_engine['cluster_nodes_tag'], False)
             create_tag(data_engine['master_id'], data_engine['cluster_nodes_resource_tag'], False)
+            create_tag(data_engine['master_id'], data_engine['cluster_nodes_billing_tag'], False)
             create_tag(data_engine['master_id'], data_engine['cluster_nodes_tag_type'], False)
         except:
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create master instance.", str(err))
         sys.exit(1)
 
@@ -158,11 +165,13 @@
                 data_engine['slave_id'] = get_instance_by_name(data_engine['tag_name'], slave_name)
                 create_tag(data_engine['slave_id'], data_engine['cluster_nodes_tag'], False)
                 create_tag(data_engine['slave_id'], data_engine['cluster_nodes_resource_tag'], False)
+                create_tag(data_engine['slave_id'], data_engine['cluster_nodes_billing_tag'], False)
                 create_tag(data_engine['slave_id'], data_engine['cluster_nodes_tag_type'], False)
             except:
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         remove_ec2(data_engine['tag_name'], data_engine['master_node_name'])
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine_start.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine_start.py
index b3c5ffb..02e6475 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine_start.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine_start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -28,7 +31,7 @@
 def start_data_engine(cluster_name):
     print("Start Data Engine")
     try:
-        start_ec2('user:tag', cluster_name)
+        start_ec2(os.environ['conf_tag_resource_id'], cluster_name)
     except:
         sys.exit(1)
 
@@ -70,6 +73,7 @@
         start_data_engine("{}:{}".format(os.environ['conf_service_base_name'],
                                          data_engine_config['cluster_name']))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to start Data Engine.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine_stop.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine_stop.py
index 0a0b6f6..5349b8c 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine_stop.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine_stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -28,7 +31,7 @@
 def stop_data_engine(cluster_name):
     print("Stop Data Engine")
     try:
-        stop_ec2('user:tag', cluster_name)
+        stop_ec2(os.environ['conf_tag_resource_id'], cluster_name)
     except:
         sys.exit(1)
 
@@ -69,6 +72,7 @@
         stop_data_engine("{}:{}".format(os.environ['conf_service_base_name'],
                                         data_engine_config['cluster_name']))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop Data Engine.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/dataengine_terminate.py b/infrastructure-provisioning/src/general/scripts/aws/dataengine_terminate.py
index 099cff3..daa25ae 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/dataengine_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/dataengine_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -31,7 +34,7 @@
                           cluster_name, remote_kernel_name):
     print("Terminating data engine cluster")
     try:
-        remove_ec2('user:tag', cluster_name)
+        remove_ec2(os.environ['conf_tag_resource_id'], cluster_name)
     except:
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/deeplearning_configure.py b/infrastructure-provisioning/src/general/scripts/aws/deeplearning_configure.py
index 7019c5e..50b31a1 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/deeplearning_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/deeplearning_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,6 +52,7 @@
     notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
     notebook_config['key_name'] = os.environ['conf_key_name']
     notebook_config['user_keyname'] = os.environ['edge_user_name']
+    notebook_config['network_type'] = os.environ['conf_network_type']
     notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
                                                                os.environ['edge_user_name'],
                                                                notebook_config['exploratory_name'], args.uuid)
@@ -67,7 +71,10 @@
     instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
     edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
-    edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
+    if notebook_config['network_type'] == 'private':
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Private')
+    else:
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
     keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
 
     try:
@@ -90,6 +97,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -107,6 +115,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -124,6 +133,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -141,6 +151,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -152,19 +163,19 @@
                  "--os_user {} --jupyter_version {} " \
                  "--scala_version {} --spark_version {} " \
                  "--hadoop_version {} --region {} " \
-                 "--tensorflow_version {} --r_mirror {} " \
-                 "--exploratory_name {}" \
+                 "--r_mirror {} --exploratory_name {}" \
                  .format(instance_hostname, keyfile_name, notebook_config['dlab_ssh_user'],
                          os.environ['notebook_jupyter_version'], os.environ['notebook_scala_version'],
                          os.environ['notebook_spark_version'], os.environ['notebook_hadoop_version'],
-                         os.environ['aws_region'], os.environ['notebook_tensorflow_version'],
-                         os.environ['notebook_r_mirror'], notebook_config['exploratory_name'])
+                         os.environ['aws_region'], os.environ['notebook_r_mirror'],
+                         notebook_config['exploratory_name'])
         try:
             local("~/scripts/{}.py {}".format('configure_deep_learning_node', params))
         except:
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure Deep Learning node.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -180,6 +191,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -197,6 +209,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -226,6 +239,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed edge reverse proxy template.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -242,6 +256,7 @@
                 if image_id != '':
                     print("Image was successfully created. It's ID is {}".format(image_id))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
             sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py b/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py
index a0bcb24..b23e4f7 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -41,10 +44,12 @@
         if args.elastic_ip == 'None':
             print("Allocating Elastic IP")
             allocation_id = allocate_elastic_ip()
+            create_product_tag(allocation_id)
         else:
             allocation_id = get_allocation_id_by_elastic_ip(args.elastic_ip)
 
         print("Associating Elastic IP to Edge")
         associate_elastic_ip(args.edge_id, allocation_id)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
index f6c5208..7720b54 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,11 +46,14 @@
                                                      os.environ['edge_user_name']).lower().replace('_', '-')
     edge_conf['shared_bucket_name'] = (edge_conf['service_base_name'] + '-shared-bucket').lower().replace('_', '-')
     edge_conf['edge_security_group_name'] = '{}-SG'.format(edge_conf['instance_name'])
-    edge_conf['notebook_instance_name'] = '{}-{}-nb'.format(edge_conf['service_base_name'], os.environ['edge_user_name'])
+    edge_conf['notebook_instance_name'] = '{}-{}-nb'.format(edge_conf['service_base_name'],
+                                                            os.environ['edge_user_name'])
     edge_conf['notebook_role_profile_name'] = '{}-{}-nb-Profile' \
         .format(edge_conf['service_base_name'].lower().replace('-', '_'), os.environ['edge_user_name'])
     edge_conf['notebook_security_group_name'] = '{}-{}-nb-SG'.format(edge_conf['service_base_name'],
                                                                      os.environ['edge_user_name'])
+    edge_conf['dataengine_instances_name'] = '{}-{}-dataengine' \
+        .format(edge_conf['service_base_name'], os.environ['edge_user_name'])
     tag = {"Key": edge_conf['tag_name'],
            "Value": "{}-{}-subnet".format(edge_conf['service_base_name'], os.environ['edge_user_name'])}
     edge_conf['private_subnet_cidr'] = get_subnet_by_tag(tag)
@@ -62,6 +68,12 @@
         edge_conf['edge_private_ip'] = get_instance_ip_address(edge_conf['tag_name'], edge_conf['instance_name']).get(
             'Private')
         edge_conf['edge_public_ip'] = edge_conf['edge_private_ip']
+    edge_conf['vpc1_cidrs'] = get_vpc_cidr_by_id(os.environ['aws_vpc_id'])
+    edge_conf['vpc2_cidrs'] = get_vpc_cidr_by_id(os.environ['aws_notebook_vpc_id'])
+    edge_conf['vpc_cidrs'] = list(set(edge_conf['vpc1_cidrs'] + edge_conf['vpc2_cidrs']))
+    edge_conf['allowed_ip_cidr'] = list()
+    for cidr in os.environ['conf_allowed_ip_cidr'].split(','):
+        edge_conf['allowed_ip_cidr'].append(cidr.replace(' ', ''))
 
 
     instance_hostname = get_instance_hostname(edge_conf['tag_name'], edge_conf['instance_name'])
@@ -87,6 +99,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -108,6 +121,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -122,7 +136,14 @@
         print('[INSTALLING HTTP PROXY]')
         logging.info('[INSTALLING HTTP PROXY]')
         additional_config = {"exploratory_subnet": edge_conf['private_subnet_cidr'],
-                             "template_file": "/root/templates/squid.conf"}
+                             "template_file": "/root/templates/squid.conf",
+                             "edge_user_name": os.environ['aws_iam_user'],
+                             "ldap_host": os.environ['ldap_hostname'],
+                             "ldap_dn": os.environ['ldap_dn'],
+                             "ldap_user": os.environ['ldap_service_username'],
+                             "ldap_password": os.environ['ldap_service_password'],
+                             "vpc_cidrs": edge_conf['vpc_cidrs'],
+                             "allowed_ip_cidr": edge_conf['allowed_ip_cidr']}
         params = "--hostname {} --keyfile {} --additional_config '{}' --user {}" \
                  .format(instance_hostname, keyfile_name, json.dumps(additional_config), edge_conf['dlab_ssh_user'])
         try:
@@ -131,6 +152,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing http proxy.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -155,7 +177,8 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
-        append_result("Failed installing users key. Excpeption: " + str(err))
+        print('Error: {0}'.format(err))
+        append_result("Failed installing users key." + str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
         remove_ec2(edge_conf['tag_name'], edge_conf['instance_name'])
@@ -176,7 +199,8 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
-        append_result("Failed installing users key. Excpeption: " + str(err))
+        print('Error: {0}'.format(err))
+        append_result("Failed installing users key." + str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
         remove_ec2(edge_conf['tag_name'], edge_conf['instance_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py
index b3d7499..9de94dc 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -27,7 +30,8 @@
 
 
 if __name__ == "__main__":
-    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'], os.environ['request_id'])
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
     local_log_filepath = "/logs/edge/" + local_log_filename
     logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
                         level=logging.DEBUG,
@@ -41,6 +45,7 @@
     edge_conf['user_keyname'] = os.environ['edge_user_name']
     edge_conf['public_subnet_id'] = os.environ['aws_subnet_id']
     edge_conf['vpc_id'] = os.environ['aws_vpc_id']
+    edge_conf['vpc2_id'] = os.environ['aws_notebook_vpc_id']
     edge_conf['region'] = os.environ['aws_region']
     edge_conf['ami_id'] = get_ami_id(os.environ['aws_{}_image_name'.format(os.environ['conf_os_family'])])
     edge_conf['instance_size'] = os.environ['aws_edge_instance_size']
@@ -50,15 +55,18 @@
     edge_conf['bucket_name'] = '{}-{}-bucket'.format(edge_conf['service_base_name'],
                                                      os.environ['edge_user_name']).lower().replace('_', '-')
     edge_conf['ssn_bucket_name'] = '{}-ssn-bucket'.format(edge_conf['service_base_name']).lower().replace('_', '-')
-    edge_conf['shared_bucket_name'] = '{}-shared-bucket'.format(edge_conf['service_base_name']).lower().replace('_', '-')
+    edge_conf['shared_bucket_name'] = '{}-shared-bucket'.format(edge_conf['service_base_name']).lower().replace('_',
+                                                                                                                '-')
     edge_conf['role_name'] = '{}-{}-edge-Role'.format(edge_conf['service_base_name'].lower().replace('-', '_'),
                                                       os.environ['edge_user_name'])
-    edge_conf['role_profile_name'] = '{}-{}-edge-Profile'.format(edge_conf['service_base_name'].lower().replace('-', '_'),
+    edge_conf['role_profile_name'] = '{}-{}-edge-Profile'.format(edge_conf['service_base_name'].lower().replace('-',
+                                                                                                                '_'),
                                                                  os.environ['edge_user_name'])
     edge_conf['policy_name'] = '{}-{}-edge-Policy'.format(edge_conf['service_base_name'].lower().replace('-', '_'),
                                                           os.environ['edge_user_name'])
     edge_conf['edge_security_group_name'] = '{}-SG'.format(edge_conf['instance_name'])
-    edge_conf['notebook_instance_name'] = '{}-{}-nb'.format(edge_conf['service_base_name'], os.environ['edge_user_name'])
+    edge_conf['notebook_instance_name'] = '{}-{}-nb'.format(edge_conf['service_base_name'],
+                                                            os.environ['edge_user_name'])
     edge_conf['dataengine_instances_name'] = '{}-{}-dataengine' \
         .format(edge_conf['service_base_name'], os.environ['edge_user_name'])
     edge_conf['notebook_dataengine_role_name'] = '{}-{}-nb-de-Role' \
@@ -67,13 +75,16 @@
         .format(edge_conf['service_base_name'].lower().replace('-', '_'), os.environ['edge_user_name'])
     edge_conf['notebook_dataengine_role_profile_name'] = '{}-{}-nb-de-Profile' \
         .format(edge_conf['service_base_name'].lower().replace('-', '_'), os.environ['edge_user_name'])
-    edge_conf['notebook_security_group_name'] = '{}-{}-nb-SG'.format(edge_conf['service_base_name'], os.environ['edge_user_name'])
+    edge_conf['notebook_security_group_name'] = '{}-{}-nb-SG'.format(edge_conf['service_base_name'],
+                                                                     os.environ['edge_user_name'])
     edge_conf['private_subnet_prefix'] = os.environ['aws_private_subnet_prefix']
     edge_conf['dataengine_master_security_group_name'] = '{}-{}-dataengine-master-sg' \
         .format(edge_conf['service_base_name'], os.environ['edge_user_name'])
     edge_conf['dataengine_slave_security_group_name'] = '{}-{}-dataengine-slave-sg' \
         .format(edge_conf['service_base_name'], os.environ['edge_user_name'])
-    edge_conf['allowed_ip_cidr'] = os.environ['conf_allowed_ip_cidr']
+    edge_conf['allowed_ip_cidr'] = list()
+    for cidr in os.environ['conf_allowed_ip_cidr'].split(','):
+        edge_conf['allowed_ip_cidr'].append({"CidrIp": cidr.replace(' ','')})
     edge_conf['network_type'] = os.environ['conf_network_type']
     edge_conf['all_ip_cidr'] = '0.0.0.0/0'
     if 'aws_user_predefined_s3_policies' not in os.environ:
@@ -99,7 +110,7 @@
         logging.info('[CREATE SUBNET]')
         print('[CREATE SUBNET]')
         params = "--vpc_id '{}' --infra_tag_name {} --infra_tag_value {} --username {} --prefix {} --user_subnets_range '{}'" \
-                 .format(edge_conf['vpc_id'], edge_conf['tag_name'], edge_conf['service_base_name'],
+                 .format(edge_conf['vpc2_id'], edge_conf['tag_name'], edge_conf['service_base_name'],
                          os.environ['edge_user_name'], edge_conf['private_subnet_prefix'],
                          os.environ['conf_user_subnets_range'])
         try:
@@ -108,10 +119,12 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create subnet.", str(err))
         sys.exit(1)
 
-    tag = {"Key": edge_conf['tag_name'], "Value": "{}-{}-subnet".format(edge_conf['service_base_name'], os.environ['edge_user_name'])}
+    tag = {"Key": edge_conf['tag_name'], "Value": "{}-{}-subnet".format(edge_conf['service_base_name'],
+                                                                        os.environ['edge_user_name'])}
     edge_conf['private_subnet_cidr'] = get_subnet_by_tag(tag)
     print('NEW SUBNET CIDR CREATED: {}'.format(edge_conf['private_subnet_cidr']))
 
@@ -127,6 +140,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to creating roles.", str(err))
         sys.exit(1)
 
@@ -142,6 +156,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to creating roles.", str(err))
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
         sys.exit(1)
@@ -149,7 +164,7 @@
     try:
         logging.info('[CREATE SECURITY GROUP FOR EDGE NODE]')
         print('[CREATE SECURITY GROUPS FOR EDGE]')
-        edge_sg_ingress = [
+        edge_sg_ingress = format_sg([
             {
                 "IpProtocol": "-1",
                 "IpRanges": [{"CidrIp": edge_conf['private_subnet_cidr']}],
@@ -158,17 +173,30 @@
             {
                 "PrefixListIds": [],
                 "FromPort": 22,
-                "IpRanges": [{"CidrIp": edge_conf['allowed_ip_cidr']}],
+                "IpRanges": edge_conf['allowed_ip_cidr'],
                 "ToPort": 22, "IpProtocol": "tcp", "UserIdGroupPairs": []
             },
             {
                 "PrefixListIds": [],
+                "FromPort": 3128,
+                "IpRanges": edge_conf['allowed_ip_cidr'],
+                "ToPort": 3128, "IpProtocol": "tcp", "UserIdGroupPairs": []
+            },
+            {
+                "PrefixListIds": [],
                 "FromPort": 80,
-                "IpRanges": [{"CidrIp": edge_conf['allowed_ip_cidr']}],
+                "IpRanges": edge_conf['allowed_ip_cidr'],
                 "ToPort": 80, "IpProtocol": "tcp", "UserIdGroupPairs": []
+            },
+            {
+                "IpProtocol": "-1",
+                "IpRanges": [{"CidrIp": get_instance_ip_address(edge_conf['tag_name'], '{}-ssn'.format(
+                    edge_conf['service_base_name'])).get('Private') + "/32"}],
+                "UserIdGroupPairs": [],
+                "PrefixListIds": []
             }
-        ]
-        edge_sg_egress = [
+        ])
+        edge_sg_egress = format_sg([
             {
                 "PrefixListIds": [],
                 "FromPort": 22,
@@ -227,7 +255,7 @@
                 "PrefixListIds": [],
                 "FromPort": 4040,
                 "IpRanges": [{"CidrIp": edge_conf['private_subnet_cidr']}],
-                "ToPort": 4040, "IpProtocol": "tcp", "UserIdGroupPairs": []
+                "ToPort": 4045, "IpProtocol": "tcp", "UserIdGroupPairs": []
             },
             {
                 "PrefixListIds": [],
@@ -271,7 +299,7 @@
                 "IpRanges": [{"CidrIp": edge_conf['all_ip_cidr']}],
                 "ToPort": 389, "IpProtocol": "tcp", "UserIdGroupPairs": []
             }
-        ]
+        ])
         params = "--name {} --vpc_id {} --security_group_rules '{}' --infra_tag_name {} --infra_tag_value {} \
             --egress '{}' --force {} --nb_sg_name {} --resource {}".\
             format(edge_conf['edge_security_group_name'], edge_conf['vpc_id'], json.dumps(edge_sg_ingress),
@@ -300,7 +328,7 @@
         rules_list = []
         for i in sg_list:
             rules_list.append({"GroupId": i})
-        private_sg_ingress = [
+        private_sg_ingress = format_sg([
             {
                 "IpProtocol": "-1",
                 "IpRanges": [],
@@ -315,13 +343,14 @@
             },
             {
                 "IpProtocol": "-1",
-                "IpRanges": [{"CidrIp": get_instance_ip_address(edge_conf['tag_name'], '{}-ssn'.format(edge_conf['service_base_name'])).get('Private') + "/32"}],
+                "IpRanges": [{"CidrIp": get_instance_ip_address(edge_conf['tag_name'], '{}-ssn'.format(
+                    edge_conf['service_base_name'])).get('Private') + "/32"}],
                 "UserIdGroupPairs": [],
                 "PrefixListIds": []
             }
-        ]
+        ])
 
-        private_sg_egress = [
+        private_sg_egress = format_sg([
             {
                 "IpProtocol": "-1",
                 "IpRanges": [{"CidrIp": edge_conf['private_subnet_cidr']}],
@@ -330,7 +359,8 @@
             },
             {
                 "IpProtocol": "-1",
-                "IpRanges": [{"CidrIp": get_instance_ip_address(edge_conf['tag_name'], '{}-ssn'.format(edge_conf['service_base_name'])).get('Private') + "/32"}],
+                "IpRanges": [{"CidrIp": get_instance_ip_address(edge_conf['tag_name'], '{}-ssn'.format(
+                    edge_conf['service_base_name'])).get('Private') + "/32"}],
                 "UserIdGroupPairs": [],
                 "PrefixListIds": [],
             },
@@ -348,10 +378,10 @@
                 "UserIdGroupPairs": [],
                 "PrefixListIds": [],
             }
-        ]
+        ])
 
         params = "--name {} --vpc_id {} --security_group_rules '{}' --egress '{}' --infra_tag_name {} --infra_tag_value {} --force {}".\
-            format(edge_conf['notebook_security_group_name'], edge_conf['vpc_id'], json.dumps(private_sg_ingress),
+            format(edge_conf['notebook_security_group_name'], edge_conf['vpc2_id'], json.dumps(private_sg_ingress),
                    json.dumps(private_sg_egress), edge_conf['service_base_name'], edge_conf['notebook_instance_name'], True)
         try:
             local("~/scripts/{}.py {}".format('common_create_security_group', params))
@@ -363,6 +393,7 @@
             print('Waiting for changes to propagate')
             time.sleep(10)
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating security group for private subnet.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -374,7 +405,7 @@
     print("[CREATING SECURITY GROUPS FOR MASTER NODE]")
     try:
         params = "--name {} --vpc_id {} --security_group_rules '{}' --egress '{}' --infra_tag_name {} --infra_tag_value {} --force {}". \
-            format(edge_conf['dataengine_master_security_group_name'], edge_conf['vpc_id'],
+            format(edge_conf['dataengine_master_security_group_name'], edge_conf['vpc2_id'],
                    json.dumps(private_sg_ingress), json.dumps(private_sg_egress), edge_conf['service_base_name'],
                    edge_conf['dataengine_instances_name'], True)
         try:
@@ -383,6 +414,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create sg.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -394,7 +426,7 @@
     print("[CREATING SECURITY GROUPS FOR SLAVE NODES]")
     try:
         params = "--name {} --vpc_id {} --security_group_rules '{}' --egress '{}' --infra_tag_name {} --infra_tag_value {} --force {}". \
-            format(edge_conf['dataengine_slave_security_group_name'], edge_conf['vpc_id'],
+            format(edge_conf['dataengine_slave_security_group_name'], edge_conf['vpc2_id'],
                    json.dumps(private_sg_ingress), json.dumps(private_sg_egress), edge_conf['service_base_name'],
                    edge_conf['dataengine_instances_name'], True)
         try:
@@ -403,6 +435,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create bucket.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -423,6 +456,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create bucket.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -444,6 +478,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create bucket policy.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -468,6 +503,7 @@
             raise Exception
 
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create instance.", str(err))
         remove_all_iam_resources('notebook', os.environ['edge_user_name'])
         remove_all_iam_resources('edge', os.environ['edge_user_name'])
@@ -493,6 +529,7 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to associate elastic ip.", str(err))
             try:
                 edge_conf['edge_public_ip'] = get_instance_ip_address(edge_conf['tag_name'], edge_conf['instance_name']).get('Public')
@@ -506,4 +543,4 @@
             remove_sgroups(edge_conf['notebook_instance_name'])
             remove_sgroups(edge_conf['instance_name'])
             remove_s3('edge', os.environ['edge_user_name'])
-            sys.exit(1)
\ No newline at end of file
+            sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_start.py b/infrastructure-provisioning/src/general/scripts/aws/edge_start.py
index 71eac0f..c728591 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_start.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -44,12 +47,10 @@
     try:
         start_ec2(edge_conf['tag_name'], edge_conf['instance_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to start edge.", str(err))
         sys.exit(1)
 
-    except:
-        sys.exit(1)
-
     try:
         instance_hostname = get_instance_hostname(edge_conf['tag_name'], edge_conf['instance_name'])
         addresses = get_instance_ip_address(edge_conf['tag_name'], edge_conf['instance_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_status.py b/infrastructure-provisioning/src/general/scripts/aws/edge_status.py
index 78c39a9..86ff6e3 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_status.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_status.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,7 +38,6 @@
 
     create_aws_config_files()
     print('Getting statuses of DLAB resources')
-    # Base config
 
     try:
         logging.info('[COLLECT DATA]')
@@ -47,5 +49,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to collect necessary information.", str(err))
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_stop.py b/infrastructure-provisioning/src/general/scripts/aws/edge_stop.py
index a6b8bfd..dd52ff9 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_stop.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_terminate.py b/infrastructure-provisioning/src/general/scripts/aws/edge_terminate.py
index d50e6a6..26be0b8 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,7 +43,8 @@
                     print("The EMR cluster {} has been terminated successfully".format(emr_name))
         else:
             print("There are no EMR clusters to terminate.")
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Terminating EDGE and notebook instances")
@@ -109,7 +113,8 @@
         except Exception as err:
             traceback.print_exc()
             append_result("Failed to terminate edge.", str(err))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     try:
diff --git a/infrastructure-provisioning/src/general/scripts/aws/jupyter_configure.py b/infrastructure-provisioning/src/general/scripts/aws/jupyter_configure.py
index 8db5d7c..3a352cc 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/jupyter_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/jupyter_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,6 +52,7 @@
     notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
     notebook_config['key_name'] = os.environ['conf_key_name']
     notebook_config['user_keyname'] = os.environ['edge_user_name']
+    notebook_config['network_type'] = os.environ['conf_network_type']
     notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
                                                                os.environ['edge_user_name'],
                                                                notebook_config['exploratory_name'], args.uuid)
@@ -67,7 +71,10 @@
     instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
     edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
-    edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
+    if notebook_config['network_type'] == 'private':
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Private')
+    else:
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
     keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
 
     try:
@@ -90,6 +97,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -107,6 +115,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -123,6 +132,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -155,6 +165,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure jupyter.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -172,6 +183,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -188,6 +200,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -205,6 +218,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -234,6 +248,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to set edge reverse proxy template.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -250,6 +265,7 @@
                 if image_id != '':
                     print("Image was successfully created. It's ID is {}".format(image_id))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
             sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py b/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
index df6b5f2..2913e1a 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -103,6 +106,8 @@
     else:
         local('mkdir -p ' + kernels_dir + 'toree_' + args.cluster_name + '/')
         local('tar zxvf /tmp/toree_kernel.tar.gz -C ' + kernels_dir + 'toree_' + args.cluster_name + '/')
+        local('sudo mv {0}toree_{1}/toree-0.2.0-incubating/* {0}toree_{1}/'.format(kernels_dir, args.cluster_name))
+        local('sudo rm -r {0}toree_{1}/toree-0.2.0-incubating'.format(kernels_dir, args.cluster_name))
         kernel_path = kernels_dir + "toree_" + args.cluster_name + "/kernel.json"
         template_file = "/tmp/toree_dataengine-service_templatev2.json"
         with open(template_file, 'r') as f:
diff --git a/infrastructure-provisioning/src/general/scripts/aws/jupyter_install_dataengine-service_kernels.py b/infrastructure-provisioning/src/general/scripts/aws/jupyter_install_dataengine-service_kernels.py
index 3b0b77f..294f9d2 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/jupyter_install_dataengine-service_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/jupyter_install_dataengine-service_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/rstudio_configure.py b/infrastructure-provisioning/src/general/scripts/aws/rstudio_configure.py
index 6530918..506b3b8 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/rstudio_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/rstudio_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -50,6 +53,7 @@
     notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
     notebook_config['key_name'] = os.environ['conf_key_name']
     notebook_config['user_keyname'] = os.environ['edge_user_name']
+    notebook_config['network_type'] = os.environ['conf_network_type']
     notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
                                                                os.environ['edge_user_name'],
                                                                notebook_config['exploratory_name'], args.uuid)
@@ -69,7 +73,10 @@
     instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
     edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
-    edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
+    if notebook_config['network_type'] == 'private':
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Private')
+    else:
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
     keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
 
     try:
@@ -92,6 +99,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -110,6 +118,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -126,6 +135,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -148,6 +158,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure rstudio.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -165,6 +176,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -180,6 +192,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -197,6 +210,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -216,6 +230,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to set edge reverse proxy template.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -232,6 +247,7 @@
                 if image_id != '':
                     print("Image was successfully created. It's ID is {}".format(image_id))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
             sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/rstudio_dataengine-service_create_configs.py b/infrastructure-provisioning/src/general/scripts/aws/rstudio_dataengine-service_create_configs.py
index 5f4074c..5534b73 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/rstudio_dataengine-service_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/rstudio_dataengine-service_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -46,9 +49,9 @@
 parser.add_argument('--os_user', type=str, default='')
 args = parser.parse_args()
 
-emr_dir = '/opt/' + args.emr_version + '/jars/'
-spark_dir = '/opt/' + args.emr_version + '/' + args.cluster_name + '/spark/'
-yarn_dir = '/opt/' + args.emr_version + '/' + args.cluster_name + '/conf/'
+emr_dir = '/opt/{}/jars/'.format(args.emr_version)
+spark_dir = '/opt/{0}/{1}/spark/'.format(args.emr_version, args.cluster_name)
+yarn_dir = '/opt/{0}/{1}/conf/'.format(args.emr_version, args.cluster_name)
 
 
 def configure_rstudio():
@@ -61,8 +64,12 @@
             local('echo \'HADOOP_CONF_DIR="' + yarn_dir + '"\' >> /home/' + args.os_user + '/.Renviron')
             local("sed -i 's/^master/#master/' /home/" + args.os_user + "/.Rprofile")
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
+            #fix emr 5.19 problem with warnings in rstudio because of bug in AWS configuration
+            if args.emr_version == "emr-5.19.0":
+                local("sed -i '/DRFA/s/^/#/' " + spark_dir + "conf/log4j.properties")
             local('touch /home/' + args.os_user + '/.ensure_dir/rstudio_dataengine-service_ensured')
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
     else:
         try:
@@ -75,7 +82,11 @@
             local('echo \'YARN_CONF_DIR="' + yarn_dir + '"\' >> /home/' + args.os_user + '/.Renviron')
             local('echo \'HADOOP_CONF_DIR="' + yarn_dir + '"\' >> /home/' + args.os_user + '/.Renviron')
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
-        except:
+            #fix emr 5.19 problem with warnings in rstudio because of bug in AWS configuration
+            if args.emr_version == "emr-5.19.0":
+                local("sed -i '/DRFA/s/^/#/' " + spark_dir + "conf/log4j.properties")
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/rstudio_install_dataengine-service_kernels.py b/infrastructure-provisioning/src/general/scripts/aws/rstudio_install_dataengine-service_kernels.py
index 809a2ef..93f8bfc 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/rstudio_install_dataengine-service_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/rstudio_install_dataengine-service_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py
index 2347fc9..f86b1cd 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,10 +43,12 @@
         if args.elastic_ip == 'None':
             print("Allocating Elastic IP")
             allocation_id = allocate_elastic_ip()
+            create_product_tag(allocation_id)
         else:
             allocation_id = get_allocation_id_by_elastic_ip(args.elastic_ip)
 
         print("Associating Elastic IP to SSN")
         associate_elastic_ip(args.ssn_id, allocation_id)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py
index 9b13f34..cbb8df0 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py
@@ -2,25 +2,28 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
 from dlab.fab import *
 from dlab.actions_lib import *
-import sys, os
+import sys, os, json
 from fabric.api import *
 from dlab.ssn_lib import *
 import traceback
@@ -43,12 +46,14 @@
         user_bucket_name = (service_base_name + '-ssn-bucket').lower().replace('_', '-')
         shared_bucket_name = (service_base_name + '-shared-bucket').lower().replace('_', '-')
         tag_name = service_base_name + '-Tag'
+        tag2_name = service_base_name + '-secondary-Tag'
         instance_name = service_base_name + '-ssn'
         region = os.environ['aws_region']
         ssn_image_name = os.environ['aws_{}_image_name'.format(os.environ['conf_os_family'])]
         ssn_ami_id = get_ami_id(ssn_image_name)
         policy_path = '/root/files/ssn_policy.json'
         vpc_cidr = os.environ['conf_vpc_cidr']
+        vpc2_cidr = os.environ['conf_vpc2_cidr']
         sg_name = instance_name + '-SG'
         pre_defined_vpc = False
         pre_defined_subnet = False
@@ -56,6 +61,11 @@
         billing_enabled = True
         dlab_ssh_user = os.environ['conf_os_user']
         network_type = os.environ['conf_network_type']
+        if 'ssn_hosted_zone_id' in os.environ and 'ssn_hosted_zone_name' in os.environ and \
+                'ssn_subdomain' in os.environ:
+            domain_created = True
+        else:
+            domain_created = False
 
         try:
             if os.environ['aws_vpc_id'] == '':
@@ -72,6 +82,19 @@
             os.environ['aws_subnet_id'] = get_subnet_by_tag(tag, True)
             pre_defined_subnet = True
         try:
+            if os.environ['conf_duo_vpc_enable'] == 'true' and not os.environ['aws_vpc2_id']:
+                raise KeyError
+        except KeyError:
+            tag = {"Key": tag2_name, "Value": "{}-subnet".format(service_base_name)}
+            os.environ['aws_vpc2_id'] = get_vpc_by_tag(tag2_name, service_base_name)
+            pre_defined_vpc2 = True
+        try:
+            if os.environ['conf_duo_vpc_enable'] == 'true' and not os.environ['aws_peering_id']:
+                raise KeyError
+        except KeyError:
+            os.environ['aws_peering_id'] = get_peering_by_tag(tag_name, service_base_name)
+            pre_defined_peering = True
+        try:
             if os.environ['aws_security_groups_ids'] == '':
                 raise KeyError
         except KeyError:
@@ -92,7 +115,8 @@
                 raise KeyError
         except KeyError:
             os.environ['aws_report_path'] = ''
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     try:
@@ -121,6 +145,9 @@
             raise Exception
     except Exception as err:
         append_result("Failed creating ssh user 'dlab'.", str(err))
+        if domain_created:
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
         remove_ec2(tag_name, instance_name)
         remove_all_iam_resources(instance)
         remove_s3(instance)
@@ -138,7 +165,8 @@
     try:
         logging.info('[INSTALLING PREREQUISITES TO SSN INSTANCE]')
         print('[INSTALLING PREREQUISITES TO SSN INSTANCE]')
-        params = "--hostname {} --keyfile {} --pip_packages 'boto3 backoff argparse fabric==1.14.0 awscli pymongo pyyaml jinja2' --user {} --region {}". \
+        params = "--hostname {} --keyfile {} --pip_packages 'boto3 backoff argparse fabric==1.14.0 awscli pymongo " \
+                 "pyyaml jinja2' --user {} --region {}". \
             format(instance_hostname, os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem", dlab_ssh_user,
                    os.environ['aws_region'])
 
@@ -149,6 +177,9 @@
             raise Exception
     except Exception as err:
         append_result("Failed installing software: pip, packages.", str(err))
+        if domain_created:
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
         remove_ec2(tag_name, instance_name)
         remove_all_iam_resources(instance)
         remove_s3(instance)
@@ -166,11 +197,15 @@
     try:
         logging.info('[CONFIGURE SSN INSTANCE]')
         print('[CONFIGURE SSN INSTANCE]')
-        additional_config = {"nginx_template_dir": "/root/templates/", "service_base_name": service_base_name, "security_group_id": os.environ['aws_security_groups_ids'], "vpc_id": os.environ['aws_vpc_id'], "subnet_id": os.environ['aws_subnet_id'], "admin_key": os.environ['conf_key_name']}
-        params = "--hostname {} --keyfile {} --additional_config '{}' --os_user {} --dlab_path {} --tag_resource_id {}". \
-            format(instance_hostname, "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name']),
-                   json.dumps(additional_config), dlab_ssh_user, os.environ['ssn_dlab_path'],
-                   os.environ['conf_tag_resource_id'])
+        additional_config = {"nginx_template_dir": "/root/templates/", "service_base_name": service_base_name,
+                             "security_group_id": os.environ['aws_security_groups_ids'],
+                             "vpc_id": os.environ['aws_vpc_id'], "subnet_id": os.environ['aws_subnet_id'],
+                             "admin_key": os.environ['conf_key_name']}
+        params = "--hostname {} --keyfile {} --additional_config '{}' --os_user {} --dlab_path {} " \
+                 "--tag_resource_id {}".format(instance_hostname, "{}{}.pem".format(os.environ['conf_key_dir'],
+                                                                                    os.environ['conf_key_name']),
+                                               json.dumps(additional_config), dlab_ssh_user,
+                                               os.environ['ssn_dlab_path'], os.environ['conf_tag_resource_id'])
 
         try:
             local("~/scripts/{}.py {}".format('configure_ssn_node', params))
@@ -179,6 +214,9 @@
             raise Exception
     except Exception as err:
         append_result("Failed configuring ssn.", str(err))
+        if domain_created:
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
         remove_ec2(tag_name, instance_name)
         remove_all_iam_resources(instance)
         remove_s3(instance)
@@ -206,10 +244,13 @@
                              {"name": "deeplearning", "tag": "latest"},
                              {"name": "dataengine-service", "tag": "latest"},
                              {"name": "dataengine", "tag": "latest"}]
-        params = "--hostname {} --keyfile {} --additional_config '{}' --os_family {} --os_user {} --dlab_path {} --cloud_provider {} --region {}". \
-            format(instance_hostname, "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name']),
-                   json.dumps(additional_config), os.environ['conf_os_family'], dlab_ssh_user,
-                   os.environ['ssn_dlab_path'], os.environ['conf_cloud_provider'], os.environ['aws_region'])
+        params = "--hostname {} --keyfile {} --additional_config '{}' --os_family {} --os_user {} --dlab_path {} " \
+                 "--cloud_provider {} --region {}".format(instance_hostname,
+                                                          "{}{}.pem".format(os.environ['conf_key_dir'],
+                                                                            os.environ['conf_key_name']),
+                                                          json.dumps(additional_config), os.environ['conf_os_family'],
+                                                          dlab_ssh_user, os.environ['ssn_dlab_path'],
+                                                          os.environ['conf_cloud_provider'], os.environ['aws_region'])
 
         try:
             local("~/scripts/{}.py {}".format('configure_docker', params))
@@ -218,6 +259,9 @@
             raise Exception
     except Exception as err:
         append_result("Unable to configure docker.", str(err))
+        if domain_created:
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
         remove_ec2(tag_name, instance_name)
         remove_all_iam_resources(instance)
         remove_s3(instance)
@@ -245,6 +289,18 @@
             "ssn_instance_size": os.environ['aws_ssn_instance_size'],
             "edge_instance_size": os.environ['aws_edge_instance_size']
         }
+        if os.environ['conf_duo_vpc_enable'] == 'true':
+            secondary_parameters = {
+                "aws_notebook_vpc_id": os.environ['aws_vpc2_id'],
+                "aws_notebook_subnet_id": os.environ['aws_subnet_id'],
+                "aws_peering_id": os.environ['aws_peering_id']
+            }
+        else:
+            secondary_parameters = {
+                "aws_notebook_vpc_id": os.environ['aws_vpc_id'],
+                "aws_notebook_subnet_id": os.environ['aws_subnet_id'],
+            }
+        mongo_parameters.update(secondary_parameters)
         logging.info('[CONFIGURE SSN INSTANCE UI]')
         print('[CONFIGURE SSN INSTANCE UI]')
         params = "--hostname {} " \
@@ -303,6 +359,9 @@
     except Exception as err:
         append_result("Unable to configure UI.", str(err))
         print(err)
+        if domain_created:
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
         remove_ec2(tag_name, instance_name)
         remove_all_iam_resources(instance)
         remove_s3(instance)
@@ -340,7 +399,7 @@
         print("Jenkins URL: {}".format(jenkins_url))
         print("Jenkins URL HTTPS: {}".format(jenkins_url_https))
         try:
-            with open('jenkins_crids.txt') as f:
+            with open('jenkins_creds.txt') as f:
                 print(f.read())
         except:
             print("Jenkins is either configured already or have issues in configuration routine.")
@@ -375,6 +434,9 @@
             params += "--key_id {}".format(os.environ['aws_access_key'])
             local("~/scripts/{}.py {}".format('ssn_finalize', params))
     except:
+        if domain_created:
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
         remove_ec2(tag_name, instance_name)
         remove_all_iam_resources(instance)
         remove_s3(instance)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_create_endpoint.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_create_endpoint.py
index b7f0e21..f44c6d9 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_create_endpoint.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_create_endpoint.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,7 +38,6 @@
 
 
 if __name__ == "__main__":
-    success = False
     tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value}
     waiter = time.sleep(10)
     if args.vpc_id:
@@ -78,19 +80,13 @@
                 if result:
                     endpoint = endpoint_id
             print("ENDPOINT: {}".format(endpoint))
-            success = True
         except botocore.exceptions.ClientError as err:
             print(err.response['Error']['Message'])
             print('Failed to create endpoint. Removing RT')
             ec2.delete_route_table(
                 RouteTableId=route_table[0]
             )
-            success = False
+            sys.exit(1)
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_create_vpc.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_create_vpc.py
index 0754f4b..4e1676f 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_create_vpc.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_create_vpc.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -25,35 +28,35 @@
 
 parser = argparse.ArgumentParser()
 parser.add_argument('--vpc', type=str, default='')
+parser.add_argument('--secondary', dest='secondary', action='store_true')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--infra_tag_name', type=str, default='')
 parser.add_argument('--infra_tag_value', type=str, default='')
+parser.set_defaults(secondary=False)
 args = parser.parse_args()
 
+sec_str = ''
+if args.secondary:
+    sec_str = 'SECONDARY '
+
 
 if __name__ == "__main__":
-    success = False
     tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value}
     if args.vpc != '':
         try:
             vpc_id = get_vpc_by_tag(args.infra_tag_name, args.infra_tag_value)
             if vpc_id == '':
-                print("Creating vpc {0} in region {1} with tag {2}".format(args.vpc, args.region, json.dumps(tag)))
+                print("Creating {3}vpc {0} in region {1} with tag {2}".format(args.vpc, args.region, json.dumps(tag), sec_str))
                 vpc_id = create_vpc(args.vpc, tag)
                 enable_vpc_dns(vpc_id)
-                rt_id = create_rt(vpc_id, args.infra_tag_name, args.infra_tag_value)
+                rt_id = create_rt(vpc_id, args.infra_tag_name, args.infra_tag_value, args.secondary)
             else:
-                print("REQUESTED VPC ALREADY EXISTS")
-            print("VPC_ID: {}".format(vpc_id))
+                print("REQUESTED {}VPC ALREADY EXISTS".format(sec_str))
+            print("{0}VPC_ID: {1}".format(sec_str, vpc_id))
             args.vpc_id = vpc_id
-            success = True
-        except:
-            success = False
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
     else:
         parser.print_help()
         sys.exit(2)
-
-    if success:
-        sys.exit(0)
-    else:
-        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_finalize.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_finalize.py
index 983c204..ee6ac9d 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_finalize.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_finalize.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
index 0996ba9..5712695 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,6 +38,7 @@
     pre_defined_vpc = False
     pre_defined_subnet = False
     pre_defined_sg = False
+    pre_defined_vpc2 = False
     try:
         logging.info('[CREATE AWS CONFIG FILE]')
         print('[CREATE AWS CONFIG FILE]')
@@ -42,7 +46,8 @@
             create_aws_config_files(generate_full_config=True)
         else:
             create_aws_config_files()
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         logging.info('Unable to create configuration')
         append_result("Unable to create configuration")
         traceback.print_exc()
@@ -58,19 +63,23 @@
         user_bucket_name = (service_base_name + '-ssn-bucket').lower().replace('_', '-')
         shared_bucket_name = (service_base_name + '-shared-bucket').lower().replace('_', '-')
         tag_name = service_base_name + '-Tag'
+        tag2_name = service_base_name + '-secondary-Tag'
         instance_name = service_base_name + '-ssn'
         region = os.environ['aws_region']
         ssn_image_name = os.environ['aws_{}_image_name'.format(os.environ['conf_os_family'])]
         ssn_ami_id = get_ami_id(ssn_image_name)
         policy_path = '/root/files/ssn_policy.json'
         vpc_cidr = os.environ['conf_vpc_cidr']
-        allowed_ip_cidr = os.environ['conf_allowed_ip_cidr']
+        vpc2_cidr = os.environ['conf_vpc2_cidr']
+        allowed_ip_cidr = list()
+        for cidr in os.environ['conf_allowed_ip_cidr'].split(','):
+            allowed_ip_cidr.append({"CidrIp": cidr.replace(' ','')})
         sg_name = instance_name + '-SG'
         network_type = os.environ['conf_network_type']
         all_ip_cidr = '0.0.0.0/0'
 
         try:
-            if os.environ['aws_vpc_id'] == '':
+            if not os.environ['aws_vpc_id']:
                 raise KeyError
         except KeyError:
             try:
@@ -84,10 +93,41 @@
                     traceback.print_exc()
                     raise Exception
                 os.environ['aws_vpc_id'] = get_vpc_by_tag(tag_name, service_base_name)
+                create_product_tag(os.environ['aws_vpc_id'])
             except Exception as err:
+                print('Error: {0}'.format(err))
                 append_result("Failed to create VPC. Exception:" + str(err))
                 sys.exit(1)
 
+        allowed_vpc_cidr_ip_ranges = list()
+        for cidr in get_vpc_cidr_by_id(os.environ['aws_vpc_id']):
+            allowed_vpc_cidr_ip_ranges.append({"CidrIp": cidr})
+
+        try:
+            if os.environ['conf_duo_vpc_enable'] == 'true' and not os.environ['aws_vpc2_id']:
+                raise KeyError
+        except KeyError:
+            try:
+                pre_defined_vpc2 = True
+                logging.info('[CREATE SECONDARY VPC AND ROUTE TABLE]')
+                print('[CREATE SECONDARY VPC AND ROUTE TABLE]')
+                params = "--vpc {} --region {} --infra_tag_name {} --infra_tag_value {} --secondary".format(vpc2_cidr, region, tag2_name, service_base_name)
+                try:
+                    local("~/scripts/{}.py {}".format('ssn_create_vpc', params))
+                except:
+                    traceback.print_exc()
+                    raise Exception
+                os.environ['aws_vpc2_id'] = get_vpc_by_tag(tag2_name, service_base_name)
+                create_product_tag(os.environ['aws_vpc2_id'])
+            except Exception as err:
+                print('Error: {0}'.format(err))
+                append_result("Failed to create secondary VPC. Exception:" + str(err))
+                if pre_defined_vpc:
+                    remove_internet_gateways(os.environ['aws_vpc_id'], tag_name, service_base_name)
+                    remove_route_tables(tag_name, True)
+                    remove_vpc(os.environ['aws_vpc_id'])
+                sys.exit(1)
+
         try:
             if os.environ['aws_subnet_id'] == '':
                 raise KeyError
@@ -104,8 +144,10 @@
                     raise Exception
                 with open('/tmp/ssn_subnet_id', 'r') as f:
                     os.environ['aws_subnet_id'] = f.read()
+                create_product_tag(os.environ['aws_subnet_id'])
                 enable_auto_assign_ip(os.environ['aws_subnet_id'])
             except Exception as err:
+                print('Error: {0}'.format(err))
                 append_result("Failed to create Subnet.", str(err))
                 if pre_defined_vpc:
                     remove_internet_gateways(os.environ['aws_vpc_id'], tag_name, service_base_name)
@@ -115,6 +157,34 @@
                     except:
                         print("Subnet hasn't been created.")
                     remove_vpc(os.environ['aws_vpc_id'])
+                if pre_defined_vpc2:
+                    remove_route_tables(tag2_name, True)
+                    remove_vpc(os.environ['aws_vpc2_id'])
+                sys.exit(1)
+
+        try:
+            if os.environ['conf_duo_vpc_enable'] == 'true' and os.environ['aws_vpc_id'] and os.environ['aws_vpc2_id']:
+                raise KeyError
+        except KeyError:
+            try:
+                logging.info('[CREATE PEERING CONNECTION]')
+                print('[CREATE PEERING CONNECTION]')
+                os.environ['aws_peering_id'] = create_peering_connection(os.environ['aws_vpc_id'], os.environ['aws_vpc2_id'], service_base_name)
+                print('PEERING CONNECTION ID:' + os.environ['aws_peering_id'])
+                create_route_by_id(os.environ['aws_subnet_id'], os.environ['aws_vpc_id'], os.environ['aws_peering_id'], get_cidr_by_vpc(os.environ['aws_vpc2_id']))
+            except Exception as err:
+                print('Error: {0}'.format(err))
+                append_result("Failed to create peering connection.", str(err))
+                if pre_defined_vpc:
+                    remove_route_tables(tag_name, True)
+                    try:
+                        remove_subnets(service_base_name + "-subnet")
+                    except:
+                        print("Subnet hasn't been created.")
+                    remove_vpc(os.environ['aws_vpc_id'])
+                if pre_defined_vpc2:
+                    remove_route_tables(tag2_name, True)
+                    remove_vpc(os.environ['aws_vpc2_id'])
                 sys.exit(1)
 
         try:
@@ -125,59 +195,47 @@
                 pre_defined_sg = True
                 logging.info('[CREATE SG FOR SSN]')
                 print('[CREATE SG FOR SSN]')
-                ingress_sg_rules_template = [
+                ingress_sg_rules_template = format_sg([
                     {
                         "PrefixListIds": [],
                         "FromPort": 80,
-                        "IpRanges": [{"CidrIp": allowed_ip_cidr}],
+                        "IpRanges": allowed_ip_cidr,
                         "ToPort": 80, "IpProtocol": "tcp", "UserIdGroupPairs": []
                     },
                     {
                         "PrefixListIds": [],
-                        "FromPort": 8080,
-                        "IpRanges": [{"CidrIp": allowed_ip_cidr}],
-                        "ToPort": 8080, "IpProtocol": "tcp", "UserIdGroupPairs": []
-                    },
-                    {
-                        "PrefixListIds": [],
                         "FromPort": 22,
-                        "IpRanges": [{"CidrIp": allowed_ip_cidr}],
+                        "IpRanges": allowed_ip_cidr,
                         "ToPort": 22, "IpProtocol": "tcp", "UserIdGroupPairs": []
                     },
                     {
                         "PrefixListIds": [],
-                        "FromPort": 3128,
-                        "IpRanges": [{"CidrIp": vpc_cidr}],
-                        "ToPort": 3128, "IpProtocol": "tcp", "UserIdGroupPairs": []
-                    },
-                    {
-                        "PrefixListIds": [],
                         "FromPort": 443,
-                        "IpRanges": [{"CidrIp": allowed_ip_cidr}],
+                        "IpRanges": allowed_ip_cidr,
                         "ToPort": 443, "IpProtocol": "tcp", "UserIdGroupPairs": []
                     },
                     {
                         "PrefixListIds": [],
                         "FromPort": -1,
-                        "IpRanges": [{"CidrIp": allowed_ip_cidr}],
+                        "IpRanges": allowed_ip_cidr,
                         "ToPort": -1, "IpProtocol": "icmp", "UserIdGroupPairs": []
                     },
                     {
                         "PrefixListIds": [],
                         "FromPort": 80,
-                        "IpRanges": [{"CidrIp": vpc_cidr}],
+                        "IpRanges": allowed_vpc_cidr_ip_ranges,
                         "ToPort": 80, "IpProtocol": "tcp", "UserIdGroupPairs": []
                     },
                     {
                         "PrefixListIds": [],
                         "FromPort": 443,
-                        "IpRanges": [{"CidrIp": vpc_cidr}],
+                        "IpRanges": allowed_vpc_cidr_ip_ranges,
                         "ToPort": 443, "IpProtocol": "tcp", "UserIdGroupPairs": []
                     }
-                ]
-                egress_sg_rules_template = [
+                ])
+                egress_sg_rules_template = format_sg([
                     {"IpProtocol": "-1", "IpRanges": [{"CidrIp": all_ip_cidr}], "UserIdGroupPairs": [], "PrefixListIds": []}
-                ]
+                ])
                 params = "--name {} --vpc_id {} --security_group_rules '{}' --egress '{}' --infra_tag_name {} --infra_tag_value {} --force {} --ssn {}". \
                     format(sg_name, os.environ['aws_vpc_id'], json.dumps(ingress_sg_rules_template), json.dumps(egress_sg_rules_template), service_base_name, tag_name, False, True)
                 try:
@@ -188,12 +246,16 @@
                 with open('/tmp/ssn_sg_id', 'r') as f:
                     os.environ['aws_security_groups_ids'] = f.read()
             except Exception as err:
+                print('Error: {0}'.format(err))
                 append_result("Failed creating security group for SSN.", str(err))
                 if pre_defined_vpc:
                     remove_internet_gateways(os.environ['aws_vpc_id'], tag_name, service_base_name)
                     remove_subnets(service_base_name + "-subnet")
                     remove_route_tables(tag_name, True)
                     remove_vpc(os.environ['aws_vpc_id'])
+                if pre_defined_vpc2:
+                    remove_route_tables(tag2_name, True)
+                    remove_vpc(os.environ['aws_vpc2_id'])
                 sys.exit(1)
         logging.info('[CREATE ROLES]')
         print('[CREATE ROLES]')
@@ -205,6 +267,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create roles.", str(err))
         if pre_defined_sg:
             remove_sgroups(tag_name)
@@ -214,6 +277,9 @@
         if pre_defined_vpc:
             remove_route_tables(tag_name, True)
             remove_vpc(os.environ['aws_vpc_id'])
+        if pre_defined_vpc2:
+            remove_route_tables(tag2_name, True)
+            remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
 
     try:
@@ -227,6 +293,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create an endpoint.", str(err))
         remove_all_iam_resources(instance)
         if pre_defined_sg:
@@ -237,8 +304,40 @@
         if pre_defined_vpc:
             remove_route_tables(tag_name, True)
             remove_vpc(os.environ['aws_vpc_id'])
+        if pre_defined_vpc2:
+            remove_route_tables(tag2_name, True)
+            remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
 
+
+
+    if os.environ['conf_duo_vpc_enable'] == 'true':
+        try:
+            logging.info('[CREATE ENDPOINT AND ROUTE-TABLE FOR NOTEBOOK VPC]')
+            print('[CREATE ENDPOINT AND ROUTE-TABLE FOR NOTEBOOK VPC]')
+            params = "--vpc_id {} --region {} --infra_tag_name {} --infra_tag_value {}".format(
+                os.environ['aws_vpc2_id'], os.environ['aws_region'], tag2_name, service_base_name)
+            try:
+                local("~/scripts/{}.py {}".format('ssn_create_endpoint', params))
+            except:
+                traceback.print_exc()
+                raise Exception
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            append_result("Unable to create secondary endpoint.", str(err))
+            remove_all_iam_resources(instance)
+            if pre_defined_sg:
+                remove_sgroups(tag_name)
+            if pre_defined_subnet:
+                remove_internet_gateways(os.environ['aws_vpc_id'], tag_name, service_base_name)
+                remove_subnets(service_base_name + "-subnet")
+            if pre_defined_vpc:
+                remove_route_tables(tag_name, True)
+                remove_vpc(os.environ['aws_vpc_id'])
+            if pre_defined_vpc2:
+                remove_route_tables(tag2_name, True)
+                remove_vpc(os.environ['aws_vpc2_id'])
+            sys.exit(1)
     try:
         logging.info('[CREATE BUCKETS]')
         print('[CREATE BUCKETS]')
@@ -260,6 +359,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create bucket.", str(err))
         remove_all_iam_resources(instance)
         if pre_defined_sg:
@@ -271,6 +371,9 @@
             remove_vpc_endpoints(os.environ['aws_vpc_id'])
             remove_route_tables(tag_name, True)
             remove_vpc(os.environ['aws_vpc_id'])
+        if pre_defined_vpc2:
+            remove_route_tables(tag2_name, True)
+            remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
 
     try:
@@ -287,6 +390,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create ssn instance.", str(err))
         remove_all_iam_resources(instance)
         remove_s3(instance)
@@ -299,6 +403,9 @@
             remove_vpc_endpoints(os.environ['aws_vpc_id'])
             remove_route_tables(tag_name, True)
             remove_vpc(os.environ['aws_vpc_id'])
+        if pre_defined_vpc2:
+            remove_route_tables(tag2_name, True)
+            remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
 
     if network_type == 'public':
@@ -317,6 +424,7 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to associate elastic ip.", str(err))
             remove_ec2(tag_name, instance_name)
             remove_all_iam_resources(instance)
@@ -330,4 +438,40 @@
                 remove_vpc_endpoints(os.environ['aws_vpc_id'])
                 remove_route_tables(tag_name, True)
                 remove_vpc(os.environ['aws_vpc_id'])
-            sys.exit(1)
\ No newline at end of file
+            if pre_defined_vpc2:
+                remove_route_tables(tag2_name, True)
+                remove_vpc(os.environ['aws_vpc2_id'])
+            sys.exit(1)
+
+    if network_type == 'private':
+        instance_ip = get_instance_ip_address(tag_name, instance_name).get('Private')
+    else:
+        instance_ip = get_instance_ip_address(tag_name, instance_name).get('Public')
+
+    if 'ssn_hosted_zone_id' in os.environ and 'ssn_hosted_zone_name' in os.environ and 'ssn_subdomain' in os.environ:
+        try:
+            logging.info('[CREATING ROUTE53 RECORD]')
+            print('[CREATING ROUTE53 RECORD]')
+            try:
+                create_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                       os.environ['ssn_subdomain'], instance_ip)
+            except:
+                traceback.print_exc()
+                raise Exception
+        except Exception as err:
+            append_result("Failed to create route53 record.", str(err))
+            remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                                   os.environ['ssn_subdomain'])
+            remove_ec2(tag_name, instance_name)
+            remove_all_iam_resources(instance)
+            remove_s3(instance)
+            if pre_defined_sg:
+                remove_sgroups(tag_name)
+            if pre_defined_subnet:
+                remove_internet_gateways(os.environ['aws_vpc_id'], tag_name, service_base_name)
+                remove_subnets(service_base_name + "-subnet")
+            if pre_defined_vpc:
+                remove_vpc_endpoints(os.environ['aws_vpc_id'])
+                remove_route_tables(tag_name, True)
+                remove_vpc(os.environ['aws_vpc_id'])
+            sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate.py
index e45926e..05db7ee 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -56,6 +59,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to terminate ssn.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate_aws_resources.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate_aws_resources.py
index 0614b6f..7aa6629 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate_aws_resources.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_terminate_aws_resources.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -24,6 +27,7 @@
 import argparse
 import sys
 from dlab.ssn_lib import *
+import os
 
 parser = argparse.ArgumentParser()
 parser.add_argument('--tag_name', type=str)
@@ -33,7 +37,7 @@
 parser.add_argument('--service_base_name', type=str)
 parser.add_argument('--de_se_sg', type=str)
 args = parser.parse_args()
-
+tag2 = args.service_base_name + '-secondary-Tag'
 
 ##############
 # Run script #
@@ -53,7 +57,8 @@
                 print("The EMR cluster {} has been terminated successfully".format(emr_name))
         else:
             print("There are no EMR clusters to terminate.")
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Deregistering notebook's AMI")
@@ -68,6 +73,11 @@
     except:
         sys.exit(1)
 
+    if 'ssn_hosted_zone_id' in os.environ and 'ssn_hosted_zone_name' in os.environ and 'ssn_subdomain' in os.environ:
+        print("Removing Route53 records")
+        remove_route_53_record(os.environ['ssn_hosted_zone_id'], os.environ['ssn_hosted_zone_name'],
+                               os.environ['ssn_subdomain'])
+
     print("Removing security groups")
     try:
         remove_sgroups(args.de_se_sg)
@@ -87,6 +97,12 @@
     except:
         sys.exit(1)
 
+    print("Removing peering connection")
+    try:
+        remove_peering('*')
+    except:
+        sys.exit(1)
+
     print("Removing s3 buckets")
     try:
         remove_s3()
@@ -102,6 +118,7 @@
     print("Removing route tables")
     try:
         remove_route_tables(args.tag_name)
+        remove_route_tables(tag2)
     except:
         sys.exit(1)
 
@@ -127,5 +144,22 @@
             remove_vpc(vpc_id)
         else:
             print("There is no pre-defined SSN VPC")
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
+
+    print("Removing notebook VPC")
+    try:
+        vpc_id = get_vpc_by_tag(tag2, args.service_base_name)
+        if vpc_id != '':
+            try:
+                remove_vpc_endpoints(vpc_id)
+            except:
+                print("There is no such VPC Endpoint")
+            remove_route_tables(tag2, True)
+            remove_vpc(vpc_id)
+        else:
+            print("There is no pre-defined notebook VPC")
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/aws/tensor-rstudio_configure.py b/infrastructure-provisioning/src/general/scripts/aws/tensor-rstudio_configure.py
index 011e2d5..eb7a3b7 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/tensor-rstudio_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/tensor-rstudio_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -51,6 +54,7 @@
     notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
     notebook_config['key_name'] = os.environ['conf_key_name']
     notebook_config['user_keyname'] = os.environ['edge_user_name']
+    notebook_config['network_type'] = os.environ['conf_network_type']
     notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
                                                                os.environ['edge_user_name'],
                                                                notebook_config['exploratory_name'], args.uuid)
@@ -73,8 +77,10 @@
     instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
     edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
-    edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get(
-        'Public')
+    if notebook_config['network_type'] == 'private':
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Private')
+    else:
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
     keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
 
     try:
@@ -97,6 +103,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -114,6 +121,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -130,6 +138,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -152,6 +161,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure tensoflow-rstudio.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -169,6 +179,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -184,6 +195,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -201,6 +213,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -220,6 +233,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to set edge reverse proxy template.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -236,6 +250,7 @@
                 if image_id != '':
                     print("Image was successfully created. It's ID is {}".format(image_id))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
             sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/tensor_configure.py b/infrastructure-provisioning/src/general/scripts/aws/tensor_configure.py
index 1e9fe8e..1ac5305 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/tensor_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/tensor_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -51,6 +54,7 @@
     notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
     notebook_config['key_name'] = os.environ['conf_key_name']
     notebook_config['user_keyname'] = os.environ['edge_user_name']
+    notebook_config['network_type'] = os.environ['conf_network_type']
     notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
                                                                os.environ['edge_user_name'],
                                                                notebook_config['exploratory_name'], args.uuid)
@@ -72,8 +76,10 @@
     instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
     edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
-    edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get(
-        'Public')
+    if notebook_config['network_type'] == 'private':
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Private')
+    else:
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
     keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
 
     try:
@@ -96,6 +102,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -113,6 +120,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -129,6 +137,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -149,6 +158,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure TensorFlow.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -166,6 +176,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -181,6 +192,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -198,6 +210,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -217,6 +230,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to set edge reverse proxy template.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -233,6 +247,7 @@
                 if image_id != '':
                     print("Image was successfully created. It's ID is {}".format(image_id))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
             sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/zeppelin_configure.py b/infrastructure-provisioning/src/general/scripts/aws/zeppelin_configure.py
index e9ebf17..a0c2b49 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/zeppelin_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/zeppelin_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -51,6 +54,7 @@
     notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
     notebook_config['key_name'] = os.environ['conf_key_name']
     notebook_config['user_keyname'] = os.environ['edge_user_name']
+    notebook_config['network_type'] = os.environ['conf_network_type']
     notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
                                                                os.environ['edge_user_name'],
                                                                notebook_config['exploratory_name'], args.uuid)
@@ -77,8 +81,10 @@
     instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
     edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
     edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
-    edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get(
-        'Public')
+    if notebook_config['network_type'] == 'private':
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Private')
+    else:
+        edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
     keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
 
     try:
@@ -101,6 +107,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -119,6 +126,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result('Unable to configure proxy on zeppelin notebook. Exception: ' + str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -135,6 +143,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -168,6 +177,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure zeppelin.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -185,6 +195,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -200,6 +211,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -217,6 +229,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -236,6 +249,7 @@
             append_result("Failed edge reverse proxy template")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to set edge reverse proxy template.", str(err))
         remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -252,6 +266,7 @@
                 if image_id != '':
                     print("Image was successfully created. It's ID is {}".format(image_id))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
             sys.exit(1)
@@ -293,11 +308,11 @@
                "notebook_image_name": notebook_config['notebook_image_name'],
                "Action": "Create new notebook server",
                "exploratory_url": [
-                   {"description": "Zeppelin",
+                   {"description": "Apache Zeppelin",
                     "url": zeppelin_notebook_acces_url},
                    {"description": "Ungit",
                     "url": zeppelin_ungit_acces_url},
-                   {"description": "Zeppelin (via tunnel)",
+                   {"description": "Apache Zeppelin (via tunnel)",
                     "url": zeppelin_ip_url},
                    {"description": "Ungit (via tunnel)",
                     "url": ungit_ip_url}
diff --git a/infrastructure-provisioning/src/general/scripts/aws/zeppelin_dataengine-service_create_configs.py b/infrastructure-provisioning/src/general/scripts/aws/zeppelin_dataengine-service_create_configs.py
index a7d2970..ea72a0a 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/zeppelin_dataengine-service_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/zeppelin_dataengine-service_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -64,7 +67,7 @@
 elif args.region == 'cn-north-1':
     endpoint_url = "https://s3.{}.amazonaws.com.cn".format(args.region)
 else:
-    endpoint_url = 'https://s3-' + args.region + '.amazonaws.com'
+    endpoint_url = 'https://s3-{}.amazonaws.com'.format(args.region)
 
 
 def install_remote_livy(args):
diff --git a/infrastructure-provisioning/src/general/scripts/aws/zeppelin_install_dataengine-service_kernels.py b/infrastructure-provisioning/src/general/scripts/aws/zeppelin_install_dataengine-service_kernels.py
index 43b9047..cbdff4d 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/zeppelin_install_dataengine-service_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/zeppelin_install_dataengine-service_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -74,11 +77,41 @@
     livy_version = os.environ['notebook_livy_version']
     r_enabled = os.environ['notebook_r_enabled']
     numpy_version = os.environ['notebook_numpy_version']
-    sudo("/usr/bin/python /usr/local/bin/zeppelin_dataengine-service_create_configs.py --bucket " + args.bucket +
-         " --cluster_name " + args.cluster_name + " --emr_version " + args.emr_version + " --spark_version " +
-         spark_version + " --hadoop_version " + hadoop_version + " --region " + args.region + " --excluded_lines '"
-         + args.emr_excluded_spark_properties + "' --user_name " + args.edge_user_name + " --os_user " + args.os_user +
-         " --edge_hostname " + args.edge_hostname + " --proxy_port " + args.proxy_port + " --scala_version " +
-         args.scala_version + " --livy_version " + livy_version + " --multiple_clusters " +
-         os.environ['notebook_multiple_clusters'] + " --pip_mirror " + args.pip_mirror + " --numpy_version " + numpy_version + " --application " +
-         args.application + " --r_enabled " + r_enabled)
+    command = "/usr/bin/python /usr/local/bin/zeppelin_dataengine-service_create_configs.py " \
+             "--bucket {0} " \
+             "--cluster_name {1} " \
+             "--emr_version {2} " \
+             "--spark_version {3} " \
+             "--hadoop_version {4} " \
+             "--region {5} " \
+             "--excluded_lines '{6}' " \
+             "--user_name {7} " \
+             "--os_user {8} " \
+             "--edge_hostname {9} " \
+             "--proxy_port {10} " \
+             "--scala_version {11} " \
+             "--livy_version {12} " \
+             "--multiple_clusters {13} " \
+             "--pip_mirror {14} " \
+             "--numpy_version {15} " \
+             "--application {16} " \
+             "--r_enabled {17}" \
+        .format(args.bucket,
+                args.cluster_name,
+                args.emr_version,
+                spark_version,
+                hadoop_version,
+                args.region,
+                args.emr_excluded_spark_properties,
+                args.edge_user_name,
+                args.os_user,
+                args.edge_hostname,
+                args.proxy_port,
+                args.scala_version,
+                livy_version,
+                os.environ['notebook_multiple_clusters'],
+                args.pip_mirror,
+                numpy_version,
+                args.application,
+                r_enabled)
+    sudo(command)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_collect_data.py b/infrastructure-provisioning/src/general/scripts/azure/common_collect_data.py
index a834198..29660b0 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_collect_data.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_collect_data.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_datalake_directory.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_datalake_directory.py
index 0b45952..0493b07 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_datalake_directory.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_datalake_directory.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -58,5 +61,5 @@
             print("Requested Data Lake Store '{}' is missing".format(datalake.name))
             sys.exit(1)
     except Exception as err:
-        print(str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_instance.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_instance.py
index dbd675d..a49ac95 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_instance.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_instance.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -53,33 +56,33 @@
     create_option = 'fromImage'
     if args.instance_name != '':
         try:
-            if AzureMeta().get_instance(args.service_base_name, args.instance_name):
+            if AzureMeta().get_instance(args.resource_group_name, args.instance_name):
                 print("REQUESTED INSTANCE {} ALREADY EXISTS".format(args.instance_name))
             else:
                 if args.public_ip_name != 'None':
-                    if AzureMeta().get_static_ip(args.service_base_name, args.public_ip_name):
+                    if AzureMeta().get_static_ip(args.resource_group_name, args.public_ip_name):
                         print("REQUESTED PUBLIC IP ADDRESS {} ALREADY EXISTS.".format(args.public_ip_name))
                         static_public_ip_address = AzureMeta().get_static_ip(
-                            args.service_base_name, args.public_ip_name).ip_address
+                            args.resource_group_name, args.public_ip_name).ip_address
                     else:
                         print("Creating Static IP address {}".format(args.public_ip_name))
                         static_public_ip_address = \
-                            AzureActions().create_static_public_ip(args.service_base_name, args.public_ip_name,
+                            AzureActions().create_static_public_ip(args.resource_group_name, args.public_ip_name,
                                                                    args.region, args.instance_name,
                                                                    json.loads(args.tags))
-                if AzureMeta().get_network_interface(args.service_base_name, args.network_interface_name):
+                if AzureMeta().get_network_interface(args.resource_group_name, args.network_interface_name):
                     print("REQUESTED NETWORK INTERFACE {} ALREADY EXISTS.".format(args.network_interface_name))
-                    network_interface_id = AzureMeta().get_network_interface(args.service_base_name,
+                    network_interface_id = AzureMeta().get_network_interface(args.resource_group_name,
                                                                              args.network_interface_name).id
                 else:
                     print("Creating Network Interface {}".format(args.network_interface_name))
-                    network_interface_id = AzureActions().create_network_if(args.service_base_name, args.vpc_name,
+                    network_interface_id = AzureActions().create_network_if(args.resource_group_name, args.vpc_name,
                                                                             args.subnet_name,
                                                                             args.network_interface_name, args.region,
                                                                             args.security_group_name,
                                                                             json.loads(args.tags),
                                                                             args.public_ip_name)
-                disk = AzureMeta().get_disk(args.service_base_name, '{}-disk0'.format(
+                disk = AzureMeta().get_disk(args.resource_group_name, '{}-disk0'.format(
                     args.instance_name))
                 if disk:
                     create_option = 'attach'
@@ -91,7 +94,9 @@
                                                args.instance_type, args.image_name, json.loads(args.tags), args.user_name,
                                                create_option, disk_id, args.instance_storage_account_type,
                                                args.image_type)
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
     else:
-        sys.exit(1)
+        parser.print_help()
+        sys.exit(2)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py
index 38ee0b8..c78fb06 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_notebook_image.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,7 +46,8 @@
                               "SBN": image_conf['service_base_name'],
                               "User": image_conf['user_name'],
                               "Image": image_conf['image_name'],
-                              "FIN": image_conf['full_image_name']}
+                              "FIN": image_conf['full_image_name'],
+                              os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
 
         instance_hostname = AzureMeta().get_private_ip_address(image_conf['resource_group_name'],
                                                                image_conf['instance_name'])
@@ -86,6 +90,7 @@
                 local("~/scripts/{}.py {}".format('common_configure_proxy', params))
                 print("Image was successfully created. It's name is {}".format(image_conf['full_image_name']))
             except Exception as err:
+                print('Error: {0}'.format(err))
                 AzureActions().remove_instance(image_conf['resource_group_name'], image_conf['instance_name'])
                 append_result("Failed to create instance from image.", str(err))
                 sys.exit(1)
@@ -100,5 +105,6 @@
                        "Action": "Create image from notebook"}
                 result.write(json.dumps(res))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create image from notebook", str(err))
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_security_group.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_security_group.py
index f66779b..62cd0d7 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_security_group.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_security_group.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,6 +46,7 @@
                                                                   args.region, json.loads(args.tags),
                                                                   json.loads(args.list_rules))
             print("SECURITY GROUP {} has been created".format(args.security_group_name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_storage_account.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_storage_account.py
index 8ef4d51..d2e3dcc 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_storage_account.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_storage_account.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -55,6 +58,6 @@
                 print("CONTAINER {} has been created".format(args.container_name))
             else:
                 print("STORAGE ACCOUNT with name {0} could not be created. {1}".format(account_name, check.message))
-                sys.exit(1)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_create_subnet.py b/infrastructure-provisioning/src/general/scripts/azure/common_create_subnet.py
index d213c73..6e57137 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_create_subnet.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_create_subnet.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -37,34 +40,39 @@
 
 
 if __name__ == "__main__":
-    empty_vpc = False
-    private_subnet_size = ipaddress.ip_network(u'0.0.0.0/{}'.format(args.prefix)).num_addresses
-    first_vpc_ip = int(ipaddress.IPv4Address(args.vpc_cidr.split('/')[0].decode("utf-8")))
-    subnets_cidr = []
-    subnets = AzureMeta().list_subnets(args.resource_group_name, args.vpc_name)
-    for subnet in subnets:
-        subnets_cidr.append(subnet.address_prefix)
-    sorted_subnets_cidr = sorted(subnets_cidr)
-    if not subnets_cidr:
-        empty_vpc = True
+    try:
+        empty_vpc = False
+        private_subnet_size = ipaddress.ip_network(u'0.0.0.0/{}'.format(args.prefix)).num_addresses
+        first_vpc_ip = int(ipaddress.IPv4Address(args.vpc_cidr.split('/')[0].decode("utf-8")))
+        subnets_cidr = []
+        subnets = AzureMeta().list_subnets(args.resource_group_name, args.vpc_name)
+        for subnet in subnets:
+            subnets_cidr.append(subnet.address_prefix)
+        sorted_subnets_cidr = sorted(subnets_cidr)
+        if not subnets_cidr:
+            empty_vpc = True
 
-    last_ip = first_vpc_ip
-    for cidr in sorted_subnets_cidr:
-        first_ip = int(ipaddress.IPv4Address(cidr.split('/')[0].decode("utf-8")))
-        if first_ip - last_ip < private_subnet_size:
-            subnet_size = ipaddress.ip_network(u'{}'.format(cidr)).num_addresses
-            last_ip = first_ip + subnet_size - 1
+        last_ip = first_vpc_ip
+        for cidr in sorted_subnets_cidr:
+            first_ip = int(ipaddress.IPv4Address(cidr.split('/')[0].decode("utf-8")))
+            if first_ip - last_ip < private_subnet_size:
+                subnet_size = ipaddress.ip_network(u'{}'.format(cidr)).num_addresses
+                last_ip = first_ip + subnet_size - 1
+            else:
+                break
+        if empty_vpc:
+            dlab_subnet_cidr = '{0}/{1}'.format(ipaddress.ip_address(last_ip), args.prefix)
         else:
-            break
-    if empty_vpc:
-        dlab_subnet_cidr = '{0}/{1}'.format(ipaddress.ip_address(last_ip), args.prefix)
-    else:
-        dlab_subnet_cidr = '{0}/{1}'.format(ipaddress.ip_address(last_ip + 1), args.prefix)
-    if args.subnet_name != '':
-        if AzureMeta().get_subnet(args.resource_group_name, args.vpc_name, args.subnet_name):
-            print("REQUESTED SUBNET {} ALREADY EXISTS".format(args.subnet_name))
+            dlab_subnet_cidr = '{0}/{1}'.format(ipaddress.ip_address(last_ip + 1), args.prefix)
+        if args.subnet_name != '':
+            if AzureMeta().get_subnet(args.resource_group_name, args.vpc_name, args.subnet_name):
+                print("REQUESTED SUBNET {} ALREADY EXISTS".format(args.subnet_name))
+            else:
+                print("Creating Subnet {}".format(args.subnet_name))
+                AzureActions().create_subnet(args.resource_group_name, args.vpc_name, args.subnet_name, dlab_subnet_cidr)
         else:
-            print("Creating Subnet {}".format(args.subnet_name))
-            AzureActions().create_subnet(args.resource_group_name, args.vpc_name, args.subnet_name, dlab_subnet_cidr)
-    else:
+            print("Subnet name can't be empty")
+            sys.exit(1)
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_download_git_certfile.py b/infrastructure-provisioning/src/general/scripts/azure/common_download_git_certfile.py
index ae638a7..70c08d5 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_download_git_certfile.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_download_git_certfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_notebook_configure_dataengine.py b/infrastructure-provisioning/src/general/scripts/azure/common_notebook_configure_dataengine.py
index 1cc9d43..9547532 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_notebook_configure_dataengine.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_notebook_configure_dataengine.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -66,7 +69,8 @@
                 notebook_config['resource_group_name'], notebook_config['master_node_name'])
             notebook_config['notebook_ip'] = AzureMeta().get_private_ip_address(
                 notebook_config['resource_group_name'], notebook_config['notebook_name'])
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
         notebook_config['spark_master_url'] = 'spark://{}:7077'.format(notebook_config['spark_master_ip'])
 
@@ -92,6 +96,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(notebook_config['instance_count'] - 1):
             slave_name = notebook_config['slave_node_name'] + '{}'.format(i+1)
             AzureActions().remove_instance(notebook_config['resource_group_name'], slave_name)
@@ -100,6 +105,29 @@
         sys.exit(1)
 
     try:
+        logging.info('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        print('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        params = "--hostname {0} " \
+                 "--keyfile {1} " \
+                 "--os_user {2} " \
+            .format(notebook_config['notebook_ip'],
+                    notebook_config['key_path'],
+                    notebook_config['dlab_ssh_user'])
+        try:
+            local("~/scripts/{0}.py {1}".format('common_configure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        for i in range(notebook_config['instance_count'] - 1):
+            slave_name = notebook_config['slave_node_name'] + '{}'.format(i+1)
+            AzureActions().remove_instance(notebook_config['resource_group_name'], slave_name)
+        AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['master_node_name'])
+        append_result("Failed to configure Spark.", str(err))
+        sys.exit(1)
+
+    try:
         with open("/root/result.json", 'w') as result:
             res = {"notebook_name": notebook_config['notebook_name'],
                    "Action": "Configure notebook server"}
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_notebook_update_refresh_token.py b/infrastructure-provisioning/src/general/scripts/azure/common_notebook_update_refresh_token.py
index 1a434c3..4add786 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_notebook_update_refresh_token.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_notebook_update_refresh_token.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
index d23b1f5..b63de2a 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -41,19 +44,7 @@
     try:
         notebook_config = dict()
         notebook_config['user_name'] = os.environ['edge_user_name'].replace('_', '-')
-        edge_status = AzureMeta().get_instance_status(os.environ['conf_service_base_name'],
-                                                      os.environ['conf_service_base_name'] + '-' +
-                                                      notebook_config['user_name'] + '-edge')
-        if edge_status != 'running':
-            logging.info('ERROR: Edge node is unavailable! Aborting...')
-            print('ERROR: Edge node is unavailable! Aborting...')
-            ssn_hostname = AzureMeta().get_private_ip_address(os.environ['conf_service_base_name'],
-                                                              os.environ['conf_service_base_name'] + '-ssn')
-            put_resource_status('edge', 'Unavailable', os.environ['ssn_dlab_path'], os.environ['conf_os_user'],
-                                ssn_hostname)
-            append_result("Edge node is unavailable")
-            sys.exit(1)
-
+        
         print('Generating infrastructure names and tags')
         try:
             notebook_config['exploratory_name'] = os.environ['exploratory_name'].replace('_', '-')
@@ -71,7 +62,8 @@
         notebook_config['tags'] = {"Name": notebook_config['instance_name'],
                                    "SBN": notebook_config['service_base_name'],
                                    "User": notebook_config['user_name'],
-                                   "Exploratory": notebook_config['exploratory_name']}
+                                   "Exploratory": notebook_config['exploratory_name'],
+                                   "product": "dlab"}
         notebook_config['network_interface_name'] = notebook_config['instance_name'] + "-nif"
         notebook_config['security_group_name'] = '{}-{}-nb-sg'.format(notebook_config['service_base_name'],
                                                                       notebook_config['user_name'])
@@ -109,6 +101,24 @@
         append_result("Failed to generate variables dictionary.", str(err))
         sys.exit(1)
 
+    try:
+        edge_status = AzureMeta().get_instance_status(notebook_config['resource_group_name'],
+                                                      os.environ['conf_service_base_name'] + '-' +
+                                                      notebook_config['user_name'] + '-edge')
+        if edge_status != 'running':
+            logging.info('ERROR: Edge node is unavailable! Aborting...')
+            print('ERROR: Edge node is unavailable! Aborting...')
+            ssn_hostname = AzureMeta().get_private_ip_address(notebook_config['resource_group_name'],
+                                                              os.environ['conf_service_base_name'] + '-ssn')
+            put_resource_status('edge', 'Unavailable', os.environ['ssn_dlab_path'], os.environ['conf_os_user'],
+                                ssn_hostname)
+            append_result("Edge node is unavailable")
+            sys.exit(1)
+    except Exception as err:
+        print("Failed to verify edge status.")
+        append_result("Failed to verify edge status.", str(err))
+        sys.exit(1)
+
     with open('/root/result.json', 'w') as f:
         data = {"notebook_name": notebook_config['instance_name'], "error": ""}
         json.dump(data, f)
@@ -135,6 +145,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         except:
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_remove_remote_kernels.py b/infrastructure-provisioning/src/general/scripts/azure/common_remove_remote_kernels.py
index 3a6f8ba..830969b 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_remove_remote_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_remove_remote_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,5 +51,3 @@
     except Exception as err:
         print('Failed to remove cluster kernels.', str(err))
         sys.exit(1)
-
-    sys.exit(0)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_reupload_key.py b/infrastructure-provisioning/src/general/scripts/azure/common_reupload_key.py
index 9c866ad..f4d7cb4 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_reupload_key.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_reupload_key.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -24,7 +27,6 @@
 from dlab.actions_lib import *
 from dlab.meta_lib import *
 from dlab.fab import *
-import traceback
 import json
 
 parser = argparse.ArgumentParser()
@@ -44,6 +46,6 @@
             args.os_user, ip, args.keyfile, args.additional_config)
         try:
             local("~/scripts/{}.py {}".format('install_user_key', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_start_notebook.py b/infrastructure-provisioning/src/general/scripts/azure/common_start_notebook.py
index 0b206fe..48fe5ab 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_start_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_start_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_stop_notebook.py b/infrastructure-provisioning/src/general/scripts/azure/common_stop_notebook.py
index 5f72c39..5ea2541 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_stop_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_stop_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,24 +38,25 @@
     cluster_list = []
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            try:
+            if "notebook_name" in vm.tags:
                 if notebook_name == vm.tags['notebook_name']:
                     if 'master' == vm.tags["Type"]:
                         cluster_list.append(vm.tags["Name"])
                     AzureActions().stop_instance(resource_group_name, vm.name)
                     print("Instance {} has been stopped".format(vm.name))
-            except:
-                pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Stopping notebook")
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            if notebook_name == vm.tags["Name"]:
-                AzureActions().stop_instance(resource_group_name, vm.name)
-                print("Instance {} has been stopped".format(vm.name))
-    except:
+            if "Name" in vm.tags:
+                if notebook_name == vm.tags["Name"]:
+                    AzureActions().stop_instance(resource_group_name, vm.name)
+                    print("Instance {} has been stopped".format(vm.name))
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -83,6 +87,7 @@
     try:
         stop_notebook(notebook_config['resource_group_name'], notebook_config['notebook_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop notebook.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook.py b/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook.py
index 4906342..aa11357 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,22 +35,23 @@
     print("Terminating data engine cluster")
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            try:
+            if "notebook_name" in vm.tags:
                 if notebook_name == vm.tags['notebook_name']:
                     AzureActions().remove_instance(resource_group_name, vm.name)
                     print("Instance {} has been terminated".format(vm.name))
-            except:
-                pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Terminating notebook")
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            if notebook_name == vm.tags["Name"]:
-                AzureActions().remove_instance(resource_group_name, vm.name)
-                print("Instance {} has been terminated".format(vm.name))
-    except:
+            if "Name" in vm.tags:
+                if notebook_name == vm.tags["Name"]:
+                    AzureActions().remove_instance(resource_group_name, vm.name)
+                    print("Instance {} has been terminated".format(vm.name))
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook_image.py b/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook_image.py
index 0539d38..ff186ac 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_terminate_notebook_image.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -42,5 +45,6 @@
                        "Action": "Delete existing notebook image"}
                 result.write(json.dumps(res))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to delete existing notebook image", str(err))
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/dataengine_configure.py b/infrastructure-provisioning/src/general/scripts/azure/dataengine_configure.py
index 9ee7112..b0ae221 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/dataengine_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/dataengine_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,6 +51,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -68,6 +72,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -87,6 +92,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -107,6 +113,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -125,6 +132,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -147,6 +155,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed configuring slave node", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
@@ -216,6 +225,7 @@
             initial_user = 'ec2-user'
             sudo_group = 'wheel'
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -237,6 +247,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -257,6 +268,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -276,6 +288,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -296,6 +309,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
@@ -314,6 +328,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
@@ -336,6 +351,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure master node", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
@@ -355,6 +371,7 @@
             if job.exitcode != 0:
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i + 1)
             AzureActions().remove_instance(data_engine['resource_group_name'], slave_name)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py
index 97a3dde..d120401 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/dataengine_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -42,18 +45,7 @@
     try:
         data_engine = dict()
         data_engine['user_name'] = os.environ['edge_user_name'].replace('_', '-')
-        edge_status = AzureMeta().get_instance_status(os.environ['conf_service_base_name'],
-                                                      os.environ['conf_service_base_name'] + '-' +
-                                                      data_engine['user_name'] + '-edge')
-        if edge_status != 'running':
-            logging.info('ERROR: Edge node is unavailable! Aborting...')
-            print('ERROR: Edge node is unavailable! Aborting...')
-            ssn_hostname = AzureMeta().get_private_ip_address(os.environ['conf_service_base_name'],
-                                                              os.environ['conf_service_base_name'] + '-ssn')
-            put_resource_status('edge', 'Unavailable', os.environ['ssn_dlab_path'], os.environ['conf_os_user'],
-                                ssn_hostname)
-            append_result("Edge node is unavailable")
-            sys.exit(1)
+        
         print('Generating infrastructure names and tags')
         try:
             data_engine['exploratory_name'] = os.environ['exploratory_name'].replace('_', '-')
@@ -95,12 +87,14 @@
                                      "SBN": data_engine['service_base_name'],
                                      "User": data_engine['user_name'],
                                      "Type": "slave",
-                                     "notebook_name": data_engine['notebook_name']}
+                                     "notebook_name": data_engine['notebook_name'],
+                                     os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         data_engine['master_tags'] = {"Name": data_engine['cluster_name'],
                                       "SBN": data_engine['service_base_name'],
                                       "User": data_engine['user_name'],
                                       "Type": "master",
-                                      "notebook_name": data_engine['notebook_name']}
+                                      "notebook_name": data_engine['notebook_name'],
+                                      os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         data_engine['primary_disk_size'] = '32'
         data_engine['image_type'] = 'default'
         data_engine['expected_image_name'] = '{}-{}-notebook-image'.format(data_engine['service_base_name'],
@@ -122,6 +116,24 @@
         append_result("Failed to generate variables dictionary. Exception:" + str(err))
         sys.exit(1)
 
+    try:
+        edge_status = AzureMeta().get_instance_status(data_engine['resource_group_name'],
+                                                      os.environ['conf_service_base_name'] + '-' +
+                                                      data_engine['user_name'] + '-edge')
+        if edge_status != 'running':
+            logging.info('ERROR: Edge node is unavailable! Aborting...')
+            print('ERROR: Edge node is unavailable! Aborting...')
+            ssn_hostname = AzureMeta().get_private_ip_address(data_engine['resource_group_name'],
+                                                              os.environ['conf_service_base_name'] + '-ssn')
+            put_resource_status('edge', 'Unavailable', os.environ['ssn_dlab_path'], os.environ['conf_os_user'],
+                                ssn_hostname)
+            append_result("Edge node is unavailable")
+            sys.exit(1)
+    except Exception as err:
+        print("Failed to verify edge status.")
+        append_result("Failed to verify edge status.", str(err))
+        sys.exit(1)
+
     if os.environ['conf_os_family'] == 'debian':
         initial_user = 'ubuntu'
         sudo_group = 'sudo'
@@ -154,6 +166,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             AzureActions().remove_instance(data_engine['resource_group_name'], data_engine['master_node_name'])
         except:
@@ -188,6 +201,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             try:
diff --git a/infrastructure-provisioning/src/general/scripts/azure/dataengine_start.py b/infrastructure-provisioning/src/general/scripts/azure/dataengine_start.py
index b13dced..6a8a1f2 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/dataengine_start.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/dataengine_start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,10 +35,12 @@
     print("Starting data engine cluster")
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            if cluster_name == vm.tags["Name"]:
-                AzureActions().start_instance(resource_group_name, vm.name)
-                print("Instance {} has been started".format(vm.name))
-    except:
+            if "Name" in vm.tags:
+                if cluster_name == vm.tags["Name"]:
+                    AzureActions().start_instance(resource_group_name, vm.name)
+                    print("Instance {} has been started".format(vm.name))
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/dataengine_stop.py b/infrastructure-provisioning/src/general/scripts/azure/dataengine_stop.py
index fb8058f..84d151f 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/dataengine_stop.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/dataengine_stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,10 +35,12 @@
     print("Stopping data engine cluster")
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            if cluster_name == vm.tags["Name"]:
-                AzureActions().stop_instance(resource_group_name, vm.name)
-                print("Instance {} has been stopped".format(vm.name))
-    except:
+            if "Name" in vm.tags:
+                if cluster_name == vm.tags["Name"]:
+                    AzureActions().stop_instance(resource_group_name, vm.name)
+                    print("Instance {} has been stopped".format(vm.name))
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/dataengine_terminate.py b/infrastructure-provisioning/src/general/scripts/azure/dataengine_terminate.py
index efdea87..b47eb61 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/dataengine_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/dataengine_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,16 +35,19 @@
     print("Terminating data engine cluster")
     try:
         for vm in AzureMeta().compute_client.virtual_machines.list(resource_group_name):
-            if cluster_name == vm.tags["Name"]:
-                AzureActions().remove_instance(resource_group_name, vm.name)
-                print("Instance {} has been terminated".format(vm.name))
-    except:
+            if "Name" in vm.tags:
+                if cluster_name == vm.tags["Name"]:
+                    AzureActions().remove_instance(resource_group_name, vm.name)
+                    print("Instance {} has been terminated".format(vm.name))
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing Data Engine kernels from notebook")
     try:
         AzureActions().remove_dataengine_kernels(resource_group_name, notebook_name, os_user, key_path, cluster_name)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py b/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py
index 609f9ea..a34b8dd 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/deeplearning_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -59,7 +62,8 @@
         notebook_config['tags'] = {"Name": notebook_config['instance_name'],
                                    "SBN": notebook_config['service_base_name'],
                                    "User": notebook_config['user_name'],
-                                   "Exploratory": notebook_config['exploratory_name']}
+                                   "Exploratory": notebook_config['exploratory_name'],
+                                   os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         notebook_config['shared_image_enabled'] = os.environ['conf_shared_image_enabled']
 
         # generating variables regarding EDGE proxy on Notebook instance
@@ -77,6 +81,7 @@
             initial_user = 'ec2-user'
             sudo_group = 'wheel'
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate variables dictionary", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -94,6 +99,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab-user'.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -111,6 +117,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -128,6 +135,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -145,6 +153,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -156,13 +165,12 @@
                  "--os_user {} --jupyter_version {} " \
                  "--scala_version {} --spark_version {} " \
                  "--hadoop_version {} --region {} " \
-                 "--tensorflow_version {} --r_mirror {} " \
-                 "--exploratory_name {}" \
+                 "--r_mirror {} --exploratory_name {}" \
                  .format(instance_hostname, keyfile_name, notebook_config['dlab_ssh_user'],
                          os.environ['notebook_jupyter_version'], os.environ['notebook_scala_version'],
                          os.environ['notebook_spark_version'], os.environ['notebook_hadoop_version'],
-                         os.environ['azure_region'], os.environ['notebook_tensorflow_version'],
-                         os.environ['notebook_r_mirror'], notebook_config['exploratory_name'])
+                         os.environ['azure_region'], os.environ['notebook_r_mirror'],
+                         notebook_config['exploratory_name'])
         try:
             local("~/scripts/{}.py {}".format('configure_deep_learning_node', params))
             remount_azure_disk(True, notebook_config['dlab_ssh_user'], instance_hostname,
@@ -171,6 +179,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure Deep Learning node.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -186,6 +195,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -203,6 +213,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -237,6 +248,7 @@
                             json.dumps(additional_config), notebook_config['dlab_ssh_user'])
                 local("~/scripts/{}.py {}".format('common_configure_proxy', params))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
             sys.exit(1)
@@ -278,6 +290,7 @@
                    ]}
             result.write(json.dumps(res))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate output information.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
index bcd43fd..bedf3f1 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -68,13 +71,21 @@
         keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], edge_conf['key_name'])
         edge_conf['private_subnet_cidr'] = AzureMeta().get_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                                                   edge_conf['private_subnet_name']).address_prefix
-        edge_conf['edge_public_ip'] = AzureMeta().get_instance_public_ip_address(edge_conf['resource_group_name'],
-                                                                       edge_conf['instance_name'])
-        edge_conf['edge_private_ip'] = AzureMeta().get_private_ip_address(edge_conf['resource_group_name'],
-                                                                                   edge_conf['instance_name'])
+        if os.environ['conf_network_type'] == 'private':
+            edge_conf['edge_private_ip'] = AzureMeta().get_private_ip_address(edge_conf['resource_group_name'],
+                                                                                    edge_conf['instance_name'])
+            edge_conf['edge_public_ip'] =  edge_conf['edge_private_ip']
+        else:
+            edge_conf['edge_public_ip'] = AzureMeta().get_instance_public_ip_address(edge_conf['resource_group_name'],
+                                                                        edge_conf['instance_name'])
+            edge_conf['edge_private_ip'] = AzureMeta().get_private_ip_address(edge_conf['resource_group_name'],
+                                                                                    edge_conf['instance_name'])
         instance_hostname = AzureMeta().get_private_ip_address(edge_conf['resource_group_name'],
                                                                         edge_conf['instance_name'])
+        edge_conf['vpc_cidrs'] = AzureMeta().get_vpc(edge_conf['resource_group_name'],
+                                                      edge_conf['vpc_name']).address_space.address_prefixes
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate infrastructure names", str(err))
         AzureActions().remove_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
@@ -114,6 +125,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         AzureActions().remove_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
@@ -144,6 +156,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         AzureActions().remove_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
@@ -167,7 +180,14 @@
         print('[INSTALLING HTTP PROXY]')
         logging.info('[INSTALLING HTTP PROXY]')
         additional_config = {"exploratory_subnet": edge_conf['private_subnet_cidr'],
-                             "template_file": "/root/templates/squid.conf"}
+                             "template_file": "/root/templates/squid.conf",
+                             "edge_user_name": os.environ['azure_iam_user'],
+                             "ldap_host": os.environ['ldap_hostname'],
+                             "ldap_dn": os.environ['ldap_dn'],
+                             "ldap_user": os.environ['ldap_service_username'],
+                             "ldap_password": os.environ['ldap_service_password'],
+                             "vpc_cidrs": edge_conf['vpc_cidrs'],
+                             "allowed_ip_cidr": ['0.0.0.0/0']}
         params = "--hostname {} --keyfile {} --additional_config '{}' --user {}" \
                  .format(instance_hostname, keyfile_name, json.dumps(additional_config), edge_conf['dlab_ssh_user'])
         try:
@@ -176,6 +196,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing http proxy.", str(err))
         AzureActions().remove_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
@@ -209,6 +230,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key. Excpeption: " + str(err))
         AzureActions().remove_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
@@ -300,5 +322,3 @@
     except:
         print("Failed writing results.")
         sys.exit(0)
-
-    sys.exit(0)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py b/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py
index cb9c313..0654ac2 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -47,7 +50,10 @@
         edge_conf['subnet_name'] = os.environ['azure_subnet_name']
         edge_conf['private_subnet_name'] = edge_conf['service_base_name'] + '-' + edge_conf['user_name'] + '-subnet'
         edge_conf['network_interface_name'] = edge_conf['service_base_name'] + "-" + edge_conf['user_name'] + '-edge-nif'
-        edge_conf['static_public_ip_name'] = edge_conf['service_base_name'] + "-" + edge_conf['user_name'] + '-edge-ip'
+        if os.environ['conf_network_type'] == 'private':
+            edge_conf['static_public_ip_name'] = 'None'
+        else:
+            edge_conf['static_public_ip_name'] = edge_conf['service_base_name'] + "-" + edge_conf['user_name'] + '-edge-ip'
         edge_conf['region'] = os.environ['azure_region']
         edge_conf['vpc_cidr'] = os.environ['conf_vpc_cidr']
         edge_conf['private_subnet_prefix'] = os.environ['azure_private_subnet_prefix']
@@ -74,10 +80,12 @@
         edge_conf['image_name'] = os.environ['azure_{}_image_name'.format(os.environ['conf_os_family'])]
         edge_conf['instance_tags'] = {"Name": edge_conf['instance_name'],
                                       "SBN": edge_conf['service_base_name'],
-                                      "User": edge_conf['user_name']}
+                                      "User": edge_conf['user_name'],
+                                      os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         edge_conf['storage_account_tags'] = {"Name": edge_conf['edge_storage_account_name'],
                                              "SBN": edge_conf['service_base_name'],
-                                             "User": edge_conf['user_name']}
+                                             "User": edge_conf['user_name'],
+                                             os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         edge_conf['primary_disk_size'] = '32'
 
         # FUSE in case of absence of user's key
@@ -105,6 +113,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                          edge_conf['private_subnet_name'])
@@ -145,13 +154,13 @@
             },
             {
                 "name": "in-3",
-                "protocol": "*",
+                "protocol": "Tcp",
                 "source_port_range": "*",
-                "destination_port_range": "*",
+                "destination_port_range": "3128",
                 "source_address_prefix": "*",
                 "destination_address_prefix": "*",
-                "access": "Deny",
-                "priority": 200,
+                "access": "Allow",
+                "priority": 120,
                 "direction": "Inbound"
             },
             {
@@ -279,7 +288,7 @@
                 "name": "out-12",
                 "protocol": "Tcp",
                 "source_port_range": "*",
-                "destination_port_range": "4040",
+                "destination_port_range": "4040-4045",
                 "source_address_prefix": "*",
                 "destination_address_prefix": edge_conf['private_subnet_cidr'],
                 "access": "Allow",
@@ -308,7 +317,7 @@
                 "priority": 230,
                 "direction": "Outbound"
             },
-             {
+            {
                 "name": "out-15",
                 "protocol": "Tcp",
                 "source_port_range": "*",
@@ -321,6 +330,17 @@
             },
             {
                 "name": "out-16",
+                "protocol": "Tcp",
+                "source_port_range": "*",
+                "destination_port_range": "389",
+                "source_address_prefix": '*',
+                "destination_address_prefix": "*",
+                "access": "Allow",
+                "priority": 250,
+                "direction": "Outbound"
+            },
+            {
+                "name": "out-17",
                 "protocol": "*",
                 "source_port_range": "*",
                 "destination_port_range": "*",
@@ -443,6 +463,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                      edge_conf['private_subnet_name'])
         AzureActions().remove_security_group(edge_conf['resource_group_name'], edge_conf['edge_security_group_name'])
@@ -548,6 +569,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                      edge_conf['private_subnet_name'])
         AzureActions().remove_security_group(edge_conf['resource_group_name'], edge_conf['edge_security_group_name'])
@@ -573,6 +595,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                      edge_conf['private_subnet_name'])
         AzureActions().remove_security_group(edge_conf['resource_group_name'], edge_conf['edge_security_group_name'])
@@ -601,6 +624,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create storage account.", str(err))
         AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                      edge_conf['private_subnet_name'])
@@ -629,6 +653,7 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to create Data Lake Store directory.", str(err))
             AzureActions().remove_subnet(edge_conf['resource_group_name'], edge_conf['vpc_name'],
                                          edge_conf['private_subnet_name'])
@@ -645,7 +670,8 @@
                 for datalake in AzureMeta().list_datalakes(edge_conf['resource_group_name']):
                     if edge_conf['datalake_store_name'] == datalake.tags["Name"]:
                         AzureActions().remove_datalake_directory(datalake.name, edge_conf['datalake_user_directory_name'])
-            except:
+            except Exception as err:
+                print('Error: {0}'.format(err))
                 print("Data Lake Store directory hasn't been created.")
             sys.exit(1)
 
@@ -675,6 +701,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             AzureActions().remove_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
         except:
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_start.py b/infrastructure-provisioning/src/general/scripts/azure/edge_start.py
index bc44c76..8f5557b 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_start.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -44,12 +47,10 @@
     try:
         AzureActions().start_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to start edge.", str(err))
         sys.exit(1)
 
-    except:
-        sys.exit(1)
-
     try:
         public_ip_address = AzureMeta().get_instance_public_ip_address(edge_conf['resource_group_name'],
                                                                        edge_conf['instance_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_status.py b/infrastructure-provisioning/src/general/scripts/azure/edge_status.py
index a5b4489..8c16d12 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_status.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_status.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,5 +51,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to collect necessary information.", str(err))
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_stop.py b/infrastructure-provisioning/src/general/scripts/azure/edge_stop.py
index a675955..7de86be 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_stop.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,6 +46,7 @@
     try:
         AzureActions().stop_instance(edge_conf['resource_group_name'], edge_conf['instance_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop edge.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_terminate.py b/infrastructure-provisioning/src/general/scripts/azure/edge_terminate.py
index 820aca0..31086bb 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,7 +38,8 @@
                     print("Instance {} has been terminated".format(vm.name))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing network interfaces")
@@ -47,7 +51,8 @@
                     print("Network interface {} has been removed".format(network_interface.name))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing static public IPs")
@@ -59,7 +64,8 @@
                     print("Static public IP {} has been removed".format(static_public_ip.name))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing disks")
@@ -71,7 +77,8 @@
                     print("Disk {} has been removed".format(disk.name))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing storage account")
@@ -83,7 +90,8 @@
                     print("Storage account {} has been terminated".format(storage_account.name))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Deleting Data Lake Store directory")
@@ -95,7 +103,8 @@
                     print("Data Lake Store directory {} has been deleted".format(user_name + '-folder'))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing security groups")
@@ -107,14 +116,16 @@
                     print("Security group {} has been terminated".format(sg.name))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing private subnet")
     try:
         AzureActions().remove_subnet(resource_group_name, vpc_name, subnet_name)
         print("Private subnet {} has been terminated".format(subnet_name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py b/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py
index 126bbaf..66a979e 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/jupyter_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -58,7 +61,8 @@
         notebook_config['tags'] = {"Name": notebook_config['instance_name'],
                                    "SBN": notebook_config['service_base_name'],
                                    "User": notebook_config['user_name'],
-                                   "Exploratory": notebook_config['exploratory_name']}
+                                   "Exploratory": notebook_config['exploratory_name'],
+                                   os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         notebook_config['shared_image_enabled'] = os.environ['conf_shared_image_enabled']
 
         # generating variables regarding EDGE proxy on Notebook instance
@@ -76,6 +80,7 @@
             initial_user = 'ec2-user'
             sudo_group = 'wheel'
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate variables dictionary.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -93,6 +98,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab-user'.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -111,6 +117,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -127,6 +134,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -153,6 +161,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure jupyter.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -170,6 +179,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -186,6 +196,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -203,6 +214,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -237,6 +249,7 @@
                             json.dumps(additional_config), notebook_config['dlab_ssh_user'])
                 local("~/scripts/{}.py {}".format('common_configure_proxy', params))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image from notebook.", str(err))
             AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
             sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/rstudio_change_pass.py b/infrastructure-provisioning/src/general/scripts/azure/rstudio_change_pass.py
index 9c15a29..cbc97c4 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/rstudio_change_pass.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/rstudio_change_pass.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -41,6 +44,7 @@
     print("Setting password for Rstudio user.")
     try:
         sudo('echo "{0}:{1}" | chpasswd'.format(args.os_user, args.rstudio_pass))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py b/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py
index 20bfc76..0b0e293 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/rstudio_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -59,7 +62,8 @@
         notebook_config['tags'] = {"Name": notebook_config['instance_name'],
                                    "SBN": notebook_config['service_base_name'],
                                    "User": notebook_config['user_name'],
-                                   "Exploratory": notebook_config['exploratory_name']}
+                                   "Exploratory": notebook_config['exploratory_name'],
+                                   os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         notebook_config['shared_image_enabled'] = os.environ['conf_shared_image_enabled']
 
         # generating variables regarding EDGE proxy on Notebook instance
@@ -78,6 +82,7 @@
             initial_user = 'ec2-user'
             sudo_group = 'wheel'
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate variables dictionary.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -95,6 +100,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -113,6 +119,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -129,6 +136,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -153,6 +161,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure rstudio.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -170,6 +179,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -185,6 +195,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -202,6 +213,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -241,6 +253,7 @@
                             notebook_config['rstudio_pass'])
                 local("~/scripts/{}.py {}".format('rstudio_change_pass', params))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
             sys.exit(1)
@@ -281,6 +294,7 @@
                    "exploratory_pass": notebook_config['rstudio_pass']}
             result.write(json.dumps(res))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate output information", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py
index 51718e2..419213d 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,20 +35,25 @@
     logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
                         level=logging.DEBUG,
                         filename=local_log_filepath)
-    instance = 'ssn'
-    pre_defined_resource_group = False
-    pre_defined_vpc = False
-    pre_defined_subnet = False
-    pre_defined_sg = False
-    billing_enabled = True
 
     try:
+        instance = 'ssn'
+        
         logging.info('[DERIVING NAMES]')
         print('[DERIVING NAMES]')
 
+        billing_enabled = True
+
         ssn_conf = dict()
+        # We need to cut service_base_name to 12 symbols do to the Azure Name length limitation
         ssn_conf['service_base_name'] = os.environ['conf_service_base_name'] = replace_multi_symbols(
             os.environ['conf_service_base_name'].replace('_', '-')[:12], '-', True)
+        # Check azure predefined resources
+        ssn_conf['resource_group_name'] = os.environ.get('azure_resource_group_name', ssn_conf['service_base_name'])
+        ssn_conf['vpc_name'] = os.environ.get('azure_vpc_name', '{}-vpc'.format(ssn_conf['service_base_name']))
+        ssn_conf['subnet_name'] = os.environ.get('azure_subnet_name', '{}-ssn-subnet'.format(ssn_conf['service_base_name']))
+        ssn_conf['security_group_name'] = os.environ.get('azure_security_group_name', '{}-sg'.format(ssn_conf['service_base_name']))
+        # Default variables
         ssn_conf['region'] = os.environ['azure_region']
         ssn_conf['ssn_storage_account_name'] = '{}-ssn-storage'.format(ssn_conf['service_base_name'])
         ssn_conf['ssn_container_name'] = '{}-ssn-container'.format(ssn_conf['service_base_name']).lower()
@@ -54,30 +62,18 @@
         ssn_conf['datalake_store_name'] = '{}-ssn-datalake'.format(ssn_conf['service_base_name'])
         ssn_conf['datalake_shared_directory_name'] = '{}-shared-folder'.format(ssn_conf['service_base_name'])
         ssn_conf['instance_name'] = '{}-ssn'.format(ssn_conf['service_base_name'])
-        ssn_conf['vpc_name'] = os.environ['azure_vpc_name'] = '{}-vpc'.format(ssn_conf['service_base_name'])
-        ssn_conf['subnet_name'] = '{}-ssn-subnet'.format(ssn_conf['service_base_name'])
-        ssn_conf['security_group_name'] = '{}-ssn-sg'.format(ssn_conf['service_base_name'])
+        
         ssn_conf['ssh_key_path'] = os.environ['conf_key_dir'] + os.environ['conf_key_name'] + '.pem'
         ssn_conf['dlab_ssh_user'] = os.environ['conf_os_user']
+        if os.environ['conf_network_type'] == 'private':
+            ssn_conf['instnace_ip'] = AzureMeta().get_private_ip_address(ssn_conf['resource_group_name'],
+                                                                        ssn_conf['instance_name'])
+        else:
+            ssn_conf['instnace_ip'] = AzureMeta().get_instance_public_ip_address(ssn_conf['resource_group_name'],
+                                                                        ssn_conf['instance_name'])
         ssn_conf['instance_dns_name'] = 'host-{}.{}.cloudapp.azure.com'.format(ssn_conf['instance_name'], ssn_conf['region'])
 
         try:
-            if os.environ['azure_resource_group_name'] == '':
-                raise KeyError
-        except KeyError:
-            os.environ['azure_resource_group_name'] = ssn_conf['service_base_name']
-            pre_defined_resource_group = True
-        try:
-            if os.environ['azure_vpc_name'] == '':
-                raise KeyError
-        except KeyError:
-            pre_defined_vpc = True
-        try:
-            if os.environ['azure_subnet_name'] == '':
-                raise KeyError
-        except KeyError:
-            pre_defined_subnet = True
-        try:
             if os.environ['azure_offer_number'] == '':
                 raise KeyError
             if os.environ['azure_currency'] == '':
@@ -99,59 +95,40 @@
         if os.environ['conf_os_family'] == 'redhat':
             initial_user = 'ec2-user'
             sudo_group = 'wheel'
-    except:
-        print("Failed to generate variables dictionary.")
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
-            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
-            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
-        AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
-        append_result("Failed creating ssh user 'dlab-user'.", str(err))
+    except Exception as err:
+        print("Failed to generate variables dictionary." + str(err))
         sys.exit(1)
 
+    def clear_resources():
+        if 'azure_resource_group_name' not in os.environ:
+            AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+        if 'azure_vpc_name' not in os.environ:
+            AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+        if 'azure_subnet_name' not in os.environ:
+            AzureActions().remove_subnet(ssn_conf['resource_group_name'], ssn_conf['vpc_name'],
+                                            ssn_conf['subnet_name'])
+        if 'azure_security_group_name' not in os.environ:
+            AzureActions().remove_security_group(ssn_conf['resource_group_name'], ssn_conf['security_group_name'])
+        for storage_account in AzureMeta().list_storage_accounts(ssn_conf['resource_group_name']):
+            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
+            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
+        for datalake in AzureMeta().list_datalakes(ssn_conf['resource_group_name']):
+            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
+                AzureActions().delete_datalake_store(ssn_conf['resource_group_name'], datalake.name)
+        AzureActions().remove_instance(ssn_conf['resource_group_name'], ssn_conf['instance_name'])
+
     try:
         logging.info('[CREATING DLAB SSH USER]')
         print('[CREATING DLAB SSH USER]')
         params = "--hostname {} --keyfile {} --initial_user {} --os_user {} --sudo_group {}".format\
-            (ssn_conf['instance_dns_name'], ssn_conf['ssh_key_path'], initial_user, ssn_conf['dlab_ssh_user'], sudo_group)
-
-        try:
-            local("~/scripts/{}.py {}".format('create_ssh_user', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+            (ssn_conf['instnace_ip'], ssn_conf['ssh_key_path'], initial_user, ssn_conf['dlab_ssh_user'], sudo_group)
+        local("~/scripts/{}.py {}".format('create_ssh_user', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
-            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
-            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
-        AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
+        #print('Error: {0}'.format(err))
+        traceback.print_exc()
+        clear_resources()
         append_result("Failed creating ssh user 'dlab-user'.", str(err))
         sys.exit(1)
 
@@ -159,33 +136,13 @@
         logging.info('[INSTALLING PREREQUISITES TO SSN INSTANCE]')
         print('[INSTALLING PREREQUISITES TO SSN INSTANCE]')
         params = "--hostname {} --keyfile {} --pip_packages 'backoff argparse fabric==1.14.0 pymongo pyyaml pycrypto azure==2.0.0' \
-            --user {} --region {}".format(ssn_conf['instance_dns_name'], ssn_conf['ssh_key_path'],
+            --user {} --region {}".format(ssn_conf['instnace_ip'], ssn_conf['ssh_key_path'],
                                           ssn_conf['dlab_ssh_user'], ssn_conf['region'])
-        try:
-            local("~/scripts/{}.py {}".format('install_prerequisites', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        local("~/scripts/{}.py {}".format('install_prerequisites', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
-            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
-            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
-        AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
+        #print('Error: {0}'.format(err))
+        traceback.print_exc()
+        clear_resources()
         append_result("Failed installing software: pip, packages.", str(err))
         sys.exit(1)
 
@@ -197,33 +154,13 @@
                              "security_group_id": ssn_conf['security_group_name'], "vpc_id": ssn_conf['vpc_name'],
                              "subnet_id": ssn_conf['subnet_name'], "admin_key": os.environ['conf_key_name']}
         params = "--hostname {} --keyfile {} --additional_config '{}' --os_user {} --dlab_path {} --tag_resource_id {}". \
-            format(ssn_conf['instance_dns_name'], ssn_conf['ssh_key_path'], json.dumps(additional_config),
+            format(ssn_conf['instnace_ip'], ssn_conf['ssh_key_path'], json.dumps(additional_config),
                    ssn_conf['dlab_ssh_user'], os.environ['ssn_dlab_path'], ssn_conf['service_base_name'])
-
-        try:
-            local("~/scripts/{}.py {}".format('configure_ssn_node', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        local("~/scripts/{}.py {}".format('configure_ssn_node', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
-            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
-            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
-        AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
+        #print('Error: {0}'.format(err))
+        traceback.print_exc()
+        clear_resources()
         append_result("Failed configuring ssn.", str(err))
         sys.exit(1)
 
@@ -239,34 +176,14 @@
                              {"name": "deeplearning", "tag": "latest"},
                              {"name": "dataengine", "tag": "latest"}]
         params = "--hostname {} --keyfile {} --additional_config '{}' --os_family {} --os_user {} --dlab_path {} --cloud_provider {} --region {}". \
-            format(ssn_conf['instance_dns_name'], ssn_conf['ssh_key_path'], json.dumps(additional_config),
+            format(ssn_conf['instnace_ip'], ssn_conf['ssh_key_path'], json.dumps(additional_config),
                    os.environ['conf_os_family'], ssn_conf['dlab_ssh_user'], os.environ['ssn_dlab_path'],
                    os.environ['conf_cloud_provider'], ssn_conf['region'])
-
-        try:
-            local("~/scripts/{}.py {}".format('configure_docker', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        local("~/scripts/{}.py {}".format('configure_docker', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
-            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
-            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
-        AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
+        #print('Error: {0}'.format(err))
+        traceback.print_exc()
+        clear_resources()
         append_result("Unable to configure docker.", str(err))
         sys.exit(1)
 
@@ -277,7 +194,7 @@
         ldap_login = 'false'
         if os.environ['azure_datalake_enable'] == 'false':
             mongo_parameters = {
-                "azure_resource_group_name": os.environ['azure_resource_group_name'],
+                "azure_resource_group_name": ssn_conf['resource_group_name'],
                 "azure_region": ssn_conf['region'],
                 "azure_vpc_name": ssn_conf['vpc_name'],
                 "azure_subnet_name": ssn_conf['subnet_name'],
@@ -298,7 +215,7 @@
             datalake_store_name = None
         else:
             mongo_parameters = {
-                "azure_resource_group_name": os.environ['azure_resource_group_name'],
+                "azure_resource_group_name": ssn_conf['resource_group_name'],
                 "azure_region": ssn_conf['region'],
                 "azure_vpc_name": ssn_conf['vpc_name'],
                 "azure_subnet_name": ssn_conf['subnet_name'],
@@ -316,7 +233,7 @@
             tenant_id = json.dumps(AzureMeta().sp_creds['tenantId']).replace('"', '')
             subscription_id = json.dumps(AzureMeta().sp_creds['subscriptionId']).replace('"', '')
             datalake_application_id = os.environ['azure_application_id']
-            for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
+            for datalake in AzureMeta().list_datalakes(ssn_conf['resource_group_name']):
                 if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
                     datalake_store_name = datalake.name
         params = "--hostname {} --keyfile {} --dlab_path {} --os_user {} --os_family {} --request_id {} \
@@ -324,45 +241,24 @@
                  --offer_number {} --currency {} --locale {} --region_info {}  --ldap_login {} --tenant_id {} \
                  --application_id {} --datalake_store_name {} --mongo_parameters '{}' --subscription_id {}  \
                  --validate_permission_scope {}". \
-            format(ssn_conf['instance_dns_name'], ssn_conf['ssh_key_path'], os.environ['ssn_dlab_path'],
+            format(ssn_conf['instnace_ip'], ssn_conf['ssh_key_path'], os.environ['ssn_dlab_path'],
                    ssn_conf['dlab_ssh_user'], os.environ['conf_os_family'], os.environ['request_id'],
                    os.environ['conf_resource'], ssn_conf['service_base_name'], os.environ['conf_cloud_provider'],
                    billing_enabled, azure_auth_path, os.environ['azure_offer_number'],
                    os.environ['azure_currency'], os.environ['azure_locale'], os.environ['azure_region_info'],
                    ldap_login, tenant_id, datalake_application_id, datalake_store_name, json.dumps(mongo_parameters),
                    subscription_id, os.environ['azure_validate_permission_scope'])
-        try:
-            local("~/scripts/{}.py {}".format('configure_ui', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        local("~/scripts/{}.py {}".format('configure_ui', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
-            if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
-            if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
-        AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
+        #print('Error: {0}'.format(err))
+        traceback.print_exc()
+        clear_resources()
         append_result("Unable to configure UI.", str(err))
         sys.exit(1)
 
     try:
         logging.info('[SUMMARY]')
-        instance_hostname = AzureMeta().get_instance_public_ip_address(os.environ['azure_resource_group_name'],
-                                                                       ssn_conf['instance_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
+        for storage_account in AzureMeta().list_storage_accounts(ssn_conf['resource_group_name']):
             if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
                 ssn_storage_account_name = storage_account.name
             if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
@@ -371,8 +267,11 @@
         print('[SUMMARY]')
         print("Service base name: {}".format(ssn_conf['service_base_name']))
         print("SSN Name: {}".format(ssn_conf['instance_name']))
-        print("SSN Public IP address: {}".format(instance_hostname))
-        print("SSN Hostname: {}".format(ssn_conf['instance_dns_name']))
+        if os.environ['conf_network_type'] == 'public':
+            print("SSN Public IP address: {}".format(ssn_conf['instnace_ip']))
+            print("SSN Hostname: {}".format(ssn_conf['instance_dns_name']))
+        else:
+            print("SSN Private IP address: {}".format(ssn_conf['instnace_ip']))
         print("Key name: {}".format(os.environ['conf_key_name']))
         print("VPC Name: {}".format(ssn_conf['vpc_name']))
         print("Subnet Name: {}".format(ssn_conf['subnet_name']))
@@ -383,28 +282,29 @@
         print("Shared storage account name: {}".format(shared_storage_account_name))
         print("Shared container name: {}".format(ssn_conf['shared_container_name']))
         if os.environ['azure_datalake_enable'] == 'true':
-            for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
+            for datalake in AzureMeta().list_datalakes(ssn_conf['resource_group_name']):
                 if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
                     datalake_store_name = datalake.name
             print("DataLake store name: {}".format(datalake_store_name))
             print("DataLake shared directory name: {}".format(ssn_conf['datalake_shared_directory_name']))
         print("Region: {}".format(ssn_conf['region']))
-        jenkins_url = "http://{}/jenkins".format(ssn_conf['instance_dns_name'])
-        jenkins_url_https = "https://{}/jenkins".format(ssn_conf['instance_dns_name'])
+        jenkins_url = "http://{}/jenkins".format(ssn_conf['instnace_ip'])
+        jenkins_url_https = "https://{}/jenkins".format(ssn_conf['instnace_ip'])
         print("Jenkins URL: {}".format(jenkins_url))
         print("Jenkins URL HTTPS: {}".format(jenkins_url_https))
 
         try:
-            with open('jenkins_crids.txt') as f:
+            with open('jenkins_creds.txt') as f:
                 print(f.read())
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             print("Jenkins is either configured already or have issues in configuration routine.")
 
         with open("/root/result.json", 'w') as f:
             if os.environ['azure_datalake_enable'] == 'false':
                 res = {"service_base_name": ssn_conf['service_base_name'],
                        "instance_name": ssn_conf['instance_name'],
-                       "instance_hostname": ssn_conf['instance_dns_name'],
+                       "instance_hostname": ssn_conf['instnace_ip'],
                        "master_keyname": os.environ['conf_key_name'],
                        "vpc_id": ssn_conf['vpc_name'],
                        "subnet_id": ssn_conf['subnet_name'],
@@ -419,7 +319,7 @@
             else:
                 res = {"service_base_name": ssn_conf['service_base_name'],
                        "instance_name": ssn_conf['instance_name'],
-                       "instance_hostname": ssn_conf['instance_dns_name'],
+                       "instance_hostname": ssn_conf['instnace_ip'],
                        "master_keyname": os.environ['conf_key_name'],
                        "vpc_id": ssn_conf['vpc_name'],
                        "subnet_id": ssn_conf['subnet_name'],
@@ -437,7 +337,7 @@
 
         print('Upload response file')
         params = "--instance_name {} --local_log_filepath {} --os_user {} --instance_hostname {}".\
-            format(ssn_conf['instance_name'], local_log_filepath, ssn_conf['dlab_ssh_user'], instance_hostname)
+            format(ssn_conf['instance_name'], local_log_filepath, ssn_conf['dlab_ssh_user'], ssn_conf['instnace_ip'])
         local("~/scripts/{}.py {}".format('upload_response_file', params))
     except:
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py
index 0d7c49c..53a94e9 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_datalake.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,5 +52,6 @@
                                                             datalake_tags)
             print("DATA LAKE {} has been created".format(datalake_name))
 
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_peering.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_peering.py
new file mode 100644
index 0000000..6b53174
--- /dev/null
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_peering.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+import argparse
+from dlab.actions_lib import *
+from dlab.meta_lib import *
+import sys, time
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--source_resource_group_name', type=str, default='')
+parser.add_argument('--destination_resource_group_name', type=str, default='')
+parser.add_argument('--source_virtual_network_name', type=str, default='')
+parser.add_argument('--destination_virtual_network_name', type=str, default='')
+args = parser.parse_args()
+
+if __name__ == "__main__":
+    try:
+        source_virtual_network_peering_name = '{}_to_{}'.format(args.source_virtual_network_name, args.destination_virtual_network_name)
+        destination_virtual_network_peering_name = '{}_to_{}'.format(args.destination_virtual_network_name, args.source_virtual_network_name)
+
+        destination_vnet_id = AzureMeta().get_vpc(
+            args.destination_resource_group_name,
+            args.destination_virtual_network_name,
+        ).id
+
+        source_vnet_id = AzureMeta().get_vpc(
+            args.source_resource_group_name,
+            args.source_virtual_network_name,
+        ).id
+
+        print("Creating Virtual Network peering {} and {}".format(source_virtual_network_peering_name, destination_virtual_network_peering_name))
+        AzureActions().create_virtual_network_peerings(
+                args.source_resource_group_name,
+                args.source_virtual_network_name,
+                source_virtual_network_peering_name,
+                destination_vnet_id)
+        AzureActions().create_virtual_network_peerings(
+                args.destination_resource_group_name,
+                args.destination_virtual_network_name,
+                destination_virtual_network_peering_name,
+                source_vnet_id)
+        time.sleep(250)
+    except Exception as err:
+        print("Error creating vpc peering: " + str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_resource_group.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_resource_group.py
index e750ba7..8134096 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_resource_group.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_resource_group.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -36,4 +39,5 @@
             print("Creating Resource Group {}".format(args.resource_group_name))
             AzureActions().create_resource_group(args.resource_group_name, args.region)
     else:
+        print("Resource group name can't be empty.")
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_vpc.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_vpc.py
index e4eee14..ac7cb18 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_create_vpc.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_create_vpc.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -38,4 +41,5 @@
             print("Creating Virtual Network {}".format(args.vpc_name))
             AzureActions().create_vpc(args.resource_group_name, args.vpc_name, args.region, args.vpc_cidr)
     else:
+        print("VPC name can't be empty.")
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_prepare.py
index 303394d..d8e1563 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,16 +38,26 @@
                         filename=local_log_filepath)
     try:
         instance = 'ssn'
-        pre_defined_resource_group = False
-        pre_defined_vpc = False
-        pre_defined_subnet = False
-        pre_defined_sg = False
+
+        logging.info('[DERIVING NAMES]')
+        print('[DERIVING NAMES]')
+
         ssn_conf = dict()
+        # Verify vpc deployment
+        if os.environ['conf_network_type'] == 'private' and os.environ.get('azure_vpc_name') == None and os.environ.get('azure_source_vpc_name') == None:
+            raise Exception('Not possible to deploy private environment without predefined vpc or without source vpc')
+        if os.environ['conf_network_type'] == 'private' and os.environ.get('azure_resource_group_name') == None and os.environ.get('azure_source_resource_group_name') == None:
+            raise Exception('Not possible to deploy private environment without predefined resource_group_name or source_group_name')
         # We need to cut service_base_name to 12 symbols do to the Azure Name length limitation
         ssn_conf['service_base_name'] = os.environ['conf_service_base_name'] = replace_multi_symbols(
             os.environ['conf_service_base_name'].replace('_', '-')[:12], '-', True)
-        ssn_conf['vpc_name'] = '{}-vpc'.format(ssn_conf['service_base_name'])
-        ssn_conf['subnet_name'] = '{}-ssn-subnet'.format(ssn_conf['service_base_name'])
+        # Check azure predefined resources
+        ssn_conf['resource_group_name'] = os.environ.get('azure_resource_group_name', ssn_conf['service_base_name'])
+        ssn_conf['source_resource_group_name'] = os.environ.get('azure_source_resource_group_name', ssn_conf['resource_group_name'])
+        ssn_conf['vpc_name'] = os.environ.get('azure_vpc_name', '{}-vpc'.format(ssn_conf['service_base_name']))
+        ssn_conf['subnet_name'] = os.environ.get('azure_subnet_name', '{}-ssn-subnet'.format(ssn_conf['service_base_name']))
+        ssn_conf['security_group_name'] = os.environ.get('azure_security_group_name', '{}-sg'.format(ssn_conf['service_base_name']))
+        # Default variables
         ssn_conf['region'] = os.environ['azure_region']
         ssn_conf['vpc_cidr'] = os.environ['conf_vpc_cidr']
         ssn_conf['subnet_prefix'] = '20'
@@ -57,112 +70,118 @@
         ssn_conf['datalake_shared_directory_name'] = '{}-shared-folder'.format(ssn_conf['service_base_name'])
         ssn_conf['instance_name'] = '{}-ssn'.format(ssn_conf['service_base_name'])
         ssn_conf['network_interface_name'] = '{}-ssn-nif'.format(ssn_conf['service_base_name'])
-        ssn_conf['static_public_ip_name'] = '{}-ssn-ip'.format(ssn_conf['service_base_name'])
-        ssn_conf['security_group_name'] = '{}-sg'.format(ssn_conf['service_base_name'])
+        if os.environ['conf_network_type'] == 'private':
+            ssn_conf['static_public_ip_name'] = 'None'      
+        else:
+            ssn_conf['static_public_ip_name'] = '{}-ssn-ip'.format(ssn_conf['service_base_name'])
         key = RSA.importKey(open('{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name']), 'rb').read())
         ssn_conf['instance_storage_account_type'] = 'Premium_LRS'
         ssn_conf['public_ssh_key'] = key.publickey().exportKey("OpenSSH")
         ssn_conf['instance_tags'] = {"Name": ssn_conf['instance_name'],
-                                     "SBN": ssn_conf['service_base_name']}
+                                     "SBN": ssn_conf['service_base_name'],
+                                     os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         ssn_conf['ssn_storage_account_tags'] = {"Name": ssn_conf['ssn_storage_account_name'],
-                                                "SBN": ssn_conf['service_base_name']}
+                                                "SBN": ssn_conf['service_base_name'],
+                                                os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         ssn_conf['shared_storage_account_tags'] = {"Name": ssn_conf['shared_storage_account_name'],
-                                                   "SBN": ssn_conf['service_base_name']}
+                                                   "SBN": ssn_conf['service_base_name'],
+                                                   os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         ssn_conf['datalake_store_tags'] = {"Name": ssn_conf['datalake_store_name'],
-                                           "SBN": ssn_conf['service_base_name']}
+                                           "SBN": ssn_conf['service_base_name'],
+                                           os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         ssn_conf['primary_disk_size'] = '32'
-
-    except:
-        print("Failed to generate variables dictionary.")
+    except Exception as err:
+        print("Failed to generate variables dictionary." + str(err))
         sys.exit(1)
 
     try:
-        if os.environ['azure_resource_group_name'] == '':
-            raise KeyError
-    except KeyError:
-        pre_defined_resource_group = True
-        logging.info('[CREATING RESOURCE GROUP]')
-        print("[CREATING RESOURCE GROUP]")
-        try:
-            params = "--resource_group_name {} --region {}".format(ssn_conf['service_base_name'], ssn_conf['region'])
-            try:
-                local("~/scripts/{}.py {}".format('ssn_create_resource_group', params))
-            except:
-                traceback.print_exc()
-                raise Exception
-            os.environ['azure_resource_group_name'] = ssn_conf['service_base_name']
-        except Exception as err:
-            try:
-                AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
-            except:
-                print("Resource group hasn't been created.")
-            append_result("Failed to create Resource Group. Exception:" + str(err))
-            sys.exit(1)
-
+        if 'azure_resource_group_name' in os.environ:
+            logging.info('Resource group predefined')
+            print('Resource group predefined')
+        else:
+            logging.info('[CREATING RESOURCE GROUP]')
+            print("[CREATING RESOURCE GROUP]")
+            params = "--resource_group_name {} --region {}".format(ssn_conf['resource_group_name'], ssn_conf['region'])
+            local("~/scripts/{}.py {}".format('ssn_create_resource_group', params))
+    except Exception as err:
+        traceback.print_exc()
+        print('Error creating resource group: ' + str(err))
+        append_result("Failed to create Resource Group. Exception: " + str(err))
+        sys.exit(1)
+    
     try:
-        if os.environ['azure_vpc_name'] == '':
-            raise KeyError
-    except KeyError:
-        pre_defined_vpc = True
-        logging.info('[CREATING VIRTUAL NETWORK]')
-        print("[CREATING VIRTUAL NETWORK]")
-        try:
+        if 'azure_vpc_name' in os.environ:
+            logging.info('VPC predefined')
+            print('VPC predefined')
+        else:
+            logging.info('[CREATING VIRTUAL NETWORK]')
+            print("[CREATING VIRTUAL NETWORK]")
             params = "--resource_group_name {} --vpc_name {} --region {} --vpc_cidr {}".format(
-                os.environ['azure_resource_group_name'], ssn_conf['vpc_name'], ssn_conf['region'], ssn_conf['vpc_cidr'])
-            try:
-                local("~/scripts/{}.py {}".format('ssn_create_vpc', params))
-            except:
-                traceback.print_exc()
-                raise Exception
-            os.environ['azure_vpc_name'] = ssn_conf['vpc_name']
-        except Exception as err:
-            if pre_defined_resource_group:
-                AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-            try:
-                AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-            except:
-                print("Virtual Network hasn't been created.")
-            append_result("Failed to create Virtual Network. Exception:" + str(err))
-            sys.exit(1)
-
-    try:
-        if os.environ['azure_subnet_name'] == '':
-            raise KeyError
-    except KeyError:
-        pre_defined_vpc = True
-        logging.info('[CREATING SUBNET]')
-        print("[CREATING SUBNET]")
+                ssn_conf['resource_group_name'], ssn_conf['vpc_name'], ssn_conf['region'], ssn_conf['vpc_cidr'])
+            local("~/scripts/{}.py {}".format('ssn_create_vpc', params))
+    except Exception as err:
+        traceback.print_exc()
+        print('Error creating VPC: ' + str(err))
         try:
+            if 'azure_resource_group_name' not in os.environ:
+                AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+        except Exception as err:
+            print("Resources hasn't been removed: " + str(err))
+        append_result("Failed to create VPC. Exception: " + str(err))
+        sys.exit(1)
+  
+    try:
+        if 'azure_subnet_name' in os.environ:    
+            logging.info('Subnet predefined')
+            print('Subnet predefined')
+        else:
+            logging.info('[CREATING SUBNET]')
+            print("[CREATING SUBNET]")
             params = "--resource_group_name {} --vpc_name {} --region {} --vpc_cidr {} --subnet_name {} --prefix {}".\
-                format(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'], ssn_conf['region'],
+                format(ssn_conf['resource_group_name'], ssn_conf['vpc_name'], ssn_conf['region'],
                        ssn_conf['vpc_cidr'], ssn_conf['subnet_name'], ssn_conf['subnet_prefix'])
-            try:
-                local("~/scripts/{}.py {}".format('common_create_subnet', params))
-            except:
-                traceback.print_exc()
-                raise Exception
-            os.environ['azure_subnet_name'] = ssn_conf['subnet_name']
+            local("~/scripts/{}.py {}".format('common_create_subnet', params))
+    except Exception as err:
+        traceback.print_exc()
+        print('Error creating Subnet: ' + str(err))
+        try:
+            if 'azure_resource_group_name' not in os.environ:
+                AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+            if 'azure_vpc_name' not in os.environ:
+                AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
         except Exception as err:
-            if pre_defined_resource_group:
-                AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-            if pre_defined_vpc:
-                AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-            try:
-                AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                             ssn_conf['subnet_name'])
-            except:
-                print("Subnet hasn't been created.")
-            append_result("Failed to create Subnet. Exception:" + str(err))
-            sys.exit(1)
+            print("Resources hasn't been removed: " + str(err))
+        append_result("Failed to create Subnet. Exception: " + str(err))
+        sys.exit(1)
+    
+    try:
+        if 'azure_vpc_name' not in os.environ and os.environ['conf_network_type'] == 'private':
+            logging.info('[CREATING VPC PEERING]')
+            print("[CREATING VPC PEERING]")
+            params = "--source_resource_group_name {} --destination_resource_group_name {} " \
+            "--source_virtual_network_name {} --destination_virtual_network_name {}".format(ssn_conf['source_resource_group_name'], 
+                        ssn_conf['resource_group_name'], os.environ['azure_source_vpc_name'], ssn_conf['vpc_name'])
+            local("~/scripts/{}.py {}".format('ssn_create_peering', params))
+    except Exception as err:
+        traceback.print_exc()
+        print('Error creating VPC peering: ' + str(err))
+        try:
+            if 'azure_resource_group_name' not in os.environ:
+                AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+            if 'azure_vpc_name' not in os.environ:
+                AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+        except Exception as err:
+            print("Resources hasn't been removed: " + str(err))
+        append_result("Failed to create VPC peering. Exception: " + str(err))
+        sys.exit(1)
 
     try:
-        if os.environ['azure_security_group_name'] == '':
-            raise KeyError
-    except KeyError:
-        pre_defined_sg = True
-        logging.info('[CREATING SECURITY GROUPS]')
-        print("[CREATING SECURITY GROUPS]")
-        try:
+        if 'azure_security_group_name' in os.environ:
+            logging.info('Security group predefined')
+            print('Security group predefined')
+        else:
+            logging.info('[CREATING SECURITY GROUP]')
+            print("[CREATING SECURITY GROUP]")
             list_rules = [
                 {
                     "name": "in-1",
@@ -198,17 +217,6 @@
                     "direction": "Inbound"
                 },
                 {
-                    "name": "in-4",
-                    "protocol": "*",
-                    "source_port_range": "*",
-                    "destination_port_range": "*",
-                    "source_address_prefix": "*",
-                    "destination_address_prefix": "*",
-                    "access": "Deny",
-                    "priority": 200,
-                    "direction": "Inbound"
-                },
-                {
                     "name": "out-1",
                     "protocol": "*",
                     "source_port_range": "*",
@@ -221,46 +229,47 @@
                 }
             ]
             params = "--resource_group_name {} --security_group_name {} --region {} --tags '{}'  --list_rules '{}'".\
-                format(os.environ['azure_resource_group_name'], ssn_conf['security_group_name'], ssn_conf['region'],
+                format(ssn_conf['resource_group_name'], ssn_conf['security_group_name'], ssn_conf['region'],
                        json.dumps(ssn_conf['instance_tags']), json.dumps(list_rules))
-            try:
-                local("~/scripts/{}.py {}".format('common_create_security_group', params))
-            except:
-                traceback.print_exc()
-                raise Exception
-            os.environ['azure_security_group_name'] = ssn_conf['security_group_name']
-        except Exception as err:
-            if pre_defined_resource_group:
-                AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-            if pre_defined_vpc:
-                AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-                AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
+            local("~/scripts/{}.py {}".format('common_create_security_group', params))
+    except Exception as err:
+        traceback.print_exc()
+        print('Error creating Security group: ' + str(err))
+        try:
+            if 'azure_resource_group_name' not in os.environ:
+                AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+            if 'azure_vpc_name' not in os.environ:
+                AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+            if 'azure_subnet_name' not in os.environ:
+                AzureActions().remove_subnet(ssn_conf['resource_group_name'], ssn_conf['vpc_name'],
                                              ssn_conf['subnet_name'])
-            append_result("Failed to create Security groups. Exception:" + str(err))
-            sys.exit(1)
+        except Exception as err:
+            print("Resources hasn't been removed: " + str(err))
+        append_result("Failed to create Security group. Exception: " + str(err))
+        sys.exit(1)
 
     try:
         logging.info('[CREATE SSN STORAGE ACCOUNT AND CONTAINER]')
         print('[CREATE SSN STORAGE ACCOUNT AND CONTAINER]')
         params = "--container_name {} --account_tags '{}' --resource_group_name {} --region {}". \
                  format(ssn_conf['ssn_container_name'], json.dumps(ssn_conf['ssn_storage_account_tags']),
-                        os.environ['azure_resource_group_name'], ssn_conf['region'])
-        try:
-            local("~/scripts/{}.py {}".format('common_create_storage_account', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+                        ssn_conf['resource_group_name'], ssn_conf['region'])
+        local("~/scripts/{}.py {}".format('common_create_storage_account', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'], ssn_conf['subnet_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'], ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
+        traceback.print_exc()
+        print('Error: {0}'.format(err))
+        if 'azure_resource_group_name' not in os.environ:
+            AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+        if 'azure_vpc_name' not in os.environ:
+            AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+        if 'azure_subnet_name' not in os.environ:
+            AzureActions().remove_subnet(ssn_conf['resource_group_name'], ssn_conf['vpc_name'],
+                                            ssn_conf['subnet_name'])
+        if 'azure_security_group_name' not in os.environ:
+            AzureActions().remove_security_group(ssn_conf['resource_group_name'], ssn_conf['security_group_name'])
+        for storage_account in AzureMeta().list_storage_accounts(ssn_conf['resource_group_name']):
             if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
         append_result("Failed to create SSN storage account and container. Exception:" + str(err))
         sys.exit(1)
 
@@ -269,27 +278,25 @@
         print('[CREATE SHARED STORAGE ACCOUNT AND CONTAINER]')
         params = "--container_name {} --account_tags '{}' --resource_group_name {} --region {}". \
             format(ssn_conf['shared_container_name'], json.dumps(ssn_conf['shared_storage_account_tags']),
-                   os.environ['azure_resource_group_name'], ssn_conf['region'])
-        try:
-            local("~/scripts/{}.py {}".format('common_create_storage_account', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+                   ssn_conf['resource_group_name'], ssn_conf['region'])
+        local("~/scripts/{}.py {}".format('common_create_storage_account', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
+        traceback.print_exc()
+        print('Error: {0}'.format(err))
+        if 'azure_resource_group_name' not in os.environ:
+            AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+        if 'azure_vpc_name' not in os.environ:
+            AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+        if 'azure_subnet_name' not in os.environ:
+            AzureActions().remove_subnet(ssn_conf['resource_group_name'], ssn_conf['vpc_name'],
+                                            ssn_conf['subnet_name'])
+        if 'azure_security_group_name' not in os.environ:
+            AzureActions().remove_security_group(ssn_conf['resource_group_name'], ssn_conf['security_group_name'])
+        for storage_account in AzureMeta().list_storage_accounts(ssn_conf['resource_group_name']):
             if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
             if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
         append_result("Failed to create SSN storage account and container. Exception:" + str(err))
         sys.exit(1)
 
@@ -299,7 +306,7 @@
             print('[CREATE DATA LAKE STORE]')
             params = "--datalake_name {} --datalake_tags '{}' --resource_group_name {} --region {}". \
                      format(ssn_conf['datalake_store_name'], json.dumps(ssn_conf['datalake_store_tags']),
-                            os.environ['azure_resource_group_name'], ssn_conf['region'])
+                            ssn_conf['resource_group_name'], ssn_conf['region'])
             try:
                 local("~/scripts/{}.py {}".format('ssn_create_datalake', params))
             except:
@@ -309,7 +316,7 @@
             logging.info('[CREATE DATA LAKE SHARED DIRECTORY]')
             print('[CREATE DATA LAKE SHARED DIRECTORY]')
             params = "--resource_group_name {} --datalake_name {} --directory_name {} --service_base_name {} --ad_group {}". \
-                format(os.environ['azure_resource_group_name'], ssn_conf['datalake_store_name'],
+                format(ssn_conf['resource_group_name'], ssn_conf['datalake_store_name'],
                        ssn_conf['datalake_shared_directory_name'], ssn_conf['service_base_name'],
                        os.environ['azure_ad_group_id'])
             try:
@@ -318,19 +325,23 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
-            if pre_defined_resource_group:
-                AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-            if pre_defined_vpc:
-                AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-                AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'], ssn_conf['subnet_name'])
-            if pre_defined_sg:
-                AzureActions().remove_security_group(os.environ['azure_resource_group_name'], ssn_conf['security_group_name'])
-            for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
+            traceback.print_exc()
+            print('Error: {0}'.format(err))
+            if 'azure_resource_group_name' not in os.environ:
+                AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+            if 'azure_vpc_name' not in os.environ:
+                AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+            if 'azure_subnet_name' not in os.environ:
+                AzureActions().remove_subnet(ssn_conf['resource_group_name'], ssn_conf['vpc_name'],
+                                                ssn_conf['subnet_name'])
+            if 'azure_security_group_name' not in os.environ:
+                AzureActions().remove_security_group(ssn_conf['resource_group_name'], ssn_conf['security_group_name'])
+            for storage_account in AzureMeta().list_storage_accounts(ssn_conf['resource_group_name']):
                 if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                    AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-            for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
+                    AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
+            for datalake in AzureMeta().list_datalakes(ssn_conf['resource_group_name']):
                 if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                    AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
+                    AzureActions().delete_datalake_store(ssn_conf['resource_group_name'], datalake.name)
             append_result("Failed to create Data Lake Store. Exception:" + str(err))
             sys.exit(1)
 
@@ -349,36 +360,34 @@
             --dlab_ssh_user_name {} --public_ip_name {} --public_key '''{}''' --primary_disk_size {} \
             --instance_type {} --instance_storage_account_type {} --image_name {} --tags '{}'".\
             format(ssn_conf['instance_name'], os.environ['azure_ssn_instance_size'], ssn_conf['region'],
-                   os.environ['azure_vpc_name'], ssn_conf['network_interface_name'], os.environ['azure_security_group_name'],
-                   os.environ['azure_subnet_name'], ssn_conf['service_base_name'], os.environ['azure_resource_group_name'],
+                   ssn_conf['vpc_name'], ssn_conf['network_interface_name'], ssn_conf['security_group_name'],
+                   ssn_conf['subnet_name'], ssn_conf['service_base_name'], ssn_conf['resource_group_name'],
                    initial_user, ssn_conf['static_public_ip_name'], ssn_conf['public_ssh_key'],
                    ssn_conf['primary_disk_size'], 'ssn', ssn_conf['instance_storage_account_type'],
                    ssn_conf['ssn_image_name'], json.dumps(ssn_conf['instance_tags']))
-        try:
-            local("~/scripts/{}.py {}".format('common_create_instance', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        local("~/scripts/{}.py {}".format('common_create_instance', params))
     except Exception as err:
-        if pre_defined_resource_group:
-            AzureActions().remove_resource_group(os.environ['azure_resource_group_name'], ssn_conf['region'])
-        if pre_defined_vpc:
-            AzureActions().remove_vpc(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'])
-            AzureActions().remove_subnet(os.environ['azure_resource_group_name'], ssn_conf['vpc_name'],
-                                         ssn_conf['subnet_name'])
-        if pre_defined_sg:
-            AzureActions().remove_security_group(os.environ['azure_resource_group_name'],
-                                                 ssn_conf['security_group_name'])
-        for storage_account in AzureMeta().list_storage_accounts(os.environ['azure_resource_group_name']):
+        traceback.print_exc()
+        print('Error: {0}'.format(err))
+        if 'azure_resource_group_name' not in os.environ:
+            AzureActions().remove_resource_group(ssn_conf['service_base_name'], ssn_conf['region'])
+        if 'azure_vpc_name' not in os.environ:
+            AzureActions().remove_vpc(ssn_conf['resource_group_name'], ssn_conf['vpc_name'])
+        if 'azure_subnet_name' not in os.environ:
+            AzureActions().remove_subnet(ssn_conf['resource_group_name'], ssn_conf['vpc_name'],
+                                            ssn_conf['subnet_name'])
+        if 'azure_security_group_name' not in os.environ:
+            AzureActions().remove_security_group(ssn_conf['resource_group_name'], ssn_conf['security_group_name'])
+        for storage_account in AzureMeta().list_storage_accounts(ssn_conf['resource_group_name']):
             if ssn_conf['ssn_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
             if ssn_conf['shared_storage_account_name'] == storage_account.tags["Name"]:
-                AzureActions().remove_storage_account(os.environ['azure_resource_group_name'], storage_account.name)
-        for datalake in AzureMeta().list_datalakes(os.environ['azure_resource_group_name']):
+                AzureActions().remove_storage_account(ssn_conf['resource_group_name'], storage_account.name)
+        for datalake in AzureMeta().list_datalakes(ssn_conf['resource_group_name']):
             if ssn_conf['datalake_store_name'] == datalake.tags["Name"]:
-                AzureActions().delete_datalake_store(os.environ['azure_resource_group_name'], datalake.name)
+                AzureActions().delete_datalake_store(ssn_conf['resource_group_name'], datalake.name)
         try:
-            AzureActions().remove_instance(os.environ['azure_resource_group_name'], ssn_conf['instance_name'])
+            AzureActions().remove_instance(ssn_conf['resource_group_name'], ssn_conf['instance_name'])
         except:
             print("The instance {} hasn't been created".format(ssn_conf['instance_name']))
         append_result("Failed to create instance. Exception:" + str(err))
diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
index c09eed7..bf2f91e 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -33,7 +36,8 @@
             if service_base_name == vm.tags["SBN"]:
                 AzureActions().remove_instance(resource_group_name, vm.name)
                 print("Instance {} has been terminated".format(vm.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing network interfaces")
@@ -42,7 +46,8 @@
             if service_base_name == network_interface.tags["SBN"]:
                 AzureActions().delete_network_if(resource_group_name, network_interface.name)
                 print("Network interface {} has been removed".format(network_interface.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing static public IPs")
@@ -51,7 +56,8 @@
             if service_base_name == static_public_ip.tags["SBN"]:
                 AzureActions().delete_static_public_ip(resource_group_name, static_public_ip.name)
                 print("Static public IP {} has been removed".format(static_public_ip.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing disks")
@@ -60,7 +66,8 @@
             if service_base_name == disk.tags["SBN"]:
                 AzureActions().remove_disk(resource_group_name, disk.name)
                 print("Disk {} has been removed".format(disk.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing storage accounts")
@@ -69,7 +76,8 @@
             if service_base_name == storage_account.tags["SBN"]:
                 AzureActions().remove_storage_account(resource_group_name, storage_account.name)
                 print("Storage account {} has been terminated".format(storage_account.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing Data Lake Store")
@@ -78,7 +86,8 @@
             if service_base_name == datalake.tags["SBN"]:
                 AzureActions().delete_datalake_store(resource_group_name, datalake.name)
                 print("Data Lake Store {} has been terminated".format(datalake.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing images")
@@ -87,7 +96,8 @@
             if service_base_name == image.tags["SBN"]:
                 AzureActions().remove_image(resource_group_name, image.name)
                 print("Image {} has been removed".format(image.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing security groups")
@@ -96,7 +106,8 @@
             if service_base_name == sg.tags["SBN"]:
                 AzureActions().remove_security_group(resource_group_name, sg.name)
                 print("Security group {} has been terminated".format(sg.name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing VPC")
@@ -104,7 +115,8 @@
         if AzureMeta().get_vpc(resource_group_name, service_base_name + '-vpc'):
             AzureActions().remove_vpc(resource_group_name, vpc_name)
             print("VPC {} has been terminated".format(vpc_name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing Resource Group")
@@ -112,7 +124,8 @@
         if AzureMeta().get_resource_group(service_base_name):
             AzureActions().remove_resource_group(service_base_name, region)
             print("Resource group {} has been terminated".format(vpc_name))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -142,6 +155,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to terminate ssn.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py b/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py
index 7e31da6..094abd8 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/tensor_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -61,7 +64,8 @@
         notebook_config['tags'] = {"Name": notebook_config['instance_name'],
                                    "SBN": notebook_config['service_base_name'],
                                    "User": notebook_config['user_name'],
-                                   "Exploratory": notebook_config['exploratory_name']}
+                                   "Exploratory": notebook_config['exploratory_name'],
+                                   os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
         notebook_config['shared_image_enabled'] = os.environ['conf_shared_image_enabled']
 
         # generating variables regarding EDGE proxy on Notebook instance
@@ -96,6 +100,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -113,6 +118,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -129,6 +135,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -151,6 +158,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure TensorFlow.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -168,6 +176,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -183,6 +192,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -200,6 +210,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -234,6 +245,7 @@
                             json.dumps(additional_config), notebook_config['dlab_ssh_user'])
                 local("~/scripts/{}.py {}".format('common_configure_proxy', params))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
             sys.exit(1)
@@ -276,6 +288,7 @@
                         "url": ungit_ip_url}]}
             result.write(json.dumps(res))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate output information.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py b/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py
index 7487127..527d4aa 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/zeppelin_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -60,7 +63,8 @@
         notebook_config['tags'] = {"Name": notebook_config['instance_name'],
                                    "SBN": notebook_config['service_base_name'],
                                    "User": notebook_config['user_name'],
-                                   "Exploratory": notebook_config['exploratory_name']}
+                                   "Exploratory": notebook_config['exploratory_name'],
+                                   "product": "dlab"}
         notebook_config['shared_image_enabled'] = os.environ['conf_shared_image_enabled']
 
         # generating variables regarding EDGE proxy on Notebook instance
@@ -78,6 +82,7 @@
             initial_user = 'ec2-user'
             sudo_group = 'wheel'
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate variables dictionary.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -95,6 +100,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -113,6 +119,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result('Unable to configure proxy on zeppelin notebook. Exception: ' + str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -129,6 +136,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -165,6 +173,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure zeppelin.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -182,6 +191,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -197,6 +207,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -214,6 +225,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to post configuring instance.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
@@ -248,6 +260,7 @@
                             json.dumps(additional_config), notebook_config['dlab_ssh_user'])
                 local("~/scripts/{}.py {}".format('common_configure_proxy', params))
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed creating image.", str(err))
             AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
             sys.exit(1)
@@ -278,12 +291,13 @@
                    "notebook_image_name": notebook_config['notebook_image_name'],
                    "Action": "Create new notebook server",
                    "exploratory_url": [
-                       {"description": "Zeppelin",
+                       {"description": "Apache Zeppelin",
                         "url": zeppelin_ip_url},
                        {"description": "Ungit",
                         "url": ungit_ip_url}]}
             result.write(json.dumps(res))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to generate output information.", str(err))
         AzureActions().remove_instance(notebook_config['resource_group_name'], notebook_config['instance_name'])
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_collect_data.py b/infrastructure-provisioning/src/general/scripts/gcp/common_collect_data.py
index 1f1754c..a2a6bd4 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_collect_data.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_collect_data.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py
index 7e0fdc4..643f6ca 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -38,4 +41,5 @@
             print("Creating Bucket {}".format(args.bucket_name))
             GCPActions().create_bucket(args.bucket_name)
     else:
-        sys.exit(1)
\ No newline at end of file
+        parser.print_help()
+        sys.exit(2)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_firewall.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_firewall.py
index 6aaf921..0c11dcf 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_firewall.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_firewall.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -47,4 +50,5 @@
                 print("Creating Egress Firewall {}".format(firewall_rule['name']))
                 GCPActions().create_firewall(firewall_rule)
     else:
-        sys.exit(1)
\ No newline at end of file
+        parser.print_help()
+        sys.exit(2)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_instance.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_instance.py
index 3da6451..4be3072 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_instance.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_instance.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -58,4 +61,5 @@
                                          json.loads(args.labels), args.static_ip, args.primary_disk_size,
                                          args.secondary_disk_size, args.gpu_accelerator_type)
     else:
-        sys.exit(1)
+        parser.print_help()
+        sys.exit(2)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_service_account.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_service_account.py
index 7588917..90e4400 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_service_account.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_service_account.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -59,5 +62,7 @@
                 for role in predefined_roles:
                     GCPActions().set_role_to_service_account(args.service_account_name, role, 'predefined')
     else:
-        sys.exit(1)
+        parser.print_help()
+        sys.exit(2)
+
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_subnet.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_subnet.py
index 2a3125e..7131764 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_subnet.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_subnet.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -92,4 +95,5 @@
             print("Creating Subnet {}".format(args.subnet_name))
             GCPActions().create_subnet(args.subnet_name, dlab_subnet_cidr, args.vpc_selflink, args.region)
     else:
+        print("Subnet name can't be empty")
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_download_git_certfile.py b/infrastructure-provisioning/src/general/scripts/gcp/common_download_git_certfile.py
index 0533bbc..40d6e5d 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_download_git_certfile.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_download_git_certfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py b/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py
index e2939c7..da88b5e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -58,7 +61,9 @@
         "name": notebook_config['cluster_name'],
         "sbn": notebook_config['service_base_name'],
         "user": notebook_config['edge_user_name'],
-        "notebook_name": os.environ['notebook_instance_name']
+        "notebook_name": os.environ['notebook_instance_name'],
+        "product": "dlab",
+        "computational_name": (os.environ['computational_name']).lower().replace('_', '-')
     }
 
     try:
@@ -77,6 +82,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing Dataproc kernels.", str(err))
         actions_lib.GCPActions().delete_dataproc_cluster(notebook_config['cluster_name'], os.environ['gcp_region'])
         actions_lib.GCPActions().remove_kernels(notebook_config['notebook_name'], notebook_config['cluster_name'],
@@ -84,6 +90,28 @@
         sys.exit(1)
 
     try:
+        logging.info('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        print('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        params = "--hostname {0} " \
+                 "--keyfile {1} " \
+                 "--os_user {2} " \
+            .format(notebook_config['notebook_ip'],
+                    notebook_config['key_path'],
+                    os.environ['conf_os_user'])
+        try:
+            local("~/scripts/{0}.py {1}".format('common_configure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        append_result("Failed to configure Spark.", str(err))
+        actions_lib.GCPActions().delete_dataproc_cluster(notebook_config['cluster_name'], os.environ['gcp_region'])
+        actions_lib.GCPActions().remove_kernels(notebook_config['notebook_name'], notebook_config['cluster_name'],
+                                                os.environ['dataproc_version'], os.environ['conf_os_user'], notebook_config['key_path'])
+        sys.exit(1)
+
+    try:
         with open("/root/result.json", 'w') as result:
             res = {"notebook_name": notebook_config['notebook_name'],
                    "Tag_name": notebook_config['tag_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine.py b/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine.py
index 888e56f..9bd7ab4 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -64,11 +67,13 @@
         try:
             notebook_config['spark_master_ip'] = GCPMeta().get_private_ip_address(notebook_config['master_node_name'])
             notebook_config['notebook_ip'] = GCPMeta().get_private_ip_address(notebook_config['notebook_name'])
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
         notebook_config['spark_master_url'] = 'spark://{}:7077'.format(notebook_config['spark_master_ip'])
 
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(notebook_config['instance_count'] - 1):
             slave_name = notebook_config['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, notebook_config['zone'])
@@ -89,6 +94,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(notebook_config['instance_count'] - 1):
             slave_name = notebook_config['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, notebook_config['zone'])
@@ -97,6 +103,29 @@
         sys.exit(1)
 
     try:
+        logging.info('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        print('[UPDATING SPARK CONFIGURATION FILES ON NOTEBOOK]')
+        params = "--hostname {0} " \
+                 "--keyfile {1} " \
+                 "--os_user {2} " \
+            .format(notebook_config['notebook_ip'],
+                    notebook_config['key_path'],
+                    notebook_config['dlab_ssh_user'])
+        try:
+            local("~/scripts/{0}.py {1}".format('common_configure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        for i in range(notebook_config['instance_count'] - 1):
+            slave_name = notebook_config['slave_node_name'] + '{}'.format(i+1)
+            GCPActions().remove_instance(slave_name, notebook_config['zone'])
+        GCPActions().remove_instance(notebook_config['master_node_name'], notebook_config['zone'])
+        append_result("Failed to configure Spark.", str(err))
+        sys.exit(1)
+
+    try:
         with open("/root/result.json", 'w') as result:
             res = {"notebook_name": notebook_config['notebook_name'],
                    "Action": "Configure notebook server"}
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
index 041bdf1..d7cd61d 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -92,7 +95,8 @@
                                                          notebook_config['edge_user_name'])
     notebook_config['labels'] = {"name": notebook_config['instance_name'],
                                  "sbn": notebook_config['service_base_name'],
-                                 "user": notebook_config['edge_user_name']}
+                                 "user": notebook_config['edge_user_name'],
+                                 "product": "dlab"}
     # launching instance for notebook server
     try:
         logging.info('[CREATE NOTEBOOK INSTANCE]')
@@ -110,6 +114,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create instance.", str(err))
         GCPActions().remove_disk(notebook_config['instance_name'], notebook_config['zone'])
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_put_to_bucket.py b/infrastructure-provisioning/src/general/scripts/gcp/common_put_to_bucket.py
index 0d4352a..c182dd4 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_put_to_bucket.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_put_to_bucket.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_reupload_key.py b/infrastructure-provisioning/src/general/scripts/gcp/common_reupload_key.py
index aab4f87..aaff46e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_reupload_key.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_reupload_key.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -24,7 +27,6 @@
 from dlab.actions_lib import *
 from dlab.meta_lib import *
 from dlab.fab import *
-import traceback
 import json
 
 parser = argparse.ArgumentParser()
@@ -45,6 +47,6 @@
             args.os_user, ip, args.keyfile, args.additional_config)
         try:
             local("~/scripts/{}.py {}".format('install_user_key', params))
-        except:
-            traceback.print_exc()
-            raise Exception
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_start_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_start_notebook.py
index 65795d7..d61584a 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_start_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_start_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_stop_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_stop_notebook.py
index d9594a2..8d4b2fd 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_stop_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_stop_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -39,16 +42,20 @@
         clusters_list = meta_lib.GCPMeta().get_dataproc_list(labels)
         if clusters_list:
             for cluster_name in clusters_list:
+                computational_name = meta_lib.GCPMeta().get_cluster(cluster_name).get('labels').get(
+                    'computational_name')
                 cluster = meta_lib.GCPMeta().get_list_cluster_statuses([cluster_name])
                 actions_lib.GCPActions().bucket_cleanup(bucket_name, user_name, cluster_name)
                 print('The bucket {} has been cleaned successfully'.format(bucket_name))
                 actions_lib.GCPActions().delete_dataproc_cluster(cluster_name, region)
                 print('The Dataproc cluster {} has been terminated successfully'.format(cluster_name))
-                actions_lib.GCPActions().remove_kernels(instance_name, cluster_name, cluster[0]['version'], ssh_user, key_path)
+                actions_lib.GCPActions().remove_kernels(instance_name, cluster_name, cluster[0]['version'], ssh_user,
+                                                        key_path, computational_name)
         else:
             print("There are no Dataproc clusters to terminate.")
-    except:
-       sys.exit(1)
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
 
     print("Stopping data engine cluster")
     cluster_list = []
@@ -62,13 +69,15 @@
                     print("Instance {} has been stopped".format(vm['name']))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Stopping notebook")
     try:
         GCPActions().stop_instance(instance_name, zone)
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop notebook.", str(err))
         sys.exit(1)
 
@@ -101,6 +110,7 @@
                       os.environ['conf_os_user'], notebook_config['key_path'],
                       notebook_config['edge_user_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop notebook.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook.py
index 91214a9..776c5c7 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,8 +46,9 @@
                 print('The Dataproc cluster {} has been terminated successfully'.format(cluster_name))
         else:
             print("There are no Dataproc clusters to terminate.")
-    except:
-       sys.exit(1)
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
 
     print("Terminating data engine cluster")
     try:
@@ -55,13 +59,15 @@
                     print("Instance {} has been terminated".format(vm['name']))
             except:
                 pass
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Terminating notebook")
     try:
         GCPActions().remove_instance(instance_name, zone)
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to terminate notebook.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_configure.py
index 1617d0c..29dcc26 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,6 +51,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         actions_lib.GCPActions().delete_dataproc_cluster(dataproc_conf['cluster_name'], os.environ['gcp_region'])
         sys.exit(1)
@@ -65,6 +69,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure dataengine service.", str(err))
         actions_lib.GCPActions().delete_dataproc_cluster(dataproc_conf['cluster_name'], os.environ['gcp_region'])
         sys.exit(1)
@@ -159,5 +164,3 @@
     except:
         print("Failed writing results.")
         sys.exit(1)
-
-    sys.exit(0)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_create.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_create.py
index 0c9c9d7..affeddc 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_create.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_create.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_install_libs.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_install_libs.py
index 73ab122..72ba672 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_install_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_install_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -66,6 +69,7 @@
             data_engine['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
             data_engine['libs'] = os.environ['libs']
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to get parameter.", str(err))
             sys.exit(1)
         try:
@@ -83,5 +87,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to install additional libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_jars_parser.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_jars_parser.py
index ebf6990..be7d627 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_jars_parser.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_jars_parser.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_key_importer.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_key_importer.py
index 14ab228..c996937 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_key_importer.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_key_importer.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_list_libs.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_list_libs.py
index 42b7fa0..be54add 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_list_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_list_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -61,5 +64,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to get available libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
index 4203e50..53e73c9 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -72,7 +75,9 @@
         "name": dataproc_conf['cluster_name'],
         "sbn": dataproc_conf['service_base_name'],
         "user": dataproc_conf['edge_user_name'],
-        "notebook_name": os.environ['notebook_instance_name']
+        "notebook_name": os.environ['notebook_instance_name'],
+        "product": "dlab",
+        "computational_name": dataproc_conf['computational_name']
     }
     dataproc_conf['dataproc_service_account_name'] = '{0}-{1}-ps'.format(dataproc_conf['service_base_name'],
                                                                          dataproc_conf['edge_user_name'])
@@ -133,8 +138,7 @@
         keyfile_name = "/root/keys/{}.pem".format(dataproc_conf['key_name'])
         local('rm /response/.dataproc_creating_{}'.format(os.environ['exploratory_name']))
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create Dataproc Cluster.", str(err))
         local('rm /response/.dataproc_creating_{}'.format(os.environ['exploratory_name']))
         sys.exit(1)
-
-    sys.exit(0)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_terminate.py
index 7b1f15a..2002a29 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -32,14 +35,17 @@
     try:
         cluster = meta_lib.GCPMeta().get_list_cluster_statuses([dataproc_name])
         if cluster[0]['status'] == 'running':
+            computational_name = meta_lib.GCPMeta().get_cluster(dataproc_name).get('labels').get('computational_name')
             actions_lib.GCPActions().bucket_cleanup(bucket_name, os.environ['edge_user_name'], dataproc_name)
             print('The bucket {} has been cleaned successfully'.format(bucket_name))
             actions_lib.GCPActions().delete_dataproc_cluster(dataproc_name, os.environ['gcp_region'])
             print('The Dataproc cluster {} has been terminated successfully'.format(dataproc_name))
-            actions_lib.GCPActions().remove_kernels(notebook_name, dataproc_name, cluster[0]['version'], ssh_user, key_path)
+            actions_lib.GCPActions().remove_kernels(notebook_name, dataproc_name, cluster[0]['version'], ssh_user,
+                                                    key_path, computational_name)
         else:
             print("There are no Dataproc clusters to terminate.")
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -74,7 +80,8 @@
             traceback.print_exc()
             append_result("Failed to terminate Dataproc cluster.", str(err))
             raise Exception
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     try:
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_configure.py
index 1b1fc99..43fe231 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,6 +51,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -68,6 +72,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -88,6 +93,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -106,6 +112,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
@@ -128,6 +135,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed configuring slave node", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
@@ -201,6 +209,7 @@
         data_engine['dlab_ssh_user'] = os.environ['conf_os_user']
         keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -222,6 +231,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -242,6 +252,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -262,6 +273,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
@@ -280,6 +292,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
@@ -302,6 +315,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure master node", str(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
@@ -321,6 +335,7 @@
             if job.exitcode != 0:
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             GCPActions().remove_instance(slave_name, data_engine['zone'])
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py
index bae332b..faf9d65 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -101,12 +104,14 @@
                                    "sbn": data_engine['service_base_name'],
                                    "user": data_engine['edge_user_name'],
                                    "type": "slave",
-                                   "notebook_name": data_engine['notebook_name']}
+                                   "notebook_name": data_engine['notebook_name'],
+                                   "product": "dlab"}
     data_engine['master_labels'] = {"name": data_engine['cluster_name'],
                                     "sbn": data_engine['service_base_name'],
                                     "user": data_engine['edge_user_name'],
                                     "type": "master",
-                                    "notebook_name": data_engine['notebook_name']}
+                                    "notebook_name": data_engine['notebook_name'],
+                                    "product": "dlab"}
 
     try:
         logging.info('[CREATE MASTER NODE]')
@@ -123,6 +128,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create instance.", str(err))
         GCPActions().remove_instance(data_engine['master_node_name'], data_engine['zone'])
         sys.exit(1)
@@ -144,6 +150,7 @@
                 traceback.print_exc()
                 raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         for i in range(data_engine['instance_count'] - 1):
             slave_name = data_engine['slave_node_name'] + '{}'.format(i+1)
             try:
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_start.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_start.py
index a7b9fec..001de6d 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_start.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,7 +38,8 @@
         if 'items' in instances:
             for i in instances['items']:
                 GCPActions().start_instance(i['name'], zone)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_stop.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_stop.py
index 0e4b38c..a0ef185 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_stop.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,7 +38,8 @@
         if 'items' in instances:
             for i in instances['items']:
                 GCPActions().stop_instance(i['name'], zone)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_terminate.py
index e12bf6f..4adc374 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,13 +38,15 @@
         if 'items' in instances:
             for i in instances['items']:
                 GCPActions().remove_instance(i['name'], zone)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing Data Engine kernels from notebook")
     try:
         remove_dataengine_kernels(notebook_name, os_user, key_path, cluster_name)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
index 1c32b76..54d833f 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -74,6 +77,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -92,6 +96,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -108,6 +113,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -119,19 +125,19 @@
                  "--os_user {} --jupyter_version {} " \
                  "--scala_version {} --spark_version {} " \
                  "--hadoop_version {} --region {} " \
-                 "--tensorflow_version {} --r_mirror {} " \
-                 "--exploratory_name {}" \
+                 "--r_mirror {} --exploratory_name {}" \
                  .format(instance_hostname, notebook_config['ssh_key_path'], notebook_config['dlab_ssh_user'],
                          os.environ['notebook_jupyter_version'], os.environ['notebook_scala_version'],
                          os.environ['notebook_spark_version'], os.environ['notebook_hadoop_version'],
-                         os.environ['gcp_region'], os.environ['notebook_tensorflow_version'],
-                         os.environ['notebook_r_mirror'], notebook_config['exploratory_name'])
+                         os.environ['gcp_region'], os.environ['notebook_r_mirror'],
+                         notebook_config['exploratory_name'])
         try:
             local("~/scripts/{}.py {}".format('configure_deep_learning_node', params))
         except:
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure Deep Learning node.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -149,6 +155,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -165,6 +172,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -184,7 +192,7 @@
     print("User key name: {}".format(os.environ['edge_user_name']))
     print("TensorBoard URL: {}".format(tensorboard_url))
     print("TensorBoard log dir: /var/log/tensorboard")
-    print("Jupyter URL: {}".format(jupyter_ip_url))
+    print("Jupyter URL: {}".format(jupyter_url))
     print("Ungit URL: {}".format(ungit_ip_url))
     print('SSH access (from Edge node, via IP address): ssh -i {0}.pem {1}@{2}'.format(notebook_config['key_name'],
                                                                                        notebook_config['dlab_ssh_user'],
@@ -202,7 +210,7 @@
                    {"description": "TensorBoard",
                     "url": tensorboard_url},
                    {"description": "Jupyter",
-                    "url": jupyter_ip_url},
+                    "url": jupyter_url},
                    {"description": "Ungit",
                     "url": ungit_ip_url}]}
         result.write(json.dumps(res))
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py
index f4bd1b5..7792173 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -74,6 +77,8 @@
     edge_conf['static_ip'] = \
         GCPMeta().get_static_address(edge_conf['region'], edge_conf['static_address_name'])['address']
     edge_conf['private_ip'] = GCPMeta().get_private_ip_address(edge_conf['instance_name'])
+    edge_conf['vpc_cidrs'] = [edge_conf['vpc_cidr']]
+    edge_conf['allowed_ip_cidr'] = [edge_conf['vpc_cidr']]
     edge_conf['fw_common_name'] = '{}-{}-ps'.format(edge_conf['service_base_name'], edge_conf['edge_user_name'])
     edge_conf['fw_ps_ingress'] = '{}-ingress'.format(edge_conf['fw_common_name'])
     edge_conf['fw_ps_egress_private'] = '{}-egress-private'.format(edge_conf['fw_common_name'])
@@ -103,6 +108,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         GCPActions().remove_instance(edge_conf['instance_name'], edge_conf['zone'])
         GCPActions().remove_static_address(edge_conf['static_address_name'], edge_conf['region'])
@@ -133,6 +139,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         GCPActions().remove_instance(edge_conf['instance_name'], edge_conf['zone'])
         GCPActions().remove_static_address(edge_conf['static_address_name'], edge_conf['region'])
@@ -156,7 +163,14 @@
         print('[INSTALLING HTTP PROXY]')
         logging.info('[INSTALLING HTTP PROXY]')
         additional_config = {"exploratory_subnet": edge_conf['private_subnet_cidr'],
-                             "template_file": "/root/templates/squid.conf"}
+                             "template_file": "/root/templates/squid.conf",
+                             "edge_user_name": os.environ['edge_user_name'],
+                             "ldap_host": os.environ['ldap_hostname'],
+                             "ldap_dn": os.environ['ldap_dn'],
+                             "ldap_user": os.environ['ldap_service_username'],
+                             "ldap_password": os.environ['ldap_service_password'],
+                             "vpc_cidrs": edge_conf['vpc_cidrs'],
+                             "allowed_ip_cidr": edge_conf['allowed_ip_cidr']}
         params = "--hostname {} --keyfile {} --additional_config '{}' --user {}" \
                  .format(instance_hostname, edge_conf['ssh_key_path'], json.dumps(additional_config), edge_conf['dlab_ssh_user'])
         try:
@@ -165,6 +179,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing http proxy.", str(err))
         GCPActions().remove_instance(edge_conf['instance_name'], edge_conf['zone'])
         GCPActions().remove_static_address(edge_conf['static_address_name'], edge_conf['region'])
@@ -198,6 +213,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key. Excpeption: " + str(err))
         GCPActions().remove_instance(edge_conf['instance_name'], edge_conf['zone'])
         GCPActions().remove_static_address(edge_conf['static_address_name'], edge_conf['region'])
@@ -246,5 +262,3 @@
     except:
         print("Failed writing results.")
         sys.exit(0)
-
-    sys.exit(0)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_create_static_ip.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_create_static_ip.py
index 3b55445..81df6be 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_create_static_ip.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_create_static_ip.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,5 +46,6 @@
         else:
             print("Creating Elastic IP")
             GCPActions().create_static_address(args.address_name, args.region)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_prepare.py
index 5d4f1ab..71fdc4a 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -86,7 +89,8 @@
     edge_conf['network_tag'] = edge_conf['instance_name']
     edge_conf['instance_labels'] = {"name": edge_conf['instance_name'],
                                     "sbn": edge_conf['service_base_name'],
-                                    "user": edge_conf['edge_user_name']}
+                                    "user": edge_conf['edge_user_name'],
+                                    "product": "dlab"}
     edge_conf['allowed_ip_cidr'] = os.environ['conf_allowed_ip_cidr']
 
     # FUSE in case of absence of user's key
@@ -113,6 +117,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             GCPActions().remove_subnet(edge_conf['private_subnet_name'], edge_conf['region'])
         except:
@@ -134,6 +139,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             GCPActions().remove_service_account(edge_conf['edge_service_account_name'])
             GCPActions().remove_role(edge_conf['edge_role_name'])
@@ -156,6 +162,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         try:
             GCPActions().remove_service_account(edge_conf['ps_service_account_name'])
             GCPActions().remove_role(edge_conf['ps_role_name'])
@@ -231,7 +238,7 @@
             {
                 'IPProtocol': 'tcp',
                 'ports': ['22', '8888', '8080', '8787', '6006', '20888', '8088', '18080', '50070', '8085', '8081',
-                          '4040']
+                          '4040-4045']
             }
         ]
         egress_rule['allowed'] = rules
@@ -246,6 +253,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         GCPActions().remove_service_account(edge_conf['ps_service_account_name'])
         GCPActions().remove_role(edge_conf['ps_role_name'])
         GCPActions().remove_service_account(edge_conf['edge_service_account_name'])
@@ -323,6 +331,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create firewall for private subnet.", str(err))
         GCPActions().remove_firewall(edge_conf['fw_edge_ingress_public'])
         GCPActions().remove_firewall(edge_conf['fw_edge_ingress_internal'])
@@ -346,6 +355,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create bucket.", str(err))
         GCPActions().remove_firewall(edge_conf['fw_edge_ingress_public'])
         GCPActions().remove_firewall(edge_conf['fw_edge_ingress_internal'])
@@ -367,6 +377,7 @@
         GCPActions().set_bucket_owner(edge_conf['bucket_name'], edge_conf['ps_service_account_name'])
         GCPActions().set_bucket_owner(edge_conf['shared_bucket_name'], edge_conf['ps_service_account_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to set bucket permissions.", str(err))
         GCPActions().remove_bucket(edge_conf['bucket_name'])
         GCPActions().remove_firewall(edge_conf['fw_edge_ingress_public'])
@@ -393,6 +404,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create static ip.", str(err))
         try:
             GCPActions().remove_static_address(edge_conf['static_address_name'], edge_conf['region'])
@@ -436,6 +448,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create instance.", str(err))
         GCPActions().remove_static_address(edge_conf['static_address_name'], edge_conf['region'])
         GCPActions().remove_bucket(edge_conf['bucket_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_start.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_start.py
index 054878a..98c5eb4 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_start.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_start.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -46,12 +49,10 @@
     try:
         GCPActions().start_instance(edge_conf['instance_name'], edge_conf['zone'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to start edge.", str(err))
         sys.exit(1)
 
-    except:
-        sys.exit(1)
-
     try:
         instance_hostname = GCPMeta().get_instance_public_ip_by_name(edge_conf['instance_name'])
         public_ip_address = \
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_status.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_status.py
index 3731daf..4eb0cc9 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_status.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_status.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -34,7 +37,6 @@
                         filename=local_log_filepath)
 
     print('Getting statuses of DLAB resources')
-    # Base config
 
     try:
         logging.info('[COLLECT DATA]')
@@ -46,5 +48,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to collect information about DLAB resources.", str(err))
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_stop.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_stop.py
index 1a5da6b..4d8fc05 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_stop.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_stop.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -43,6 +46,7 @@
     try:
         GCPActions().stop_instance(edge_conf['instance_name'], edge_conf['zone'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to stop edge.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_terminate.py
index ccd25db..98a03db 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -39,7 +42,8 @@
                 print('The Dataproc cluster {} has been terminated successfully'.format(cluster_name))
         else:
             print("There are no Dataproc clusters to terminate.")
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Terminating EDGE and notebook instances")
@@ -52,7 +56,8 @@
             for i in instances['items']:
                 if 'user' in i['labels'] and user_name == i['labels']['user']:
                     GCPActions().remove_instance(i['name'], zone)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing static addresses")
@@ -62,7 +67,8 @@
             for i in static_addresses['items']:
                 if bool(set(targets) & set([i['name']])):
                     GCPActions().remove_static_address(i['name'], region)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing storage bucket")
@@ -72,7 +78,8 @@
             for i in buckets['items']:
                 if bool(set(targets) & set([i['name']])):
                     GCPActions().remove_bucket(i['name'])
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing firewalls")
@@ -82,7 +89,8 @@
             for i in firewalls['items']:
                 if bool(set(targets) & set(i['targetTags'])):
                     GCPActions().remove_firewall(i['name'])
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing Service accounts and roles")
@@ -93,7 +101,8 @@
         list_roles_names = GCPMeta().get_list_roles()
         for role in (set(targets) & set(list_roles_names)):
             GCPActions().remove_role(role)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing subnets")
@@ -106,7 +115,8 @@
             for i in subnets['items']:
                 if bool(set(targets) & set([i['name']])):
                     GCPActions().remove_subnet(i['name'], region)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -134,7 +144,8 @@
         except Exception as err:
             traceback.print_exc()
             append_result("Failed to terminate edge.", str(err))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     try:
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/jupyter_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/jupyter_configure.py
index d02048c..a01ff6a 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/jupyter_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/jupyter_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -72,6 +75,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -90,6 +94,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -106,6 +111,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -130,6 +136,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure jupyter.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -147,6 +154,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -163,6 +171,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/jupyter_dataengine-service_create_configs.py b/infrastructure-provisioning/src/general/scripts/gcp/jupyter_dataengine-service_create_configs.py
index 7fe7b20..959f9b5 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/jupyter_dataengine-service_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/jupyter_dataengine-service_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -79,6 +82,8 @@
     scala_version = local('scala -e "println(scala.util.Properties.versionNumberString)"', capture=True)
     local('mkdir -p {0}toree_{1}/'.format(kernels_dir, args.cluster_name))
     local('tar zxvf /tmp/toree_kernel.tar.gz -C {0}toree_{1}/'.format(kernels_dir, args.cluster_name))
+    local('sudo mv {0}toree_{1}/toree-0.2.0-incubating/* {0}toree_{1}/'.format(kernels_dir, args.cluster_name))
+    local('sudo rm -r {0}toree_{1}/toree-0.2.0-incubating'.format(kernels_dir, args.cluster_name))
     kernel_path = '{0}toree_{1}/kernel.json'.format(kernels_dir, args.cluster_name)
     template_file = "/tmp/toree_dataengine-service_templatev2.json"
     with open(template_file, 'r') as f:
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/jupyter_install_dataengine-service_kernels.py b/infrastructure-provisioning/src/general/scripts/gcp/jupyter_install_dataengine-service_kernels.py
index 2a1bbb4..14c390e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/jupyter_install_dataengine-service_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/jupyter_install_dataengine-service_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/rstudio_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/rstudio_configure.py
index cc422a9..3b61352 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/rstudio_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/rstudio_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -77,6 +80,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -95,6 +99,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -111,6 +116,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -133,6 +139,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure RStudio.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -150,6 +157,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -166,6 +174,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/rstudio_dataengine-service_create_configs.py b/infrastructure-provisioning/src/general/scripts/gcp/rstudio_dataengine-service_create_configs.py
index 7fde279..2d98ee8 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/rstudio_dataengine-service_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/rstudio_dataengine-service_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -63,7 +66,8 @@
             local("sed -i 's/^master/#master/' /home/" + args.os_user + "/.Rprofile")
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
             local('touch /home/' + args.os_user + '/.ensure_dir/rstudio_dataengine-service_ensured')
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
     else:
         try:
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/rstudio_install_dataengine-service_kernels.py b/infrastructure-provisioning/src/general/scripts/gcp/rstudio_install_dataengine-service_kernels.py
index 7b1e8e9..b725996 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/rstudio_install_dataengine-service_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/rstudio_install_dataengine-service_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
index 8841080..6a17c9f 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -92,6 +95,7 @@
             os.environ['aws_billing_bucket'] = 'None'
             os.environ['aws_report_path'] = 'None'
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed deriving names.", str(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -127,6 +131,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab-user'.", str(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -157,6 +162,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing software: pip, packages.", str(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -189,6 +195,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed configuring ssn.", str(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -227,6 +234,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to configure docker.", str(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -261,6 +269,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to configure UI.", str(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -296,7 +305,7 @@
         print("Jenkins URL: {}".format(jenkins_url))
         print("Jenkins URL HTTPS: {}".format(jenkins_url_https))
         try:
-            with open('jenkins_crids.txt') as f:
+            with open('jenkins_creds.txt') as f:
                 print(f.read())
         except:
             print("Jenkins is either configured already or have issues in configuration routine.")
@@ -323,7 +332,8 @@
         params = "--instance_name {} --local_log_filepath {} --os_user {} --instance_hostname {}".\
             format(ssn_conf['instance_name'], local_log_filepath, ssn_conf['dlab_ssh_user'], instance_hostname)
         local("~/scripts/{}.py {}".format('upload_response_file', params))
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         GCPActions().remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
         GCPActions().remove_role(ssn_conf['role_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_static_ip.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_static_ip.py
index 5def12a..67c4071 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_static_ip.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_static_ip.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -42,5 +45,6 @@
         else:
             print("Creating Elastic IP")
             GCPActions().create_static_address(args.address_name, args.region)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_vpc.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_vpc.py
index 162b882..bd2f81d 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_vpc.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_create_vpc.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -36,4 +39,5 @@
             print("Creating VPC {}".format(args.vpc_name))
             GCPActions().create_vpc(args.vpc_name)
     else:
+        print("VPC name can't be empty.")
         sys.exit(1)
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_finalize.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_finalize.py
index 983c204..9359c84 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_finalize.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_finalize.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
index dd01484..4fca82e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -62,7 +65,8 @@
     ssn_conf['ssn_roles_path'] = '/root/files/ssn_roles.json'
     ssn_conf['network_tag'] = ssn_conf['instance_name']
     ssn_conf['instance_labels'] = {"name": ssn_conf['instance_name'],
-                                   "sbn": ssn_conf['service_base_name']}
+                                   "sbn": ssn_conf['service_base_name'],
+                                   os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value']}
     ssn_conf['allowed_ip_cidr'] = os.environ['conf_allowed_ip_cidr']
 
     try:
@@ -83,6 +87,7 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to create VPC. Exception:" + str(err))
             if pre_defined_vpc:
                 try:
@@ -112,6 +117,7 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to create Subnet.", str(err))
             if pre_defined_vpc:
                 try:
@@ -173,6 +179,7 @@
                 traceback.print_exc()
                 raise Exception
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to create Firewall.", str(err))
             if pre_defined_vpc:
                 GCPActions().remove_subnet(ssn_conf['subnet_name'], ssn_conf['region'])
@@ -191,6 +198,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create Service account and role.", str(err))
         try:
             GCPActions().remove_service_account(ssn_conf['service_account_name'])
@@ -223,6 +231,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create bucket.", str(err))
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
         GCPActions().remove_role(ssn_conf['role_name'])
@@ -240,6 +249,7 @@
         print('[SET PERMISSIONS FOR SSN BUCKET]')
         GCPActions().set_bucket_owner(ssn_conf['ssn_bucket_name'], ssn_conf['service_account_name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to set bucket permissions.", str(err))
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
         GCPActions().remove_role(ssn_conf['role_name'])
@@ -264,6 +274,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to create static ip.", str(err))
         try:
             GCPActions().remove_static_address(ssn_conf['static_address_name'], ssn_conf['region'])
@@ -305,6 +316,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Unable to create ssn instance.", str(err))
         GCPActions().remove_service_account(ssn_conf['service_account_name'])
         GCPActions().remove_role(ssn_conf['role_name'])
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate.py
index e09af91..7f349c2 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,6 +52,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to terminate ssn.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate_gcp_resources.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate_gcp_resources.py
index ea3fda8..533198b 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate_gcp_resources.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_terminate_gcp_resources.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,7 +52,8 @@
                 print('The Dataproc cluster {} has been terminated successfully'.format(cluster_name))
         else:
             print("There are no Dataproc clusters to terminate.")
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Terminating instances")
@@ -58,7 +62,8 @@
         if 'items' in instances:
             for i in instances['items']:
                 GCPActions().remove_instance(i['name'], args.zone)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing static addresses")
@@ -67,7 +72,8 @@
         if 'items' in static_addresses:
             for i in static_addresses['items']:
                 GCPActions().remove_static_address(i['name'], args.region)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing firewalls")
@@ -76,7 +82,8 @@
         if 'items' in firewalls:
             for i in firewalls['items']:
                 GCPActions().remove_firewall(i['name'])
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing Service accounts and roles")
@@ -89,7 +96,8 @@
         for role in list_roles_names:
             if args.service_base_name in role:
                 GCPActions().remove_role(role)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing subnets")
@@ -101,7 +109,8 @@
             subnets = GCPMeta().get_list_subnetworks(args.region, vpc_name, args.service_base_name)
             for i in subnets['items']:
                 GCPActions().remove_subnet(i['name'], args.region)
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing s3 buckets")
@@ -110,11 +119,14 @@
         if 'items' in buckets:
             for i in buckets['items']:
                 GCPActions().remove_bucket(i['name'])
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Removing SSN VPC")
     try:
         GCPActions().remove_vpc(args.service_base_name + '-ssn-vpc')
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         print("No such VPC")
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/tensor_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/tensor_configure.py
index a2e9fed..da771c1 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/tensor_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/tensor_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -77,6 +80,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -95,6 +99,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -111,6 +116,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -129,6 +135,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure TensorFlow.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -146,6 +153,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -162,6 +170,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_configure.py
index 8039983..efeb4b2 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_configure.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -77,6 +80,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed creating ssh user 'dlab'.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -95,6 +99,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure proxy.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -112,6 +117,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing apps: apt & pip.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -146,6 +152,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to configure zeppelin.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -164,6 +171,7 @@
             append_result("Failed installing users key")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed installing users key.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -180,6 +188,7 @@
             append_result("Failed setup git credentials")
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to setup git credentials.", str(err))
         GCPActions().remove_instance(notebook_config['instance_name'], notebook_config['zone'])
         sys.exit(1)
@@ -209,7 +218,7 @@
                "notebook_name": notebook_config['instance_name'],
                "Action": "Create new notebook server",
                "exploratory_url": [
-                   {"description": "Zeppelin",
+                   {"description": "Apache Zeppelin",
                     "url": zeppelin_ip_url},
                    {"description": "Ungit",
                     "url": ungit_ip_url}]}
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_dataengine-service_create_configs.py b/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_dataengine-service_create_configs.py
index 0a5f57d..bd5c65b 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_dataengine-service_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_dataengine-service_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_install_dataengine-service_kernels.py b/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_install_dataengine-service_kernels.py
index 4193b65..e12e5a97 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_install_dataengine-service_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/zeppelin_install_dataengine-service_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/common_clean_instance.py b/infrastructure-provisioning/src/general/scripts/os/common_clean_instance.py
index dd824ac..4564d8c 100644
--- a/infrastructure-provisioning/src/general/scripts/os/common_clean_instance.py
+++ b/infrastructure-provisioning/src/general/scripts/os/common_clean_instance.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -41,7 +44,7 @@
         remove_os_pkg(['nodejs', 'npm'])
         sudo('sed -i "/spark.*.memory/d" /opt/spark/conf/spark-defaults.conf')
     except Exception as err:
-        print('Error:', str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 def clean_jupyter():
@@ -57,7 +60,7 @@
         sudo('rm -f /etc/systemd/system/jupyter-notebook.service')
         sudo('systemctl daemon-reload')
     except Exception as err:
-        print('Error:', str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 def clean_zeppelin():
@@ -71,7 +74,7 @@
         sudo('rm -f /etc/systemd/system/zeppelin-notebook.service')
         sudo('systemctl daemon-reload')
     except Exception as err:
-        print('Error:', str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 def clean_rstudio():
@@ -90,7 +93,7 @@
         sudo('systemctl disable tensorboard')
         sudo('systemctl daemon-reload')
     except Exception as err:
-        print('Error:', str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 def clean_tensor_rstudio():
@@ -100,7 +103,7 @@
         sudo('systemctl disable tensorboard')
         sudo('systemctl daemon-reload')
     except Exception as err:
-        print('Error:', str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 if __name__ == "__main__":
diff --git a/infrastructure-provisioning/src/general/scripts/os/common_configure_proxy.py b/infrastructure-provisioning/src/general/scripts/os/common_configure_proxy.py
index e6de8b5..21bd691 100644
--- a/infrastructure-provisioning/src/general/scripts/os/common_configure_proxy.py
+++ b/infrastructure-provisioning/src/general/scripts/os/common_configure_proxy.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/common_configure_reverse_proxy.py b/infrastructure-provisioning/src/general/scripts/os/common_configure_reverse_proxy.py
index 106d7ae..6d634ea 100644
--- a/infrastructure-provisioning/src/general/scripts/os/common_configure_reverse_proxy.py
+++ b/infrastructure-provisioning/src/general/scripts/os/common_configure_reverse_proxy.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -34,6 +37,7 @@
 parser.add_argument('--additional_info', type=str, default='')
 args = parser.parse_args()
 
+
 def make_template():
     conf_file_name = args.exploratory_name
     additional_info = json.loads(args.additional_info)
@@ -85,6 +89,7 @@
         f.close()
     return conf_file_name
 
+
 ##############
 # Run script #
 ##############
@@ -94,7 +99,7 @@
     try:
         conf_file_name = make_template()
     except Exception as err:
-        print('Error:', str(err))
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
     print("Configure connections")
@@ -102,7 +107,7 @@
     env.key_filename = [args.keyfile]
     env.host_string = args.os_user + '@' + args.edge_hostname
     put('/tmp/{}.conf'.format(conf_file_name), '/etc/nginx/locations', use_sudo=True)
-    sudo('service nginx restart')
+    sudo('service nginx reload')
 
 
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/common_configure_spark.py b/infrastructure-provisioning/src/general/scripts/os/common_configure_spark.py
new file mode 100644
index 0000000..0d104db
--- /dev/null
+++ b/infrastructure-provisioning/src/general/scripts/os/common_configure_spark.py
@@ -0,0 +1,92 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+import os
+import sys
+import time
+import ast
+import argparse
+from dlab.fab import *
+from fabric.api import *
+from dlab.notebook_lib import *
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--hostname', type=str, default='')
+parser.add_argument('--keyfile', type=str, default='')
+parser.add_argument('--os_user', type=str, default='')
+parser.add_argument('--spark_conf', type=str, default='')
+parser.add_argument('--cluster_name', type=str, default='')
+args = parser.parse_args()
+
+
+def update_spark_defaults_conf(spark_conf):
+    try:
+        timestamp = time.strftime("%a, %d %b %Y %H:%M:%S %Z", time.gmtime())
+        configs = sudo('find /opt/ /etc/ /usr/lib/ -name spark-defaults.conf -type f').split('\r\n')
+        for conf in filter(None, configs):
+            sudo('''sed -i '/^# Updated/d' {0}'''.format(conf))
+            sudo('''echo "# Updated by DLab at {0} >> {1}'''.format(timestamp, conf))
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
+
+
+def add_custom_spark_properties(cluster_name):
+    try:
+        spark_configurations = ast.literal_eval(os.environ['spark_configurations'])
+        new_spark_defaults = list()
+        spark_defaults = sudo('cat /opt/{0}/spark/conf/spark-defaults.conf'.format(cluster_name))
+        current_spark_properties = spark_defaults.split('\n')
+        for param in current_spark_properties:
+            for config in spark_configurations:
+                if config['Classification'] == 'spark-defaults':
+                    for property in config['Properties']:
+                        if property == param.split(' ')[0]:
+                            param = property + ' ' + config['Properties'][property]
+                        else:
+                            new_spark_defaults.append(property + ' ' + config['Properties'][property])
+            new_spark_defaults.append(param)
+        new_spark_defaults = set(new_spark_defaults)
+        sudo('echo "" > /opt/{0}/spark/conf/spark-defaults.conf'.format(cluster_name))
+        for prop in new_spark_defaults:
+            prop = prop.rstrip()
+            sudo('echo "{0}" >> /opt/{1}/spark/conf/spark-defaults.conf'.format(prop, cluster_name))
+        sudo('sed -i "/^\s*$/d" /opt/{0}/spark/conf/spark-defaults.conf'.format(cluster_name))
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
+
+
+if __name__ == "__main__":
+    print('Configure connections')
+    env['connection_attempts'] = 100
+    env.key_filename = [args.keyfile]
+    env.host_string = args.os_user + '@' + args.hostname
+
+    if (args.spark_conf != ''):
+        update_spark_defaults_conf(args.spark_conf)
+
+    update_spark_jars()
+
+    if 'spark_configurations' in os.environ:
+        add_custom_spark_properties(args.cluster_name)
diff --git a/infrastructure-provisioning/src/general/scripts/os/dataengine_install_libs.py b/infrastructure-provisioning/src/general/scripts/os/dataengine_install_libs.py
index 12b7eca..c7677ee 100644
--- a/infrastructure-provisioning/src/general/scripts/os/dataengine_install_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/dataengine_install_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -39,9 +42,9 @@
     try:
         # Run script to install additional libs
         local("~/scripts/{}.py {}".format('install_additional_libs', params))
-    except:
-        traceback.print_exc()
-        raise Exception
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
 
 
 if __name__ == "__main__":
@@ -96,5 +99,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to install additional libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/os/dataengine_list_libs.py b/infrastructure-provisioning/src/general/scripts/os/dataengine_list_libs.py
index 5b212dc..6d17733 100644
--- a/infrastructure-provisioning/src/general/scripts/os/dataengine_list_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/dataengine_list_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -50,6 +53,7 @@
                 data_engine['tag_name'], data_engine['master_node_name'])
             data_engine['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to get parameter.", str(err))
             sys.exit(1)
         params = "--os_user {} --instance_ip {} --keyfile '{}'" \
@@ -61,5 +65,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to get available libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py b/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py
new file mode 100644
index 0000000..67c30fa
--- /dev/null
+++ b/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py
@@ -0,0 +1,126 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+import os
+import sys
+import logging
+import traceback
+import json
+from dlab.fab import *
+from dlab.meta_lib import *
+from dlab.actions_lib import *
+from fabric.api import *
+import multiprocessing
+
+
+def install_libs_on_slaves(slave, data_engine):
+    slave_name = data_engine['slave_node_name'] + '{}'.format(slave + 1)
+    data_engine['slave_ip'] = get_instance_private_ip_address(
+        data_engine['tag_name'], slave_name)
+    params = "--os_user {} --instance_ip {} --keyfile '{}' --resource_type dataengine " \
+        .format(data_engine['os_user'], data_engine['slave_ip'], data_engine['keyfile'])
+    try:
+        # Run script to install additional libs
+        local("~/scripts/{}.py {}".format('reconfigure_spark', params))
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
+
+
+if __name__ == "__main__":
+    instance_class = 'notebook'
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        logging.info('[RECONFIGURING SPARK ON DATAENGINE]')
+        print('[RECONFIGURING SPARK ON DATAENGINE]')
+        data_engine = dict()
+        try:
+            data_engine['os_user'] = os.environ['conf_os_user']
+            data_engine['service_base_name'] = os.environ['conf_service_base_name']
+            data_engine['tag_name'] = data_engine['service_base_name'] + '-Tag'
+            data_engine['cluster_name'] = os.environ['computational_id']
+            data_engine['master_node_name'] = data_engine['cluster_name'] + '-m'
+            data_engine['slave_node_name'] = data_engine['cluster_name'] + '-s'
+            data_engine['master_ip'] = get_instance_private_ip_address(
+                data_engine['tag_name'], data_engine['master_node_name'])
+            data_engine['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
+            data_engine['instance_count'] = int(node_count(data_engine['cluster_name']))
+            data_engine['notebook_name'] = os.environ['notebook_instance_name']
+            data_engine['notebook_ip'] = get_instance_private_ip_address(
+                data_engine['tag_name'], data_engine['notebook_name'])
+        except Exception as err:
+            append_result("Failed to get parameter.", str(err))
+            sys.exit(1)
+        params = "--os_user {} --instance_ip {} --keyfile '{}' --resource_type dataengine " \
+            .format(data_engine['os_user'], data_engine['master_ip'], data_engine['keyfile'])
+        try:
+            # Run script to install additional libs
+            local("~/scripts/{}.py {}".format('reconfigure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+        try:
+            jobs = []
+            for slave in range(data_engine['instance_count'] - 1):
+                p = multiprocessing.Process(target=install_libs_on_slaves, args=(slave, data_engine))
+                jobs.append(p)
+                p.start()
+            for job in jobs:
+                job.join()
+            for job in jobs:
+                if job.exitcode != 0:
+                    raise Exception
+        except:
+            traceback.print_exc()
+            raise Exception
+
+        params = "--os_user {} --instance_ip {} --keyfile '{}' --resource_type notebook --spark_type dataengine " \
+                 "--cluster_name {}".format(data_engine['os_user'], data_engine['notebook_ip'], data_engine['keyfile'],
+                                            data_engine['cluster_name'])
+        try:
+            # Run script to get available libs
+            local("~/scripts/{}.py {}".format('reconfigure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        append_result("Failed to reconfigure Spark.", str(err))
+        sys.exit(1)
+
+    try:
+        with open("/root/result.json", 'w') as result:
+            res = {"service_base_name": data_engine['service_base_name'],
+                   "Action": "Reconfigure Spark on Data Engine"}
+            print(json.dumps(res))
+            result.write(json.dumps(res))
+    except:
+        print("Failed writing results.")
+        sys.exit(0)
diff --git a/infrastructure-provisioning/src/general/scripts/os/deeplearning_dataengine_create_configs.py b/infrastructure-provisioning/src/general/scripts/os/deeplearning_dataengine_create_configs.py
index f946cca..cc65bc5 100644
--- a/infrastructure-provisioning/src/general/scripts/os/deeplearning_dataengine_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/deeplearning_dataengine_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,6 +43,7 @@
 parser.add_argument('--spark_master', type=str, default='')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--datalake_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
 args = parser.parse_args()
 
 kernels_dir = '/home/' + args.os_user + '/.local/share/jupyter/kernels/'
@@ -104,5 +108,6 @@
         install_dataengine_spark(args.cluster_name, spark_link, spark_version, hadoop_version, cluster_dir, args.os_user,
                                  args.datalake_enabled)
         ensure_dataengine_tensorflow_jars(local_jars_dir)
-        configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.region, args.datalake_enabled)
+        configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.datalake_enabled,
+                                   args.spark_configurations)
         pyspark_kernel(args)
diff --git a/infrastructure-provisioning/src/general/scripts/os/deeplearning_install_dataengine_kernels.py b/infrastructure-provisioning/src/general/scripts/os/deeplearning_install_dataengine_kernels.py
index d8c29e9..44c6762 100644
--- a/infrastructure-provisioning/src/general/scripts/os/deeplearning_install_dataengine_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/os/deeplearning_install_dataengine_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -70,7 +73,11 @@
     except:
         region = ''
     configure_notebook(args.keyfile, env.host_string)
-    sudo("/usr/bin/python /usr/local/bin/deeplearning_dataengine_create_configs.py "
-         "--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} --datalake_enabled {}".
-         format(args.cluster_name, args.spark_version, args.hadoop_version, args.os_user, args.spark_master, region,
-                args.datalake_enabled))
+    if 'spark_configurations' not in os.environ:
+        os.environ['spark_configurations'] = '[]'
+    sudo('/usr/bin/python /usr/local/bin/deeplearning_dataengine_create_configs.py '
+         '--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} '
+         '--datalake_enabled {} --spark_configurations "{}"'.format(args.cluster_name, args.spark_version,
+                                                                  args.hadoop_version, args.os_user,  args.spark_master,
+                                                                  region, args.datalake_enabled,
+                                                                  os.environ['spark_configurations']))
diff --git a/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py b/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
index d1ecd09..c4107a7 100644
--- a/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -48,7 +51,8 @@
             else:
                 local('sleep 5')
                 continue
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -64,7 +68,8 @@
         for pkg in all_pkgs_other:
             pip_pkgs[pkg] = "N/A"
         return pip_pkgs
-    except:
+    except Exception as err:
+        print('Error: {0}'.format(err))
         sys.exit(1)
 
 
@@ -75,7 +80,7 @@
 
     all_pkgs = dict()
     all_pkgs['os_pkg'] = get_available_os_pkgs()
-    #all_pkgs['java'] = {}
+    all_pkgs['java'] = {}
 
     if os.environ['application'] in ('jupyter', 'zeppelin', 'deeplearning', 'tensor', 'tensor-rstudio', 'rstudio'):
         all_pkgs['pip2'] = get_available_pip_pkgs("2.7")
diff --git a/infrastructure-provisioning/src/general/scripts/os/git_pre_commit.py b/infrastructure-provisioning/src/general/scripts/os/git_pre_commit.py
index 1e90aca..9987820 100644
--- a/infrastructure-provisioning/src/general/scripts/os/git_pre_commit.py
+++ b/infrastructure-provisioning/src/general/scripts/os/git_pre_commit.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py b/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py
index e881db1..b3a787f 100644
--- a/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -51,10 +54,14 @@
         for row in range(len(data)):
             if not data[row]['group'] in pkgs['libraries'].keys():
                 pkgs["libraries"].update({data[row]['group']: []})
-            pkgs['libraries'][data[row]['group']].append(data[row]['name'])
             if data[row]['group'] == "java":
-                pkgs['libraries'][data[row]['group']].append(data[row]['version'])
+                pkgs['libraries'][data[row]['group']].append(
+                    [data[row]['name'].split(':')[0], data[row]['name'].split(':')[1],
+                     data[row]['version'], data[row]['override']])
+            else:
+                pkgs['libraries'][data[row]['group']].append(data[row]['name'])
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to parse libs list.", str(err))
         sys.exit(1)
 
@@ -65,39 +72,38 @@
     except KeyError:
         pass
 
-    if os.environ['application'] in ['jupyter', 'zeppelin', 'deeplearning', 'tensor', 'tensor-rstudio', 'rstudio']:
-        try:
-            print('Installing java dependencies: {}'.format(pkgs['libraries']['java']))
-            status = install_java_pkg(pkgs['libraries']['java'])
-            general_status = general_status + status
-        except KeyError:
-            pass
+    try:
+        print('Installing java dependencies: {}'.format(pkgs['libraries']['java']))
+        status = install_java_pkg(pkgs['libraries']['java'])
+        general_status = general_status + status
+    except KeyError:
+        pass
 
-        try:
-            print('Installing pip2 packages: {}'.format(pkgs['libraries']['pip2']))
-            status = install_pip_pkg(pkgs['libraries']['pip2'], 'pip2', 'pip2')
-            general_status = general_status + status
-        except KeyError:
-            pass
+    try:
+        print('Installing pip2 packages: {}'.format(pkgs['libraries']['pip2']))
+        status = install_pip_pkg(pkgs['libraries']['pip2'], 'pip2', 'pip2')
+        general_status = general_status + status
+    except KeyError:
+        pass
 
-        try:
-            print('Installing pip3 packages: {}'.format(pkgs['libraries']['pip3']))
-            status = install_pip_pkg(pkgs['libraries']['pip3'], 'pip3', 'pip3')
-            general_status = general_status + status
-        except KeyError:
-            pass
+    try:
+        print('Installing pip3 packages: {}'.format(pkgs['libraries']['pip3']))
+        status = install_pip_pkg(pkgs['libraries']['pip3'], 'pip3', 'pip3')
+        general_status = general_status + status
+    except KeyError:
+        pass
 
-        try:
-            print('Installing other packages: {}'.format(pkgs['libraries']['others']))
-            for pkg in pkgs['libraries']['others']:
-                status_pip2 = install_pip_pkg([pkg], 'pip2', 'others')
-                status_pip3 = install_pip_pkg([pkg], 'pip3', 'others')
-                if status_pip2[0]['status'] == 'installed':
-                    general_status = general_status + status_pip2
-                else:
-                    general_status = general_status + status_pip3
-        except KeyError:
-            pass
+    try:
+        print('Installing other packages: {}'.format(pkgs['libraries']['others']))
+        for pkg in pkgs['libraries']['others']:
+            status_pip2 = install_pip_pkg([pkg], 'pip2', 'others')
+            status_pip3 = install_pip_pkg([pkg], 'pip3', 'others')
+            if status_pip2[0]['status'] == 'installed':
+                general_status = general_status + status_pip2
+            else:
+                general_status = general_status + status_pip3
+    except KeyError:
+        pass
 
     if (os.environ['application'] in ('jupyter', 'zeppelin')
         and os.environ['notebook_r_enabled'] == 'true')\
diff --git a/infrastructure-provisioning/src/general/scripts/os/ipynb_output_filter.py b/infrastructure-provisioning/src/general/scripts/os/ipynb_output_filter.py
index 0faaed1..20587d7 100644
--- a/infrastructure-provisioning/src/general/scripts/os/ipynb_output_filter.py
+++ b/infrastructure-provisioning/src/general/scripts/os/ipynb_output_filter.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/jupyter_dataengine_create_configs.py b/infrastructure-provisioning/src/general/scripts/os/jupyter_dataengine_create_configs.py
index dd75867..5b4a51c 100644
--- a/infrastructure-provisioning/src/general/scripts/os/jupyter_dataengine_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/jupyter_dataengine_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,6 +43,7 @@
 parser.add_argument('--spark_master', type=str, default='')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--datalake_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
 parser.add_argument('--r_enabled', type=str, default='')
 args = parser.parse_args()
 
@@ -78,6 +82,8 @@
     scala_version = local('scala -e "println(scala.util.Properties.versionNumberString)"', capture=True)
     local('mkdir -p ' + kernels_dir + 'toree_' + args.cluster_name + '/')
     local('tar zxvf /tmp/{}/toree_kernel.tar.gz -C '.format(args.cluster_name) + kernels_dir + 'toree_' + args.cluster_name + '/')
+    local('sudo mv {0}toree_{1}/toree-0.2.0-incubating/* {0}toree_{1}/'.format(kernels_dir, args.cluster_name))
+    local('sudo rm -r {0}toree_{1}/toree-0.2.0-incubating'.format(kernels_dir, args.cluster_name))
     kernel_path = kernels_dir + "toree_" + args.cluster_name + "/kernel.json"
     template_file = "/tmp/{}/toree_dataengine_template.json".format(args.cluster_name)
     with open(template_file, 'r') as f:
@@ -156,7 +162,8 @@
         dataengine_dir_prepare('/opt/{}/'.format(args.cluster_name))
         install_dataengine_spark(args.cluster_name, spark_link, spark_version, hadoop_version, cluster_dir, args.os_user,
                                  args.datalake_enabled)
-        configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.region, args.datalake_enabled)
+        configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.datalake_enabled,
+                                   args.spark_configurations)
         pyspark_kernel(args)
         toree_kernel(args)
         if args.r_enabled == 'true':
diff --git a/infrastructure-provisioning/src/general/scripts/os/jupyter_install_dataengine_kernels.py b/infrastructure-provisioning/src/general/scripts/os/jupyter_install_dataengine_kernels.py
index 2aff14a..7a5d372 100644
--- a/infrastructure-provisioning/src/general/scripts/os/jupyter_install_dataengine_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/os/jupyter_install_dataengine_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -73,10 +76,12 @@
     except:
         region = ''
     r_enabled = os.environ['notebook_r_enabled']
+    if 'spark_configurations' not in os.environ:
+        os.environ['spark_configurations'] = '[]'
     configure_notebook(args.keyfile, env.host_string)
-    sudo("/usr/bin/python /usr/local/bin/jupyter_dataengine_create_configs.py "
-         "--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} \
-         --spark_master {} --region {} --datalake_enabled {} --r_enabled {}".
+    sudo('/usr/bin/python /usr/local/bin/jupyter_dataengine_create_configs.py '
+         '--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} \
+         --spark_master {} --region {} --datalake_enabled {} --r_enabled {} --spark_configurations "{}"'.
          format(args.cluster_name, args.spark_version, args.hadoop_version, args.os_user, args.spark_master,
-                region, args.datalake_enabled, r_enabled))
+                region, args.datalake_enabled, r_enabled, os.environ['spark_configurations']))
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py b/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
index e5fbb4f..7010e5f 100644
--- a/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
+++ b/infrastructure-provisioning/src/general/scripts/os/manage_git_creds.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -53,13 +56,15 @@
         if exists('/home/{}/.gitcreds'.format(args.os_user)):
             run('rm .gitcreds')
         git_creds = os.environ['git_creds']
-    except KeyError:
+    except KeyError as err:
+        print('Error: {0}'.format(err))
         print("Parameter git_creds does not exist. Skipping.")
         sys.exit(0)
 
     try:
         data = ast.literal_eval(git_creds)
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to parse git credentials.", str(err))
         sys.exit(1)
 
@@ -83,5 +88,6 @@
         put('new_gitcreds', '/home/{}/.gitcreds'.format(args.os_user))
 
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to add host/login/(password/token) to config.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/os/notebook_git_creds.py b/infrastructure-provisioning/src/general/scripts/os/notebook_git_creds.py
index 3960cf8..81719ba 100644
--- a/infrastructure-provisioning/src/general/scripts/os/notebook_git_creds.py
+++ b/infrastructure-provisioning/src/general/scripts/os/notebook_git_creds.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -57,6 +60,7 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to manage git credentials.", str(err))
         sys.exit(1)
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/notebook_install_libs.py b/infrastructure-provisioning/src/general/scripts/os/notebook_install_libs.py
index 7594f1e..2b2559e 100644
--- a/infrastructure-provisioning/src/general/scripts/os/notebook_install_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/notebook_install_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -51,6 +54,7 @@
             notebook_config['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
             notebook_config['libs'] = os.environ['libs']
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to get parameter.", str(err))
             sys.exit(1)
         params = '--os_user {} --instance_ip {} --keyfile "{}" --libs "{}"' \
@@ -63,5 +67,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to install additional libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/os/notebook_list_libs.py b/infrastructure-provisioning/src/general/scripts/os/notebook_list_libs.py
index 24cc1cc..49387b3 100644
--- a/infrastructure-provisioning/src/general/scripts/os/notebook_list_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/notebook_list_libs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,6 +52,7 @@
                 notebook_config['tag_name'], notebook_config['notebook_name'])
             notebook_config['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
         except Exception as err:
+            print('Error: {0}'.format(err))
             append_result("Failed to get parameter.", str(err))
             sys.exit(1)
         params = "--os_user {} --instance_ip {} --keyfile '{}'" \
@@ -60,5 +64,6 @@
             traceback.print_exc()
             raise Exception
     except Exception as err:
+        print('Error: {0}'.format(err))
         append_result("Failed to get available libraries.", str(err))
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/os/notebook_reconfigure_dataengine_spark.py b/infrastructure-provisioning/src/general/scripts/os/notebook_reconfigure_dataengine_spark.py
new file mode 100644
index 0000000..9d9ac00
--- /dev/null
+++ b/infrastructure-provisioning/src/general/scripts/os/notebook_reconfigure_dataengine_spark.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+
+from fabric.api import *
+import argparse
+import os
+import sys
+import time
+from fabric.api import lcd
+from fabric.contrib.files import exists
+from dlab.notebook_lib import *
+from dlab.actions_lib import *
+from dlab.fab import *
+from dlab.common_lib import *
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--cluster_name', type=str, default='')
+parser.add_argument('--jars_dir', type=str, default='')
+parser.add_argument('--cluster_dir', type=str, default='')
+parser.add_argument('--datalake_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
+args = parser.parse_args()
+
+if __name__ == "__main__":
+    configure_dataengine_spark(args.cluster_name, args.jars_dir, args.cluster_dir, args.datalake_enabled,
+                               args.spark_configurations)
diff --git a/infrastructure-provisioning/src/general/scripts/os/notebook_reconfigure_spark.py b/infrastructure-provisioning/src/general/scripts/os/notebook_reconfigure_spark.py
new file mode 100644
index 0000000..f5f0116
--- /dev/null
+++ b/infrastructure-provisioning/src/general/scripts/os/notebook_reconfigure_spark.py
@@ -0,0 +1,81 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+import os
+import sys
+import json
+import logging
+import traceback
+from dlab.fab import *
+from dlab.meta_lib import *
+from dlab.actions_lib import *
+from fabric.api import *
+
+if __name__ == "__main__":
+    instance_class = 'notebook'
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        logging.info('[RECONFIGURING SPARK]')
+        print('[RECONFIGURING SPARK]')
+        notebook_config = dict()
+        try:
+            notebook_config['notebook_name'] = os.environ['notebook_instance_name']
+            notebook_config['os_user'] = os.environ['conf_os_user']
+            notebook_config['service_base_name'] = os.environ['conf_service_base_name']
+            notebook_config['tag_name'] = notebook_config['service_base_name'] + '-Tag'
+            notebook_config['notebook_ip'] = get_instance_private_ip_address(
+                notebook_config['tag_name'], notebook_config['notebook_name'])
+            notebook_config['keyfile'] = '{}{}.pem'.format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
+        except Exception as err:
+            print('Error: {0}'.format(err))
+            append_result("Failed to get parameter.", str(err))
+            sys.exit(1)
+        params = "--os_user {} --instance_ip {} --keyfile '{}' --resource_type notebook " \
+            .format(notebook_config['os_user'], notebook_config['notebook_ip'], notebook_config['keyfile'])
+        try:
+            # Run script to get available libs
+            local("~/scripts/{}.py {}".format('reconfigure_spark', params))
+        except:
+            traceback.print_exc()
+            raise Exception
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        append_result("Failed to reconfigure Spark.", str(err))
+        sys.exit(1)
+
+
+    try:
+        with open("/root/result.json", 'w') as result:
+            res = {"service_base_name": notebook_config['service_base_name'],
+                   "Action": "Reconfigure Spark on Notebook"}
+            print(json.dumps(res))
+            result.write(json.dumps(res))
+    except:
+        print("Failed writing results.")
+        sys.exit(0)
diff --git a/infrastructure-provisioning/src/general/scripts/os/reconfigure_spark.py b/infrastructure-provisioning/src/general/scripts/os/reconfigure_spark.py
new file mode 100644
index 0000000..9be3147
--- /dev/null
+++ b/infrastructure-provisioning/src/general/scripts/os/reconfigure_spark.py
@@ -0,0 +1,75 @@
+#!/usr/bin/python
+
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+import sys
+import argparse
+from dlab.notebook_lib import *
+from dlab.fab import *
+from dlab.actions_lib import *
+from fabric.api import *
+import json
+import os
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--os_user', type=str, default='')
+parser.add_argument('--instance_ip', type=str, default='')
+parser.add_argument('--keyfile', type=str, default='')
+parser.add_argument('--resource_type', type=str, default='')
+parser.add_argument('--spark_type', type=str, default='local')
+parser.add_argument('--cluster_name', type=str, default='')
+args = parser.parse_args()
+
+
+if __name__ == "__main__":
+    env['connection_attempts'] = 100
+    env.key_filename = [args.keyfile]
+    env.host_string = '{}@{}'.format(args.os_user, args.instance_ip)
+
+    jars_dir = '/opt/jars/'
+    templates_dir = '/root/templates/'
+    if args.resource_type == 'dataengine':
+        memory_type = ''
+    else:
+        memory_type = 'driver'
+    if args.spark_type == 'local':
+        configure_local_spark(jars_dir, templates_dir, memory_type)
+    elif args.spark_type == 'dataengine':
+        if not exists('/usr/local/bin/notebook_reconfigure_dataengine_spark.py'):
+            put('/root/scripts/notebook_reconfigure_dataengine_spark.py',
+                '/tmp/notebook_reconfigure_dataengine_spark.py')
+            sudo('mv /tmp/notebook_reconfigure_dataengine_spark.py '
+                 '/usr/local/bin/notebook_reconfigure_dataengine_spark.py')
+        sudo('mkdir -p /tmp/{}'.format(args.cluster_name))
+        put('{}notebook_spark-defaults_local.conf'.format(templates_dir),
+            '/tmp/{}/notebook_spark-defaults_local.conf'.format(args.cluster_name), use_sudo=True)
+        cluster_dir = '/opt/' + args.cluster_name + '/'
+        if 'azure_datalake_enable' in os.environ:
+            datalake_enabled = os.environ['azure_datalake_enable']
+        else:
+            datalake_enabled = 'false'
+        if 'spark_configurations' not in os.environ:
+            os.environ['spark_configurations'] = '[]'
+        sudo('/usr/bin/python /usr/local/bin/notebook_reconfigure_dataengine_spark.py --cluster_name {0} '
+             '--jars_dir {1} --cluster_dir {2} --datalake_enabled {3} --spark_configurations "{4}"'.format(
+              args.cluster_name, jars_dir, cluster_dir, datalake_enabled, os.environ['spark_configurations']))
diff --git a/infrastructure-provisioning/src/general/scripts/os/rstudio_dataengine_create_configs.py b/infrastructure-provisioning/src/general/scripts/os/rstudio_dataengine_create_configs.py
index 9921060..2d8d524 100644
--- a/infrastructure-provisioning/src/general/scripts/os/rstudio_dataengine_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/rstudio_dataengine_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,6 +43,7 @@
 parser.add_argument('--spark_master', type=str, default='')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--datalake_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
 args = parser.parse_args()
 
 cluster_dir = '/opt/' + args.cluster_name + '/'
@@ -63,7 +67,8 @@
                   args.os_user + '/.Rprofile')
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
             local('touch /home/' + args.os_user + '/.ensure_dir/rstudio_dataengine_ensured')
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
     else:
         try:
@@ -76,7 +81,8 @@
             local('echo \'master="' + args.spark_master + '" # Cluster - "' + args.cluster_name + '" \' >> /home/' +
                   args.os_user + '/.Rprofile')
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
 
 
@@ -84,6 +90,7 @@
     dataengine_dir_prepare('/opt/{}/'.format(args.cluster_name))
     install_dataengine_spark(args.cluster_name, spark_link, spark_version, hadoop_version, cluster_dir, args.os_user,
                              args.datalake_enabled)
-    configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.region, args.datalake_enabled)
+    configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.datalake_enabled,
+                               args.spark_configurations)
     configure_rstudio()
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/rstudio_install_dataengine_kernels.py b/infrastructure-provisioning/src/general/scripts/os/rstudio_install_dataengine_kernels.py
index 2e5cfb5..cb1a82e 100644
--- a/infrastructure-provisioning/src/general/scripts/os/rstudio_install_dataengine_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/os/rstudio_install_dataengine_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -65,8 +68,11 @@
         region = os.environ['aws_region']
     except:
         region = ''
+    if 'spark_configurations' not in os.environ:
+        os.environ['spark_configurations'] = '[]'
     configure_notebook(args.keyfile, env.host_string)
-    sudo("/usr/bin/python /usr/local/bin/rstudio_dataengine_create_configs.py "
-         "--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} --datalake_enabled {}".
+    sudo('/usr/bin/python /usr/local/bin/rstudio_dataengine_create_configs.py '
+         '--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} '
+         '--datalake_enabled {} --spark_configurations "{}"'.
          format(args.cluster_name, args.spark_version, args.hadoop_version, args.os_user, args.spark_master, region,
-                args.datalake_enabled))
+                args.datalake_enabled, os.environ['spark_configurations']))
diff --git a/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_dataengine_create_configs.py b/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_dataengine_create_configs.py
index 51fd412..48ec248 100644
--- a/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_dataengine_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_dataengine_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,6 +43,7 @@
 parser.add_argument('--spark_master', type=str, default='')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--datalake_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
 args = parser.parse_args()
 
 cluster_dir = '/opt/' + args.cluster_name + '/'
@@ -63,7 +67,8 @@
                   args.os_user + '/.Rprofile')
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
             local('touch /home/' + args.os_user + '/.ensure_dir/rstudio_dataengine_ensured')
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
     else:
         try:
@@ -76,7 +81,8 @@
             local('echo \'master="' + args.spark_master + '" # Cluster - "' + args.cluster_name + '" \' >> /home/' +
                   args.os_user + '/.Rprofile')
             local('''R -e "source('/home/{}/.Rprofile')"'''.format(args.os_user))
-        except:
+        except Exception as err:
+            print('Error: {0}'.format(err))
             sys.exit(1)
 
 
@@ -85,6 +91,7 @@
     install_dataengine_spark(args.cluster_name, spark_link, spark_version, hadoop_version, cluster_dir, args.os_user,
                              args.datalake_enabled)
     ensure_dataengine_tensorflow_jars(local_jars_dir)
-    configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.region, args.datalake_enabled)
+    configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.datalake_enabled,
+                               args.spark_configurations)
     configure_rstudio()
 
diff --git a/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_install_dataengine_kernels.py b/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_install_dataengine_kernels.py
index c5f94bb..7294f08 100644
--- a/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_install_dataengine_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/os/tensor-rstudio_install_dataengine_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -65,8 +68,11 @@
         region = os.environ['aws_region']
     except:
         region = ''
+    if 'spark_configurations' not in os.environ:
+        os.environ['spark_configurations'] = '[]'
     configure_notebook(args.keyfile, env.host_string)
-    sudo("/usr/bin/python /usr/local/bin/tensor-rstudio_dataengine_create_configs.py "
-         "--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} --datalake_enabled {}".
+    sudo('/usr/bin/python /usr/local/bin/tensor-rstudio_dataengine_create_configs.py '
+         '--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} '
+         '--datalake_enabled {} --spark_configurations "{}"'.
          format(args.cluster_name, args.spark_version, args.hadoop_version, args.os_user, args.spark_master, region,
-                args.datalake_enabled))
+                args.datalake_enabled, os.environ['spark_configurations']))
diff --git a/infrastructure-provisioning/src/general/scripts/os/tensor_dataengine_create_configs.py b/infrastructure-provisioning/src/general/scripts/os/tensor_dataengine_create_configs.py
index f946cca..b26a713 100644
--- a/infrastructure-provisioning/src/general/scripts/os/tensor_dataengine_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/tensor_dataengine_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -40,6 +43,7 @@
 parser.add_argument('--spark_master', type=str, default='')
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--datalake_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
 args = parser.parse_args()
 
 kernels_dir = '/home/' + args.os_user + '/.local/share/jupyter/kernels/'
@@ -104,5 +108,6 @@
         install_dataengine_spark(args.cluster_name, spark_link, spark_version, hadoop_version, cluster_dir, args.os_user,
                                  args.datalake_enabled)
         ensure_dataengine_tensorflow_jars(local_jars_dir)
-        configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.region, args.datalake_enabled)
+        configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.datalake_enabled,
+                                   args.spark_configurations)
         pyspark_kernel(args)
diff --git a/infrastructure-provisioning/src/general/scripts/os/tensor_install_dataengine_kernels.py b/infrastructure-provisioning/src/general/scripts/os/tensor_install_dataengine_kernels.py
index ca2d26e..e8c6565 100644
--- a/infrastructure-provisioning/src/general/scripts/os/tensor_install_dataengine_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/os/tensor_install_dataengine_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -66,8 +69,11 @@
         region = os.environ['aws_region']
     except:
         region = ''
+    if 'spark_configurations' not in os.environ:
+        os.environ['spark_configurations'] = '[]'
     configure_notebook(args.keyfile, env.host_string)
-    sudo("/usr/bin/python /usr/local/bin/tensor_dataengine_create_configs.py "
-         "--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} --datalake_enabled {}".
+    sudo('/usr/bin/python /usr/local/bin/tensor_dataengine_create_configs.py '
+         '--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --region {} '
+         '--datalake_enabled {} --spark_configurations "{}"'.
          format(args.cluster_name, args.spark_version, args.hadoop_version, args.os_user, args.spark_master, region,
-                args.datalake_enabled))
+                args.datalake_enabled, os.environ['spark_configurations']))
diff --git a/infrastructure-provisioning/src/general/scripts/os/zeppelin_dataengine_create_configs.py b/infrastructure-provisioning/src/general/scripts/os/zeppelin_dataengine_create_configs.py
index bb820fe..7e7cfc2 100644
--- a/infrastructure-provisioning/src/general/scripts/os/zeppelin_dataengine_create_configs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/zeppelin_dataengine_create_configs.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -45,6 +48,7 @@
 parser.add_argument('--region', type=str, default='')
 parser.add_argument('--datalake_enabled', type=str, default='')
 parser.add_argument('--r_enabled', type=str, default='')
+parser.add_argument('--spark_configurations', type=str, default='')
 args = parser.parse_args()
 
 cluster_dir = '/opt/' + args.cluster_name + '/'
@@ -145,8 +149,9 @@
                     except:
                         local('sleep 5')
         local('touch /home/' + os_user + '/.ensure_dir/dataengine_' + cluster_name + '_interpreter_ensured')
-    except:
-            sys.exit(1)
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
 
 
 def install_remote_livy(args):
@@ -169,7 +174,8 @@
     dataengine_dir_prepare('/opt/{}/'.format(args.cluster_name))
     install_dataengine_spark(args.cluster_name, spark_link, spark_version, hadoop_version, cluster_dir, args.os_user,
                              args.datalake_enabled)
-    configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.region, args.datalake_enabled)
+    configure_dataengine_spark(args.cluster_name, local_jars_dir, cluster_dir, args.datalake_enabled,
+                               args.spark_configurations)
     if args.multiple_clusters == 'true':
         install_remote_livy(args)
     configure_zeppelin_dataengine_interpreter(args.cluster_name, cluster_dir, args.os_user,
diff --git a/infrastructure-provisioning/src/general/scripts/os/zeppelin_install_dataengine_kernels.py b/infrastructure-provisioning/src/general/scripts/os/zeppelin_install_dataengine_kernels.py
index 9e55ca1..2b10a5b 100644
--- a/infrastructure-provisioning/src/general/scripts/os/zeppelin_install_dataengine_kernels.py
+++ b/infrastructure-provisioning/src/general/scripts/os/zeppelin_install_dataengine_kernels.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -49,6 +52,7 @@
     put(templates_dir + 'notebook_spark-defaults_local.conf', '/tmp/{}/notebook_spark-defaults_local.conf'.format(args.cluster_name))
     spark_master_ip = args.spark_master.split('//')[1].split(':')[0]
     spark_memory = get_spark_memory(True, args.os_user, spark_master_ip, keyfile)
+    run('sed -i "s|EXECUTOR_MEMORY|{}m|g " /tmp/{}/dataengine_interpreter.json'.format(spark_memory, args.cluster_name))
     run('echo "spark.executor.memory {0}m" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(spark_memory, args.cluster_name))
     if not exists('/usr/local/bin/zeppelin_dataengine_create_configs.py'):
         put(scripts_dir + 'zeppelin_dataengine_create_configs.py', '/usr/local/bin/zeppelin_dataengine_create_configs.py', use_sudo=True)
@@ -70,12 +74,15 @@
         region = os.environ['aws_region']
     except:
         region = ''
+    if 'spark_configurations' not in os.environ:
+        os.environ['spark_configurations'] = '[]'
     configure_notebook(args.keyfile, env.host_string)
     livy_version = os.environ['notebook_livy_version']
     r_enabled = os.environ['notebook_r_enabled']
-    sudo("/usr/bin/python /usr/local/bin/zeppelin_dataengine_create_configs.py "
-         "--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --keyfile {} \
-         --notebook_ip {} --livy_version {} --multiple_clusters {} --region {} --datalake_enabled {} --r_enabled {}".
+    sudo('/usr/bin/python /usr/local/bin/zeppelin_dataengine_create_configs.py '
+         '--cluster_name {} --spark_version {} --hadoop_version {} --os_user {} --spark_master {} --keyfile {} \
+         --notebook_ip {} --livy_version {} --multiple_clusters {} --region {} --datalake_enabled {} '
+         '--r_enabled {} --spark_configurations "{}"'.
          format(args.cluster_name, args.spark_version, args.hadoop_version, args.os_user, args.spark_master,
                 args.keyfile, args.notebook_ip, livy_version, os.environ['notebook_multiple_clusters'], region,
-                args.datalake_enabled, r_enabled))
+                args.datalake_enabled, r_enabled, os.environ['spark_configurations']))
diff --git a/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_livy.json b/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_livy.json
index ff91326..b4bece1 100644
--- a/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_livy.json
+++ b/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_livy.json
@@ -2,25 +2,111 @@
   "name": "CLUSTER_NAME",
   "group": "livy",
   "properties": {
-    "zeppelin.livy.concurrentSQL": "false",
-    "livy.spark.home":"SPARK_HOME",
-    "livy.spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL",
-    "zeppelin.interpreter.localRepo": "/opt/zeppelin/local-repo/2CAC665T6",
-    "zeppelin.livy.url": "http://localhost:LIVY_PORT",
-    "livy.spark.hadoop.fs.s3a.buffer.dir": "/tmp",
-    "zeppelin.spark.useHiveContext": "true",
-    "livy.spark.app.name": "Zeppelin",
-    "zeppelin.spark.printREPLOutput": "true",
-    "zeppelin.spark.maxResult": "1000",
-    "zeppelin.spark.concurrentSQL": "false",
-    "zeppelin.spark.importImplicit": "true",
-    "zeppelin.dep.localrepo": "local-repo",
-    "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-    "livy.spark.hadoop.fs.s3a.fast.upload": "true",
-    "zeppelin.R.image.width": "100%",
-    "zeppelin.R.render.options": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
-    "zeppelin.R.cmd": "R",
-    "zeppelin.R.knitr": "true"
+        "zeppelin.livy.concurrentSQL": {
+            "propertyName": "zeppelin.livy.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+	    "livy.spark.home": {
+            "propertyName": "livy.spark.home",
+            "value": "SPARK_HOME",
+            "type": "string"
+          },
+        "livy.spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "livy.spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.interpreter.localRepo": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/zeppelin/local-repo/2CAC665T6",
+            "type": "string"
+          },
+        "zeppelin.livy.url": {
+            "propertyName": "zeppelin.livy.url",
+            "value": "http://localhost:LIVY_PORT",
+            "type": "string"
+          },
+	    "livy.spark.hadoop.fs.s3a.buffer.dir": {
+            "propertyName": "livy.spark.hadoop.fs.s3a.buffer.dir",
+            "value": "/tmp",
+            "type": "string"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.app.name": {
+            "propertyName": "livy.spark.app.name",
+            "value": "Zeppelin",
+            "type": "string"
+          },
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.maxResult": {
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "type": "number"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit": {
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.localrepo": {
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "type": "string"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "type": "string"
+          },
+        "livy.spark.hadoop.fs.s3a.fast.upload": {
+            "propertyName": "livy.spark.hadoop.fs.s3a.fast.upload",
+            "value": "true",
+            "type": "checkbox"
+          },
+		"zeppelin.R.image.width": {
+			"envName": "ZEPPELIN_R_IMAGE_WIDTH",
+			"propertyName": "zeppelin.R.image.width",
+			"value": "100%",
+			"description": "",
+			"type": "string"
+		  },
+		"zeppelin.R.render.options": {
+			"envName": "ZEPPELIN_R_RENDER_OPTIONS",
+			"propertyName": "zeppelin.R.render.options",
+			"value": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
+			"description": "",
+			"type": "string"
+		  },
+		"zeppelin.R.cmd": {
+			"envName": "ZEPPELIN_R_CMD",
+			"propertyName": "zeppelin.R.cmd",
+			"value": "R",
+			"description": "",
+			"type": "string"
+          },
+		"zeppelin.R.knitr": {
+			"envName": "ZEPPELIN_R_KNITR",
+			"propertyName": "zeppelin.R.knitr",
+			"value": "true",
+			"description": "",
+			"type": "checkbox"
+		  }
   },
     "interpreterGroup": [
       {
diff --git a/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_spark.json b/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_spark.json
index 4bf1379..4ba5737 100644
--- a/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_spark.json
+++ b/infrastructure-provisioning/src/general/templates/aws/dataengine-service_interpreter_spark.json
@@ -2,25 +2,139 @@
   "name": "CLUSTERNAME_pyPYTHONVER_SHORT",
   "group": "spark",
   "properties": {
-    "args": "",
-    "zeppelin.spark.useHiveContext": "true",
-    "spark.app.name": "Zeppelin",
-    "zeppelin.spark.printREPLOutput": "true",
-    "zeppelin.spark.maxResult": "1000",
-    "master": "yarn",
-    "zeppelin.spark.concurrentSQL": "false",
-    "zeppelin.spark.sql.stacktrace": "false",
-    "zeppelin.spark.importImplicit": "true",
-    "zeppelin.pyspark.python": "pythonPYTHONVERSION",
-    "zeppelin.dep.localrepo": "local-repo",
-    "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-    "spark.home": "SPARK_HOME",
-    "spark.hadoop.fs.s3a.fast.upload": "true",
-    "spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL",
-    "zeppelin.R.image.width": "100%",
-    "zeppelin.R.render.options": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
-    "zeppelin.R.cmd": "R",
-    "zeppelin.R.knitr": "true"
+    "zeppelin.spark.useHiveContext": {
+        "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+        "propertyName": "zeppelin.spark.useHiveContext",
+        "value": "true",
+        "description": "Use HiveContext instead of SQLContext if it is true.",
+        "type": "checkbox"
+      },
+    "spark.app.name": {
+        "envName": "SPARK_APP_NAME",
+        "propertyName": "spark.app.name",
+        "value": "Zeppelin",
+        "description": "The name of spark application.",
+        "type": "string"
+      },
+    "zeppelin.spark.printREPLOutput": {
+        "envName": null,
+        "propertyName": "zeppelin.spark.printREPLOutput",
+        "value": "true",
+        "description": "Print REPL output",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.maxResult": {
+        "envName": "ZEPPELIN_SPARK_MAXRESULT",
+        "propertyName": "zeppelin.spark.maxResult",
+        "value": "1000",
+        "description": "Max number of Spark SQL result to display.",
+        "type": "number"
+      },
+    "master":{
+        "envName": "Master",
+        "propertyName": "spark.master",
+        "value": "yarn",
+        "description": "Spark master uri. ex) spark://masterhost:7077",
+        "type": "string"
+      },
+    "spark.submit.deployMode":{
+        "envName": "spark submit deploy mode",
+        "propertyName": "spark.submit.deployMode",
+        "value": "client",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.spark.concurrentSQL": {
+        "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+        "propertyName": "zeppelin.spark.concurrentSQL",
+        "value": "false",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.sql.stacktrace": {
+        "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+        "propertyName": "zeppelin.spark.sql.stacktrace",
+        "value": "false",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.importImplicit":{
+        "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+        "propertyName": "zeppelin.spark.importImplicit",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.pyspark.python": {
+        "envName": "ZEPPELIN_PYSPARK_PYTHON",
+        "propertyName": "zeppelin.pyspark.python",
+        "value": "pythonPYTHONVERSION",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.dep.localrepo": {
+        "envName": "ZEPPELIN_DEP_LOCALREPO",
+        "propertyName": "zeppelin.dep.localrepo",
+        "value": "local-repo",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.dep.additionalRemoteRepository": {
+        "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+        "propertyName": "zeppelin.dep.additionalRemoteRepository",
+        "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+        "description": "",
+        "type": "string"
+      },
+    "spark.home": {
+        "envName": "Spark Home",
+        "propertyName": "spark.home",
+        "value": "SPARK_HOME",
+        "description": "",
+        "type": "string"
+      },
+    "spark.hadoop.fs.s3a.fast.upload": {
+        "envName": "SPARK_HADOOP_FS_S3A_FAST_UPLOAD",
+        "propertyName": "spark.hadoop.fs.s3a.fast.upload",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      },
+    "spark.hadoop.fs.s3a.endpoint": {
+        "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+        "propertyName": "spark.hadoop.fs.s3a.endpoint",
+        "value": "ENDPOINTURL",
+        "description": "",
+        "type": "string"
+      },
+	"zeppelin.R.image.width": {
+        "envName": "ZEPPELIN_R_IMAGE_WIDTH",
+        "propertyName": "zeppelin.R.image.width",
+        "value": "100%",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.R.render.options": {
+        "envName": "ZEPPELIN_R_RENDER_OPTIONS",
+        "propertyName": "zeppelin.R.render.options",
+        "value": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
+        "description": "",
+        "type": "string"
+      },
+	"zeppelin.R.cmd": {
+        "envName": "ZEPPELIN_R_CMD",
+        "propertyName": "zeppelin.R.cmd",
+        "value": "R",
+        "description": "",
+        "type": "string"
+      },
+	"zeppelin.R.knitr": {
+        "envName": "ZEPPELIN_R_KNITR",
+        "propertyName": "zeppelin.R.knitr",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      }
   },
   "dependencies": [],
   "option": {
diff --git a/infrastructure-provisioning/src/general/templates/aws/interpreter_livy.json b/infrastructure-provisioning/src/general/templates/aws/interpreter_livy.json
index 031e9d1..4fa46d6 100644
--- a/infrastructure-provisioning/src/general/templates/aws/interpreter_livy.json
+++ b/infrastructure-provisioning/src/general/templates/aws/interpreter_livy.json
@@ -5,22 +5,97 @@
       "name": "local_interpreter",
       "group": "livy",
       "properties": {
-        "zeppelin.livy.concurrentSQL": "false",
-        "livy.spark.master": "local[*]",
-        "livy.spark.home":"/opt/spark/",
-        "livy.spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL",
-        "zeppelin.interpreter.localRepo": "/opt/zeppelin/local-repo/2CAC665T6",
-        "zeppelin.livy.url": "http://localhost:LIVY_PORT",
-        "livy.spark.hadoop.fs.s3a.buffer.dir": "/tmp",
-        "zeppelin.spark.useHiveContext": "true",
-        "livy.spark.app.name": "Zeppelin",
-        "zeppelin.spark.printREPLOutput": "true",
-        "zeppelin.spark.maxResult": "1000",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "livy.spark.hadoop.fs.s3a.fast.upload": "true"
+        "zeppelin.livy.concurrentSQL": {
+            "propertyName": "zeppelin.livy.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "livy.spark.master":{
+            "envName": "Master",
+            "propertyName": "master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "livy.spark.home": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/spark/",
+            "type": "string"
+          },
+        "livy.spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "livy.spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.interpreter.localRepo": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/zeppelin/local-repo/2CAC665T6",
+            "type": "string"
+          },
+        "zeppelin.livy.url": {
+            "propertyName": "zeppelin.livy.url",
+            "value": "http://localhost:LIVY_PORT",
+            "type": "string"
+          },
+	    "livy.spark.hadoop.fs.s3a.buffer.dir": {
+            "propertyName": "livy.spark.hadoop.fs.s3a.buffer.dir",
+            "value": "/tmp",
+            "type": "string"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.app.name": {
+            "propertyName": "livy.spark.app.name",
+            "value": "Zeppelin",
+            "type": "string"
+          },
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.maxResult": {
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "type": "number"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit": {
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.localrepo": {
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "type": "string"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "type": "string"
+          },
+        "livy.spark.hadoop.fs.s3a.fast.upload": {
+            "propertyName": "livy.spark.hadoop.fs.s3a.fast.upload",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "livy.spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
diff --git a/infrastructure-provisioning/src/general/templates/aws/interpreter_spark.json b/infrastructure-provisioning/src/general/templates/aws/interpreter_spark.json
index 9fb328b..0d354cd 100644
--- a/infrastructure-provisioning/src/general/templates/aws/interpreter_spark.json
+++ b/infrastructure-provisioning/src/general/templates/aws/interpreter_spark.json
@@ -5,21 +5,96 @@
       "name": "local_interpreter_python2",
       "group": "spark",
       "properties": {
-        "spark.executor.memory": "",
-        "args": "",
-        "zeppelin.spark.printREPLOutput": "true",
-        "spark.cores.max": "",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "zeppelin.spark.sql.stacktrace": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.useHiveContext": "true",
-        "zeppelin.pyspark.python": "python",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.spark.maxResult": "1000",
-        "master": "local[*]",
-        "spark.app.name": "Zeppelin",
-        "spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL"
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "description": "Print REPL output",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.sql.stacktrace": {
+            "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+            "propertyName": "zeppelin.spark.sql.stacktrace",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit":{
+            "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "description": "Use HiveContext instead of SQLContext if it is true.",
+            "type": "checkbox"
+          },
+        "zeppelin.pyspark.python": {
+            "envName": "ZEPPELIN_PYSPARK_PYTHON",
+            "propertyName": "zeppelin.pyspark.python",
+            "value": "python",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.dep.localrepo": {
+            "envName": "ZEPPELIN_DEP_LOCALREPO",
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.maxResult": {
+            "envName": "ZEPPELIN_SPARK_MAXRESULT",
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "description": "Max number of Spark SQL result to display.",
+            "type": "number"
+          },
+        "master":{
+            "envName": "Master",
+            "propertyName": "spark.master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "spark.app.name": {
+            "envName": "SPARK_APP_NAME",
+            "propertyName": "spark.app.name",
+            "value": "Zeppelin",
+            "description": "The name of spark application.",
+            "type": "string"
+          },
+        "spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
@@ -44,21 +119,96 @@
       "name": "local_interpreter_python3",
       "group": "spark",
       "properties": {
-        "spark.executor.memory": "",
-        "args": "",
-        "zeppelin.spark.printREPLOutput": "true",
-        "spark.cores.max": "",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "zeppelin.spark.sql.stacktrace": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.useHiveContext": "true",
-        "zeppelin.pyspark.python": "python3.5",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.spark.maxResult": "1000",
-        "master": "local[*]",
-        "spark.app.name": "Zeppelin",
-        "spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL"
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "description": "Print REPL output",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.sql.stacktrace": {
+            "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+            "propertyName": "zeppelin.spark.sql.stacktrace",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit":{
+            "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "description": "Use HiveContext instead of SQLContext if it is true.",
+            "type": "checkbox"
+          },
+        "zeppelin.pyspark.python": {
+            "envName": "ZEPPELIN_PYSPARK_PYTHON",
+            "propertyName": "zeppelin.pyspark.python",
+            "value": "python3.5",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.dep.localrepo": {
+            "envName": "ZEPPELIN_DEP_LOCALREPO",
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.maxResult": {
+            "envName": "ZEPPELIN_SPARK_MAXRESULT",
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "description": "Max number of Spark SQL result to display.",
+            "type": "number"
+          },
+        "master":{
+            "envName": "Master",
+            "propertyName": "spark.master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "spark.app.name": {
+            "envName": "SPARK_APP_NAME",
+            "propertyName": "spark.app.name",
+            "value": "Zeppelin",
+            "description": "The name of spark application.",
+            "type": "string"
+          },
+        "spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/config.xml
index 904a283..6430bd4 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -58,6 +61,11 @@
                     <description></description>
                     <defaultValue></defaultValue>
                 </hudson.model.StringParameterDefinition>
+                <hudson.model.StringParameterDefinition>
+                    <name>Spark_configurations</name>
+                    <description></description>
+                    <defaultValue>[]</defaultValue>
+                </hudson.model.StringParameterDefinition>
                 <hudson.model.ChoiceParameterDefinition>
                   <name>notebook_app</name>
                   <description>notebook application to be deployed</description>
@@ -84,9 +92,9 @@
     <builders>
         <hudson.tasks.Shell>
             <command>rand=`openssl rand -hex 10`;
-                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_prepare.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/ADMS/&apos;${Master_Node_Shape}&apos;/g&apos; | sed &apos;s/ADSS/&apos;${Slave_Node_Shape}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/NIN/&apos;${Notebook_image_name}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action create;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_prepare.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/ADMS/&apos;${Master_Node_Shape}&apos;/g&apos; | sed &apos;s/ADSS/&apos;${Slave_Node_Shape}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/NIN/&apos;${Notebook_image_name}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action create;
                 rand=`openssl rand -hex 10`;
-                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_configure.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-${notebook_app} --action configure;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_configure.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-${notebook_app} --action configure;
             </command>
         </hudson.tasks.Shell>
     </builders>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_configure.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_configure.json
index a8dea0e..3b787f5 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_configure.json
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_configure.json
@@ -5,5 +5,6 @@
     "dataengine_instance_count":"EIC",
     "notebook_instance_name":"NNM",
     "computational_name": "CNAM",
-    "application": "APP"
+    "application": "APP",
+    "spark_configurations": SPC
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_prepare.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_prepare.json
index ee6dca5..bf94c90 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_prepare.json
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_data_engine/template_prepare.json
@@ -8,5 +8,6 @@
     "notebook_instance_name": "NNM",
     "computational_name": "CNAM",
     "notebook_image_name": "NIN",
-    "application": "APP"
+    "application": "APP",
+    "spark_configurations": SPC
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/config.xml
index 6d66dcb..4d99338 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -24,9 +27,34 @@
     <hudson.model.ParametersDefinitionProperty>
       <parameterDefinitions>
         <hudson.model.StringParameterDefinition>
+          <name>User_name</name>
+          <description></description>
+          <defaultValue></defaultValue>
+          <trim>false</trim>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>Notebook_name</name>
+          <description>Name of the Notebook server</description>
+          <defaultValue></defaultValue>
+          <trim>false</trim>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>exploratory_name</name>
+          <description>Short name of notebook instance</description>
+          <defaultValue></defaultValue>
+          <trim>false</trim>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>computational_name</name>
+          <description>Short name of cluster instance</description>
+          <defaultValue></defaultValue>
+          <trim>false</trim>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
           <name>Nodes_Count</name>
           <description>Number of nodes the new cluster will consist of</description>
           <defaultValue></defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>slave_spot_instance</name>
@@ -42,6 +70,7 @@
           <name>slave_instance_spot_pct_price</name>
           <description>The percentage of EC2 instance price which will be used for Spot price. If spot instances is disabled, the value of this parameter can be anything.</description>
           <defaultValue>70</defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>Master_node_size</name>
@@ -93,11 +122,13 @@
           <name>Service_role</name>
           <description></description>
           <defaultValue>EMR_DefaultRole</defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
         <hudson.model.StringParameterDefinition>
           <name>EMR_EC2_role</name>
           <description></description>
           <defaultValue>EMR_EC2_DefaultRole</defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>Release_label</name>
@@ -105,23 +136,15 @@
           <choices class="java.util.Arrays$ArrayList">
             <a class="string-array">
               <string>emr-5.6.0</string>
+              <string>emr-5.12.0</string>
             </a>
           </choices>
         </hudson.model.ChoiceParameterDefinition>
         <hudson.model.StringParameterDefinition>
-          <name>Notebook_name</name>
-          <description>Name of the Notebook server</description>
-          <defaultValue></defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
-          <name>User_name</name>
-          <description></description>
-          <defaultValue></defaultValue>
-        </hudson.model.StringParameterDefinition>
-        <hudson.model.StringParameterDefinition>
           <name>Timeout</name>
           <description>Timeout for EMR during build. Not mandatory</description>
           <defaultValue>1500</defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>notebook_app</name>
@@ -135,6 +158,18 @@
             </a>
           </choices>
         </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>aws_notebook_vpc_id</name>
+          <description>Notebook VPC ID (secondary or the same VPC ID for deploy)</description>
+          <defaultValue></defaultValue>
+          <trim>false</trim>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>configutations</name>
+          <description>Custom configurations for EMR cluster</description>
+          <defaultValue>[]</defaultValue>
+          <trim>false</trim>
+        </hudson.model.StringParameterDefinition>
       </parameterDefinitions>
     </hudson.model.ParametersDefinitionProperty>
   </properties>
@@ -148,9 +183,28 @@
   <builders>
     <hudson.tasks.Shell>
       <command>rand=`openssl rand -hex 10`;
-sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_dataengine-service/template_prepare.json  | sed &apos;s/SPI/&apos;${slave_spot_instance}&apos;/g&apos; | sed &apos;s/SISPP/&apos;${slave_instance_spot_pct_price}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/ESR/&apos;${Service_role}&apos;/g&apos; | sed &apos;s/EE2R/&apos;${EMR_EC2_role}&apos;/g&apos; | sed &apos;s/EVER/&apos;${Release_label}&apos;/g&apos; | sed &apos;s/EMIT/&apos;${Master_node_size}&apos;/g&apos; | sed &apos;s/ESMT/&apos;${Slave_node_size}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/ETIM/&apos;${Timeout}&apos;/g&apos;  | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sudo docker run -i -e &quot;conf_tag_resource_id=CTUN&quot; -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine-service:/logs/dataengine-service  docker.dlab-dataengine-service --action create;
+sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_dataengine-service/template_prepare.json | \
+sed &apos;s/SPI/&apos;${slave_spot_instance}&apos;/g&apos; | \
+sed &apos;s/SISPP/&apos;${slave_instance_spot_pct_price}&apos;/g&apos; | \
+sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/ESR/&apos;${Service_role}&apos;/g&apos; | \
+sed &apos;s/EE2R/&apos;${EMR_EC2_role}&apos;/g&apos; | sed &apos;s/EVER/&apos;${Release_label}&apos;/g&apos; | \
+sed &apos;s/EMIT/&apos;${Master_node_size}&apos;/g&apos; | sed &apos;s/ESMT/&apos;${Slave_node_size}&apos;/g&apos; | \
+sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/ETIM/&apos;${Timeout}&apos;/g&apos; | \
+sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/NVPCID/&apos;${aws_notebook_vpc_id}&apos;/g&apos; | \
+sed &apos;s/EXN/&apos;${exploratory_name}&apos;/g&apos; | sed &apos;s/CON/&apos;${computational_name}&apos;/g&apos; | \
+sudo docker run -i -e &quot;conf_tag_resource_id=user:tag&quot; -e &quot;configurations=$configurations&quot; \
+-v /home/dlab-user/keys:/root/keys -v /opt/dlab/tmp/result:/response \
+-v /var/opt/dlab/log/dataengine-service:/logs/dataengine-service \
+docker.dlab-dataengine-service --action create;
+
 rand=`openssl rand -hex 10`;
-sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_dataengine-service/template_configure.json  | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EVER/&apos;${Release_label}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sudo docker run -i -e &quot;conf_tag_resource_id=CTUN&quot; -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine-service:/logs/dataengine-service  docker.dlab-${notebook_app} --action configure;
+sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_dataengine-service/template_configure.json | \
+sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EVER/&apos;${Release_label}&apos;/g&apos; | \
+sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | \
+sudo docker run -i -e &quot;conf_tag_resource_id=user:tag&quot; \
+-v /home/dlab-user/keys:/root/keys -v /opt/dlab/tmp/result:/response \
+-v /var/opt/dlab/log/dataengine-service:/logs/dataengine-service \
+docker.dlab-${notebook_app} --action configure;
         </command>
     </hudson.tasks.Shell>
   </builders>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_configure.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_configure.json
index 889e736..0048ec6 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_configure.json
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_configure.json
@@ -2,6 +2,8 @@
     "request_id":"RID",
     "conf_resource": "dataengine-service",
     "edge_user_name":"EUN",
+    "exploratory_name": "EXN",
+    "computational_name": "CON",
     "emr_version":"EVER",
     "notebook_instance_name":"NNM",
     "application":"APP"
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_prepare.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_prepare.json
index 8df8b29..c8f63be 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_prepare.json
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_dataengine-service/template_prepare.json
@@ -2,6 +2,9 @@
     "request_id":"RID",
     "conf_resource": "dataengine-service",
     "edge_user_name":"EUN",
+    "exploratory_name": "EXN",
+    "computational_name": "CON",
+    "aws_notebook_vpc_id": "NVPCID",
     "emr_service_role":"ESR",
     "emr_ec2_role":"EE2R",
     "emr_version":"EVER",
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_edge_node/config.xml
index 980109f..8dcab89 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_image/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_image/config.xml
index a5b39e7..7633fd5 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_image/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_image/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/config.xml
index 097eee4..6e29a79 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -88,6 +91,11 @@
           </description>
           <defaultValue>[{"username": "", "email": "", "hostname": "", "login": "", "password": ""}]</defaultValue>
         </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>Action</name>
           <description></description>
@@ -110,7 +118,7 @@
   <builders>
     <hudson.tasks.Shell>
       <command>rand=`openssl rand -hex 10`; creds=$git_creds;
-sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/IMAGE/&apos;${Image_name}&apos;/g&apos; | sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook  docker.dlab-${notebook_app} --action $Action</command>
+sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/IMAGE/&apos;${Image_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook  docker.dlab-${notebook_app} --action $Action</command>
     </hudson.tasks.Shell>
   </builders>
   <publishers/>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/template.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/template.json
index be430f8..1e90388 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/template.json
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/create_notebook_server/template.json
@@ -5,5 +5,6 @@
     "edge_user_name":"NUN",
     "application":"APP",
     "notebook_image_name":"IMAGE",
-    "git_creds": GIT
+    "git_creds": GIT,
+    "spark_configurations": SPC
 }
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_install_additional_libs/config.xml
index 46e8017..d467eb0 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_list_available_libs/config.xml
index a93bea3..e11ef7e 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine-service_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_install_additional_libs/config.xml
index 2a7223d..1f21650 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_list_available_libs/config.xml
index 8c31535..0fff3c6 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_reconfigure_spark/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_reconfigure_spark/config.xml
new file mode 100644
index 0000000..cbc592e
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_reconfigure_spark/config.xml
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<project>
+  <actions/>
+  <description>Reconfigures Spark on DataEngine.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>Cluster_name</name>
+          <description>Name of dataengine cluster</description>
+          <defaultValue>CNAM</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Notebook_name</name>
+            <description>Name of the Notebook server</description>
+            <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>User_name</name>
+          <description>name of the data scientist user</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>application</name>
+          <description>application to be deployed</description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>dataengine</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>Action</name>
+          <description></description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>reconfigure_spark</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>rand=`openssl rand -hex 10`;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/dataengine_reconfigure_spark/template.json | sed &apos;s/APP/&apos;${application}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action $Action;
+            </command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_reconfigure_spark/template.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_reconfigure_spark/template.json
new file mode 100644
index 0000000..52b2651
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/dataengine_reconfigure_spark/template.json
@@ -0,0 +1,9 @@
+{
+    "conf_resource": "dataengine",
+    "request_id": "RID",
+    "edge_user_name": "EUN",
+    "computational_id": "CNAM",
+    "application": "APP",
+    "notebook_instance_name":"NNM",
+    "spark_configurations": SPC
+}
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/gitlab_server/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/gitlab_server/config.xml
index e7f4e2b..88b9e75 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/gitlab_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/gitlab_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/manage_git_credentials/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/manage_git_credentials/config.xml
index f70304e..ed7e0b3 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/manage_git_credentials/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/manage_git_credentials/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_install_additional_libs/config.xml
index 311690a..0fb3bc3 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_list_available_libs/config.xml
index c0694f1..9a5da7d 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_reconfigure_spark/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_reconfigure_spark/config.xml
new file mode 100644
index 0000000..efe4f35
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_reconfigure_spark/config.xml
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<project>
+  <actions/>
+  <description>Reconfigures Spark on notebook server.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>Notebook_Name</name>
+          <description>name of the notebook to start</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>Username</name>
+          <description>name of the data scientist user</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>notebook_app</name>
+          <description>notebook application to be deployed</description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>jupyter</string>
+              <string>rstudio</string>
+              <string>zeppelin</string>
+              <string>tensor</string>
+              <string>deeplearning</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>Action</name>
+          <description></description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>reconfigure_spark</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>rand=`openssl rand -hex 10`; sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/notebook_reconfigure_spark/template.json | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/NIN/&apos;${Notebook_Name}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sudo docker run -i -v /home/dlab-user/keys:/root/keys -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook docker.dlab-${notebook_app} --action $Action
+      </command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_reconfigure_spark/template.json b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_reconfigure_spark/template.json
new file mode 100644
index 0000000..8bf5bef
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/notebook_reconfigure_spark/template.json
@@ -0,0 +1,9 @@
+{
+    "conf_resource": "notebook",
+    "request_id": "RID",
+    "edge_user_name": "NUN",
+    "notebook_instance_name": "NIN",
+    "additional_libs": "ADL",
+    "application": "APP",
+    "spark_configurations": SPC
+}
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/recreate_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/recreate_edge_node/config.xml
index 83479ec..2fd4aa4 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/recreate_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/recreate_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/reupload_ssh_key/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/reupload_ssh_key/config.xml
index 3608edf..a63b0e0 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/reupload_ssh_key/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/reupload_ssh_key/config.xml
@@ -1,4 +1,24 @@
 <?xml version='1.1' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
 <project>
   <actions/>
   <description>Reupload user key</description>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_data_engine/config.xml
index 5fabe39..8a91540 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_edge_node/config.xml
index c9fa53e..db86eba 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_notebook_server/config.xml
index df880ed..4c33872 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/start_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_data_engine/config.xml
index 4fc4389..98f1af9 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_edge_node/config.xml
index 4ee35b7..12f84ff 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_notebook_server/config.xml
index 8223412..c1103b5 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/stop_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_data_engine/config.xml
index bfcb840..17c152b 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_dataengine-service/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_dataengine-service/config.xml
index 46dc0bb..550ec41 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_dataengine-service/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_dataengine-service/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_edge_node/config.xml
index c21f613..94c1a9c 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_image/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_image/config.xml
index cc18dfc..d8e5a0a 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_image/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_image/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_server/config.xml
index bcc911f..a594df0 100644
--- a/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/aws/jenkins_jobs/terminate_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/core-site-datalake.xml b/infrastructure-provisioning/src/general/templates/azure/core-site-datalake.xml
index 49df061..cb69c6e 100644
--- a/infrastructure-provisioning/src/general/templates/azure/core-site-datalake.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/core-site-datalake.xml
@@ -2,19 +2,22 @@
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <configuration>
diff --git a/infrastructure-provisioning/src/general/templates/azure/core-site-storage.xml b/infrastructure-provisioning/src/general/templates/azure/core-site-storage.xml
index 89623b8..8254d71 100644
--- a/infrastructure-provisioning/src/general/templates/azure/core-site-storage.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/core-site-storage.xml
@@ -2,19 +2,22 @@
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <configuration>
diff --git a/infrastructure-provisioning/src/general/templates/azure/interpreter_livy.json b/infrastructure-provisioning/src/general/templates/azure/interpreter_livy.json
index 031e9d1..4fa46d6 100644
--- a/infrastructure-provisioning/src/general/templates/azure/interpreter_livy.json
+++ b/infrastructure-provisioning/src/general/templates/azure/interpreter_livy.json
@@ -5,22 +5,97 @@
       "name": "local_interpreter",
       "group": "livy",
       "properties": {
-        "zeppelin.livy.concurrentSQL": "false",
-        "livy.spark.master": "local[*]",
-        "livy.spark.home":"/opt/spark/",
-        "livy.spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL",
-        "zeppelin.interpreter.localRepo": "/opt/zeppelin/local-repo/2CAC665T6",
-        "zeppelin.livy.url": "http://localhost:LIVY_PORT",
-        "livy.spark.hadoop.fs.s3a.buffer.dir": "/tmp",
-        "zeppelin.spark.useHiveContext": "true",
-        "livy.spark.app.name": "Zeppelin",
-        "zeppelin.spark.printREPLOutput": "true",
-        "zeppelin.spark.maxResult": "1000",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "livy.spark.hadoop.fs.s3a.fast.upload": "true"
+        "zeppelin.livy.concurrentSQL": {
+            "propertyName": "zeppelin.livy.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "livy.spark.master":{
+            "envName": "Master",
+            "propertyName": "master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "livy.spark.home": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/spark/",
+            "type": "string"
+          },
+        "livy.spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "livy.spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.interpreter.localRepo": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/zeppelin/local-repo/2CAC665T6",
+            "type": "string"
+          },
+        "zeppelin.livy.url": {
+            "propertyName": "zeppelin.livy.url",
+            "value": "http://localhost:LIVY_PORT",
+            "type": "string"
+          },
+	    "livy.spark.hadoop.fs.s3a.buffer.dir": {
+            "propertyName": "livy.spark.hadoop.fs.s3a.buffer.dir",
+            "value": "/tmp",
+            "type": "string"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.app.name": {
+            "propertyName": "livy.spark.app.name",
+            "value": "Zeppelin",
+            "type": "string"
+          },
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.maxResult": {
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "type": "number"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit": {
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.localrepo": {
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "type": "string"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "type": "string"
+          },
+        "livy.spark.hadoop.fs.s3a.fast.upload": {
+            "propertyName": "livy.spark.hadoop.fs.s3a.fast.upload",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "livy.spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
diff --git a/infrastructure-provisioning/src/general/templates/azure/interpreter_spark.json b/infrastructure-provisioning/src/general/templates/azure/interpreter_spark.json
index 9fb328b..0d354cd 100644
--- a/infrastructure-provisioning/src/general/templates/azure/interpreter_spark.json
+++ b/infrastructure-provisioning/src/general/templates/azure/interpreter_spark.json
@@ -5,21 +5,96 @@
       "name": "local_interpreter_python2",
       "group": "spark",
       "properties": {
-        "spark.executor.memory": "",
-        "args": "",
-        "zeppelin.spark.printREPLOutput": "true",
-        "spark.cores.max": "",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "zeppelin.spark.sql.stacktrace": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.useHiveContext": "true",
-        "zeppelin.pyspark.python": "python",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.spark.maxResult": "1000",
-        "master": "local[*]",
-        "spark.app.name": "Zeppelin",
-        "spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL"
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "description": "Print REPL output",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.sql.stacktrace": {
+            "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+            "propertyName": "zeppelin.spark.sql.stacktrace",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit":{
+            "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "description": "Use HiveContext instead of SQLContext if it is true.",
+            "type": "checkbox"
+          },
+        "zeppelin.pyspark.python": {
+            "envName": "ZEPPELIN_PYSPARK_PYTHON",
+            "propertyName": "zeppelin.pyspark.python",
+            "value": "python",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.dep.localrepo": {
+            "envName": "ZEPPELIN_DEP_LOCALREPO",
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.maxResult": {
+            "envName": "ZEPPELIN_SPARK_MAXRESULT",
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "description": "Max number of Spark SQL result to display.",
+            "type": "number"
+          },
+        "master":{
+            "envName": "Master",
+            "propertyName": "spark.master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "spark.app.name": {
+            "envName": "SPARK_APP_NAME",
+            "propertyName": "spark.app.name",
+            "value": "Zeppelin",
+            "description": "The name of spark application.",
+            "type": "string"
+          },
+        "spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
@@ -44,21 +119,96 @@
       "name": "local_interpreter_python3",
       "group": "spark",
       "properties": {
-        "spark.executor.memory": "",
-        "args": "",
-        "zeppelin.spark.printREPLOutput": "true",
-        "spark.cores.max": "",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "zeppelin.spark.sql.stacktrace": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.useHiveContext": "true",
-        "zeppelin.pyspark.python": "python3.5",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.spark.maxResult": "1000",
-        "master": "local[*]",
-        "spark.app.name": "Zeppelin",
-        "spark.hadoop.fs.s3a.endpoint": "ENDPOINTURL"
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "description": "Print REPL output",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.sql.stacktrace": {
+            "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+            "propertyName": "zeppelin.spark.sql.stacktrace",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit":{
+            "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "description": "Use HiveContext instead of SQLContext if it is true.",
+            "type": "checkbox"
+          },
+        "zeppelin.pyspark.python": {
+            "envName": "ZEPPELIN_PYSPARK_PYTHON",
+            "propertyName": "zeppelin.pyspark.python",
+            "value": "python3.5",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.dep.localrepo": {
+            "envName": "ZEPPELIN_DEP_LOCALREPO",
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.maxResult": {
+            "envName": "ZEPPELIN_SPARK_MAXRESULT",
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "description": "Max number of Spark SQL result to display.",
+            "type": "number"
+          },
+        "master":{
+            "envName": "Master",
+            "propertyName": "spark.master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "spark.app.name": {
+            "envName": "SPARK_APP_NAME",
+            "propertyName": "spark.app.name",
+            "value": "Zeppelin",
+            "description": "The name of spark application.",
+            "type": "string"
+          },
+        "spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/config.xml
index c30f309..18ce8b2 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -68,6 +71,11 @@
                     <description></description>
                     <defaultValue></defaultValue>
                 </hudson.model.StringParameterDefinition>
+                <hudson.model.StringParameterDefinition>
+                    <name>Spark_configurations</name>
+                    <description></description>
+                    <defaultValue>[]</defaultValue>
+                </hudson.model.StringParameterDefinition>
                 <hudson.model.ChoiceParameterDefinition>
                     <name>notebook_app</name>
                     <description>notebook application to be deployed</description>
@@ -93,9 +101,9 @@
     <builders>
         <hudson.tasks.Shell>
             <command>rand=`openssl rand -hex 10`;
-                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_prepare.json | sed &apos;s/ACI/&apos;${Client_ID}&apos;/g&apos; | sed &apos;s/AURT/&apos;${User_Refresh_Token}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/ADMS/&apos;${Master_Node_Shape}&apos;/g&apos; | sed &apos;s/ADSS/&apos;${Slave_Node_Shape}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NIN/&apos;${Notebook_image_name}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action create;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_prepare.json | sed &apos;s/ACI/&apos;${Client_ID}&apos;/g&apos; | sed &apos;s/AURT/&apos;${User_Refresh_Token}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/ADMS/&apos;${Master_Node_Shape}&apos;/g&apos; | sed &apos;s/ADSS/&apos;${Slave_Node_Shape}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/NIN/&apos;${Notebook_image_name}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action create;
                 rand=`openssl rand -hex 10`;
-                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_configure.json | sed &apos;s/ACI/&apos;${Client_ID}&apos;/g&apos; | sed &apos;s/AURT/&apos;${User_Refresh_Token}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-${notebook_app} --action configure;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_configure.json | sed &apos;s/ACI/&apos;${Client_ID}&apos;/g&apos; | sed &apos;s/AURT/&apos;${User_Refresh_Token}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-${notebook_app} --action configure;
             </command>
         </hudson.tasks.Shell>
     </builders>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_configure.json b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_configure.json
index a8ad6d2..6ca5ed1 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_configure.json
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_configure.json
@@ -7,5 +7,6 @@
     "azure_user_refresh_token":"AURT",
     "notebook_instance_name":"NNM",
     "computational_name": "CNAM",
-    "application": "APP"
+    "application": "APP",
+    "spark_configurations": SPC
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_prepare.json b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_prepare.json
index 30fc1fc..b30a0c2 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_prepare.json
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_data_engine/template_prepare.json
@@ -10,5 +10,6 @@
     "notebook_instance_name": "NNM",
     "computational_name": "CNAM",
     "notebook_image_name": "NIN",
-    "application": "APP"
+    "application": "APP",
+    "spark_configurations": SPC
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_edge_node/config.xml
index 2b00264..4f89868 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_image/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_image/config.xml
index a5b39e7..7633fd5 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_image/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_image/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/config.xml
index 8659520..3c42f15 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -86,6 +89,11 @@
           </description>
           <defaultValue>[{"username": "", "email": "", "hostname": "", "login": "", "password": ""}]</defaultValue>
         </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>Action</name>
           <description></description>
@@ -108,7 +116,7 @@
   <builders>
     <hudson.tasks.Shell>
       <command>rand=`openssl rand -hex 10`; creds=$git_creds;
-sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/ACI/&apos;${Client_ID}&apos;/g&apos; | sed &apos;s/AURT/&apos;${User_Refresh_Token}&apos;/g&apos; | sed &apos;s/IMAGE/&apos;${Image_name}&apos;/g&apos; | sed &apos;s/VPC/&apos;${vpc_name}&apos;/g&apos; | sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook  docker.dlab-${notebook_app} --action $Action</command>
+sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/ACI/&apos;${Client_ID}&apos;/g&apos; | sed &apos;s/AURT/&apos;${User_Refresh_Token}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/IMAGE/&apos;${Image_name}&apos;/g&apos; | sed &apos;s/VPC/&apos;${vpc_name}&apos;/g&apos; | sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook  docker.dlab-${notebook_app} --action $Action</command>
     </hudson.tasks.Shell>
   </builders>
   <publishers/>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/template.json b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/template.json
index 5c9a93f..db99d63 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/template.json
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/create_notebook_server/template.json
@@ -8,5 +8,6 @@
     "application":"APP",
     "notebook_image_name":"IMAGE",
     "vpc_name":"VPC",
-    "git_creds": GIT
+    "git_creds": GIT,
+    "spark_configurations": SPC
 }
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_install_additional_libs/config.xml
index 2a7223d..1f21650 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_list_available_libs/config.xml
index 0bd6c14..4f25357 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_reconfigure_spark/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_reconfigure_spark/config.xml
new file mode 100644
index 0000000..5a51b79
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_reconfigure_spark/config.xml
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<project>
+  <actions/>
+  <description>Reconfigures Spark on DataEngine.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>Cluster_name</name>
+          <description>Name of dataengine cluster</description>
+          <defaultValue>CNAM</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Notebook_name</name>
+            <description>Name of the Notebook server</description>
+            <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>User_name</name>
+          <description>name of the data scientist user</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+                  <name>application</name>
+                  <description>application to be deployed</description>
+                  <choices class="java.util.Arrays$ArrayList">
+                    <a class="string-array">
+                      <string>dataengine</string>
+                    </a>
+                  </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>Action</name>
+          <description></description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>reconfigure_spark</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>rand=`openssl rand -hex 10`;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/dataengine_install_additional_libs/template.json | sed &apos;s/APP/&apos;${application}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action $Action;
+            </command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_reconfigure_spark/template.json b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_reconfigure_spark/template.json
new file mode 100644
index 0000000..14c892e
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/dataengine_reconfigure_spark/template.json
@@ -0,0 +1,10 @@
+{
+    "conf_resource": "dataengine",
+    "request_id": "RID",
+    "edge_user_name": "EUN",
+    "computational_id": "CNAM",
+    "azure_user_refresh_token":"AURT",
+    "application": "APP",
+    "notebook_instance_name":"NNM",
+    "spark_configurations": SPC
+}
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/manage_git_credentials/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/manage_git_credentials/config.xml
index 7058282..bebdc9e 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/manage_git_credentials/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/manage_git_credentials/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_install_additional_libs/config.xml
index 6a45cb4..1afc1e5 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_list_available_libs/config.xml
index c0694f1..9a5da7d 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_reconfigure_spark/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_reconfigure_spark/config.xml
new file mode 100644
index 0000000..2f9a65a
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_reconfigure_spark/config.xml
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<project>
+  <actions/>
+  <description>Reconfigure Spark on notebook server.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>Notebook_Name</name>
+          <description>name of the notebook to start</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>Username</name>
+          <description>name of the data scientist user</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>notebook_app</name>
+          <description>notebook application to be deployed</description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>jupyter</string>
+              <string>rstudio</string>
+              <string>zeppelin</string>
+              <string>tensor</string>
+              <string>deeplearning</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>Action</name>
+          <description></description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>reconfigure_spark</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>rand=`openssl rand -hex 10`; sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/notebook_reconfigure_spark/template.json | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/NIN/&apos;${Notebook_Name}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sudo docker run -i -v /home/dlab-user/keys:/root/keys -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook docker.dlab-${notebook_app} --action $Action
+      </command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_reconfigure_spark/template.json b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_reconfigure_spark/template.json
new file mode 100644
index 0000000..ec57949
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/notebook_reconfigure_spark/template.json
@@ -0,0 +1,10 @@
+{
+    "conf_resource": "notebook",
+    "request_id": "RID",
+    "edge_user_name": "NUN",
+    "notebook_instance_name": "NIN",
+    "azure_user_refresh_token":"AURT",
+    "additional_libs": "ADL",
+    "application": "APP",
+    "spark_configurations": SPC
+}
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/recreate_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/recreate_edge_node/config.xml
index f711455..6a97dc5 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/recreate_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/recreate_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_data_engine/config.xml
index 15d2f48..5544510 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_edge_node/config.xml
index 2162db9..07c72f9 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_notebook_server/config.xml
index e264b09..230ff9b 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/start_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_data_engine/config.xml
index 5e3e56a..9b45c81 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_edge_node/config.xml
index 6f4de18..37c74cd 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_notebook_server/config.xml
index ba9d523..02da1ab 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/stop_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_data_engine/config.xml
index bfcb840..17c152b 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_edge_node/config.xml
index 4d4213b..fb5970e 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_image/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_image/config.xml
index cc18dfc..d8e5a0a 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_image/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_image/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_server/config.xml
index c93d187..23f2c32 100644
--- a/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/azure/jenkins_jobs/terminate_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/core-site.xml b/infrastructure-provisioning/src/general/templates/gcp/core-site.xml
index 52c0757..89071ce 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/core-site.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/core-site.xml
@@ -1,16 +1,24 @@
 <?xml version="1.0" ?>
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 <!--
-Copyright (c) 2016, EPAM SYSTEMS INC
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-   http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
 -->
 <configuration>
   <property>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_livy.json b/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_livy.json
index 75eacfa..f2386b6 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_livy.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_livy.json
@@ -2,22 +2,94 @@
   "name": "CLUSTER_NAME",
   "group": "livy",
   "properties": {
-    "zeppelin.livy.concurrentSQL": "false",
-    "livy.spark.home":"SPARK_HOME",
-    "zeppelin.interpreter.localRepo": "/opt/zeppelin/local-repo/2CAC665T6",
-    "zeppelin.livy.url": "http://localhost:LIVY_PORT",
-    "zeppelin.spark.useHiveContext": "true",
-    "livy.spark.app.name": "Zeppelin",
-    "zeppelin.spark.printREPLOutput": "true",
-    "zeppelin.spark.maxResult": "1000",
-    "zeppelin.spark.concurrentSQL": "false",
-    "zeppelin.spark.importImplicit": "true",
-    "zeppelin.dep.localrepo": "local-repo",
-    "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-    "zeppelin.R.image.width": "100%",
-    "zeppelin.R.render.options": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
-    "zeppelin.R.cmd": "R",
-    "zeppelin.R.knitr": "true"
+        "zeppelin.livy.concurrentSQL": {
+            "propertyName": "zeppelin.livy.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+	    "livy.spark.home": {
+            "propertyName": "livy.spark.home",
+            "value": "SPARK_HOME",
+            "type": "string"
+          },
+        "zeppelin.interpreter.localRepo": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/zeppelin/local-repo/2CAC665T6",
+            "type": "string"
+          },
+        "zeppelin.livy.url": {
+            "propertyName": "zeppelin.livy.url",
+            "value": "http://localhost:LIVY_PORT",
+            "type": "string"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.app.name": {
+            "propertyName": "livy.spark.app.name",
+            "value": "Zeppelin",
+            "type": "string"
+          },
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.maxResult": {
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "type": "number"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit": {
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.localrepo": {
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "type": "string"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "type": "string"
+          },
+		"zeppelin.R.image.width": {
+			"envName": "ZEPPELIN_R_IMAGE_WIDTH",
+			"propertyName": "zeppelin.R.image.width",
+			"value": "100%",
+			"description": "",
+			"type": "string"
+		  },
+		"zeppelin.R.render.options": {
+			"envName": "ZEPPELIN_R_RENDER_OPTIONS",
+			"propertyName": "zeppelin.R.render.options",
+			"value": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
+			"description": "",
+			"type": "string"
+		  },
+		"zeppelin.R.cmd": {
+			"envName": "ZEPPELIN_R_CMD",
+			"propertyName": "zeppelin.R.cmd",
+			"value": "R",
+			"description": "",
+			"type": "string"
+          },
+		"zeppelin.R.knitr": {
+			"envName": "ZEPPELIN_R_KNITR",
+			"propertyName": "zeppelin.R.knitr",
+			"value": "true",
+			"description": "",
+			"type": "checkbox"
+		  }
   },
     "interpreterGroup": [
       {
diff --git a/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_spark.json b/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_spark.json
index e79b21b..6f4cf31 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_spark.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/dataengine-service_interpreter_spark.json
@@ -2,23 +2,125 @@
   "name": "CLUSTERNAME_pyPYTHONVER_SHORT",
   "group": "spark",
   "properties": {
-    "args": "",
-    "zeppelin.spark.useHiveContext": "true",
-    "spark.app.name": "Zeppelin",
-    "zeppelin.spark.printREPLOutput": "true",
-    "zeppelin.spark.maxResult": "1000",
-    "master": "yarn",
-    "zeppelin.spark.concurrentSQL": "false",
-    "zeppelin.spark.sql.stacktrace": "false",
-    "zeppelin.spark.importImplicit": "true",
-    "zeppelin.pyspark.python": "pythonPYTHONVERSION",
-    "zeppelin.dep.localrepo": "local-repo",
-    "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-    "spark.home": "SPARK_HOME",
-    "zeppelin.R.image.width": "100%",
-    "zeppelin.R.render.options": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
-    "zeppelin.R.cmd": "R",
-    "zeppelin.R.knitr": "true"
+    "zeppelin.spark.useHiveContext": {
+        "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+        "propertyName": "zeppelin.spark.useHiveContext",
+        "value": "true",
+        "description": "Use HiveContext instead of SQLContext if it is true.",
+        "type": "checkbox"
+      },
+    "spark.app.name": {
+        "envName": "SPARK_APP_NAME",
+        "propertyName": "spark.app.name",
+        "value": "Zeppelin",
+        "description": "The name of spark application.",
+        "type": "string"
+      },
+    "zeppelin.spark.printREPLOutput": {
+        "envName": null,
+        "propertyName": "zeppelin.spark.printREPLOutput",
+        "value": "true",
+        "description": "Print REPL output",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.maxResult": {
+        "envName": "ZEPPELIN_SPARK_MAXRESULT",
+        "propertyName": "zeppelin.spark.maxResult",
+        "value": "1000",
+        "description": "Max number of Spark SQL result to display.",
+        "type": "number"
+      },
+    "master":{
+        "envName": "Master",
+        "propertyName": "spark.master",
+        "value": "yarn",
+        "description": "Spark master uri. ex) spark://masterhost:7077",
+        "type": "string"
+      },
+    "spark.submit.deployMode":{
+        "envName": "spark submit deploy mode",
+        "propertyName": "spark.submit.deployMode",
+        "value": "client",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.spark.concurrentSQL": {
+        "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+        "propertyName": "zeppelin.spark.concurrentSQL",
+        "value": "false",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.sql.stacktrace": {
+        "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+        "propertyName": "zeppelin.spark.sql.stacktrace",
+        "value": "false",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.importImplicit":{
+        "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+        "propertyName": "zeppelin.spark.importImplicit",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.pyspark.python": {
+        "envName": "ZEPPELIN_PYSPARK_PYTHON",
+        "propertyName": "zeppelin.pyspark.python",
+        "value": "pythonPYTHONVERSION",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.dep.localrepo": {
+        "envName": "ZEPPELIN_DEP_LOCALREPO",
+        "propertyName": "zeppelin.dep.localrepo",
+        "value": "local-repo",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.dep.additionalRemoteRepository": {
+        "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+        "propertyName": "zeppelin.dep.additionalRemoteRepository",
+        "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+        "description": "",
+        "type": "string"
+      },
+    "spark.home": {
+        "envName": "Spark Home",
+        "propertyName": "spark.home",
+        "value": "SPARK_HOME",
+        "description": "",
+        "type": "string"
+      },
+	"zeppelin.R.image.width": {
+        "envName": "ZEPPELIN_R_IMAGE_WIDTH",
+        "propertyName": "zeppelin.R.image.width",
+        "value": "100%",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.R.render.options": {
+        "envName": "ZEPPELIN_R_RENDER_OPTIONS",
+        "propertyName": "zeppelin.R.render.options",
+        "value": "out.format \u003d \u0027html\u0027, comment \u003d NA, echo \u003d FALSE, results \u003d \u0027asis\u0027, message \u003d F, warning \u003d F",
+        "description": "",
+        "type": "string"
+      },
+	"zeppelin.R.cmd": {
+        "envName": "ZEPPELIN_R_CMD",
+        "propertyName": "zeppelin.R.cmd",
+        "value": "R",
+        "description": "",
+        "type": "string"
+      },
+	"zeppelin.R.knitr": {
+        "envName": "ZEPPELIN_R_KNITR",
+        "propertyName": "zeppelin.R.knitr",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      }
   },
   "dependencies": [],
   "option": {
diff --git a/infrastructure-provisioning/src/general/templates/gcp/interpreter_livy.json b/infrastructure-provisioning/src/general/templates/gcp/interpreter_livy.json
index 518f1df..d027e3d 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/interpreter_livy.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/interpreter_livy.json
@@ -5,19 +5,80 @@
       "name": "local_interpreter",
       "group": "livy",
       "properties": {
-        "zeppelin.livy.concurrentSQL": "false",
-        "livy.spark.master": "local[*]",
-        "livy.spark.home":"/opt/spark/",
-        "zeppelin.interpreter.localRepo": "/opt/zeppelin/local-repo/2CAC665T6",
-        "zeppelin.livy.url": "http://localhost:LIVY_PORT",
-        "zeppelin.spark.useHiveContext": "true",
-        "livy.spark.app.name": "Zeppelin",
-        "zeppelin.spark.printREPLOutput": "true",
-        "zeppelin.spark.maxResult": "1000",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;"
+        "zeppelin.livy.concurrentSQL": {
+            "propertyName": "zeppelin.livy.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "livy.spark.master":{
+            "envName": "Master",
+            "propertyName": "master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "livy.spark.home": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/spark/",
+            "type": "string"
+          },
+        "zeppelin.interpreter.localRepo": {
+            "propertyName": "livy.spark.home",
+            "value": "/opt/zeppelin/local-repo/2CAC665T6",
+            "type": "string"
+          },
+        "zeppelin.livy.url": {
+            "propertyName": "zeppelin.livy.url",
+            "value": "http://localhost:LIVY_PORT",
+            "type": "string"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "livy.spark.app.name": {
+            "propertyName": "livy.spark.app.name",
+            "value": "Zeppelin",
+            "type": "string"
+          },
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.maxResult": {
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "type": "number"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit": {
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.localrepo": {
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "type": "string"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "type": "string"
+          },
+        "livy.spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "livy.spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
diff --git a/infrastructure-provisioning/src/general/templates/gcp/interpreter_spark.json b/infrastructure-provisioning/src/general/templates/gcp/interpreter_spark.json
index b25752a..0d342c0 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/interpreter_spark.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/interpreter_spark.json
@@ -5,20 +5,89 @@
       "name": "local_interpreter_python2",
       "group": "spark",
       "properties": {
-        "spark.executor.memory": "",
-        "args": "",
-        "zeppelin.spark.printREPLOutput": "true",
-        "spark.cores.max": "",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "zeppelin.spark.sql.stacktrace": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.useHiveContext": "true",
-        "zeppelin.pyspark.python": "python",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.spark.maxResult": "1000",
-        "master": "local[*]",
-        "spark.app.name": "Zeppelin"
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "description": "Print REPL output",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.sql.stacktrace": {
+            "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+            "propertyName": "zeppelin.spark.sql.stacktrace",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit":{
+            "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "description": "Use HiveContext instead of SQLContext if it is true.",
+            "type": "checkbox"
+          },
+        "zeppelin.pyspark.python": {
+            "envName": "ZEPPELIN_PYSPARK_PYTHON",
+            "propertyName": "zeppelin.pyspark.python",
+            "value": "python",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.dep.localrepo": {
+            "envName": "ZEPPELIN_DEP_LOCALREPO",
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.maxResult": {
+            "envName": "ZEPPELIN_SPARK_MAXRESULT",
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "description": "Max number of Spark SQL result to display.",
+            "type": "number"
+          },
+        "master":{
+            "envName": "Master",
+            "propertyName": "spark.master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "spark.app.name": {
+            "envName": "SPARK_APP_NAME",
+            "propertyName": "spark.app.name",
+            "value": "Zeppelin",
+            "description": "The name of spark application.",
+            "type": "string"
+          },
+        "spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
@@ -43,20 +112,96 @@
       "name": "local_interpreter_python3",
       "group": "spark",
       "properties": {
-        "spark.executor.memory": "",
-        "args": "",
-        "zeppelin.spark.printREPLOutput": "true",
-        "spark.cores.max": "",
-        "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-        "zeppelin.spark.sql.stacktrace": "false",
-        "zeppelin.spark.importImplicit": "true",
-        "zeppelin.spark.concurrentSQL": "false",
-        "zeppelin.spark.useHiveContext": "true",
-        "zeppelin.pyspark.python": "python3.5",
-        "zeppelin.dep.localrepo": "local-repo",
-        "zeppelin.spark.maxResult": "1000",
-        "master": "local[*]",
-        "spark.app.name": "Zeppelin"
+        "zeppelin.spark.printREPLOutput": {
+            "propertyName": "zeppelin.spark.printREPLOutput",
+            "value": "true",
+            "description": "Print REPL output",
+            "type": "checkbox"
+          },
+        "zeppelin.dep.additionalRemoteRepository": {
+            "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+            "propertyName": "zeppelin.dep.additionalRemoteRepository",
+            "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.sql.stacktrace": {
+            "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+            "propertyName": "zeppelin.spark.sql.stacktrace",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.importImplicit":{
+            "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+            "propertyName": "zeppelin.spark.importImplicit",
+            "value": "true",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.concurrentSQL": {
+            "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+            "propertyName": "zeppelin.spark.concurrentSQL",
+            "value": "false",
+            "description": "",
+            "type": "checkbox"
+          },
+        "zeppelin.spark.useHiveContext": {
+            "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+            "propertyName": "zeppelin.spark.useHiveContext",
+            "value": "true",
+            "description": "Use HiveContext instead of SQLContext if it is true.",
+            "type": "checkbox"
+          },
+        "zeppelin.pyspark.python": {
+            "envName": "ZEPPELIN_PYSPARK_PYTHON",
+            "propertyName": "zeppelin.pyspark.python",
+            "value": "python3.5",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.dep.localrepo": {
+            "envName": "ZEPPELIN_DEP_LOCALREPO",
+            "propertyName": "zeppelin.dep.localrepo",
+            "value": "local-repo",
+            "description": "",
+            "type": "string"
+          },
+        "zeppelin.spark.maxResult": {
+            "envName": "ZEPPELIN_SPARK_MAXRESULT",
+            "propertyName": "zeppelin.spark.maxResult",
+            "value": "1000",
+            "description": "Max number of Spark SQL result to display.",
+            "type": "number"
+          },
+        "master":{
+            "envName": "Master",
+            "propertyName": "spark.master",
+            "value": "local[*]",
+            "description": "Spark master uri. ex) spark://masterhost:7077",
+            "type": "string"
+          },
+        "spark.app.name": {
+            "envName": "SPARK_APP_NAME",
+            "propertyName": "spark.app.name",
+            "value": "Zeppelin",
+            "description": "The name of spark application.",
+            "type": "string"
+          },
+        "spark.hadoop.fs.s3a.endpoint": {
+            "envName": "SPARK_HADOOP_FS_S3A_ENDPOINT",
+            "propertyName": "spark.hadoop.fs.s3a.endpoint",
+            "value": "ENDPOINTURL",
+            "description": "",
+            "type": "string"
+          },
+        "spark.driver.memory": {
+              "envName": "MEMORY_DRIVER",
+              "propertyName": "spark.driver.memory",
+              "value": "DRIVER_MEMORY",
+              "description": "",
+              "type": "string"
+          }
       },
       "interpreterGroup": [
         {
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/config.xml
index 0557fc6..1f28970 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -53,6 +56,11 @@
                     <description></description>
                     <defaultValue></defaultValue>
                 </hudson.model.StringParameterDefinition>
+                <hudson.model.StringParameterDefinition>
+                    <name>Spark_configurations</name>
+                    <description></description>
+                    <defaultValue>[]</defaultValue>
+                </hudson.model.StringParameterDefinition>
                 <hudson.model.ChoiceParameterDefinition>
                     <name>notebook_app</name>
                     <description>notebook application to be deployed</description>
@@ -78,9 +86,9 @@
     <builders>
         <hudson.tasks.Shell>
             <command>rand=`openssl rand -hex 10`;
-                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_prepare.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/GDMS/&apos;${Master_Node_Size}&apos;/g&apos; | sed &apos;s/GDSS/&apos;${Slave_Node_Size}&apos;/g&apos; |   sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action create;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_prepare.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/GDMS/&apos;${Master_Node_Size}&apos;/g&apos; | sed &apos;s/GDSS/&apos;${Slave_Node_Size}&apos;/g&apos; |   sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action create;
                 rand=`openssl rand -hex 10`;
-                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_configure.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-${notebook_app} --action configure;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_data_engine/template_configure.json | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sed &apos;s/EIC/&apos;${Nodes_Count}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sudo docker run -i -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-${notebook_app} --action configure;
             </command>
         </hudson.tasks.Shell>
     </builders>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_configure.json b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_configure.json
index a8dea0e..3b787f5 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_configure.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_configure.json
@@ -5,5 +5,6 @@
     "dataengine_instance_count":"EIC",
     "notebook_instance_name":"NNM",
     "computational_name": "CNAM",
-    "application": "APP"
+    "application": "APP",
+    "spark_configurations": SPC
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_prepare.json b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_prepare.json
index a1cc056..3a23b96 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_prepare.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_data_engine/template_prepare.json
@@ -7,5 +7,6 @@
     "gcp_dataengine_slave_size":"GDSS",
     "notebook_instance_name":"NNM",
     "computational_name": "CNAM",
-    "application": "APP"
+    "application": "APP",
+    "spark_configurations": SPC
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
index 6bd2796..7e66948 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_edge_node/config.xml
index c400521..8ad0577 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/config.xml
index aeca35c..c09b1f8 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
@@ -81,6 +84,11 @@
           </description>
           <defaultValue>[{"username": "", "email": "", "hostname": "", "login": "", "password": ""}]</defaultValue>
         </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
         <hudson.model.ChoiceParameterDefinition>
           <name>Action</name>
           <description></description>
@@ -103,7 +111,7 @@
   <builders>
     <hudson.tasks.Shell>
       <command>rand=`openssl rand -hex 10`; creds=$git_creds;
-sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/EXN/&apos;${exploratory_name}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; |  sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook  docker.dlab-${notebook_app} --action $Action</command>
+sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/create_notebook_server/template.json | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed &apos;s/EXN/&apos;${exploratory_name}&apos;/g&apos; | sed &apos;s/NIT/&apos;${instance_shape}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; |  sed &quot;s/GIT/${creds}/g&quot; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook  docker.dlab-${notebook_app} --action $Action</command>
     </hudson.tasks.Shell>
   </builders>
   <publishers/>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/template.json b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/template.json
index 39e2bc8..f160b6e 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/template.json
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_notebook_server/template.json
@@ -5,5 +5,6 @@
     "edge_user_name":"NUN",
     "exploratory_name": "EXN",
     "application":"APP",
-    "git_creds": GIT
+    "git_creds": GIT,
+    "spark_configurations": SPC
 }
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_install_additional_libs/config.xml
index df5fadf..3fe2b65 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_list_available_libs/config.xml
index c734944..2272981 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine-service_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_install_additional_libs/config.xml
index 2a7223d..1f21650 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_list_available_libs/config.xml
index 0bd6c14..4f25357 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_reconfigure_spark/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_reconfigure_spark/config.xml
new file mode 100644
index 0000000..5f08b2e
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_reconfigure_spark/config.xml
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<project>
+  <actions/>
+  <description>Reconfigures Spark on DataEngine.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>Cluster_name</name>
+          <description>Name of dataengine cluster</description>
+          <defaultValue>CNAM</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Notebook_name</name>
+            <description>Name of the Notebook server</description>
+            <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>User_name</name>
+          <description>name of the data scientist user</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+                  <name>application</name>
+                  <description>application to be deployed</description>
+                  <choices class="java.util.Arrays$ArrayList">
+                    <a class="string-array">
+                      <string>dataengine</string>
+                    </a>
+                  </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>Action</name>
+          <description></description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>reconfigure_spark</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>rand=`openssl rand -hex 10`;
+                sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/dataengine_install_additional_libs/template.json | sed &apos;s/APP/&apos;${application}&apos;/g&apos; | sed &apos;s/NNM/&apos;${Notebook_name}&apos;/g&apos; | sed &apos;s/CNAM/&apos;${Cluster_name}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sed &apos;s/EUN/&apos;${User_name}&apos;/g&apos; | sudo docker run -i -e "conf_tag_resource_id=CTUN" -v /home/dlab-user/keys:/root/keys  -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/dataengine:/logs/dataengine  docker.dlab-dataengine --action $Action;
+            </command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_reconfigure_spark/template.json b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_reconfigure_spark/template.json
new file mode 100644
index 0000000..52b2651
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/dataengine_reconfigure_spark/template.json
@@ -0,0 +1,9 @@
+{
+    "conf_resource": "dataengine",
+    "request_id": "RID",
+    "edge_user_name": "EUN",
+    "computational_id": "CNAM",
+    "application": "APP",
+    "notebook_instance_name":"NNM",
+    "spark_configurations": SPC
+}
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/gitlab_server/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/gitlab_server/config.xml
index e7f4e2b..88b9e75 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/gitlab_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/gitlab_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/manage_git_credentials/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/manage_git_credentials/config.xml
index f70304e..ed7e0b3 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/manage_git_credentials/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/manage_git_credentials/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_install_additional_libs/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_install_additional_libs/config.xml
index 311690a..0fb3bc3 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_install_additional_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_install_additional_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_list_available_libs/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_list_available_libs/config.xml
index c0694f1..9a5da7d 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_list_available_libs/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_list_available_libs/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_reconfigure_spark/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_reconfigure_spark/config.xml
new file mode 100644
index 0000000..42f3332
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_reconfigure_spark/config.xml
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+<project>
+  <actions/>
+  <description>Reconfigures Spark on notebook server.</description>
+  <keepDependencies>false</keepDependencies>
+  <properties>
+    <hudson.model.ParametersDefinitionProperty>
+      <parameterDefinitions>
+        <hudson.model.StringParameterDefinition>
+          <name>Notebook_Name</name>
+          <description>name of the notebook to start</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+          <name>Username</name>
+          <description>name of the data scientist user</description>
+          <defaultValue></defaultValue>
+        </hudson.model.StringParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>notebook_app</name>
+          <description>notebook application to be deployed</description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>jupyter</string>
+              <string>rstudio</string>
+              <string>zeppelin</string>
+              <string>tensor</string>
+              <string>deeplearning</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.ChoiceParameterDefinition>
+          <name>Action</name>
+          <description></description>
+          <choices class="java.util.Arrays$ArrayList">
+            <a class="string-array">
+              <string>reconfigure_spark</string>
+            </a>
+          </choices>
+        </hudson.model.ChoiceParameterDefinition>
+        <hudson.model.StringParameterDefinition>
+            <name>Spark_configurations</name>
+            <description></description>
+            <defaultValue>[]</defaultValue>
+        </hudson.model.StringParameterDefinition>
+      </parameterDefinitions>
+    </hudson.model.ParametersDefinitionProperty>
+  </properties>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>rand=`openssl rand -hex 10`; sed &apos;s/RID/&apos;${rand}&apos;/g&apos; /var/lib/jenkins/jobs/notebook_reconfigure_spark/template.json | sed &apos;s/NUN/&apos;${Username}&apos;/g&apos; | sed &apos;s/NIN/&apos;${Notebook_Name}&apos;/g&apos; | sed &apos;s/APP/&apos;${notebook_app}&apos;/g&apos; | sed "s|SPC|${Spark_configurations}|g" | sudo docker run -i -v /home/dlab-user/keys:/root/keys -v /opt/dlab/tmp/result:/response -v /var/opt/dlab/log/notebook:/logs/notebook docker.dlab-${notebook_app} --action $Action
+      </command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_reconfigure_spark/template.json b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_reconfigure_spark/template.json
new file mode 100644
index 0000000..8bf5bef
--- /dev/null
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/notebook_reconfigure_spark/template.json
@@ -0,0 +1,9 @@
+{
+    "conf_resource": "notebook",
+    "request_id": "RID",
+    "edge_user_name": "NUN",
+    "notebook_instance_name": "NIN",
+    "additional_libs": "ADL",
+    "application": "APP",
+    "spark_configurations": SPC
+}
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/recreate_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/recreate_edge_node/config.xml
index 405358d..40b3acf 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/recreate_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/recreate_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_data_engine/config.xml
index 15d2f48..5544510 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_edge_node/config.xml
index c9fa53e..db86eba 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_notebook_server/config.xml
index 7ef6b8a..157cbf6 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/start_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_data_engine/config.xml
index 5e3e56a..9b45c81 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_edge_node/config.xml
index 4ee35b7..12f84ff 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_notebook_server/config.xml
index a87c492..58a10a6 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/stop_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_data_engine/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_data_engine/config.xml
index bfcb840..17c152b 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_data_engine/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_data_engine/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_dataengine-service/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_dataengine-service/config.xml
index b319a57..56b81d7 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_dataengine-service/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_dataengine-service/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_edge_node/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_edge_node/config.xml
index c21f613..94c1a9c 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_edge_node/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_edge_node/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_notebook_server/config.xml b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_notebook_server/config.xml
index 5056d86..e2a04be 100644
--- a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_notebook_server/config.xml
+++ b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/terminate_notebook_server/config.xml
@@ -1,19 +1,22 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 -->
 <project>
diff --git a/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_livy.json b/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_livy.json
index 543298e..1eebe07 100644
--- a/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_livy.json
+++ b/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_livy.json
@@ -2,20 +2,83 @@
   "name": "CLUSTER_NAME",
   "group": "livy",
   "properties": {
-    "zeppelin.livy.concurrentSQL": "false",
-    "livy.spark.home":"SPARK_HOME",
-    "zeppelin.interpreter.localRepo": "/opt/zeppelin/local-repo/2CAC665T6",
-    "zeppelin.livy.url": "http://localhost:LIVY_PORT",
-    "livy.spark.hadoop.fs.s3a.buffer.dir": "/tmp",
-    "zeppelin.spark.useHiveContext": "true",
-    "livy.spark.app.name": "Zeppelin",
-    "zeppelin.spark.printREPLOutput": "true",
-    "zeppelin.spark.maxResult": "1000",
-    "zeppelin.spark.concurrentSQL": "false",
-    "zeppelin.spark.importImplicit": "true",
-    "zeppelin.dep.localrepo": "local-repo",
-    "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-    "livy.spark.hadoop.fs.s3a.fast.upload": "true"
+	"zeppelin.livy.concurrentSQL": {
+        "propertyName": "zeppelin.livy.concurrentSQL",
+        "value": "false",
+        "type": "checkbox"
+      },
+	"livy.spark.home": {
+        "propertyName": "livy.spark.home",
+        "value": "SPARK_HOME",
+        "type": "string"
+      },
+	"zeppelin.interpreter.localRepo": {
+        "propertyName": "livy.spark.home",
+        "value": "/opt/zeppelin/local-repo/2CAC665T6",
+        "type": "string"
+      },
+	"zeppelin.livy.url": {
+        "propertyName": "zeppelin.livy.url",
+        "value": "http://localhost:LIVY_PORT",
+        "type": "string"
+      },
+	"livy.spark.hadoop.fs.s3a.buffer.dir": {
+        "propertyName": "livy.spark.hadoop.fs.s3a.buffer.dir",
+        "value": "/tmp",
+        "type": "string"
+      },
+	"zeppelin.spark.useHiveContext": {
+        "propertyName": "zeppelin.spark.useHiveContext",
+        "value": "true",
+        "type": "checkbox"
+      },
+	"livy.spark.app.name": {
+        "propertyName": "livy.spark.app.name",
+        "value": "Zeppelin",
+        "type": "string"
+      },
+	"zeppelin.spark.printREPLOutput": {
+        "propertyName": "zeppelin.spark.printREPLOutput",
+        "value": "true",
+        "type": "checkbox"
+      },
+	"zeppelin.spark.maxResult": {
+        "propertyName": "zeppelin.spark.maxResult",
+        "value": "1000",
+        "type": "number"
+      },
+	"zeppelin.spark.concurrentSQL": {
+        "propertyName": "zeppelin.spark.concurrentSQL",
+        "value": "false",
+        "type": "checkbox"
+      },
+	"zeppelin.spark.importImplicit": {
+        "propertyName": "zeppelin.spark.importImplicit",
+        "value": "true",
+        "type": "checkbox"
+      },
+	"zeppelin.dep.localrepo": {
+        "propertyName": "zeppelin.dep.localrepo",
+        "value": "local-repo",
+        "type": "string"
+      },
+	"zeppelin.dep.additionalRemoteRepository": {
+        "propertyName": "zeppelin.dep.additionalRemoteRepository",
+        "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+        "type": "string"
+      },
+	"livy.spark.hadoop.fs.s3a.fast.upload": {
+        "propertyName": "livy.spark.hadoop.fs.s3a.fast.upload",
+        "value": "true",
+        "type": "checkbox"
+      },
+    "livy.spark.executor.memory": {
+        "envName": "MEMORY_PER_EXECUTOR",
+        "propertyName": "livy.spark.executor.memory",
+        "value": "EXECUTOR_MEMORY",
+        "description": "",
+        "type": "string"
+      }
   },
   "interpreterGroup": [
     {
diff --git a/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_spark.json b/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_spark.json
index c09b9f4..f3bcebb 100644
--- a/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_spark.json
+++ b/infrastructure-provisioning/src/general/templates/os/dataengine_interpreter_spark.json
@@ -2,20 +2,104 @@
   "name": "CLUSTERNAME_pyPYTHONVER_SHORT",
   "group": "spark",
   "properties": {
-    "args": "",
-    "zeppelin.spark.useHiveContext": "true",
-    "spark.app.name": "Zeppelin",
-    "zeppelin.spark.printREPLOutput": "true",
-    "zeppelin.spark.maxResult": "1000",
-    "master": "MASTER",
-    "zeppelin.spark.concurrentSQL": "false",
-    "zeppelin.spark.sql.stacktrace": "false",
-    "zeppelin.spark.importImplicit": "true",
-    "zeppelin.pyspark.python": "pythonPYTHONVERSION",
-    "zeppelin.dep.localrepo": "local-repo",
-    "zeppelin.dep.additionalRemoteRepository": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
-    "spark.home": "SPARK_HOME",
-    "spark.hadoop.fs.s3a.fast.upload": "true"
+    "zeppelin.spark.useHiveContext": {
+        "envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
+        "propertyName": "zeppelin.spark.useHiveContext",
+        "value": "true",
+        "description": "Use HiveContext instead of SQLContext if it is true.",
+        "type": "checkbox"
+      },
+    "spark.app.name": {
+        "envName": "SPARK_APP_NAME",
+        "propertyName": "spark.app.name",
+        "value": "Zeppelin",
+        "description": "The name of spark application.",
+        "type": "string"
+      },
+    "zeppelin.spark.printREPLOutput": {
+        "envName": null,
+        "propertyName": "zeppelin.spark.printREPLOutput",
+        "value": "true",
+        "description": "Print REPL output",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.maxResult": {
+        "envName": "ZEPPELIN_SPARK_MAXRESULT",
+        "propertyName": "zeppelin.spark.maxResult",
+        "value": "1000",
+        "description": "Max number of Spark SQL result to display.",
+        "type": "number"
+      },
+    "master":{
+        "envName": "Master",
+        "propertyName": "spark.master",
+        "value": "MASTER",
+        "description": "Spark master uri. ex) spark://masterhost:7077",
+        "type": "string"
+      },
+    "zeppelin.spark.concurrentSQL": {
+        "envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
+        "propertyName": "zeppelin.spark.concurrentSQL",
+        "value": "false",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.sql.stacktrace": {
+        "envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
+        "propertyName": "zeppelin.spark.sql.stacktrace",
+        "value": "false",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.spark.importImplicit":{
+        "envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
+        "propertyName": "zeppelin.spark.importImplicit",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      },
+    "zeppelin.pyspark.python": {
+        "envName": "ZEPPELIN_PYSPARK_PYTHON",
+        "propertyName": "zeppelin.pyspark.python",
+        "value": "pythonPYTHONVERSION",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.dep.localrepo": {
+        "envName": "ZEPPELIN_DEP_LOCALREPO",
+        "propertyName": "zeppelin.dep.localrepo",
+        "value": "local-repo",
+        "description": "",
+        "type": "string"
+      },
+    "zeppelin.dep.additionalRemoteRepository": {
+        "envName": "ZEPPELIN_DEP_ADDITIONALREMOTEREPOSITORY",
+        "propertyName": "zeppelin.dep.additionalRemoteRepository",
+        "value": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
+        "description": "",
+        "type": "string"
+      },
+    "spark.home": {
+        "envName": "Spark Home",
+        "propertyName": "spark.home",
+        "value": "SPARK_HOME",
+        "description": "",
+        "type": "string"
+      },
+    "spark.hadoop.fs.s3a.fast.upload": {
+        "envName": "SPARK_HADOOP_FS_S3A_FAST_UPLOAD",
+        "propertyName": "spark.hadoop.fs.s3a.fast.upload",
+        "value": "true",
+        "description": "",
+        "type": "checkbox"
+      },
+    "spark.executor.memory": {
+        "envName": "MEMORY_PER_EXECUTOR",
+        "propertyName": "spark.executor.memory",
+        "value": "EXECUTOR_MEMORY",
+        "description": "",
+        "type": "string"
+      }
   },
   "interpreterGroup": [
     {
diff --git a/infrastructure-provisioning/src/general/templates/os/debian/jupyter-notebook.service b/infrastructure-provisioning/src/general/templates/os/debian/jupyter-notebook.service
index 6d2e36b..bfdf3f4 100644
--- a/infrastructure-provisioning/src/general/templates/os/debian/jupyter-notebook.service
+++ b/infrastructure-provisioning/src/general/templates/os/debian/jupyter-notebook.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Jupyter notebook
 
diff --git a/infrastructure-provisioning/src/general/templates/os/debian/spark-master.service b/infrastructure-provisioning/src/general/templates/os/debian/spark-master.service
index c0d07a3..070560d 100644
--- a/infrastructure-provisioning/src/general/templates/os/debian/spark-master.service
+++ b/infrastructure-provisioning/src/general/templates/os/debian/spark-master.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Apache Spark Master and Slave Servers
 After=network.target
diff --git a/infrastructure-provisioning/src/general/templates/os/debian/spark-slave.service b/infrastructure-provisioning/src/general/templates/os/debian/spark-slave.service
index 3b9cd8b..d4f6662 100644
--- a/infrastructure-provisioning/src/general/templates/os/debian/spark-slave.service
+++ b/infrastructure-provisioning/src/general/templates/os/debian/spark-slave.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Apache Spark Slave Servers
 After=network.target
diff --git a/infrastructure-provisioning/src/general/templates/os/debian/ungit.service b/infrastructure-provisioning/src/general/templates/os/debian/ungit.service
index a2967a2..bb0f59c 100644
--- a/infrastructure-provisioning/src/general/templates/os/debian/ungit.service
+++ b/infrastructure-provisioning/src/general/templates/os/debian/ungit.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=ungit
 
diff --git a/infrastructure-provisioning/src/general/templates/os/notebook_spark-defaults_local.conf b/infrastructure-provisioning/src/general/templates/os/notebook_spark-defaults_local.conf
index 11ea73c..76639c4 100644
--- a/infrastructure-provisioning/src/general/templates/os/notebook_spark-defaults_local.conf
+++ b/infrastructure-provisioning/src/general/templates/os/notebook_spark-defaults_local.conf
@@ -1,2 +1,23 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 spark.driver.extraClassPath         /opt/jars/*
 spark.driver.extraLibraryPath       /opt/jars
diff --git a/infrastructure-provisioning/src/general/templates/os/pyspark_dataengine-service_template.json b/infrastructure-provisioning/src/general/templates/os/pyspark_dataengine-service_template.json
index 6c9d85b..8c2a767 100644
--- a/infrastructure-provisioning/src/general/templates/os/pyspark_dataengine-service_template.json
+++ b/infrastructure-provisioning/src/general/templates/os/pyspark_dataengine-service_template.json
@@ -15,6 +15,6 @@
   "SPARK_HOME": "SPARK_PATH",
   "PYTHONPATH": "PY4J:SPARK_PATHpython/:",
   "PYTHONSTARTUP": "SPARK_PATHpython/pyspark/shell.py",
-  "PYSPARK_SUBMIT_ARGS": "--master yarn pyspark-shell"
+  "PYSPARK_SUBMIT_ARGS": "--deploy-mode client --master yarn pyspark-shell"
  }
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/os/r_dataengine-service_template.json b/infrastructure-provisioning/src/general/templates/os/r_dataengine-service_template.json
index 3cc93d1..c9cd356 100644
--- a/infrastructure-provisioning/src/general/templates/os/r_dataengine-service_template.json
+++ b/infrastructure-provisioning/src/general/templates/os/r_dataengine-service_template.json
@@ -5,7 +5,7 @@
   "env": {
     "HADOOP_CONF_DIR" : "/opt/DATAENGINE-SERVICE_VERSION/CLUSTER_NAME/conf/",
     "YARN_CONF_DIR": "/opt/DATAENGINE-SERVICE_VERSION/CLUSTER_NAME/conf/",
-    "SPARKR_SUBMIT_ARGS" : "--master YARN_CLI_TYPE sparkr-shell",
+    "SPARKR_SUBMIT_ARGS" : "--deploy-mode client --master YARN_CLI_TYPE sparkr-shell",
     "SPARK_HOME": "SPARK_PATH"
   }
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/templates/os/redhat/jupyter-notebook.service b/infrastructure-provisioning/src/general/templates/os/redhat/jupyter-notebook.service
index e91517a..ee24290 100644
--- a/infrastructure-provisioning/src/general/templates/os/redhat/jupyter-notebook.service
+++ b/infrastructure-provisioning/src/general/templates/os/redhat/jupyter-notebook.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Jupyter notebook
 
diff --git a/infrastructure-provisioning/src/general/templates/os/redhat/spark-master.service b/infrastructure-provisioning/src/general/templates/os/redhat/spark-master.service
index c0d07a3..070560d 100644
--- a/infrastructure-provisioning/src/general/templates/os/redhat/spark-master.service
+++ b/infrastructure-provisioning/src/general/templates/os/redhat/spark-master.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Apache Spark Master and Slave Servers
 After=network.target
diff --git a/infrastructure-provisioning/src/general/templates/os/redhat/spark-slave.service b/infrastructure-provisioning/src/general/templates/os/redhat/spark-slave.service
index 3b9cd8b..d4f6662 100644
--- a/infrastructure-provisioning/src/general/templates/os/redhat/spark-slave.service
+++ b/infrastructure-provisioning/src/general/templates/os/redhat/spark-slave.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Apache Spark Slave Servers
 After=network.target
diff --git a/infrastructure-provisioning/src/general/templates/os/redhat/ungit.service b/infrastructure-provisioning/src/general/templates/os/redhat/ungit.service
index 35f29d6..a1d4bd4 100644
--- a/infrastructure-provisioning/src/general/templates/os/redhat/ungit.service
+++ b/infrastructure-provisioning/src/general/templates/os/redhat/ungit.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=ungit
 
diff --git a/infrastructure-provisioning/src/general/templates/os/run_template.sh b/infrastructure-provisioning/src/general/templates/os/run_template.sh
index f0020ca..dbd39c1 100644
--- a/infrastructure-provisioning/src/general/templates/os/run_template.sh
+++ b/infrastructure-provisioning/src/general/templates/os/run_template.sh
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/general/templates/os/tensorboard.service b/infrastructure-provisioning/src/general/templates/os/tensorboard.service
index e494ae2..a4a1d68 100644
--- a/infrastructure-provisioning/src/general/templates/os/tensorboard.service
+++ b/infrastructure-provisioning/src/general/templates/os/tensorboard.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Tensorflow Tensorboard
 
diff --git a/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_template.json b/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_template.json
index 8d18488..c68e1d6 100644
--- a/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_template.json
+++ b/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_template.json
@@ -2,7 +2,7 @@
   "language": "scala",
   "display_name": "Apache Toree - Scala (Scala-SCALA_VERSION, SPARK_VERSION) [CLUSTER_NAME]",
   "env": {
-    "__TOREE_SPARK_OPTS__": "--master=yarn --driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info",
+    "__TOREE_SPARK_OPTS__": "--deploy-mode client --master=yarn --driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info",
     "SPARK_HOME": "SPARK_PATH",
     "__TOREE_OPTS__": "",
     "DEFAULT_INTERPRETER": "Scala",
diff --git a/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_templatev2.json b/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_templatev2.json
index 9d65e1d..66012a4 100644
--- a/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_templatev2.json
+++ b/infrastructure-provisioning/src/general/templates/os/toree_dataengine-service_templatev2.json
@@ -2,7 +2,7 @@
   "language": "scala",
   "display_name": "Apache Toree - Scala (Scala-SCALA_VERSION, SPARK_VERSION) [CLUSTER_NAME]",
   "env": {
-    "__TOREE_SPARK_OPTS__": "--master=yarn --driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info",
+    "__TOREE_SPARK_OPTS__": "--deploy-mode client --master=yarn --driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info",
     "SPARK_HOME": "SPARK_PATH",
     "__TOREE_OPTS__": "",
     "DEFAULT_INTERPRETER": "Scala",
diff --git a/infrastructure-provisioning/src/jupyter/fabfile.py b/infrastructure-provisioning/src/jupyter/fabfile.py
index 66547fd..181b79b 100644
--- a/infrastructure-provisioning/src/jupyter/fabfile.py
+++ b/infrastructure-provisioning/src/jupyter/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -203,4 +206,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed to create image from notebook node.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for notebook
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('notebook_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Notebook node.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py b/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py
index 223c6d6..124a2ba 100644
--- a/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py
+++ b/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -105,7 +108,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir)
+    configure_local_spark(jars_dir, templates_dir)
 
     # INSTALL JUPYTER KERNELS
     print("Install pyspark local kernel for Jupyter")
diff --git a/infrastructure-provisioning/src/rstudio/fabfile.py b/infrastructure-provisioning/src/rstudio/fabfile.py
index b90ee96..508d0e1 100644
--- a/infrastructure-provisioning/src/rstudio/fabfile.py
+++ b/infrastructure-provisioning/src/rstudio/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -202,4 +205,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed to create image from notebook node.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for notebook
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('notebook_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Notebook node.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/rstudio/scripts/configure_rstudio_node.py b/infrastructure-provisioning/src/rstudio/scripts/configure_rstudio_node.py
index b6ab4dd..f831375 100644
--- a/infrastructure-provisioning/src/rstudio/scripts/configure_rstudio_node.py
+++ b/infrastructure-provisioning/src/rstudio/scripts/configure_rstudio_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -96,7 +99,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir)
+    configure_local_spark(jars_dir, templates_dir)
 
     # INSTALL UNGIT
     print("Install nodejs")
diff --git a/infrastructure-provisioning/src/ssn/fabfile.py b/infrastructure-provisioning/src/ssn/fabfile.py
index de08656..3f97925 100644
--- a/infrastructure-provisioning/src/ssn/fabfile.py
+++ b/infrastructure-provisioning/src/ssn/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/files/aws/mongo_roles.json b/infrastructure-provisioning/src/ssn/files/aws/mongo_roles.json
new file mode 100644
index 0000000..68b31b6
--- /dev/null
+++ b/infrastructure-provisioning/src/ssn/files/aws/mongo_roles.json
@@ -0,0 +1,276 @@
+[
+  {
+    "_id": "nbShapes_p2.xlarge_fetching",
+    "description": "Use p2.xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "p2.xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_t2.medium_fetching",
+    "description": "Use t2.medium instance shape for notebook",
+    "exploratory_shapes": [
+      "t2.medium"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_r3.xlarge_fetching",
+    "description": "Use r3.xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "r3.xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_r4.2xlarge_fetching",
+    "description": "Use r4.2xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "r4.2xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_r3.4xlarge_fetching",
+    "description": "Use r3.4xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "r3.4xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_r3.8xlarge_fetching",
+    "description": "Use r3.8xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "r3.8xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_c4.large_fetching",
+    "description": "Use c4.large instance shape for notebook",
+    "exploratory_shapes": [
+      "c4.large"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_c4.2xlarge_fetching",
+    "description": "Use c4.2xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "c4.2xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_c4.8xlarge_fetching",
+    "description": "Use c4.8xlarge instance shape for notebook",
+    "exploratory_shapes": [
+      "c4.8xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDeeplearning",
+    "description": "Create Notebook Deep Learning",
+    "exploratories": [
+      "docker.dlab-deeplearning"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateJupyter",
+    "description": "Create Notebook Jupyter",
+    "exploratories": [
+      "docker.dlab-jupyter"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateRstudio",
+    "description": "Create Notebook RStudio",
+    "exploratories": [
+      "docker.dlab-rstudio"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateTensor",
+    "description": "Create Notebook Jupyter with TensorFlow",
+    "exploratories": [
+      "docker.dlab-tensor"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateZeppelin",
+    "description": "Create Notebook Apache Zeppelin",
+    "exploratories": [
+      "docker.dlab-zeppelin"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateTensorRstudio",
+    "description": "Create Notebook RStudio with TensorFlow",
+    "exploratories": [
+      "docker.dlab-tensor-rstudio"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDataEngine",
+    "description": "Create Data Engine",
+    "computationals": [
+      "docker.dlab-dataengine"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDataEngineService",
+    "description": "Create Data Engine Service",
+    "computationals": [
+      "docker.dlab-dataengine-service"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_c4.xlarge_fetching",
+    "description": "Use c4.xlarge instance shape for cluster",
+    "computational_shapes": [
+      "c4.xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_r3.xlarge_fetching",
+    "description": "Use r3.xlarge instance shape for cluster",
+    "computational_shapes": [
+      "r3.xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_r4.2xlarge_fetching",
+    "description": "Use r4.2xlarge instance shape for cluster",
+    "computational_shapes": [
+      "r4.2xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_r3.4xlarge_fetching",
+    "description": "Use r3.4xlarge instance shape for cluster",
+    "computational_shapes": [
+      "r3.4xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_r3.8xlarge_fetching",
+    "description": "Use r3.8xlarge instance shape for cluster",
+    "computational_shapes": [
+      "r3.8xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_c4.2xlarge_fetching",
+    "description": "Use c4.2xlarge instance shape for cluster",
+    "computational_shapes": [
+      "c4.2xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_c4.8xlarge_fetching",
+    "description": "Use c4.8xlarge instance shape for cluster",
+    "computational_shapes": [
+      "c4.8xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_p2.xlarge_fetching",
+    "description": "Use p2.xlarge instance shape for cluster",
+    "computational_shapes": [
+      "p2.xlarge"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbBillingReportFull",
+    "description": "View full billing report for all users",
+    "pages": [
+      "/api/infrastructure_provision/billing"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "admin",
+    "description": "Allow to execute administration operation",
+    "pages": [
+      "environment/*",
+      "/api/infrastructure/backup",
+      "/roleManagement",
+      "/api/settings",
+      "/user/settings"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  }
+]
diff --git a/infrastructure-provisioning/src/ssn/files/azure/mongo_roles.json b/infrastructure-provisioning/src/ssn/files/azure/mongo_roles.json
new file mode 100644
index 0000000..fc11971
--- /dev/null
+++ b/infrastructure-provisioning/src/ssn/files/azure/mongo_roles.json
@@ -0,0 +1,236 @@
+[
+  {
+    "_id": "nbShapes_Standard_NC6_fetching",
+    "description": "Allow to use Standard_NC6 instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_NC6"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_E4s_v3_fetching",
+    "description": "Use Standard_E4s_v3 instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_E4s_v3"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_E16s_v3_fetching",
+    "description": "Use Standard_E16s_v3 instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_E16s_v3"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_E32s_v3_fetching",
+    "description": "Use Standard_E32s_v3 instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_E32s_v3"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_F2s_fetching",
+    "description": "Use Standard_F2s instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_F2s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_F4s_fetching",
+    "description": "Use Standard_F4s instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_F4s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_F8s_fetching",
+    "description": "Use Standard_F8s instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_F8s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_Standard_F16s_fetching",
+    "description": "Use Standard_F16s instance shape for notebook",
+    "exploratory_shapes": [
+      "Standard_F16s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDeeplearning",
+    "description": "Create Notebook Deep Learning",
+    "exploratories": [
+      "docker.dlab-deeplearning"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateJupyter",
+    "description": "Create Notebook Jupyter",
+    "exploratories": [
+      "docker.dlab-jupyter"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateRstudio",
+    "description": "Create Notebook RStudio",
+    "exploratories": [
+      "docker.dlab-rstudio"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateTensor",
+    "description": "Create Notebook Jupyter with TensorFlow",
+    "exploratories": [
+      "docker.dlab-tensor"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateZeppelin",
+    "description": "Create Notebook Apache Zeppelin",
+    "exploratories": [
+      "docker.dlab-zeppelin"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDataEngine",
+    "description": "Create Data Engine",
+    "computationals": [
+      "docker.dlab-dataengine"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_F4s_fetching",
+    "description": "Use Standard_F4s instance shape for cluster",
+    "computational_shapes": [
+      "Standard_F4s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_E4s_v3_fetching",
+    "description": "Use Standard_E4s_v3 instance shape for cluster",
+    "computational_shapes": [
+      "Standard_E4s_v3"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_E16s_v3_fetching",
+    "description": "Use Standard_E16s_v3 instance shape for cluster",
+    "computational_shapes": [
+      "Standard_E16s_v3"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_E32s_v3_fetching",
+    "description": "Use Standard_E32s_v3 instance shape for cluster",
+    "computational_shapes": [
+      "Standard_E32s_v3"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_F8s_fetching",
+    "description": "Use Standard_F8s instance shape for cluster",
+    "computational_shapes": [
+      "Standard_F8s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_F16s_fetching",
+    "description": "Use Standard_F16s instance shape for cluster",
+    "computational_shapes": [
+      "Standard_F16s"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_Standard_NC6_fetching",
+    "description": "Use Standard_NC6 instance shape for cluster",
+    "computational_shapes": [
+      "Standard_NC6"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbBillingReportFull",
+    "description": "View full billing report for all users",
+    "pages": [
+      "/api/infrastructure_provision/billing"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "admin",
+    "description": "Allow to execute administration operation",
+    "pages": [
+      "environment/*",
+      "/api/infrastructure/backup",
+      "/roleManagement",
+      "/api/settings",
+      "/user/settings"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  }
+]
diff --git a/infrastructure-provisioning/src/ssn/files/gcp/mongo_roles.json b/infrastructure-provisioning/src/ssn/files/gcp/mongo_roles.json
new file mode 100644
index 0000000..20f81d9
--- /dev/null
+++ b/infrastructure-provisioning/src/ssn/files/gcp/mongo_roles.json
@@ -0,0 +1,246 @@
+[
+  {
+    "_id": "nbShapes_n1-highcpu-2_fetching",
+    "description": "Use n1-highcpu-2 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-highcpu-2"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-highcpu-8_fetching",
+    "description": "Use n1-highcpu-8 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-highcpu-8"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-highcpu-32_fetching",
+    "description": "Use n1-highcpu-32 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-highcpu-32"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-highmem-4_fetching",
+    "description": "Use n1-highmem-4 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-highmem-4"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-highmem-16_fetching",
+    "description": "Use n1-highmem-16 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-highmem-16"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-highmem-32_fetching",
+    "description": "Use n1-highmem-32 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-highmem-32"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-standard-1_fetching",
+    "description": "Use n1-standard-1 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-standard-1"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbShapes_n1-standard-2_fetching",
+    "description": "Use n1-standard-2 instance shape for notebook",
+    "exploratory_shapes": [
+      "n1-standard-2"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDeeplearning",
+    "description": "Create Notebook Deep Learning",
+    "exploratories": [
+      "docker.dlab-deeplearning"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateJupyter",
+    "description": "Create Notebook Jupyter",
+    "exploratories": [
+      "docker.dlab-jupyter"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateRstudio",
+    "description": "Create Notebook RStudio",
+    "exploratories": [
+      "docker.dlab-rstudio"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateTensor",
+    "description": "Create Notebook Jupyter with TensorFlow",
+    "exploratories": [
+      "docker.dlab-tensor"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateZeppelin",
+    "description": "Create Notebook Apache Zeppelin",
+    "exploratories": [
+      "docker.dlab-zeppelin"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDataEngine",
+    "description": "Create Data Engine",
+    "computationals": [
+      "docker.dlab-dataengine"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "nbCreateDataEngineService",
+    "description": "Create Data Engine Service",
+    "computationals": [
+      "docker.dlab-dataengine-service"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-standard-1_fetching",
+    "description": "Use n1-standard-1 instance shape for cluster",
+    "computational_shapes": [
+      "n1-standard-1"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-standard-2_fetching",
+    "description": "Use n1-standard-2 instance shape for cluster",
+    "computational_shapes": [
+      "n1-standard-1"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-highmem-4_fetching",
+    "description": "Use n1-highmem-4 instance shape for cluster",
+    "computational_shapes": [
+      "n1-highmem-4"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-highmem-16_fetching",
+    "description": "Use n1-highmem-16 instance shape for cluster",
+    "computational_shapes": [
+      "n1-highmem-16"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-highmem-32_fetching",
+    "description": "Use n1-highmem-32 instance shape for cluster",
+    "computational_shapes": [
+      "n1-highmem-32"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-highcpu-8_fetching",
+    "description": "Use n1-highcpu-8 instance shape for cluster",
+    "computational_shapes": [
+      "n1-highcpu-8"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-highcpu-2_fetching",
+    "description": "Use n1-highcpu-2 instance shape for cluster",
+    "computational_shapes": [
+      "n1-highcpu-2"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "compShapes_n1-highcpu-32_fetching",
+    "description": "Use n1-highcpu-32 instance shape for cluster",
+    "computational_shapes": [
+      "n1-highcpu-32"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  },
+  {
+    "_id": "admin",
+    "description": "Allow to execute administration operation",
+    "pages": [
+      "environment/*",
+      "/api/infrastructure/backup",
+      "/roleManagement",
+      "/api/settings",
+      "/user/settings"
+    ],
+    "groups": [
+      "$anyuser"
+    ]
+  }
+]
diff --git a/infrastructure-provisioning/src/ssn/files/mongo_roles.json b/infrastructure-provisioning/src/ssn/files/mongo_roles.json
deleted file mode 100644
index 3bdaf4d..0000000
--- a/infrastructure-provisioning/src/ssn/files/mongo_roles.json
+++ /dev/null
@@ -1,357 +0,0 @@
-[
-  {
-    "_id": "_Example",
-    "description": "Example role",
-    "exploratories": [
-      "comma separated list of exploratories image names from description.json",
-      "explorartory image name"
-    ],
-    "computationals": [
-      "comma separated list of computationals image names from description.json",
-      "computational image name"
-    ],
-    "groups": [
-      "comma separated list of the external group's names in lower case",
-      "other group"
-    ],
-    "users": [
-      "comma separated list of the DLab's users in lower case",
-      "example@user"
-    ]
-  },
-  {
-    "_id": "nbShapes_p2.xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "p2.xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_t2.medium_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "t2.medium"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_r3.xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "r3.xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_r4.2xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "r4.2xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_r3.4xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "r3.4xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_r3.8xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "r3.8xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_c4.large_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "c4.large"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_c4.2xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "c4.2xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_c4.8xlarge_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "c4.8xlarge"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-standard-1_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-standard-1"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-standard-2_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-standard-2"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-highcpu-2_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-highcpu-2"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-highcpu-8_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-highcpu-8"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-highcpu-32_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-highcpu-32"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-highmem-4_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-highmem-4"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-highmem-16_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-highmem-16"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_n1-highmem-32_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "n1-highmem-32"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_NC6_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_NC6"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_E4s_v3_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_E4s_v3"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_E16s_v3_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_E16s_v3"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_E32s_v3_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_E32s_v3"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_F2s_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_F2s"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_F8s_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_F8s"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbShapes_Standard_F16s_fetching",
-    "description": "Fetch notebook shapes",
-    "exploratory_shapes": [
-      "Standard_F16s"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateDeeplearning",
-    "description": "Create Notebook Deep Learning",
-    "exploratories": [
-      "docker.dlab-deeplearning"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateJupyter",
-    "description": "Create Notebook Jupyter",
-    "exploratories": [
-      "docker.dlab-jupyter"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateRstudio",
-    "description": "Create Notebook RStudio",
-    "exploratories": [
-      "docker.dlab-rstudio"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateTensor",
-    "description": "Create Notebook Tensor Flow",
-    "exploratories": [
-      "docker.dlab-tensor"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateZeppelin",
-    "description": "Create Notebook Zeppelin",
-    "exploratories": [
-      "docker.dlab-zeppelin"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateDataEngine",
-    "description": "Create Data Engine",
-    "computationals": [
-      "docker.dlab-dataengine"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbCreateDataEngineService",
-    "description": "Create Data Engine Service",
-    "computationals": [
-      "docker.dlab-dataengine-service"
-    ],
-    "groups": [
-      "$anyuser"
-    ]
-  },
-  {
-    "_id": "nbBillingReportFull",
-    "description": "View full billing report for all users",
-    "pages": [
-      "/api/infrastructure_provision/billing"
-    ],
-    "groups": [
-      "$anyuser"
-    ],
-    "users": [
-    ]
-  },
-  {
-    "_id": "admin",
-    "description": "Allow to execute administration operation operation",
-    "pages": [
-      "environment/*",
-      "/api/infrastructure/backup"
-    ],
-    "groups": [
-      "$anyuser"
-    ],
-    "users": [
-    ]
-  }
-]
diff --git a/infrastructure-provisioning/src/ssn/scripts/backup.py b/infrastructure-provisioning/src/ssn/scripts/backup.py
index 48d7c69..9792349 100644
--- a/infrastructure-provisioning/src/ssn/scripts/backup.py
+++ b/infrastructure-provisioning/src/ssn/scripts/backup.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -31,7 +34,7 @@
 parser.add_argument('--dlab_path', type=str, default='/opt/dlab/', help='Path to DLab. Default: /opt/dlab/')
 parser.add_argument('--configs', type=str, default='skip', help='Comma separated names of config files, like "security.yml", etc. Default: skip. Also available: all')
 parser.add_argument('--keys', type=str, default='skip', help='Comma separated names of keys, like "user_name.pub". Default: skip. Also available: all')
-parser.add_argument('--certs', type=str, default='skip', help='Comma separated names of SSL certificates and keys, like "dlab-selfsigned.crt", etc. Default: skip. Also available: all')
+parser.add_argument('--certs', type=str, default='skip', help='Comma separated names of SSL certificates and keys, like "dlab.crt", etc. Default: skip. Also available: all')
 parser.add_argument('--jars', type=str, default='skip', help='Comma separated names of jar application, like "self-service" (without .jar), etc. Default: skip. Also available: all')
 parser.add_argument('--db', action='store_true', default=False, help='Mongo DB. Key without arguments. Default: disable')
 parser.add_argument('--logs', action='store_true', default=False, help='All logs (include docker). Key without arguments. Default: disable')
@@ -192,7 +195,7 @@
     conf_folder = 'conf/'
     keys_folder = '/home/{}/keys/'.format(os_user)
     certs_folder = '/etc/ssl/certs/'
-    all_certs = ['dhparam.pem', 'dlab-selfsigned.crt', 'dlab-selfsigned.key']
+    all_certs = ['dhparam.pem', 'dlab.crt', 'dlab.key']
     jars_folder = 'webapp/lib/'
     dlab_logs_folder = '/var/log/dlab/'
     docker_logs_folder = '/var/lib/docker/containers/'
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_billing.py b/infrastructure-provisioning/src/ssn/scripts/configure_billing.py
index d3e16ad..ef05e8a 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_billing.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_billing.py
@@ -1,135 +1,138 @@
-#!/usr/bin/python

-# *****************************************************************************

-#

-# Copyright (c) 2016, EPAM SYSTEMS INC

-#

-# Licensed under the Apache License, Version 2.0 (the "License");

-# you may not use this file except in compliance with the License.

-# You may obtain a copy of the License at

-#

-#    http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed under the License is distributed on an "AS IS" BASIS,

-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-# ******************************************************************************

-

-

-from fabric.api import *

-import yaml, json, sys

-import argparse

-import os

-

-parser = argparse.ArgumentParser()

-parser.add_argument('--cloud_provider', type=str,

-                    help='Where DLab should be deployed. Available options: aws, azure')

-parser.add_argument('--infrastructure_tag', type=str, help='unique name for DLab environment')

-parser.add_argument('--access_key_id', default='', type=str, help='AWS Access Key ID')

-parser.add_argument('--secret_access_key', default='', type=str, help='AWS Secret Access Key')

-parser.add_argument('--tag_resource_id', type=str, default='user:tag', help='The name of user tag')

-parser.add_argument('--account_id', type=str, help='The ID of ASW linked account')

-parser.add_argument('--billing_bucket', type=str, help='The name of bucket')

-parser.add_argument('--aws_job_enabled', type=str, default='false', help='Billing format. Available options: true (aws), false(epam)')

-parser.add_argument('--report_path', type=str, default='', help='The path to report folder')

-parser.add_argument('--client_id', type=str, default='', help='Azure client ID')

-parser.add_argument('--client_secret', type=str, default='', help='Azure client secret')

-parser.add_argument('--tenant_id', type=str, default='', help='Azure tenant ID')

-parser.add_argument('--subscription_id', type=str, default='', help='Azure subscription ID')

-parser.add_argument('--authentication_file', type=str, default='', help='Azure authentication file')

-parser.add_argument('--offer_number', type=str, default='', help='Azure offer number')

-parser.add_argument('--currency', type=str, default='', help='Azure currency for billing')

-parser.add_argument('--locale', type=str, default='', help='Azure locale')

-parser.add_argument('--region_info', type=str, default='', help='Azure region info')

-parser.add_argument('--mongo_password', type=str, help='The password for Mongo DB')

-parser.add_argument('--dlab_dir', type=str, help='The path to dlab dir')

-parser.add_argument('--dlab_id', type=str, default='', help='Column name in report file that contains dlab id tag')

-parser.add_argument('--usage_date', type=str, default='', help='Column name in report file that contains usage date tag')

-parser.add_argument('--product', type=str, default='', help='Column name in report file that contains product name tag')

-parser.add_argument('--usage_type', type=str, default='', help='Column name in report file that contains usage type tag')

-parser.add_argument('--usage', type=str, default='', help='Column name in report file that contains usage tag')

-parser.add_argument('--cost', type=str, default='', help='Column name in report file that contains cost tag')

-parser.add_argument('--resource_id', type=str, default='', help='Column name in report file that contains dlab resource id tag')

-parser.add_argument('--tags', type=str, default='', help='Column name in report file that contains tags')

-args = parser.parse_args()

-

-

-def yml_billing(path):

-    try:

-        with open(path, 'r') as config_yml_r:

-            config_orig = config_yml_r.read()

-

-        config_orig = config_orig.replace('billingEnabled: false', 'billingEnabled: true')

-        if args.cloud_provider == 'aws':

-            if args.aws_job_enabled == 'true':

-                args.tag_resource_id =  'resourceTags' + ':' + args.tag_resource_id

-            elif args.aws_job_enabled == 'false':

-                args.tag_resource_id = 'user' + ':' + args.tag_resource_id

-            config_orig = config_orig.replace('<BILLING_BUCKET_NAME>', args.billing_bucket)

-            config_orig = config_orig.replace('<AWS_JOB_ENABLED>', args.aws_job_enabled)

-            config_orig = config_orig.replace('<REPORT_PATH>', args.report_path)

-            config_orig = config_orig.replace('<ACCOUNT_ID>', args.account_id)

-            config_orig = config_orig.replace('<ACCESS_KEY_ID>', args.access_key_id)

-            config_orig = config_orig.replace('<SECRET_ACCESS_KEY>', args.secret_access_key)

-            config_orig = config_orig.replace('<CONF_TAG_RESOURCE_ID>', args.tag_resource_id)

-            config_orig = config_orig.replace('<CONF_SERVICE_BASE_NAME>', args.infrastructure_tag)

-            config_orig = config_orig.replace('<MONGODB_PASSWORD>', args.mongo_password)

-            config_orig = config_orig.replace('<DLAB_ID>', args.dlab_id)

-            config_orig = config_orig.replace('<USAGE_DATE>', args.usage_date)

-            config_orig = config_orig.replace('<PRODUCT>', args.product)

-            config_orig = config_orig.replace('<USAGE_TYPE>', args.usage_type)

-            config_orig = config_orig.replace('<USAGE>', args.usage)

-            config_orig = config_orig.replace('<COST>', args.cost)

-            config_orig = config_orig.replace('<RESOURCE_ID>', args.resource_id)

-            config_orig = config_orig.replace('<TAGS>', args.tags)

-        elif args.cloud_provider == 'azure':

-            config_orig = config_orig.replace('<CLIENT_ID>', args.client_id)

-            config_orig = config_orig.replace('<CLIENT_SECRET>', args.client_secret)

-            config_orig = config_orig.replace('<TENANT_ID>', args.tenant_id)

-            config_orig = config_orig.replace('<SUBSCRIPTION_ID>', args.subscription_id)

-            config_orig = config_orig.replace('<AUTHENTICATION_FILE>', args.authentication_file)

-            config_orig = config_orig.replace('<OFFER_NUMBER>', args.offer_number)

-            config_orig = config_orig.replace('<CURRENCY>', args.currency)

-            config_orig = config_orig.replace('<LOCALE>', args.locale)

-            config_orig = config_orig.replace('<REGION_INFO>', args.region_info)

-            config_orig = config_orig.replace('<MONGODB_PASSWORD>', args.mongo_password)

-        f = open(path, 'w')

-        f.write(config_orig)

-        f.close()

-    except:

-        print("Could not write the target file {}".format(path))

-        sys.exit(1)

-

-

-def yml_self_service(path):

-    try:

-        with open(path, 'r') as config_yml_r:

-            config_orig = config_yml_r.read()

-

-        config_orig = config_orig.replace('billingSchedulerEnabled: false', 'billingSchedulerEnabled: true')

-

-        f = open(path, 'w')

-        f.write(config_orig)

-        f.close()

-    except:

-        print("Could not write the target file {}".format(path))

-        sys.exit(1)

-

-

-##############

-# Run script #

-##############

-if __name__ == "__main__":

-    print("Configure billing")

-    # Check cloud provider

-    # Access to the bucket without credentials?

-    try:

-        yml_billing(args.dlab_dir + 'conf/billing.yml')

-        yml_self_service(args.dlab_dir + 'conf/self-service.yml')

-    except:

-        print('Error configure billing')

-        sys.exit(1)

-

-    sys.exit(0)

+#!/usr/bin/python
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+
+from fabric.api import *
+import yaml, json, sys
+import argparse
+import os
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--cloud_provider', type=str,
+                    help='Where DLab should be deployed. Available options: aws, azure')
+parser.add_argument('--infrastructure_tag', type=str, help='unique name for DLab environment')
+parser.add_argument('--access_key_id', default='', type=str, help='AWS Access Key ID')
+parser.add_argument('--secret_access_key', default='', type=str, help='AWS Secret Access Key')
+parser.add_argument('--tag_resource_id', type=str, default='user:tag', help='The name of user tag')
+parser.add_argument('--account_id', type=str, help='The ID of ASW linked account')
+parser.add_argument('--billing_bucket', type=str, help='The name of bucket')
+parser.add_argument('--aws_job_enabled', type=str, default='false', help='Billing format. Available options: true (aws), false(epam)')
+parser.add_argument('--report_path', type=str, default='', help='The path to report folder')
+parser.add_argument('--client_id', type=str, default='', help='Azure client ID')
+parser.add_argument('--client_secret', type=str, default='', help='Azure client secret')
+parser.add_argument('--tenant_id', type=str, default='', help='Azure tenant ID')
+parser.add_argument('--subscription_id', type=str, default='', help='Azure subscription ID')
+parser.add_argument('--authentication_file', type=str, default='', help='Azure authentication file')
+parser.add_argument('--offer_number', type=str, default='', help='Azure offer number')
+parser.add_argument('--currency', type=str, default='', help='Azure currency for billing')
+parser.add_argument('--locale', type=str, default='', help='Azure locale')
+parser.add_argument('--region_info', type=str, default='', help='Azure region info')
+parser.add_argument('--mongo_password', type=str, help='The password for Mongo DB')
+parser.add_argument('--dlab_dir', type=str, help='The path to dlab dir')
+parser.add_argument('--dlab_id', type=str, default='', help='Column name in report file that contains dlab id tag')
+parser.add_argument('--usage_date', type=str, default='', help='Column name in report file that contains usage date tag')
+parser.add_argument('--product', type=str, default='', help='Column name in report file that contains product name tag')
+parser.add_argument('--usage_type', type=str, default='', help='Column name in report file that contains usage type tag')
+parser.add_argument('--usage', type=str, default='', help='Column name in report file that contains usage tag')
+parser.add_argument('--cost', type=str, default='', help='Column name in report file that contains cost tag')
+parser.add_argument('--resource_id', type=str, default='', help='Column name in report file that contains dlab resource id tag')
+parser.add_argument('--tags', type=str, default='', help='Column name in report file that contains tags')
+args = parser.parse_args()
+
+
+def yml_billing(path):
+    try:
+        with open(path, 'r') as config_yml_r:
+            config_orig = config_yml_r.read()
+
+        config_orig = config_orig.replace('billingEnabled: false', 'billingEnabled: true')
+        if args.cloud_provider == 'aws':
+            if args.aws_job_enabled == 'true':
+                args.tag_resource_id =  'resourceTags' + ':' + args.tag_resource_id
+            elif args.aws_job_enabled == 'false':
+                args.tag_resource_id = 'user' + ':' + args.tag_resource_id
+            config_orig = config_orig.replace('<BILLING_BUCKET_NAME>', args.billing_bucket)
+            config_orig = config_orig.replace('<AWS_JOB_ENABLED>', args.aws_job_enabled)
+            config_orig = config_orig.replace('<REPORT_PATH>', args.report_path)
+            config_orig = config_orig.replace('<ACCOUNT_ID>', args.account_id)
+            config_orig = config_orig.replace('<ACCESS_KEY_ID>', args.access_key_id)
+            config_orig = config_orig.replace('<SECRET_ACCESS_KEY>', args.secret_access_key)
+            config_orig = config_orig.replace('<CONF_TAG_RESOURCE_ID>', args.tag_resource_id)
+            config_orig = config_orig.replace('<CONF_SERVICE_BASE_NAME>', args.infrastructure_tag)
+            config_orig = config_orig.replace('<MONGODB_PASSWORD>', args.mongo_password)
+            config_orig = config_orig.replace('<DLAB_ID>', args.dlab_id)
+            config_orig = config_orig.replace('<USAGE_DATE>', args.usage_date)
+            config_orig = config_orig.replace('<PRODUCT>', args.product)
+            config_orig = config_orig.replace('<USAGE_TYPE>', args.usage_type)
+            config_orig = config_orig.replace('<USAGE>', args.usage)
+            config_orig = config_orig.replace('<COST>', args.cost)
+            config_orig = config_orig.replace('<RESOURCE_ID>', args.resource_id)
+            config_orig = config_orig.replace('<TAGS>', args.tags)
+        elif args.cloud_provider == 'azure':
+            config_orig = config_orig.replace('<CLIENT_ID>', args.client_id)
+            config_orig = config_orig.replace('<CLIENT_SECRET>', args.client_secret)
+            config_orig = config_orig.replace('<TENANT_ID>', args.tenant_id)
+            config_orig = config_orig.replace('<SUBSCRIPTION_ID>', args.subscription_id)
+            config_orig = config_orig.replace('<AUTHENTICATION_FILE>', args.authentication_file)
+            config_orig = config_orig.replace('<OFFER_NUMBER>', args.offer_number)
+            config_orig = config_orig.replace('<CURRENCY>', args.currency)
+            config_orig = config_orig.replace('<LOCALE>', args.locale)
+            config_orig = config_orig.replace('<REGION_INFO>', args.region_info)
+            config_orig = config_orig.replace('<MONGODB_PASSWORD>', args.mongo_password)
+        f = open(path, 'w')
+        f.write(config_orig)
+        f.close()
+    except:
+        print("Could not write the target file {}".format(path))
+        sys.exit(1)
+
+
+def yml_self_service(path):
+    try:
+        with open(path, 'r') as config_yml_r:
+            config_orig = config_yml_r.read()
+
+        config_orig = config_orig.replace('billingSchedulerEnabled: false', 'billingSchedulerEnabled: true')
+
+        f = open(path, 'w')
+        f.write(config_orig)
+        f.close()
+    except:
+        print("Could not write the target file {}".format(path))
+        sys.exit(1)
+
+
+##############
+# Run script #
+##############
+if __name__ == "__main__":
+    print("Configure billing")
+    # Check cloud provider
+    # Access to the bucket without credentials?
+    try:
+        yml_billing(args.dlab_dir + 'conf/billing.yml')
+        yml_self_service(args.dlab_dir + 'conf/self-service.yml')
+    except:
+        print('Error configure billing')
+        sys.exit(1)
+
+    sys.exit(0)
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_conf_file.py b/infrastructure-provisioning/src/ssn/scripts/configure_conf_file.py
index a5ff77c..5cc301b 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_conf_file.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_conf_file.py
@@ -1,19 +1,22 @@
 #!/usr/bin/python
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -35,7 +38,7 @@
     try:
         variables_list = json.loads(args.variables_list)
         conf_list = []
-        conf_file = open('{}sources/general/conf/dlab.ini'.format(args.dlab_dir), 'r')
+        conf_file = open('{}sources/infrastructure-provisioning/src/general/conf/dlab.ini'.format(args.dlab_dir), 'r')
         for line in conf_file:
             conf_list.append(line)
 
@@ -58,7 +61,7 @@
                     print('Such variable doesn`t exist!')
                     config.remove_option(section, option)
 
-        with open('{}sources/general/conf/overwrite.ini'.format(args.dlab_dir), 'w') as conf_file_final:
+        with open('{}sources/infrastructure-provisioning/src/general/conf/overwrite.ini'.format(args.dlab_dir), 'w') as conf_file_final:
             config.write(conf_file_final)
     except Exception as error:
         print('Error with modifying conf files:')
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index e9218e6..56f39fc 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -39,6 +42,8 @@
 
 
 def modify_conf_file(args):
+    if os.environ['conf_duo_vpc_enable'] == 'true':
+        os.environ['conf_vpc2_cidr'] = get_cidr_by_vpc(os.environ['aws_vpc2_id'])
     variables_list = {}
     for os_var in os.environ:
         if "'" not in os.environ[os_var] and os_var != 'aws_access_key' and os_var != 'aws_secret_access_key':
@@ -49,10 +54,24 @@
     sudo("python /tmp/configure_conf_file.py --dlab_dir {} --variables_list '{}'".format(
         args.dlab_path, json.dumps(variables_list)))
 
+def download_toree():
+    toree_path = '/opt/dlab/sources/infrastructure-provisioning/src/general/files/os/'
+    tarball_link = 'https://archive.apache.org/dist/incubator/toree/0.2.0-incubating/toree/toree-0.2.0-incubating-bin.tar.gz'
+    jar_link = 'https://repo1.maven.org/maven2/org/apache/toree/toree-assembly/0.2.0-incubating/toree-assembly-0.2.0-incubating.jar'
+    try:
+        run('wget {}'.format(tarball_link))
+        run('wget {}'.format(jar_link))
+        run('mv toree-0.2.0-incubating-bin.tar.gz {}toree_kernel.tar.gz'.format(toree_path))
+        run('mv toree-assembly-0.2.0-incubating.jar {}toree-assembly-0.2.0.jar'.format(toree_path))
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to download toree: ', str(err))
+        sys.exit(1)
 
 def add_china_repository(dlab_path):
-    with cd('{}sources/base/'.format(dlab_path)):
-        sudo('sed -i "/pip install/s/$/ -i https\:\/\/{0}\/simple --trusted-host {0} --timeout 60000/g" Dockerfile'.format(os.environ['conf_pypi_mirror']))
+    with cd('{}sources/infrastructure-provisioning/src/base/'.format(dlab_path)):
+        sudo('sed -i "/pip install/s/$/ -i https\:\/\/{0}\/simple --trusted-host {0} --timeout 60000/g" '
+             'Dockerfile'.format(os.environ['conf_pypi_mirror']))
         sudo('sed -i "/pip install/s/jupyter/ipython==5.0.0 jupyter==1.0.0/g" Dockerfile')
         sudo('sed -i "22i COPY general/files/os/debian/sources.list /etc/apt/sources.list" Dockerfile')
 
@@ -60,19 +79,28 @@
 def build_docker_images(image_list, region, dlab_path):
     try:
         if os.environ['conf_cloud_provider'] == 'azure':
-            local('scp -i {} /root/azure_auth.json {}:{}sources/base/azure_auth.json'.format(args.keyfile,
-                                                                                             env.host_string,
-                                                                                             args.dlab_path))
-            sudo('cp {0}sources/base/azure_auth.json /home/{1}/keys/azure_auth.json'.format(args.dlab_path, args.os_user))
+            local('scp -i {} /root/azure_auth.json {}:{}sources/infrastructure-provisioning/src/base/'
+                  'azure_auth.json'.format(args.keyfile, env.host_string, args.dlab_path))
+            sudo('cp {0}sources/infrastructure-provisioning/src/base/azure_auth.json '
+                 '/home/{1}/keys/azure_auth.json'.format(args.dlab_path, args.os_user))
         if region == 'cn-north-1':
             add_china_repository(dlab_path)
         for image in image_list:
             name = image['name']
             tag = image['tag']
-            sudo('cd {0}sources/; cp general/files/{1}/{2}_description.json {2}/description.json'.format(args.dlab_path, args.cloud_provider, name))
-            sudo("cd {4}sources/; docker build --build-arg OS={2} --file general/files/{3}/{0}_Dockerfile -t docker.dlab-{0}:{1} ."
-                 .format(name, tag, args.os_family, args.cloud_provider, args.dlab_path))
-        sudo('rm -f {}sources/base/azure_auth.json'.format(args.dlab_path))
+            sudo('cd {0}sources/infrastructure-provisioning/src/; cp general/files/{1}/{2}_description.json '
+                 '{2}/description.json'.format(args.dlab_path, args.cloud_provider, name))
+            if name == 'base':
+                sudo("cd {4}sources/infrastructure-provisioning/src/; docker build --build-arg OS={2} "
+                     "--build-arg SRC_PATH="" --file general/files/{3}/{0}_Dockerfile "
+                     "-t docker.dlab-{0}:{1} .".format(name, tag, args.os_family, args.cloud_provider, args.dlab_path))
+            else:
+                sudo("cd {4}sources/infrastructure-provisioning/src/; docker build --build-arg OS={2} "
+                     "--file general/files/{3}/{0}_Dockerfile -t docker.dlab-{0}:{1} .".format(name, tag,
+                                                                                               args.os_family,
+                                                                                               args.cloud_provider,
+                                                                                               args.dlab_path))
+        sudo('rm -f {}sources/infrastructure-provisioning/src/base/azure_auth.json'.format(args.dlab_path))
         return True
     except:
         return False
@@ -98,6 +126,9 @@
         print('Error:', str(err))
         sys.exit(1)
 
+    print("Downloading Apache Toree")
+    download_toree()
+
     print("Installing docker daemon")
     if not ensure_docker_daemon(args.dlab_path, args.os_user, args.region):
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_gitlab.py b/infrastructure-provisioning/src/ssn/scripts/configure_gitlab.py
index 2494884..91cf516 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_gitlab.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_gitlab.py
@@ -1,18 +1,22 @@
 #!/usr/bin/python
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#    http://www.apache.org/licenses/LICENSE-2.0
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index 7d4eb01..a7a5fc8 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index 8f2c6dc..b9247b8 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -22,8 +25,10 @@
 import argparse
 import json
 import sys
+import os
 from dlab.ssn_lib import *
 from dlab.fab import *
+import traceback
 
 parser = argparse.ArgumentParser()
 parser.add_argument('--hostname', type=str, default='')
@@ -35,6 +40,15 @@
 args = parser.parse_args()
 
 
+def set_hostname(subdomain, hosted_zone_name):
+    try:
+        sudo('hostnamectl set-hostname {0}.{1}'.format(subdomain, hosted_zone_name))
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to set hostname: ', str(err))
+        sys.exit(1)
+
+
 def cp_key(keyfile, host_string, os_user):
     try:
         key_name=keyfile.split("/")
@@ -42,9 +56,10 @@
         sudo('chown -R ' + os_user + ':' + os_user + ' /home/' + os_user + '/keys')
         local('scp -r -q -i {0} {0} {1}:/home/{3}/keys/{2}'.format(keyfile, host_string, key_name[-1], os_user))
         sudo('chmod 600 /home/' + os_user + '/keys/*.pem')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to copy key: ', str(err))
+        sys.exit(1)
 
 
 def cp_backup_scripts(dlab_path):
@@ -53,9 +68,10 @@
             put('/root/scripts/backup.py', "backup.py")
             put('/root/scripts/restore.py', "restore.py")
             run('chmod +x backup.py restore.py')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to copy backup scripts: ', str(err))
+        sys.exit(1)
 
 
 def cp_gitlab_scripts(dlab_path):
@@ -73,9 +89,10 @@
             run('sed -i "s/CONF_KEY_NAME/{}/g" gitlab.ini'.format(os.environ['conf_key_name']))
             run('sed -i "s,CONF_DLAB_PATH,{},g" gitlab.ini'.format(dlab_path))
             run('sed -i "s/SERVICE_BASE_NAME/{}/g" gitlab.ini'.format(os.environ['conf_service_base_name']))
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to copy gitlab scripts: ', str(err))
+        sys.exit(1)
 
 
 def creating_service_directories(dlab_path, os_user):
@@ -83,7 +100,6 @@
         if not exists(dlab_path):
             sudo('mkdir -p ' + dlab_path)
             sudo('mkdir -p ' + dlab_path + 'conf')
-            sudo('mkdir -p ' + dlab_path + 'webapp/lib')
             sudo('mkdir -p ' + dlab_path + 'webapp/static')
             sudo('mkdir -p ' + dlab_path + 'template')
             sudo('mkdir -p ' + dlab_path + 'tmp')
@@ -98,20 +114,27 @@
             sudo('ln -s /var/opt/dlab/log /var/log/dlab')
             sudo('chown -R ' + os_user + ':' + os_user + ' /var/opt/dlab/log')
             sudo('chown -R ' + os_user + ':' + os_user + ' ' + dlab_path)
-
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to create service directories: ', str(err))
+        sys.exit(1)
 
 
-def generate_ssl(hostname):
+def configure_ssl_certs(hostname, custom_ssl_cert):
     try:
-        sudo('openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/certs/dlab-selfsigned.key \
-             -out /etc/ssl/certs/dlab-selfsigned.crt -subj "/C=US/ST=US/L=US/O=dlab/CN={}"'.format(hostname))
+        if custom_ssl_cert:
+            put('/root/certs/dlab.crt', 'dlab.crt')
+            put('/root/certs/dlab.key', 'dlab.key')
+            sudo('mv dlab.crt /etc/ssl/certs/dlab.crt')
+            sudo('mv dlab.key /etc/ssl/certs/dlab.key')
+        else:
+            sudo('openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/certs/dlab.key \
+                 -out /etc/ssl/certs/dlab.crt -subj "/C=US/ST=US/L=US/O=dlab/CN={}"'.format(hostname))
         sudo('openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048')
-        return True
-    except:
-        return False
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to configure SSL certificates: ', str(err))
+        sys.exit(1)
 
 
 ##############
@@ -126,47 +149,47 @@
         deeper_config = json.loads(args.additional_config)
     except:
         sys.exit(2)
+    if 'ssn_hosted_zone_id' in os.environ and 'ssn_hosted_zone_name' in os.environ and 'ssn_subdomain' in os.environ:
+        domain_created = True
+    else:
+        domain_created = False
+
+    if os.path.exists('/root/certs/dlab.crt') and os.path.exists('/root/certs/dlab.key'):
+        custom_ssl_cert = True
+    else:
+        custom_ssl_cert = False
 
     print("Creating service directories.")
-    if not creating_service_directories(args.dlab_path, args.os_user):
-        sys.exit(1)
+    creating_service_directories(args.dlab_path, args.os_user)
+
+    if domain_created:
+        print("Setting hostname")
+        set_hostname(os.environ['ssn_subdomain'], os.environ['ssn_hosted_zone_name'])
+        args.hostname = "{0}.{1}".format(os.environ['ssn_subdomain'], os.environ['ssn_hosted_zone_name'])
 
     print("Installing nginx as frontend.")
-    if not ensure_nginx(args.dlab_path):
-        sys.exit(1)
+    ensure_nginx(args.dlab_path)
 
-    print("Generating ssl key and cert for nginx.")
-    if not generate_ssl(args.hostname):
-        sys.exit(1)
+    print("Configuring ssl key and cert for nginx.")
+    configure_ssl_certs(args.hostname, custom_ssl_cert)
 
     print("Configuring nginx.")
-    if not configure_nginx(deeper_config, args.dlab_path, args.hostname):
-        sys.exit(1)
+    configure_nginx(deeper_config, args.dlab_path, args.hostname)
 
     print("Installing jenkins.")
-    if not ensure_jenkins(args.dlab_path):
-        sys.exit(1)
+    ensure_jenkins(args.dlab_path)
 
     print("Configuring jenkins.")
-    if not configure_jenkins(args.dlab_path, args.os_user, deeper_config, args.tag_resource_id):
-        sys.exit(1)
+    configure_jenkins(args.dlab_path, args.os_user, deeper_config, args.tag_resource_id)
 
     print("Copying key")
-    if not cp_key(args.keyfile, env.host_string, args.os_user):
-        sys.exit(1)
+    cp_key(args.keyfile, env.host_string, args.os_user)
 
     print("Copying backup scripts")
-    if not cp_backup_scripts(args.dlab_path):
-        sys.exit(1)
+    cp_backup_scripts(args.dlab_path)
 
     print("Copying gitlab scripts & files")
-    if not cp_gitlab_scripts(args.dlab_path):
-        sys.exit(1)
+    cp_gitlab_scripts(args.dlab_path)
 
     print("Ensuring safest ssh ciphers")
-    try:
-        ensure_ciphers()
-    except:
-        sys.exit(1)
-
-    sys.exit(0)
+    ensure_ciphers()
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
index 5e65143..364a45f 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -25,6 +28,7 @@
 import json
 import sys
 import os
+import traceback
 from dlab.ssn_lib import *
 from dlab.fab import *
 
@@ -68,7 +72,7 @@
 args = parser.parse_args()
 
 dlab_conf_dir = args.dlab_path + 'conf/'
-web_path = args.dlab_path + 'webapp/lib/'
+web_path = args.dlab_path + 'webapp/'
 local_log_filename = "{}_UI.log".format(args.request_id)
 local_log_filepath = "/logs/" + args.resource + "/" + local_log_filename
 logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
@@ -79,14 +83,18 @@
 
 
 def copy_ssn_libraries():
-    sudo('mkdir -p /usr/lib/python2.7/dlab/')
-    run('mkdir -p /tmp/dlab_libs/')
-    local('scp -i {} /usr/lib/python2.7/dlab/* {}:/tmp/dlab_libs/'.format(args.keyfile, env.host_string))
-    run('chmod a+x /tmp/dlab_libs/*')
-    sudo('mv /tmp/dlab_libs/* /usr/lib/python2.7/dlab/')
-    if exists('/usr/lib64'):
-        sudo('ln -fs /usr/lib/python2.7/dlab /usr/lib64/python2.7/dlab')
-    return True
+    try:
+        sudo('mkdir -p /usr/lib/python2.7/dlab/')
+        run('mkdir -p /tmp/dlab_libs/')
+        local('scp -i {} /usr/lib/python2.7/dlab/* {}:/tmp/dlab_libs/'.format(args.keyfile, env.host_string))
+        run('chmod a+x /tmp/dlab_libs/*')
+        sudo('mv /tmp/dlab_libs/* /usr/lib/python2.7/dlab/')
+        if exists('/usr/lib64'):
+            sudo('ln -fs /usr/lib/python2.7/dlab /usr/lib64/python2.7/dlab')
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to copy ssn libraries: ', str(err))
+        sys.exit(1)
 
 
 def configure_mongo(mongo_passwd):
@@ -103,22 +111,89 @@
             sudo('systemctl enable mongod.service')
         local('sed -i "s|PASSWORD|{}|g" /root/scripts/resource_status.py'.format(mongo_passwd))
         local('scp -i {} /root/scripts/resource_status.py {}:/tmp/resource_status.py'.format(args.keyfile,
-                                                                                                      env.host_string))
+                                                                                             env.host_string))
         sudo('mv /tmp/resource_status.py ' + os.environ['ssn_dlab_path'] + 'tmp/')
         local('sed -i "s|PASSWORD|{}|g" /root/scripts/configure_mongo.py'.format(mongo_passwd))
         local('scp -i {} /root/scripts/configure_mongo.py {}:/tmp/configure_mongo.py'.format(args.keyfile,
                                                                                              env.host_string))
         sudo('mv /tmp/configure_mongo.py ' + args.dlab_path + 'tmp/')
-        local('scp -i {} /root/files/mongo_roles.json {}:/tmp/mongo_roles.json'.format(args.keyfile,
-                                                                                             env.host_string))
+        local('scp -i {} /root/files/{}/mongo_roles.json {}:/tmp/mongo_roles.json'.format(args.keyfile,
+                                                                                          args.cloud_provider,
+                                                                                          env.host_string))
         sudo('mv /tmp/mongo_roles.json ' + args.dlab_path + 'tmp/')
         mongo_parameters = json.loads(args.mongo_parameters)
         sudo("python " + args.dlab_path + "tmp/configure_mongo.py --dlab_path {} --mongo_parameters '{}'".format(
             args.dlab_path, json.dumps(mongo_parameters)))
-        return True
     except Exception as err:
-        print(err)
-        return False
+        traceback.print_exc()
+        print('Failed to configure MongoDB: ', str(err))
+        sys.exit(1)
+
+
+def build_ui():
+    try:
+        # Building Front-end
+        with cd(args.dlab_path + '/sources/services/self-service/src/main/resources/webapp/'):
+            sudo('sed -i "s|CLOUD_PROVIDER|{}|g" src/dictionary/global.dictionary.ts'.format(args.cloud_provider))
+
+            if args.cloud_provider == 'azure' and os.environ['azure_datalake_enable'] == 'true':
+                sudo('sed -i "s|\'use_ldap\': true|{}|g" src/dictionary/azure.dictionary.ts'.format(
+                     '\'use_ldap\': false'))
+
+            sudo('npm install')
+            sudo('npm run build.prod')
+            sudo('sudo chown -R {} {}/*'.format(args.os_user, args.dlab_path))
+
+        # Building Back-end
+        with cd(args.dlab_path + '/sources/'):
+            sudo('/opt/maven/bin/mvn -P{} -DskipTests package'.format(args.cloud_provider))
+
+        sudo('mkdir -p {}/webapp/'.format(args.dlab_path))
+        for service in ['self-service', 'security-service', 'provisioning-service', 'billing']:
+            sudo('mkdir -p {}/webapp/{}/lib/'.format(args.dlab_path, service))
+            sudo('mkdir -p {}/webapp/{}/conf/'.format(args.dlab_path, service))
+        sudo('cp {0}/sources/services/self-service/self-service.yml {0}/webapp/self-service/conf/'.format(
+            args.dlab_path))
+        sudo('cp {0}/sources/services/self-service/target/self-service-*.jar {0}/webapp/self-service/lib/'.format(
+            args.dlab_path))
+        sudo('cp {0}/sources/services/provisioning-service/provisioning.yml {0}/webapp/provisioning-service/conf/'.format(
+            args.dlab_path))
+        sudo('cp {0}/sources/services/provisioning-service/target/provisioning-service-*.jar '
+             '{0}/webapp/provisioning-service/lib/'.format(args.dlab_path))
+
+        sudo('sed -i "s/LDAP_HOST/{0}/g" {1}/sources/services/security-service/security.yml'.format(
+            os.environ['ldap_hostname'], args.dlab_path))
+        sudo('sed -i "s/LDAP_USER/{0}/g" {1}/sources/services/security-service/security.yml'.format(
+            os.environ['ldap_service_username'], args.dlab_path))
+        sudo('sed -i "s/LDAP_DN/{0}/g" {1}/sources/services/security-service/security.yml'.format(os.environ['ldap_dn'],
+                                                                                                  args.dlab_path))
+        sudo('sed -i "s/LDAP_OU/{0}/g" {1}/sources/services/security-service/security.yml'.format(os.environ['ldap_ou'],
+                                                                                                  args.dlab_path))
+        sudo("sed -i 's/LDAP_PASS/{0}/g' {1}/sources/services/security-service/security.yml".format(
+            os.environ['ldap_service_password'], args.dlab_path))
+        sudo('cp {0}/sources/services/security-service/security.yml {0}/webapp/security-service/conf/'.format(
+            args.dlab_path))
+        sudo('cp {0}/sources/services/security-service/target/security-service-*.jar '
+             '{0}/webapp/security-service/lib/'.format(args.dlab_path))
+
+        if args.cloud_provider == 'azure':
+            sudo('cp {0}/sources/services/billing-azure/billing.yml {0}/webapp/billing/conf/'.format(args.dlab_path))
+            sudo('cp {0}/sources/services/billing-azure/target/billing-azure*.jar {0}/webapp/billing/lib/'.format(
+                args.dlab_path))
+        elif args.cloud_provider == 'aws':
+            sudo('cp {0}/sources/services/billing-aws/billing.yml {0}/webapp/billing/conf/'.format(args.dlab_path))
+            sudo(
+                'cp {0}/sources/services/billing-aws/target/billing-aws*.jar {0}/webapp/billing/lib/'.format(
+                    args.dlab_path))
+        elif args.cloud_provider == 'gcp':
+            sudo('cp {0}/sources/services/billing-gcp/billing.yml {0}/webapp/billing/conf/'.format(args.dlab_path))
+            sudo(
+                'cp {0}/sources/services/billing-gcp/target/billing-gcp*.jar {0}/webapp/billing/lib/'.format(
+                    args.dlab_path))
+    except Exception as err:
+        traceback.print_exc()
+        print('Failed to build UI: ', str(err))
+        sys.exit(1)
 
 
 ##############
@@ -135,40 +210,33 @@
         sys.exit(2)
 
     print("Copying DLab libraries to SSN")
-    if not copy_ssn_libraries():
-        logging.error('Failed to copy DLab libraries')
-        sys.exit(1)
+    copy_ssn_libraries()
 
     print("Installing Supervisor")
-    if not ensure_supervisor():
-        logging.error('Failed to install Supervisor')
-        sys.exit(1)
+    ensure_supervisor()
 
     print("Installing MongoDB")
-    if not ensure_mongo():
-        logging.error('Failed to install MongoDB')
-        sys.exit(1)
+    ensure_mongo()
 
     print("Configuring MongoDB")
-    if not configure_mongo(mongo_passwd):
-        logging.error('MongoDB configuration script has failed.')
-        sys.exit(1)
+    configure_mongo(mongo_passwd)
 
     sudo('echo DLAB_CONF_DIR={} >> /etc/profile'.format(dlab_conf_dir))
     sudo('echo export DLAB_CONF_DIR >> /etc/profile')
 
-    print("Starting Self-Service(UI)")
-    if not start_ss(args.keyfile, env.host_string, dlab_conf_dir, web_path,
-                    args.os_user, mongo_passwd, keystore_passwd, args.cloud_provider,
-                    args.service_base_name, args.tag_resource_id, args.account_id,
-                    args.billing_bucket, args.aws_job_enabled, args.dlab_path, args.billing_enabled,
-                    args.authentication_file, args.offer_number, args.currency, args.locale,
-                    args.region_info, args.ldap_login, args.tenant_id, args.application_id,
-                    args.hostname, args.datalake_store_name, args.subscription_id, args.validate_permission_scope,
-                    args.dlab_id, args.usage_date, args.product, args.usage_type,
-                    args.usage, args.cost, args.resource_id, args.tags):
-        logging.error('Failed to start UI')
-        print('Failed to UI')
-        sys.exit(1)
+    print("Installing build dependencies for UI")
+    install_build_dep()
 
-    sys.exit(0)
+    print("Building UI")
+    build_ui()
+
+    print("Starting Self-Service(UI)")
+    start_ss(args.keyfile, env.host_string, dlab_conf_dir, web_path,
+             args.os_user, mongo_passwd, keystore_passwd, args.cloud_provider,
+             args.service_base_name, args.tag_resource_id, args.account_id,
+             args.billing_bucket, args.aws_job_enabled, args.dlab_path, args.billing_enabled,
+             args.authentication_file, args.offer_number, args.currency, args.locale,
+             args.region_info, args.ldap_login, args.tenant_id, args.application_id,
+             args.hostname, args.datalake_store_name, args.subscription_id, args.validate_permission_scope,
+             args.dlab_id, args.usage_date, args.product, args.usage_type,
+             args.usage, args.cost, args.resource_id, args.tags)
diff --git a/infrastructure-provisioning/src/ssn/scripts/gitlab_deploy.py b/infrastructure-provisioning/src/ssn/scripts/gitlab_deploy.py
index 7cf62e4..2f65895 100644
--- a/infrastructure-provisioning/src/ssn/scripts/gitlab_deploy.py
+++ b/infrastructure-provisioning/src/ssn/scripts/gitlab_deploy.py
@@ -1,18 +1,22 @@
 #!/usr/bin/python
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#    http://www.apache.org/licenses/LICENSE-2.0
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/scripts/resource_status.py b/infrastructure-provisioning/src/ssn/scripts/resource_status.py
index f90024a..ec1c4b3 100644
--- a/infrastructure-provisioning/src/ssn/scripts/resource_status.py
+++ b/infrastructure-provisioning/src/ssn/scripts/resource_status.py
@@ -1,19 +1,22 @@
 #!/usr/bin/python
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/scripts/restore.py b/infrastructure-provisioning/src/ssn/scripts/restore.py
index 81ba104..b9e325b 100644
--- a/infrastructure-provisioning/src/ssn/scripts/restore.py
+++ b/infrastructure-provisioning/src/ssn/scripts/restore.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -29,7 +32,7 @@
 parser.add_argument('--dlab_path', type=str, default='/opt/dlab/', help='Path to DLab. Default: /opt/dlab/')
 parser.add_argument('--configs', type=str, default='all', help='Comma separated names of config files, like "security.yml", etc. Also available: skip. Default: all')
 parser.add_argument('--keys', type=str, default='all', help='Comma separated names of keys, like "user_name.pub". Also available: skip. Default: all')
-parser.add_argument('--certs', type=str, default='all', help='Comma separated names of SSL certificates and keys, like "dlab-selfsigned.crt", etc. Also available: skip. Default: all')
+parser.add_argument('--certs', type=str, default='all', help='Comma separated names of SSL certificates and keys, like "dlab.crt", etc. Also available: skip. Default: all')
 parser.add_argument('--jars', type=str, default='skip', help='Comma separated names of jar application, like "self-service", etc. Default: skip')
 parser.add_argument('--db', action='store_true', default=False, help='Mongo DB. Key without arguments. Default: disable')
 parser.add_argument('--file', type=str, default='', required=True, help='Full or relative path to backup file or folder. Required field')
diff --git a/infrastructure-provisioning/src/ssn/scripts/upload_response_file.py b/infrastructure-provisioning/src/ssn/scripts/upload_response_file.py
index 40762c6..c034478 100644
--- a/infrastructure-provisioning/src/ssn/scripts/upload_response_file.py
+++ b/infrastructure-provisioning/src/ssn/scripts/upload_response_file.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/templates/gitlab.ini b/infrastructure-provisioning/src/ssn/templates/gitlab.ini
index 6da5cf0..c72c661 100644
--- a/infrastructure-provisioning/src/ssn/templates/gitlab.ini
+++ b/infrastructure-provisioning/src/ssn/templates/gitlab.ini
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 #---- List of all GitLab parameters (some parameters already setuped) ----#
 
 [conf]
diff --git a/infrastructure-provisioning/src/ssn/templates/gitlab.rb b/infrastructure-provisioning/src/ssn/templates/gitlab.rb
index 2b60ec3..f760d55 100644
--- a/infrastructure-provisioning/src/ssn/templates/gitlab.rb
+++ b/infrastructure-provisioning/src/ssn/templates/gitlab.rb
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 ## GitLab configuration settings
 ##! This file is generated during initial installation and **is not** modified
 ##! during upgrades.
diff --git a/infrastructure-provisioning/src/ssn/templates/mongod.service_template b/infrastructure-provisioning/src/ssn/templates/mongod.service_template
index df056c2..cddbf66 100644
--- a/infrastructure-provisioning/src/ssn/templates/mongod.service_template
+++ b/infrastructure-provisioning/src/ssn/templates/mongod.service_template
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=High-performance, schema-free document-oriented database
 After=network.target
diff --git a/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf b/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf
index 5d287ce..7d1570f 100644
--- a/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf
+++ b/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 server {
 
     listen 80;
@@ -12,17 +33,13 @@
     server_name  SSN_HOSTNAME;
     # SSL section
     ssl on;
-    ssl_certificate /etc/ssl/certs/dlab-selfsigned.crt;
-    ssl_certificate_key /etc/ssl/certs/dlab-selfsigned.key;
+    ssl_certificate /etc/ssl/certs/dlab.crt;
+    ssl_certificate_key /etc/ssl/certs/dlab.key;
     ssl_session_timeout 5m;
     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
     ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
     ssl_prefer_server_ciphers on;
     ssl_dhparam /etc/ssl/certs/dhparam.pem;
 
-    if ($host != $server_name) {
-        return  400;
-    }
-
     include locations/proxy_location_*.conf;
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/ssn/templates/proxy_location_jenkins_template.conf b/infrastructure-provisioning/src/ssn/templates/proxy_location_jenkins_template.conf
index 42b737f..4fdd78f 100644
--- a/infrastructure-provisioning/src/ssn/templates/proxy_location_jenkins_template.conf
+++ b/infrastructure-provisioning/src/ssn/templates/proxy_location_jenkins_template.conf
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 location /jenkins {
 
       auth_basic              "snowflake jenkins";
diff --git a/infrastructure-provisioning/src/ssn/templates/proxy_location_webapp_template.conf b/infrastructure-provisioning/src/ssn/templates/proxy_location_webapp_template.conf
index 36efad6..2b949e0 100644
--- a/infrastructure-provisioning/src/ssn/templates/proxy_location_webapp_template.conf
+++ b/infrastructure-provisioning/src/ssn/templates/proxy_location_webapp_template.conf
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 location / {
 
       proxy_set_header        Host $host;
diff --git a/infrastructure-provisioning/src/ssn/templates/squid.conf b/infrastructure-provisioning/src/ssn/templates/squid.conf
index dde69c4..5190ca4 100644
--- a/infrastructure-provisioning/src/ssn/templates/squid.conf
+++ b/infrastructure-provisioning/src/ssn/templates/squid.conf
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 #
 # Recommended minimum configuration:
 #
diff --git a/infrastructure-provisioning/src/ssn/templates/ssn.yml b/infrastructure-provisioning/src/ssn/templates/ssn.yml
index 74d484a..d5d6697 100644
--- a/infrastructure-provisioning/src/ssn/templates/ssn.yml
+++ b/infrastructure-provisioning/src/ssn/templates/ssn.yml
@@ -1,18 +1,21 @@
 # ******************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/infrastructure-provisioning/src/ssn/templates/ssn_nginx.conf b/infrastructure-provisioning/src/ssn/templates/ssn_nginx.conf
index b9301e5..ff997eb 100644
--- a/infrastructure-provisioning/src/ssn/templates/ssn_nginx.conf
+++ b/infrastructure-provisioning/src/ssn/templates/ssn_nginx.conf
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 user nginx;
 worker_processes auto;
 error_log /var/log/nginx/error.log;
diff --git a/infrastructure-provisioning/src/ssn/templates/supervisor_svc.conf b/infrastructure-provisioning/src/ssn/templates/supervisor_svc.conf
index c7fad5f..f835067 100644
--- a/infrastructure-provisioning/src/ssn/templates/supervisor_svc.conf
+++ b/infrastructure-provisioning/src/ssn/templates/supervisor_svc.conf
@@ -1,3 +1,24 @@
+; *****************************************************************************
+;
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements.  See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership.  The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License.  You may obtain a copy of the License at
+;
+;   http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied.  See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
+; ******************************************************************************
+
 [supervisorctl]
 
 [inet_http_server]
diff --git a/infrastructure-provisioning/src/tensor-rstudio/fabfile.py b/infrastructure-provisioning/src/tensor-rstudio/fabfile.py
index bc205e8..e69838b 100644
--- a/infrastructure-provisioning/src/tensor-rstudio/fabfile.py
+++ b/infrastructure-provisioning/src/tensor-rstudio/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -202,4 +205,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed to create image from notebook node.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for notebook
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('notebook_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Notebook node.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/tensor-rstudio/scripts/configure_tensor-rstudio_node.py b/infrastructure-provisioning/src/tensor-rstudio/scripts/configure_tensor-rstudio_node.py
index 7a85805..3a801be 100644
--- a/infrastructure-provisioning/src/tensor-rstudio/scripts/configure_tensor-rstudio_node.py
+++ b/infrastructure-provisioning/src/tensor-rstudio/scripts/configure_tensor-rstudio_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -42,14 +45,14 @@
 
 spark_version = os.environ['notebook_spark_version']
 hadoop_version = os.environ['notebook_hadoop_version']
-tensorflow_version = '1.8.0'
+tensorflow_version = os.environ['notebook_tensorflow_version']
 nvidia_version = os.environ['notebook_nvidia_version']
 theano_version = os.environ['notebook_theano_version']
-keras_version = '2.1.6'
-cuda_version = '9.0'
-cuda_file_name = 'cuda_9.0.176_384.81_linux-run'
-cudnn_version = '7.1.4'
-cudnn_file_name = 'cudnn-9.0-linux-x64-v7.1.tgz'
+keras_version = os.environ['notebook_keras_version']
+cuda_version = os.environ['notebook_cuda_version']
+cuda_file_name = os.environ['notebook_cuda_file_name']
+cudnn_version = os.environ['notebook_cudnn_version']
+cudnn_file_name = os.environ['notebook_cudnn_file_name']
 if args.region == 'cn-north-1':
     spark_link = "http://mirrors.hust.edu.cn/apache/spark/spark-" + spark_version + "/spark-" + spark_version + \
                  "-bin-hadoop" + hadoop_version + ".tgz"
@@ -114,7 +117,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir)
+    configure_local_spark(jars_dir, templates_dir)
 
     # INSTALL UNGIT
     print("Install nodejs")
diff --git a/infrastructure-provisioning/src/tensor/fabfile.py b/infrastructure-provisioning/src/tensor/fabfile.py
index 8672492..074ec68 100644
--- a/infrastructure-provisioning/src/tensor/fabfile.py
+++ b/infrastructure-provisioning/src/tensor/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -202,4 +205,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed to create image from notebook node.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for notebook
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('notebook_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Notebook node.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py b/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
index 922ef8b..94abbe3 100644
--- a/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
+++ b/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -111,7 +114,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir)
+    configure_local_spark(jars_dir, templates_dir)
 
     # INSTALL JUPYTER KERNELS
     print("Install pyspark local kernel for Jupyter")
diff --git a/infrastructure-provisioning/src/zeppelin/fabfile.py b/infrastructure-provisioning/src/zeppelin/fabfile.py
index 38aaf7f..3fba5c4 100644
--- a/infrastructure-provisioning/src/zeppelin/fabfile.py
+++ b/infrastructure-provisioning/src/zeppelin/fabfile.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -203,4 +206,21 @@
     except Exception as err:
         traceback.print_exc()
         append_result("Failed to create image from notebook node.", str(err))
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)
+
+
+# Main function for reconfiguring Spark for notebook
+def reconfigure_spark():
+    local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
+                                               os.environ['request_id'])
+    local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
+    logging.basicConfig(format='%(levelname)-8s [%(asctime)s]  %(message)s',
+                        level=logging.DEBUG,
+                        filename=local_log_filepath)
+
+    try:
+        local("~/scripts/{}.py".format('notebook_reconfigure_spark'))
+    except Exception as err:
+        traceback.print_exc()
+        append_result("Failed to reconfigure Spark for Notebook node.", str(err))
+        sys.exit(1)
diff --git a/infrastructure-provisioning/src/zeppelin/scripts/configure_zeppelin_node.py b/infrastructure-provisioning/src/zeppelin/scripts/configure_zeppelin_node.py
index e6f9d08..17540ff 100644
--- a/infrastructure-provisioning/src/zeppelin/scripts/configure_zeppelin_node.py
+++ b/infrastructure-provisioning/src/zeppelin/scripts/configure_zeppelin_node.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -118,6 +121,8 @@
         put(templates_dir + 'interpreter_livy.json', '/tmp/interpreter.json')
         sudo('sed -i "s|ENDPOINTURL|' + args.endpoint_url + '|g" /tmp/interpreter.json')
         sudo('sed -i "s|OS_USER|' + args.os_user + '|g" /tmp/interpreter.json')
+        spark_memory = get_spark_memory()
+        sudo('sed -i "s|DRIVER_MEMORY|{}m|g" /tmp/interpreter.json'.format(spark_memory))
         while not port_number_found:
             port_free = sudo('nmap -p ' + str(default_port) + ' localhost | grep "closed" > /dev/null; echo $?')
             port_free = port_free[:1]
@@ -145,6 +150,8 @@
         put(templates_dir + 'interpreter_spark.json', '/tmp/interpreter.json')
         sudo('sed -i "s|ENDPOINTURL|' + args.endpoint_url + '|g" /tmp/interpreter.json')
         sudo('sed -i "s|OS_USER|' + args.os_user + '|g" /tmp/interpreter.json')
+        spark_memory = get_spark_memory()
+        sudo('sed -i "s|DRIVER_MEMORY|{}m|g" /tmp/interpreter.json'.format(spark_memory))
         update_zeppelin_interpreters(args.multiple_clusters, r_enabled, 'local')
         sudo('cp -f /tmp/interpreter.json /opt/zeppelin/conf/interpreter.json')
         sudo('chown ' + args.os_user + ':' + args.os_user + ' -R /opt/zeppelin/')
@@ -215,7 +222,7 @@
     print("Install storage jars")
     ensure_local_jars(args.os_user, jars_dir)
     print("Configure local Spark")
-    configure_local_spark(args.os_user, jars_dir, args.region, templates_dir)
+    configure_local_spark(jars_dir, templates_dir)
 
     # INSTALL ZEPPELIN
     print("Install Zeppelin")
diff --git a/infrastructure-provisioning/src/zeppelin/templates/livy-server-cluster.service b/infrastructure-provisioning/src/zeppelin/templates/livy-server-cluster.service
index 60eb124..fab7f79 100644
--- a/infrastructure-provisioning/src/zeppelin/templates/livy-server-cluster.service
+++ b/infrastructure-provisioning/src/zeppelin/templates/livy-server-cluster.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Livy server
 
diff --git a/infrastructure-provisioning/src/zeppelin/templates/livy-server.service b/infrastructure-provisioning/src/zeppelin/templates/livy-server.service
index 5227db9..6aac05f 100644
--- a/infrastructure-provisioning/src/zeppelin/templates/livy-server.service
+++ b/infrastructure-provisioning/src/zeppelin/templates/livy-server.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Livy server
 
diff --git a/infrastructure-provisioning/src/zeppelin/templates/zeppelin-notebook.service b/infrastructure-provisioning/src/zeppelin/templates/zeppelin-notebook.service
index 7a759b4..7e5f275 100644
--- a/infrastructure-provisioning/src/zeppelin/templates/zeppelin-notebook.service
+++ b/infrastructure-provisioning/src/zeppelin/templates/zeppelin-notebook.service
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
 [Unit]
 Description=Zeppelin notebook
 
diff --git a/integration-tests/examples/azure_templates/deeplearning/spark_cluster.json b/integration-tests/examples/azure_templates/deeplearning/spark_cluster.json
index 2cfc54f..565307a 100644
--- a/integration-tests/examples/azure_templates/deeplearning/spark_cluster.json
+++ b/integration-tests/examples/azure_templates/deeplearning/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "Standard_NC6",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/azure_templates/jupyter/spark_cluster.json b/integration-tests/examples/azure_templates/jupyter/spark_cluster.json
index 6b0e8bc..51615e1 100644
--- a/integration-tests/examples/azure_templates/jupyter/spark_cluster.json
+++ b/integration-tests/examples/azure_templates/jupyter/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "Standard_F4s",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/azure_templates/rstudio/spark_cluster.json b/integration-tests/examples/azure_templates/rstudio/spark_cluster.json
index 6b0e8bc..51615e1 100644
--- a/integration-tests/examples/azure_templates/rstudio/spark_cluster.json
+++ b/integration-tests/examples/azure_templates/rstudio/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "Standard_F4s",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/azure_templates/tensor/spark_cluster.json b/integration-tests/examples/azure_templates/tensor/spark_cluster.json
index 2cfc54f..565307a 100644
--- a/integration-tests/examples/azure_templates/tensor/spark_cluster.json
+++ b/integration-tests/examples/azure_templates/tensor/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "Standard_NC6",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/azure_templates/zeppelin/spark_cluster.json b/integration-tests/examples/azure_templates/zeppelin/spark_cluster.json
index 6b0e8bc..51615e1 100644
--- a/integration-tests/examples/azure_templates/zeppelin/spark_cluster.json
+++ b/integration-tests/examples/azure_templates/zeppelin/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "Standard_F4s",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json b/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json
index 4fde8f6..2c7aff4 100644
--- a/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json
+++ b/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-zeppelin",
   "name" : "set the name",
   "shape" : "Standard_F2s",
-  "version" : "zeppelin-0.7.0",
-  "template_name" : "Zeppelin 0.7.0"
+  "version" : "zeppelin-0.8.0",
+  "template_name": "Apache Zeppelin 0.8.0"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/config.properties b/integration-tests/examples/config.properties
index 5a9e776..4ee463e 100644
--- a/integration-tests/examples/config.properties
+++ b/integration-tests/examples/config.properties
@@ -1,20 +1,21 @@
-# *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ******************************************************************************
 
 JENKINS_USERNAME=
 JENKINS_PASSWORD=
diff --git a/integration-tests/examples/copy_files.py b/integration-tests/examples/copy_files.py
index d841e85..3ecc17d 100644
--- a/integration-tests/examples/copy_files.py
+++ b/integration-tests/examples/copy_files.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -86,7 +89,7 @@
 def upload_gcp():
     try:
         for f in dataset_file:
-            local('gsutil -m cp /tmp/{0} gs://{1}/{2}_dataset/'.format(f, args.storage, args.notebook))
+            local('sudo gsutil -m cp /tmp/{0} gs://{1}/{2}_dataset/'.format(f, args.storage, args.notebook))
     except Exception as err:
         print('Failed to upload test dataset to bucket', str(err))
         sys.exit(1)
diff --git a/integration-tests/examples/ec2_templates/deeplearning/spark_cluster.json b/integration-tests/examples/ec2_templates/deeplearning/spark_cluster.json
index c68c151..33975f2 100644
--- a/integration-tests/examples/ec2_templates/deeplearning/spark_cluster.json
+++ b/integration-tests/examples/ec2_templates/deeplearning/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "p2.xlarge",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/ec2_templates/jupyter/spark_cluster.json b/integration-tests/examples/ec2_templates/jupyter/spark_cluster.json
index acf9ced..65b0d92 100644
--- a/integration-tests/examples/ec2_templates/jupyter/spark_cluster.json
+++ b/integration-tests/examples/ec2_templates/jupyter/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "c4.xlarge",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/ec2_templates/rstudio/spark_cluster.json b/integration-tests/examples/ec2_templates/rstudio/spark_cluster.json
index acf9ced..65b0d92 100644
--- a/integration-tests/examples/ec2_templates/rstudio/spark_cluster.json
+++ b/integration-tests/examples/ec2_templates/rstudio/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "c4.xlarge",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/ec2_templates/tensor/spark_cluster.json b/integration-tests/examples/ec2_templates/tensor/spark_cluster.json
index c68c151..33975f2 100644
--- a/integration-tests/examples/ec2_templates/tensor/spark_cluster.json
+++ b/integration-tests/examples/ec2_templates/tensor/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "p2.xlarge",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/ec2_templates/zeppelin/spark_cluster.json b/integration-tests/examples/ec2_templates/zeppelin/spark_cluster.json
index acf9ced..65b0d92 100644
--- a/integration-tests/examples/ec2_templates/zeppelin/spark_cluster.json
+++ b/integration-tests/examples/ec2_templates/zeppelin/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "c4.xlarge",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json b/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json
index 55f665e..287ef45 100644
--- a/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json
+++ b/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-zeppelin",
   "name" : "set the name",
   "shape" : "t2.medium",
-  "version" : "zeppelin-0.7.0",
-  "template_name" : "Zeppelin 0.7.0"
+  "version" : "zeppelin-0.8.0",
+  "template_name": "Apache Zeppelin 0.8.0"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/deeplearning/spark_cluster.json b/integration-tests/examples/gcp_templates/deeplearning/spark_cluster.json
index 0c9253d..63047da 100644
--- a/integration-tests/examples/gcp_templates/deeplearning/spark_cluster.json
+++ b/integration-tests/examples/gcp_templates/deeplearning/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "n1-standard-2",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/jupyter/jupyter-notebook.json b/integration-tests/examples/gcp_templates/jupyter/jupyter-notebook.json
index bc55471..c109dc1 100644
--- a/integration-tests/examples/gcp_templates/jupyter/jupyter-notebook.json
+++ b/integration-tests/examples/gcp_templates/jupyter/jupyter-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-jupyter",
   "name" : "set the name",
   "shape" : "n1-standard-2",
-  "version" : "jupyter_notebook-5.2.0",
-  "template_name" : "Jupyter notebook 5.2.0"
+  "version" : "jupyter_notebook-5.7.4",
+  "template_name" : "Jupyter notebook 5.7.4"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/jupyter/spark_cluster.json b/integration-tests/examples/gcp_templates/jupyter/spark_cluster.json
index 0c9253d..63047da 100644
--- a/integration-tests/examples/gcp_templates/jupyter/spark_cluster.json
+++ b/integration-tests/examples/gcp_templates/jupyter/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "n1-standard-2",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/rstudio/rstudio-notebook.json b/integration-tests/examples/gcp_templates/rstudio/rstudio-notebook.json
index 88cb77e..607992a 100644
--- a/integration-tests/examples/gcp_templates/rstudio/rstudio-notebook.json
+++ b/integration-tests/examples/gcp_templates/rstudio/rstudio-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-rstudio",
   "name" : "set the name",
   "shape" : "n1-standard-2",
-  "version" : "RStudio-1.1.383",
-  "template_name" : "RStudio 1.1.383"
+  "version" : "RStudio-1.1.463",
+  "template_name" : "RStudio 1.1.463"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/rstudio/spark_cluster.json b/integration-tests/examples/gcp_templates/rstudio/spark_cluster.json
index 0c9253d..63047da 100644
--- a/integration-tests/examples/gcp_templates/rstudio/spark_cluster.json
+++ b/integration-tests/examples/gcp_templates/rstudio/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "n1-standard-2",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/tensor/spark_cluster.json b/integration-tests/examples/gcp_templates/tensor/spark_cluster.json
index 0c9253d..63047da 100644
--- a/integration-tests/examples/gcp_templates/tensor/spark_cluster.json
+++ b/integration-tests/examples/gcp_templates/tensor/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "n1-standard-2",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/zeppelin/spark_cluster.json b/integration-tests/examples/gcp_templates/zeppelin/spark_cluster.json
index 0c9253d..63047da 100644
--- a/integration-tests/examples/gcp_templates/zeppelin/spark_cluster.json
+++ b/integration-tests/examples/gcp_templates/zeppelin/spark_cluster.json
@@ -4,5 +4,5 @@
   "dataengine_instance_count" : "2",
   "dataengine_instance_shape": "n1-standard-2",
   "notebook_name" : "set notebook name",
-  "template_name" : "Spark cluster"
+  "template_name": "Apache Spark cluster"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/gcp_templates/zeppelin/zeppelin-notebook.json b/integration-tests/examples/gcp_templates/zeppelin/zeppelin-notebook.json
index 019f58c..56b8790 100644
--- a/integration-tests/examples/gcp_templates/zeppelin/zeppelin-notebook.json
+++ b/integration-tests/examples/gcp_templates/zeppelin/zeppelin-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-zeppelin",
   "name" : "set the name",
   "shape" : "n1-standard-2",
-  "version" : "zeppelin-0.7.2",
-  "template_name" : "Zeppelin 0.7.2"
+  "version" : "zeppelin-0.8.0",
+  "template_name": "Apache Zeppelin 0.8.0"
 }
\ No newline at end of file
diff --git a/integration-tests/examples/scenario_deeplearning/deeplearning_tests.py b/integration-tests/examples/scenario_deeplearning/deeplearning_tests.py
index 3c39105..c4873ad 100644
--- a/integration-tests/examples/scenario_deeplearning/deeplearning_tests.py
+++ b/integration-tests/examples/scenario_deeplearning/deeplearning_tests.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -76,18 +79,6 @@
         prepare_ipynb(i, '/home/{}/test_templates/template_visualization_tensor.ipynb'.format(args.os_user), 'visualization_tensor')
         run_ipynb('visualization_tensor')
 
-def run_caffe():
-    interpreters = ['pyspark_local']
-    for i in interpreters:
-        prepare_ipynb(i, '/home/{}/test_templates/template_caffe.ipynb'.format(args.os_user), 'test_caffe')
-        run_ipynb('test_caffe')
-
-def run_caffe2():
-    interpreters = ['pyspark_local']
-    for i in interpreters:
-        prepare_ipynb(i, '/home/{}/test_templates/template_caffe2.ipynb'.format(args.os_user), 'test_caffe2')
-        run_ipynb('test_caffe2')
-
 def run_cntk():
     interpreters = ['pyspark_local']
     for i in interpreters:
@@ -123,8 +114,6 @@
     try:
         prepare_templates()
         run_tensor()
-        run_caffe()
-        run_caffe2()
         run_cntk()
         run_keras()
         run_mxnet()
diff --git a/integration-tests/examples/scenario_jupyter/jupyter_tests.py b/integration-tests/examples/scenario_jupyter/jupyter_tests.py
index b0e6ed8..018e678 100644
--- a/integration-tests/examples/scenario_jupyter/jupyter_tests.py
+++ b/integration-tests/examples/scenario_jupyter/jupyter_tests.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/integration-tests/examples/scenario_rstudio/rstudio_tests.py b/integration-tests/examples/scenario_rstudio/rstudio_tests.py
index d5e05e7..d9a1540 100644
--- a/integration-tests/examples/scenario_rstudio/rstudio_tests.py
+++ b/integration-tests/examples/scenario_rstudio/rstudio_tests.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/integration-tests/examples/scenario_tensor/tensor_tests.py b/integration-tests/examples/scenario_tensor/tensor_tests.py
index 9e3b185..3bbb93b 100644
--- a/integration-tests/examples/scenario_tensor/tensor_tests.py
+++ b/integration-tests/examples/scenario_tensor/tensor_tests.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/integration-tests/examples/scenario_zeppelin/zeppelin_tests.py b/integration-tests/examples/scenario_zeppelin/zeppelin_tests.py
index c75d022..1c9f05c 100644
--- a/integration-tests/examples/scenario_zeppelin/zeppelin_tests.py
+++ b/integration-tests/examples/scenario_zeppelin/zeppelin_tests.py
@@ -2,19 +2,22 @@
 
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
@@ -66,10 +69,10 @@
         return "OK"
 
 def import_note(note_path, notebook_ip):
-    files = {'file': (note_path, open(note_path, 'rb'), 'application/json', {'Expires': '0'})}
-    response = requests.post('http://{0}:8080/api/notebook/import'.format(notebook_ip), files=files)
+    headers = {'Accept': 'application/json', 'Content-Type': 'application/json', 'Expires': '0'}
+    response = requests.post('http://{0}:8080/api/notebook/import'.format(notebook_ip), data=open(note_path, 'rb'), headers=headers)
     status = json.loads(response.content)
-    if status.get('status') == 'CREATED':
+    if status.get('status') == 'OK':
         print('Imported notebook: {}'.format(note_path))
         return status.get('body')
     else:
diff --git a/integration-tests/examples/test_templates/deeplearning/cat_gray.jpg b/integration-tests/examples/test_templates/deeplearning/cat_gray.jpg
deleted file mode 100644
index 43c5ce3..0000000
--- a/integration-tests/examples/test_templates/deeplearning/cat_gray.jpg
+++ /dev/null
Binary files differ
diff --git a/integration-tests/examples/test_templates/deeplearning/conv.prototxt b/integration-tests/examples/test_templates/deeplearning/conv.prototxt
index 8671bb5..0343891 100644
--- a/integration-tests/examples/test_templates/deeplearning/conv.prototxt
+++ b/integration-tests/examples/test_templates/deeplearning/conv.prototxt
@@ -1,3 +1,24 @@
+# *****************************************************************************
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+# ******************************************************************************
+
 # Simple single-layer network to showcase editing model parameters.
 name: "convolution"
 layer {
diff --git a/integration-tests/examples/test_templates/deeplearning/template_caffe.ipynb b/integration-tests/examples/test_templates/deeplearning/template_caffe.ipynb
deleted file mode 100644
index 11457fc..0000000
--- a/integration-tests/examples/test_templates/deeplearning/template_caffe.ipynb
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "import numpy as np\n",
-    "import matplotlib.pyplot as plt\n",
-    "%matplotlib inline\n",
-    "\n",
-    "# Make sure that caffe is on the python path:\n",
-    "caffe_root = './'  # this file is expected to be in {caffe_root}/examples\n",
-    "import sys\n",
-    "sys.path.insert(0, caffe_root + 'python')\n",
-    "\n",
-    "import caffe\n",
-    "\n",
-    "# configure plotting\n",
-    "plt.rcParams['figure.figsize'] = (10, 10)\n",
-    "plt.rcParams['image.interpolation'] = 'nearest'\n",
-    "plt.rcParams['image.cmap'] = 'gray'"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Load the net, list its data and params, and filter an example image.\n",
-    "caffe.set_mode_gpu()\n",
-    "net = caffe.Net('test_templates/conv.prototxt', caffe.TEST)\n",
-    "print(\"blobs {}\\nparams {}\".format(net.blobs.keys(), net.params.keys()))\n",
-    "\n",
-    "# load image and prepare as a single input batch for Caffe\n",
-    "im = np.array(caffe.io.load_image('test_templates/cat_gray.jpg', color=False)).squeeze()\n",
-    "plt.title(\"original image\")\n",
-    "plt.imshow(im)\n",
-    "plt.axis('off')\n",
-    "\n",
-    "im_input = im[np.newaxis, np.newaxis, :, :]\n",
-    "net.blobs['data'].reshape(*im_input.shape)\n",
-    "net.blobs['data'].data[...] = im_input"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# helper show filter outputs\n",
-    "def show_filters(net):\n",
-    "    net.forward()\n",
-    "    plt.figure()\n",
-    "    filt_min, filt_max = net.blobs['conv'].data.min(), net.blobs['conv'].data.max()\n",
-    "    for i in range(3):\n",
-    "        plt.subplot(1,4,i+2)\n",
-    "        plt.title(\"filter #{} output\".format(i))\n",
-    "        plt.imshow(net.blobs['conv'].data[0, i], vmin=filt_min, vmax=filt_max)\n",
-    "        plt.tight_layout()\n",
-    "        plt.axis('off')\n",
-    "\n",
-    "# filter the image with initial \n",
-    "show_filters(net)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Python 2",
-   "language": "python",
-   "name": "KERNEL_NAME"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 2
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython2",
-   "version": "2.7.13"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/integration-tests/examples/test_templates/deeplearning/template_caffe2.ipynb b/integration-tests/examples/test_templates/deeplearning/template_caffe2.ipynb
deleted file mode 100644
index f771e33..0000000
--- a/integration-tests/examples/test_templates/deeplearning/template_caffe2.ipynb
+++ /dev/null
@@ -1,619 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Caffe2 Basic Concepts - Operators & Nets\n",
-    "\n",
-    "In this tutorial we will go through a set of Caffe2 basics: the basic concepts including how operators and nets are being written.\n",
-    "\n",
-    "First, let's import caffe2. `core` and `workspace` are usually the two that you need most. If you want to manipulate protocol buffers generated by caffe2, you probably also want to import `caffe2_pb2` from `caffe2.proto`."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# We'll also import a few standard python libraries\n",
-    "from matplotlib import pyplot\n",
-    "import numpy as np\n",
-    "import time\n",
-    "\n",
-    "# These are the droids you are looking for.\n",
-    "from caffe2.python import core, workspace\n",
-    "from caffe2.proto import caffe2_pb2\n",
-    "\n",
-    "# Let's show all plots inline.\n",
-    "%matplotlib inline"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "You might see a warning saying that caffe2 does not have GPU support. That means you are running a CPU-only build. Don't be alarmed - anything CPU is still runnable without problem."
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "collapsed": true
-   },
-   "source": [
-    "## Workspaces\n",
-    "\n",
-    "Let's cover workspaces first, where all the data reside.\n",
-    "\n",
-    "If you are familiar with Matlab, workspace consists of blobs you create and store in memory. For now, consider a blob to be a N-dimensional Tensor similar to numpy's ndarray, but is contiguous. Down the road, we will show you that a blob is actually a typed pointer that can store any type of C++ objects, but Tensor is the most common type stored in a blob. Let's show what the interface looks like.\n",
-    "\n",
-    "`Blobs()` prints out all existing blobs in the workspace. \n",
-    "`HasBlob()` queries if a blob exists in the workspace. For now, we don't have anything yet."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))\n",
-    "print(\"Workspace has blob 'X'? {}\".format(workspace.HasBlob(\"X\")))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "We can feed blobs into the workspace using `FeedBlob()`."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "X = np.random.randn(2, 3).astype(np.float32)\n",
-    "print(\"Generated X from numpy:\\n{}\".format(X))\n",
-    "workspace.FeedBlob(\"X\", X)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Now, let's take a look what blobs there are in the workspace."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [],
-   "source": [
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))\n",
-    "print(\"Workspace has blob 'X'? {}\".format(workspace.HasBlob(\"X\")))\n",
-    "print(\"Fetched X:\\n{}\".format(workspace.FetchBlob(\"X\")))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Let's verify that the arrays are equal."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "np.testing.assert_array_equal(X, workspace.FetchBlob(\"X\"))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Also, if you are trying to access a blob that does not exist, an error will be thrown:"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "try:\n",
-    "    workspace.FetchBlob(\"invincible_pink_unicorn\")\n",
-    "except RuntimeError as err:\n",
-    "    print(err)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "One thing that you might not use immediately: you can have multiple workspaces in Python using different names, and switch between them. Blobs in different workspaces are separate from each other. You can query the current workspace using `CurrentWorkspace`. Let's try switching the workspace by name (gutentag) and creating a new one if it doesn't exist."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "print(\"Current workspace: {}\".format(workspace.CurrentWorkspace()))\n",
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))\n",
-    "\n",
-    "# Switch the workspace. The second argument \"True\" means creating \n",
-    "# the workspace if it is missing.\n",
-    "workspace.SwitchWorkspace(\"gutentag\", True)\n",
-    "\n",
-    "# Let's print the current workspace. Note that there is nothing in the\n",
-    "# workspace yet.\n",
-    "print(\"Current workspace: {}\".format(workspace.CurrentWorkspace()))\n",
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Let's switch back to the default workspace."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "workspace.SwitchWorkspace(\"default\")\n",
-    "print(\"Current workspace: {}\".format(workspace.CurrentWorkspace()))\n",
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Finally, `ResetWorkspace()` clears anything that is in the current workspace."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "workspace.ResetWorkspace()"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Operators\n",
-    "\n",
-    "Operators in Caffe2 are kind of like functions. From the C++ side, they all derive from a common interface, and are registered by type, so that we can call different operators during runtime. The interface of operators is defined in `caffe2/proto/caffe2.proto`. Basically, it takes in a bunch of inputs, and produces a bunch of outputs.\n",
-    "\n",
-    "Remember, when we say \"create an operator\" in Caffe2 Python, nothing gets run yet. All it does is to create the protocol buffere that specifies what the operator should be. At a later time it will be sent to the C++ backend for execution. If you are not familiar with protobuf, it is a json-like serialization tool for structured data. Find more about protocol buffers [here](https://developers.google.com/protocol-buffers/).\n",
-    "\n",
-    "Let's see an actual example."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Create an operator.\n",
-    "op = core.CreateOperator(\n",
-    "    \"Relu\", # The type of operator that we want to run\n",
-    "    [\"X\"], # A list of input blobs by their names\n",
-    "    [\"Y\"], # A list of output blobs by their names\n",
-    ")\n",
-    "# and we are done!"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "As we mentioned, the created op is actually a protobuf object. Let's show the content."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [],
-   "source": [
-    "print(\"Type of the created op is: {}\".format(type(op)))\n",
-    "print(\"Content:\\n\")\n",
-    "print(str(op))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "OK, let's run the operator. We first feed in the input X to the workspace. \n",
-    "Then the simplest way to run an operator is to do `workspace.RunOperatorOnce(operator)`"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "workspace.FeedBlob(\"X\", np.random.randn(2, 3).astype(np.float32))\n",
-    "workspace.RunOperatorOnce(op)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "After execution, let's see if the operator is doing the right thing, which is our neural network's activation function ([Relu](https://en.wikipedia.org/wiki/Rectifier_(neural_networks))) in this case."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "print(\"Current blobs in the workspace: {}\\n\".format(workspace.Blobs()))\n",
-    "print(\"X:\\n{}\\n\".format(workspace.FetchBlob(\"X\")))\n",
-    "print(\"Y:\\n{}\\n\".format(workspace.FetchBlob(\"Y\")))\n",
-    "print(\"Expected:\\n{}\\n\".format(np.maximum(workspace.FetchBlob(\"X\"), 0)))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "This is working if your Expected output matches your Y output in this example.\n",
-    "\n",
-    "Operators also take optional arguments if needed. They are specified as key-value pairs. Let's take a look at one simple example, which takes a tensor and fills it with Gaussian random variables."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [],
-   "source": [
-    "op = core.CreateOperator(\n",
-    "    \"GaussianFill\",\n",
-    "    [], # GaussianFill does not need any parameters.\n",
-    "    [\"Z\"],\n",
-    "    shape=[100, 100], # shape argument as a list of ints.\n",
-    "    mean=1.0,  # mean as a single float\n",
-    "    std=1.0, # std as a single float\n",
-    ")\n",
-    "print(\"Content of op:\\n\")\n",
-    "print(str(op))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Let's run it and see if things are as intended."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "workspace.RunOperatorOnce(op)\n",
-    "temp = workspace.FetchBlob(\"Z\")\n",
-    "pyplot.hist(temp.flatten(), bins=50)\n",
-    "pyplot.title(\"Distribution of Z\")"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "If you see a bell shaped curve then it worked!"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Nets\n",
-    "\n",
-    "Nets are essentially computation graphs. We keep the name `Net` for backward consistency (and also to pay tribute to neural nets). A Net is composed of multiple operators just like a program written as a sequence of commands. Let's take a look.\n",
-    "\n",
-    "When we talk about nets, we will also talk about BlobReference, which is an object that wraps around a string so we can do easy chaining of operators.\n",
-    "\n",
-    "Let's create a network that is essentially the equivalent of the following python math:\n",
-    "```\n",
-    "X = np.random.randn(2, 3)\n",
-    "W = np.random.randn(5, 3)\n",
-    "b = np.ones(5)\n",
-    "Y = X * W^T + b\n",
-    "```\n",
-    "We'll show the progress step by step. Caffe2's `core.Net` is a wrapper class around a NetDef protocol buffer."
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "When creating a network, its underlying protocol buffer is essentially empty other than the network name. Let's create the net and then show the proto content."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": false
-   },
-   "outputs": [],
-   "source": [
-    "net = core.Net(\"my_first_net\")\n",
-    "print(\"Current network proto:\\n\\n{}\".format(net.Proto()))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Let's create a blob called X, and use GaussianFill to fill it with some random data."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [],
-   "source": [
-    "X = net.GaussianFill([], [\"X\"], mean=0.0, std=1.0, shape=[2, 3], run_once=0)\n",
-    "print(\"New network proto:\\n\\n{}\".format(net.Proto()))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "collapsed": true
-   },
-   "source": [
-    "You might have observed a few differences from the earlier `core.CreateOperator` call. Basically, when we have a net, you can direct create an operator *and* add it to the net at the same time using Python tricks: essentially, if you call `net.SomeOp` where SomeOp is a registered type string of an operator, this essentially gets translated to\n",
-    "```\n",
-    "op = core.CreateOperator(\"SomeOp\", ...)\n",
-    "net.Proto().op.append(op)\n",
-    "```\n",
-    "\n",
-    "Also, you might be wondering what X is. X is a `BlobReference` which basically records two things:\n",
-    "- what its name is. You can access the name by str(X)\n",
-    "- which net it gets created from. It is recorded by an internal variable `_from_net`, but most likely\n",
-    "you won't need that.\n",
-    "\n",
-    "Let's verify it. Also, remember, we are not actually running anything yet, so X contains nothing but a symbol. Don't expect to get any numerical values out of it right now :)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [],
-   "source": [
-    "print(\"Type of X is: {}\".format(type(X)))\n",
-    "print(\"The blob name is: {}\".format(str(X)))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Let's continue to create W and b."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "W = net.GaussianFill([], [\"W\"], mean=0.0, std=1.0, shape=[5, 3], run_once=0)\n",
-    "b = net.ConstantFill([], [\"b\"], shape=[5,], value=1.0, run_once=0)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Now, one simple code sugar: since the BlobReference objects know what net it is generated from, in addition to creating operators from net, you can also create operators from BlobReferences. Let's create the FC operator in this way."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "Y = X.FC([W, b], [\"Y\"])"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Under the hood, `X.FC(...)` simply delegates to `net.FC` by inserting `X` as the first input of the corresponding operator, so what we did above is equivalent to\n",
-    "```\n",
-    "Y = net.FC([X, W, b], [\"Y\"])\n",
-    "```\n",
-    "\n",
-    "Let's take a look at the current network."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "print(\"Current network proto:\\n\\n{}\".format(net.Proto()))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Too verbose huh? Let's try to visualize it as a graph. Caffe2 ships with a very minimal graph visualization tool for this purpose. Let's show that in ipython."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "from caffe2.python import net_drawer\n",
-    "from IPython import display\n",
-    "graph = net_drawer.GetPydotGraph(net, rankdir=\"LR\")\n",
-    "display.Image(graph.create_png(), width=800)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "So we have defined a `Net`, but nothing gets executed yet. Remember that the net above is essentially a protobuf that holds the definition of the network. When we actually want to run the network, what happens under the hood is:\n",
-    "- Instantiate a C++ net object from the protobuf;\n",
-    "- Call the instantiated net's Run() function.\n",
-    "\n",
-    "Before we do anything, we should clear any earlier workspace variables with `ResetWorkspace()`.\n",
-    "\n",
-    "Then there are two ways to run a net from Python. We will do the first option in the example below.\n",
-    "\n",
-    "1. Using `workspace.RunNetOnce()`, which instantiates, runs and immediately destructs the network. \n",
-    "2. A little bit more complex and involves two steps: \n",
-    "    (a) call `workspace.CreateNet()` to create the C++ net object owned by the workspace, and\n",
-    "    (b) use `workspace.RunNet()` by passing the name of the network to it.\n",
-    "    \n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "scrolled": false
-   },
-   "outputs": [],
-   "source": [
-    "workspace.ResetWorkspace()\n",
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))\n",
-    "workspace.RunNetOnce(net)\n",
-    "print(\"Blobs in the workspace after execution: {}\".format(workspace.Blobs()))\n",
-    "# Let's dump the contents of the blobs\n",
-    "for name in workspace.Blobs():\n",
-    "    print(\"{}:\\n{}\".format(name, workspace.FetchBlob(name)))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Now let's try the second way to create the net, and run it. First clear the variables with `ResetWorkspace()`, create the net with the workspace's net object you created earlier `CreateNet(net_object)`, and then run the net by name with `RunNet(net_name)`."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "workspace.ResetWorkspace()\n",
-    "print(\"Current blobs in the workspace: {}\".format(workspace.Blobs()))\n",
-    "workspace.CreateNet(net)\n",
-    "workspace.RunNet(net.Proto().name)\n",
-    "print(\"Blobs in the workspace after execution: {}\".format(workspace.Blobs()))\n",
-    "for name in workspace.Blobs():\n",
-    "    print(\"{}:\\n{}\".format(name, workspace.FetchBlob(name)))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "There are a few differences between `RunNetOnce` and `RunNet`, but probably the main difference is the computation time overhead. Since `RunNetOnce` involves serializing the protobuf to pass between Python and C and instantiating the network, it may take longer to run. Let's see in this case what the overhead is."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# It seems that %timeit magic does not work well with\n",
-    "# C++ extensions so we'll basically do for loops\n",
-    "start = time.time()\n",
-    "for i in range(1000):\n",
-    "    workspace.RunNetOnce(net)\n",
-    "end = time.time()\n",
-    "print('Run time per RunNetOnce: {}'.format((end - start) / 1000))\n",
-    "\n",
-    "start = time.time()\n",
-    "for i in range(1000):\n",
-    "    workspace.RunNet(net.Proto().name)\n",
-    "end = time.time()\n",
-    "print('Run time per RunNet: {}'.format((end - start) / 1000))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "collapsed": true
-   },
-   "source": [
-    "OK, so above are a few key components if you would like to use Caffe2 from the python side. We are going to add more to the tutorial as we find more needs. For now, kindly check out the rest of the tutorials!"
-   ]
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Python 2",
-   "language": "python",
-   "name": "KERNEL_NAME"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 2
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython2",
-   "version": "2.7.13"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/integration-tests/examples/test_templates/jupyter/template_visualization_sparkr.ipynb b/integration-tests/examples/test_templates/jupyter/template_visualization_sparkr.ipynb
index 5afce54..10f09a7 100644
--- a/integration-tests/examples/test_templates/jupyter/template_visualization_sparkr.ipynb
+++ b/integration-tests/examples/test_templates/jupyter/template_visualization_sparkr.ipynb
@@ -86,7 +86,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "head(summary(flights))[c(\"summary\", \"ArrDelay\",\"CarrierDelay\",\"Distance\")]"
+    "head(summary(limit(flights,1000)))[c(\"summary\", \"ArrDelay\",\"CarrierDelay\",\"Distance\")]"
    ]
   },
   {
diff --git a/integration-tests/examples/test_templates/zeppelin/template_visualization_sparkr.json b/integration-tests/examples/test_templates/zeppelin/template_visualization_sparkr.json
index 863b7b5..62c1400 100644
--- a/integration-tests/examples/test_templates/zeppelin/template_visualization_sparkr.json
+++ b/integration-tests/examples/test_templates/zeppelin/template_visualization_sparkr.json
@@ -1 +1 @@
-{"paragraphs":[{"text":"%INTERPRETER_NAME\nsparkR.session()\n\nfull_path <- function(file_path) {\n    working_storage <- \"WORKING_STORAGE\"\n    output_directory <- \"zeppelin/r\"\n    protocol_name <- 'PROTOCOL_NAME'\n    sprintf('%s://%s/%s/%s', protocol_name, working_storage, output_directory, file_path)\n}","dateUpdated":"2018-01-04T09:24:59+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823463_-1635169484","id":"20170329-112414_1472595813","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:372"},{"text":"%INTERPRETER_NAME\ncarriers <- read.df(full_path(\"carriers\"), \"parquet\")\ncreateOrReplaceTempView(carriers, \"carriers\")\nprintSchema(carriers)\nhead(carriers, 20)","dateUpdated":"2018-01-04T09:24:07+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823469_-1639016973","id":"20170329-112449_1638412317","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:373"},{"text":"%INTERPRETER_NAME\nairports <- read.df(full_path(\"airports\"), \"parquet\")\ncreateOrReplaceTempView(airports, \"airports\")\nprintSchema(airports)\nhead(airports, 20)","dateUpdated":"2018-01-04T09:24:08+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823470_-1637862726","id":"20170329-112510_202152993","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:374"},{"text":"%INTERPRETER_NAME\nflights <- read.df(full_path(\"flights\"), \"parquet\")\ncreateOrReplaceTempView(flights, \"flights\")\nprintSchema(flights)\nhead(flights, 10)[c(\"ArrDelay\",\"CarrierDelay\",\"WeatherDelay\",\"Distance\")]","dateUpdated":"2018-01-04T09:24:10+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823471_-1638247475","id":"20170329-112523_1571758659","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:375"},{"text":"%INTERPRETER_NAME\nhead(summary(flights))[c(\"summary\", \"ArrDelay\",\"CarrierDelay\",\"Distance\")]","dateUpdated":"2018-01-04T09:24:10+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823472_-1627859255","id":"20170329-112535_1375397859","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:376"},{"text":"%INTERPRETER_NAME\nlibrary(ggplot2)\nlibrary(reshape2)\n\ndelay_sql <- sql(\"\nSELECT SUBSTR(c.description, 0, 15) as Carrier, WorkDayDelay, WeekendDelay \nFROM\n       (SELECT CEIL( AVG(f.ArrDelay + f.DepDelay) ) as WorkDayDelay, f.UniqueCarrier\n        FROM flights f\n        WHERE f.DayOfWeek < 6\n        GROUP BY f.UniqueCarrier \n        ORDER BY WorkDayDelay desc \n        LIMIT 10) t\n    JOIN\n       (SELECT CEIL( AVG(f.ArrDelay + f.DepDelay) ) as WeekendDelay, f.UniqueCarrier\n        FROM flights f\n        WHERE f.DayOfWeek > 5\n        GROUP BY f.UniqueCarrier) t1\n      ON t.UniqueCarrier = t1.UniqueCarrier\n    JOIN carriers c \n      ON t.UniqueCarrier = c.code \nORDER BY WeekendDelay DESC, WorkDayDelay DESC\n\")\n\ndelay <- collect(delay_sql)\ndelay_melt <- melt(delay[c('Carrier', 'WorkDayDelay', 'WeekendDelay')])\n\ncolor_range_days <- c(\"#2966FF\", \"#61F2FF\")\n\nggplot(data=delay_melt, aes(x=Carrier, y=value, fill=variable)) +\n    geom_bar(stat=\"identity\", width=.7, position=\"dodge\") +\n    stat_summary(fun.y=mean, geom = \"line\", mapping = aes(group = 1), color=\"red\") +\n    stat_summary(fun.y=mean, geom = \"point\", mapping = aes(group = 1), color=\"red\") +\n    theme(legend.position=\"right\", axis.text.x=element_text(angle=90)) +\n    labs(x=\"Carrier\", y=\"Minutes\", fill=\"Day Type\") +\n    coord_fixed(ratio = .2) +\n    scale_fill_manual(values=color_range_days) +\n    scale_y_continuous(breaks=seq(0, 30, 5))","dateUpdated":"2018-01-04T09:24:12+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823472_-1627859255","id":"20170329-112549_2110062261","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:377"},{"text":"%INTERPRETER_NAME\ntop_flights_sql <- sql(\"\nSELECT t.cnt as FlightsAmt, carriers.description as Carrier \nFROM (\n    SELECT count(*) as cnt, flights.UniqueCarrier as carrier_code \n    FROM flights \n    GROUP BY flights.UniqueCarrier LIMIT 6) t \nLEFT JOIN carriers \n  ON t.carrier_code = carriers.code\n\")\n\ntop_flights <- collect(top_flights_sql)\n\nggplot(transform(transform(top_flights, value=FlightsAmt/sum(FlightsAmt)), labPos=cumsum(FlightsAmt)-FlightsAmt/2), \n       aes(x=\"\", y = FlightsAmt, fill = Carrier)) +\n    geom_bar(width = 1, stat = \"identity\") +\n    coord_polar(\"y\", start=0) +\n    scale_fill_brewer(palette=\"Dark2\") +\n    theme_bw() +\n    theme(axis.text.x=element_blank() ,panel.grid.major=element_blank(),panel.grid.minor = element_blank(),panel.border = element_blank()) +\n    geom_text(size=4, aes(y=labPos, label=scales::percent(value))) + \n    geom_text(size=3, aes(x=1.8, y=labPos, label=top_flights$Carrier)) + \n    theme(legend.position=\"none\")","dateUpdated":"2018-01-04T09:24:14+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823473_-1628244004","id":"20170329-112607_812774791","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:378"},{"text":"%INTERPRETER_NAME\ndistance_sql = sql(\"\nSELECT SUBSTR(c.description, 0, 15) as Carrier, COUNT(Distance) AS Distance \nFROM flights f \nJOIN carriers c \n  ON f.UniqueCarrier = c.code \nGROUP BY c.description \nORDER BY distance DESC \nLIMIT 10\n\")\n\ndistance <- collect(distance_sql)\n\ndistance$Carrier <- factor(distance$Carrier, levels = distance$Carrier[order(-distance$Distance)])\n\ncolor_range <-  c(\"#2966FF\", \"#2E73FF\",\"#3380FF\", \"#388CFF\", \"#3D99FF\", \"#42A6FF\", \"#47B2FF\", \"#4CBFFF\", \"#52CCFF\", \n                  \"#57D9FF\", \"#5CE6FF\", \"#61F2FF\", \"#66FFFF\")\n\nggplot(data=distance, aes(x=Carrier, y=Distance, fill=Carrier)) +\n    geom_bar(stat=\"identity\", width=.7, position=\"dodge\") +\n    theme(axis.text.x=element_text(angle=90)) +\n    scale_fill_manual(values=color_range) +\n    theme(legend.position=\"none\")","dateUpdated":"2018-01-04T09:24:16+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823474_-1627089757","id":"20170329-112623_1822577399","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:379"}],"name":"Flights_Visualization_SparkR","id":"2D3B7XFMR","angularObjects":{"2C6RJRBD2:shared_process":[],"2C6RJRBD1:shared_process":[]},"config":{"looknfeel":"default","personalizedMode":"false"},"info":{}}
\ No newline at end of file
+{"paragraphs":[{"text":"%INTERPRETER_NAME\nsparkR.session()\n\nfull_path <- function(file_path) {\n    working_storage <- \"WORKING_STORAGE\"\n    output_directory <- \"zeppelin/r\"\n    protocol_name <- 'PROTOCOL_NAME'\n    sprintf('%s://%s/%s/%s', protocol_name, working_storage, output_directory, file_path)\n}","dateUpdated":"2018-01-04T09:24:59+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823463_-1635169484","id":"20170329-112414_1472595813","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:372"},{"text":"%INTERPRETER_NAME\ncarriers <- read.df(full_path(\"carriers\"), \"parquet\")\ncreateOrReplaceTempView(carriers, \"carriers\")\nprintSchema(carriers)\nhead(carriers, 20)","dateUpdated":"2018-01-04T09:24:07+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823469_-1639016973","id":"20170329-112449_1638412317","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:373"},{"text":"%INTERPRETER_NAME\nairports <- read.df(full_path(\"airports\"), \"parquet\")\ncreateOrReplaceTempView(airports, \"airports\")\nprintSchema(airports)\nhead(airports, 20)","dateUpdated":"2018-01-04T09:24:08+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823470_-1637862726","id":"20170329-112510_202152993","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:374"},{"text":"%INTERPRETER_NAME\nflights <- read.df(full_path(\"flights\"), \"parquet\")\ncreateOrReplaceTempView(flights, \"flights\")\nprintSchema(flights)\nhead(flights, 10)[c(\"ArrDelay\",\"CarrierDelay\",\"WeatherDelay\",\"Distance\")]","dateUpdated":"2018-01-04T09:24:10+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823471_-1638247475","id":"20170329-112523_1571758659","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:375"},{"text":"%INTERPRETER_NAME\nhead(summary(limit(flights,10)))[c(\"summary\", \"ArrDelay\",\"CarrierDelay\",\"Distance\")]","dateUpdated":"2018-01-04T09:24:10+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823472_-1627859255","id":"20170329-112535_1375397859","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:376"},{"text":"%INTERPRETER_NAME\nlibrary(ggplot2)\nlibrary(reshape2)\n\ndelay_sql <- sql(\"\nSELECT SUBSTR(c.description, 0, 15) as Carrier, WorkDayDelay, WeekendDelay \nFROM\n       (SELECT CEIL( AVG(f.ArrDelay + f.DepDelay) ) as WorkDayDelay, f.UniqueCarrier\n        FROM flights f\n        WHERE f.DayOfWeek < 6\n        GROUP BY f.UniqueCarrier \n        ORDER BY WorkDayDelay desc \n        LIMIT 10) t\n    JOIN\n       (SELECT CEIL( AVG(f.ArrDelay + f.DepDelay) ) as WeekendDelay, f.UniqueCarrier\n        FROM flights f\n        WHERE f.DayOfWeek > 5\n        GROUP BY f.UniqueCarrier) t1\n      ON t.UniqueCarrier = t1.UniqueCarrier\n    JOIN carriers c \n      ON t.UniqueCarrier = c.code \nORDER BY WeekendDelay DESC, WorkDayDelay DESC\n\")\n\ndelay <- collect(delay_sql)\ndelay_melt <- melt(delay[c('Carrier', 'WorkDayDelay', 'WeekendDelay')])\n\ncolor_range_days <- c(\"#2966FF\", \"#61F2FF\")\n\nggplot(data=delay_melt, aes(x=Carrier, y=value, fill=variable)) +\n    geom_bar(stat=\"identity\", width=.7, position=\"dodge\") +\n    stat_summary(fun.y=mean, geom = \"line\", mapping = aes(group = 1), color=\"red\") +\n    stat_summary(fun.y=mean, geom = \"point\", mapping = aes(group = 1), color=\"red\") +\n    theme(legend.position=\"right\", axis.text.x=element_text(angle=90)) +\n    labs(x=\"Carrier\", y=\"Minutes\", fill=\"Day Type\") +\n    coord_fixed(ratio = .2) +\n    scale_fill_manual(values=color_range_days) +\n    scale_y_continuous(breaks=seq(0, 30, 5))","dateUpdated":"2018-01-04T09:24:12+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823472_-1627859255","id":"20170329-112549_2110062261","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:377"},{"text":"%INTERPRETER_NAME\ntop_flights_sql <- sql(\"\nSELECT t.cnt as FlightsAmt, carriers.description as Carrier \nFROM (\n    SELECT count(*) as cnt, flights.UniqueCarrier as carrier_code \n    FROM flights \n    GROUP BY flights.UniqueCarrier LIMIT 6) t \nLEFT JOIN carriers \n  ON t.carrier_code = carriers.code\n\")\n\ntop_flights <- collect(top_flights_sql)\n\nggplot(transform(transform(top_flights, value=FlightsAmt/sum(FlightsAmt)), labPos=cumsum(FlightsAmt)-FlightsAmt/2), \n       aes(x=\"\", y = FlightsAmt, fill = Carrier)) +\n    geom_bar(width = 1, stat = \"identity\") +\n    coord_polar(\"y\", start=0) +\n    scale_fill_brewer(palette=\"Dark2\") +\n    theme_bw() +\n    theme(axis.text.x=element_blank() ,panel.grid.major=element_blank(),panel.grid.minor = element_blank(),panel.border = element_blank()) +\n    geom_text(size=4, aes(y=labPos, label=scales::percent(value))) + \n    geom_text(size=3, aes(x=1.8, y=labPos, label=top_flights$Carrier)) + \n    theme(legend.position=\"none\")","dateUpdated":"2018-01-04T09:24:14+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823473_-1628244004","id":"20170329-112607_812774791","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:378"},{"text":"%INTERPRETER_NAME\ndistance_sql = sql(\"\nSELECT SUBSTR(c.description, 0, 15) as Carrier, COUNT(Distance) AS Distance \nFROM flights f \nJOIN carriers c \n  ON f.UniqueCarrier = c.code \nGROUP BY c.description \nORDER BY distance DESC \nLIMIT 10\n\")\n\ndistance <- collect(distance_sql)\n\ndistance$Carrier <- factor(distance$Carrier, levels = distance$Carrier[order(-distance$Distance)])\n\ncolor_range <-  c(\"#2966FF\", \"#2E73FF\",\"#3380FF\", \"#388CFF\", \"#3D99FF\", \"#42A6FF\", \"#47B2FF\", \"#4CBFFF\", \"#52CCFF\", \n                  \"#57D9FF\", \"#5CE6FF\", \"#61F2FF\", \"#66FFFF\")\n\nggplot(data=distance, aes(x=Carrier, y=Distance, fill=Carrier)) +\n    geom_bar(stat=\"identity\", width=.7, position=\"dodge\") +\n    theme(axis.text.x=element_text(angle=90)) +\n    scale_fill_manual(values=color_range) +\n    theme(legend.position=\"none\")","dateUpdated":"2018-01-04T09:24:16+0000","config":{"colWidth":12,"editorMode":"ace/mode/text","results":{},"enabled":true,"editorSetting":{"language":"text","editOnDblClick":false}},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1515057823474_-1627089757","id":"20170329-112623_1822577399","dateCreated":"2018-01-04T09:23:43+0000","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:379"}],"name":"Flights_Visualization_SparkR","id":"2D3B7XFMR","angularObjects":{"2C6RJRBD2:shared_process":[],"2C6RJRBD1:shared_process":[]},"config":{"looknfeel":"default","personalizedMode":"false"},"info":{}}
\ No newline at end of file
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 9aca794..9ac5284 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -302,6 +303,13 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <useSystemClassLoader>false</useSystemClassLoader>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/VirtualMachineStatusChecker.java b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/VirtualMachineStatusChecker.java
index 6b70fb3..0ecff1d 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/VirtualMachineStatusChecker.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/VirtualMachineStatusChecker.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2018, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.cloud;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonHelper.java b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonHelper.java
index ca0f1f8..3b0ef82 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonHelper.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonHelper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.cloud.aws;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonInstanceState.java b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonInstanceState.java
index 0460edf..576be9d 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonInstanceState.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/aws/AmazonInstanceState.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.cloud.aws;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/azure/AzureHelper.java b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/azure/AzureHelper.java
index 546481f..25fb388 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/azure/AzureHelper.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/azure/AzureHelper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2018, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.cloud.azure;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpHelper.java b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpHelper.java
index 0d5c3f4..7240464 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpHelper.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpHelper.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.cloud.gcp;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpInstanceState.java b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpInstanceState.java
index 591b45e..5c084c1 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpInstanceState.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/cloud/gcp/GcpInstanceState.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.cloud.gcp;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/AckStatus.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/AckStatus.java
index 3fd4120..df4b7e7 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/AckStatus.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/AckStatus.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Bridge.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Bridge.java
index 786b7da..8cc6015 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Bridge.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Bridge.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Docker.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Docker.java
index d658d2e..012edaf 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Docker.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Docker.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/DockerContainer.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/DockerContainer.java
index d023e0e..c22a688 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/DockerContainer.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/DockerContainer.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/HostConfig.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/HostConfig.java
index 400ce07..c2d5db0 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/HostConfig.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/HostConfig.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Labels.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Labels.java
index 65a1de3..1e49a60 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Labels.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Labels.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/NetworkSettings.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/NetworkSettings.java
index 8d0fdf1..295c217 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/NetworkSettings.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/NetworkSettings.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Networks.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Networks.java
index a95496c..2679fa3 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/Networks.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/Networks.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/docker/SSHConnect.java b/integration-tests/src/main/java/com/epam/dlab/automation/docker/SSHConnect.java
index b7adc85..fa369fa 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/docker/SSHConnect.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/docker/SSHConnect.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.docker;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/CloudException.java b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/CloudException.java
index f17d143..b576931 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/CloudException.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/CloudException.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2018, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.exceptions;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/DockerException.java b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/DockerException.java
index cfb5b54..ae8d7df 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/DockerException.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/DockerException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.exceptions;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/JenkinsException.java b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/JenkinsException.java
index de788fd..4b70836 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/JenkinsException.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/JenkinsException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.exceptions;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/LoadFailException.java b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/LoadFailException.java
index 2f120c0..16d4f20 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/LoadFailException.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/exceptions/LoadFailException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.exceptions;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudHelper.java b/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudHelper.java
index 6837161..4e0894f 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudHelper.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudHelper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2018, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.helper;
 
@@ -27,6 +28,8 @@
 import com.epam.dlab.automation.model.DeployClusterDto;
 import com.epam.dlab.automation.model.DeployDataProcDto;
 import com.epam.dlab.automation.model.DeployEMRDto;
+import com.epam.dlab.automation.model.NotebookConfig;
+import org.apache.commons.lang3.StringUtils;
 
 import java.io.IOException;
 import java.util.List;
@@ -171,10 +174,10 @@
         }
     }
 
-    public static String getDockerTemplateFileForDES() {
+	public static String getDockerTemplateFileForDES(boolean isSpotRequired) {
         switch (ConfigPropertyValue.getCloudProvider()) {
             case CloudProvider.AWS_PROVIDER:
-                return "EMR.json";
+				return isSpotRequired ? "EMR_spot.json" : "EMR.json";
             case CloudProvider.GCP_PROVIDER:
                 return "dataproc.json";
             default:
@@ -193,6 +196,22 @@
         }
     }
 
+	public static DeployClusterDto populateDeployClusterDto(DeployClusterDto deployClusterDto,
+															NotebookConfig nbConfig) {
+		if (nbConfig.getDataEngineType().equals(NamingHelper.DATA_ENGINE_SERVICE) &&
+				ConfigPropertyValue.getCloudProvider().equals(CloudProvider.AWS_PROVIDER)) {
+			DeployEMRDto emrDto = (DeployEMRDto) deployClusterDto;
+			if (!StringUtils.isEmpty(nbConfig.getDesVersion())) {
+				emrDto.setEmrVersion(nbConfig.getDesVersion());
+			}
+			if (nbConfig.isDesSpotRequired() && nbConfig.getDesSpotPrice() > 0) {
+				emrDto.setEmrSlaveInstanceSpot(nbConfig.isDesSpotRequired());
+				emrDto.setEmrSlaveInstanceSpotPctPrice(nbConfig.getDesSpotPrice());
+			}
+			return emrDto;
+		} else return deployClusterDto;
+	}
+
 	static String getGcpDataprocClusterName(String gcpDataprocMasterNodeName) {
         return gcpDataprocMasterNodeName != null ?
                 gcpDataprocMasterNodeName.substring(0, gcpDataprocMasterNodeName.lastIndexOf('-')) : null;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudProvider.java b/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudProvider.java
index d3acef3..f5241a4 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudProvider.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/helper/CloudProvider.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.helper;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/helper/ConfigPropertyValue.java b/integration-tests/src/main/java/com/epam/dlab/automation/helper/ConfigPropertyValue.java
index f38db3e..aeb6036 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/helper/ConfigPropertyValue.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/helper/ConfigPropertyValue.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.helper;
 
@@ -76,6 +77,7 @@
 
 	private static final String JUPYTER_SCENARIO_FILES = "JUPYTER_SCENARIO_FILES";
 	private static final String NOTEBOOKS_TO_TEST = "NOTEBOOKS_TO_TEST";
+	private static final String SKIPPED_LIBS = "SKIPPED_LIBS";
 	private static final String EXECUTION_TREADS = "execution.threads";
 
     private static final String USE_JENKINS = "USE_JENKINS";
@@ -150,6 +152,7 @@
 			PropertiesResolver.overlapProperty(props, GCP_DLAB_PROJECT_ID, true);
             PropertiesResolver.overlapProperty(props, GCP_REGION, true);
             PropertiesResolver.overlapProperty(props, NOTEBOOKS_TO_TEST, false);
+			PropertiesResolver.overlapProperty(props, SKIPPED_LIBS, true);
 			PropertiesResolver.overlapProperty(props, USE_JENKINS, true);
             PropertiesResolver.overlapProperty(props, JENKINS_JOB_URL, !isUseJenkins());
             PropertiesResolver.overlapProperty(props, SSN_URL, isUseJenkins());
@@ -189,6 +192,7 @@
         printProperty(AZURE_DATALAKE_SHARED_ACCOUNT);
         printProperty(AZURE_STORAGE_SHARED_ACCOUNT);
         printProperty(NOTEBOOKS_TO_TEST);
+		printProperty(SKIPPED_LIBS);
 		printProperty(CLUSTER_OS_USERNAME);
         printProperty(CLUSTER_OS_FAMILY);
         printProperty(CONF_TAG_RESOURCE_ID);
@@ -359,6 +363,10 @@
     	return get(NOTEBOOKS_TO_TEST);
     }
 
+	public static String getSkippedLibs() {
+		return get(SKIPPED_LIBS, "[]");
+	}
+
 	public static boolean isUseJenkins() {
         String s = get(USE_JENKINS, "true");
     	return Boolean.valueOf(s);
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/helper/NamingHelper.java b/integration-tests/src/main/java/com/epam/dlab/automation/helper/NamingHelper.java
index 7384de0..3094f1c 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/helper/NamingHelper.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/helper/NamingHelper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.helper;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/helper/PropertiesResolver.java b/integration-tests/src/main/java/com/epam/dlab/automation/helper/PropertiesResolver.java
index 40062dd..f71ccc3 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/helper/PropertiesResolver.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/helper/PropertiesResolver.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.helper;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/helper/WaitForStatus.java b/integration-tests/src/main/java/com/epam/dlab/automation/helper/WaitForStatus.java
index 2547999..4cb4129 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/helper/WaitForStatus.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/helper/WaitForStatus.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.helper;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/http/ApiPath.java b/integration-tests/src/main/java/com/epam/dlab/automation/http/ApiPath.java
index 3f0af9c..c3dc9f1 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/http/ApiPath.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/http/ApiPath.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.http;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/http/ContentType.java b/integration-tests/src/main/java/com/epam/dlab/automation/http/ContentType.java
index 237fcda..e2a482c 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/http/ContentType.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/http/ContentType.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.http;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpRequest.java b/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpRequest.java
index 87b0025..2ef936f 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpRequest.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpRequest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.http;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpStatusCode.java b/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpStatusCode.java
index 822d476..6c4aef0 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpStatusCode.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/http/HttpStatusCode.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.http;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsConfigProperties.java b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsConfigProperties.java
index e78920e..158715b 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsConfigProperties.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsConfigProperties.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.jenkins;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsResponseElements.java b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsResponseElements.java
index 979fc6b..0aca9f6 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsResponseElements.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsResponseElements.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.jenkins;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsService.java b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsService.java
index 1e0bb7a..5d2a995 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsService.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsService.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.jenkins;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsUrls.java b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsUrls.java
index 579a9dd..04bedcc 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsUrls.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/jenkins/JenkinsUrls.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.jenkins;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/CreateNotebookDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/CreateNotebookDto.java
index 9686f39..71bfedf 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/CreateNotebookDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/CreateNotebookDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployClusterDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployClusterDto.java
index 1ff5135..695a5eb 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployClusterDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployClusterDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployDataProcDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployDataProcDto.java
index 7efcae7..b3b64e2 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployDataProcDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployDataProcDto.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.model;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployEMRDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployEMRDto.java
index b70f298..8f3ac1e 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployEMRDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeployEMRDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeploySparkDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeploySparkDto.java
index 9c556fc..d1b4734 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/DeploySparkDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/DeploySparkDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/ExploratoryImageDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/ExploratoryImageDto.java
index 9655584..84950df 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/ExploratoryImageDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/ExploratoryImageDto.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.model;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/ImageDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/ImageDto.java
index f304128..0a5dc0b 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/ImageDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/ImageDto.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.model;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/JsonMapperDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/JsonMapperDto.java
index 769ab99..11cdd50 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/JsonMapperDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/JsonMapperDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/Lib.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/Lib.java
index 39352bc..a804c18 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/Lib.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/Lib.java
@@ -1,19 +1,20 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.model;
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/LoginDto.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/LoginDto.java
index 5cdc679..4018643 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/LoginDto.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/LoginDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
diff --git a/integration-tests/src/main/java/com/epam/dlab/automation/model/NotebookConfig.java b/integration-tests/src/main/java/com/epam/dlab/automation/model/NotebookConfig.java
index 708b0f5..bac7893 100644
--- a/integration-tests/src/main/java/com/epam/dlab/automation/model/NotebookConfig.java
+++ b/integration-tests/src/main/java/com/epam/dlab/automation/model/NotebookConfig.java
@@ -1,27 +1,28 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.model;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
+import org.apache.commons.lang3.StringUtils;
 
-import java.util.Collections;
 import java.util.List;
 
 public class NotebookConfig {
@@ -75,7 +76,19 @@
 	private boolean imageTestRequired = false;
 
 	@JsonProperty("skipped_libraries")
-	private List<Lib> skippedLibraries = Collections.emptyList();
+	private List<Lib> skippedLibraries;
+
+	@JsonProperty("notebook_shape")
+	private String notebookShape = StringUtils.EMPTY;
+
+	@JsonProperty("des_version")
+	private String desVersion = StringUtils.EMPTY;
+
+	@JsonProperty("des_spot_required")
+	private boolean desSpotRequired = false;
+
+	@JsonProperty("des_spot_price")
+	private int desSpotPrice = 0;
 
 	public List<Lib> getSkippedLibraries() {
 		return skippedLibraries;
@@ -85,7 +98,23 @@
     	return timeoutNotebookCreate;
     }
 
-    public String getTimeoutNotebookStartup() {
+	public String getNotebookShape() {
+		return notebookShape;
+	}
+
+	public String getDesVersion() {
+		return desVersion;
+	}
+
+	public boolean isDesSpotRequired() {
+		return desSpotRequired;
+	}
+
+	public int getDesSpotPrice() {
+		return desSpotPrice;
+	}
+
+	public String getTimeoutNotebookStartup() {
     	return timeoutNotebookStartup;
     }
 
@@ -146,6 +175,10 @@
 		this.imageTestRequired = imageTestRequired;
 	}
 
+	public void setSkippedLibraries(List<Lib> skippedLibraries) {
+		this.skippedLibraries = skippedLibraries;
+	}
+
 
 	@Override
     public String toString() {
@@ -162,7 +195,11 @@
     			.add("timeoutNotebookShutdown", timeoutNotebookShutdown)
     			.add("timeoutNotebookStartup", timeoutNotebookStartup)
     			.add("notebookTemplate", notebookTemplate)
+				.add("notebookShape", notebookShape)
     			.add("dataEngineType", dataEngineType)
+				.add("dataEngineServiceVersion", desVersion)
+				.add("dataEngineServiceSpotRequired", desSpotRequired)
+				.add("dataEngineServiceSpotPrice", desSpotPrice)
     			.add("fullTest", fullTest)
 				.add("imageTestRequired", imageTestRequired)
 				.add("skippedLibraries", skippedLibraries)
diff --git a/integration-tests/src/main/resources/application.properties b/integration-tests/src/main/resources/application.properties
index 852679c..67a3228 100644
--- a/integration-tests/src/main/resources/application.properties
+++ b/integration-tests/src/main/resources/application.properties
@@ -1,20 +1,21 @@
-# *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ******************************************************************************
 
 conf.file.location=${CONF_ROOT_PATH}/config.properties
 keys.directory.location=${CONF_ROOT_PATH}/keys
diff --git a/integration-tests/src/main/resources/log4j2.xml b/integration-tests/src/main/resources/log4j2.xml
index b6f6f28..8c91840 100644
--- a/integration-tests/src/main/resources/log4j2.xml
+++ b/integration-tests/src/main/resources/log4j2.xml
@@ -1,22 +1,23 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <Configuration>
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/TestCallable.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/TestCallable.java
index 95f0335..881b69e 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/TestCallable.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/TestCallable.java
@@ -1,19 +1,20 @@
-/************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.test;
@@ -211,7 +212,7 @@
 	} else if (NamingHelper.DATA_ENGINE_SERVICE.equals(dataEngineType)) {
 		clusterDto = JsonMapperDto.readNode(
 				Paths.get(String.format("%s/%s", CloudHelper.getClusterConfFileLocation(), notebookTemplate),
-						CloudHelper.getDockerTemplateFileForDES()).toString(),
+						CloudHelper.getDockerTemplateFileForDES(notebookConfig.isDesSpotRequired())).toString(),
 				CloudHelper.getDeployClusterClass());
     } else {
 		LOGGER.error("illegal argument dataEngineType {} , should be dataengine or dataengine-service", dataEngineType);
@@ -220,7 +221,8 @@
 
     clusterDto.setName(clusterName);
 		clusterDto.setNotebookName(notebookName);
-    LOGGER.info("{}: {} cluster = {}",notebookName,dataEngineType, clusterDto);
+		clusterDto = CloudHelper.populateDeployClusterDto(clusterDto, notebookConfig);
+		LOGGER.info("{}: {} cluster = {}", notebookName, dataEngineType, clusterDto);
     Response responseDeployingCluster = new HttpRequest().webApiPut(ssnCompResURL, ContentType.JSON,
     		clusterDto, token);
 	LOGGER.info("{}:   responseDeployingCluster.getBody() is {}", notebookName,
@@ -277,6 +279,9 @@
 								notebookConfigurationFile).toString(), CreateNotebookDto.class);
 
 		createNoteBookRequest.setName(notebookName);
+		if (!StringUtils.isEmpty(notebookConfig.getNotebookShape())) {
+			createNoteBookRequest.setShape(notebookConfig.getNotebookShape());
+		}
 
 		if (StringUtils.isNotBlank(imageName)) {
 			final String ssnImageDataUrl =
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/TestDataEngineService.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/TestDataEngineService.java
index 21273ae..ad73842 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/TestDataEngineService.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/TestDataEngineService.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/TestServices.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/TestServices.java
index a7a971e..9ee67b0 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/TestServices.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/TestServices.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test;
 
@@ -26,6 +27,7 @@
 import com.epam.dlab.automation.http.HttpRequest;
 import com.epam.dlab.automation.http.HttpStatusCode;
 import com.epam.dlab.automation.jenkins.JenkinsService;
+import com.epam.dlab.automation.model.Lib;
 import com.epam.dlab.automation.model.LoginDto;
 import com.epam.dlab.automation.model.NotebookConfig;
 import com.fasterxml.jackson.core.type.TypeReference;
@@ -43,6 +45,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.FutureTask;
@@ -65,6 +68,7 @@
 
 	private long testTimeMillis;
 	private List<NotebookConfig> notebookConfigs;
+	private List<Lib> skippedLibs;
 
 
 	@BeforeClass
@@ -72,11 +76,14 @@
 		testTimeMillis = System.currentTimeMillis();
 		// Load properties
 		ConfigPropertyValue.getJenkinsJobURL();
-		
+
 		ObjectMapper mapper = new ObjectMapper();
 		notebookConfigs = mapper.readValue(ConfigPropertyValue.getNotebookTemplates(),
 				new TypeReference<ArrayList<NotebookConfig>>() {
 				});
+		skippedLibs = mapper.readValue(ConfigPropertyValue.getSkippedLibs(),
+				new TypeReference<ArrayList<Lib>>() {
+				});
 	}
 
 	@AfterClass
@@ -98,7 +105,7 @@
 	private void testJenkinsJob() throws Exception {
 		/*
 		 * LOGGER.info("1. Jenkins Job will be started ...");
-		 * 
+		 *
 		 * JenkinsService jenkins = new
 		 * JenkinsService(ConfigPropertyValue.getJenkinsUsername(),
 		 * ConfigPropertyValue.getJenkinsPassword()); String buildNumber =
@@ -139,12 +146,12 @@
 		LOGGER.info("Public IP is: {}", publicSsnIp);
 		String privateSsnIp = CloudHelper.getInstancePrivateIP(NamingHelper.getSsnName(), true);
 		LOGGER.info("Private IP is: {}", privateSsnIp);
-		if(publicSsnIp == null || privateSsnIp == null){
+		if (publicSsnIp == null || privateSsnIp == null) {
 			Assert.fail("There is not any virtual machine in " + cloudProvider + " with name " + NamingHelper.getSsnName());
 			return;
 		}
 		NamingHelper.setSsnIp(PropertiesResolver.DEV_MODE ? publicSsnIp : privateSsnIp);
-        VirtualMachineStatusChecker.checkIfRunning(NamingHelper.getSsnName(), true);
+		VirtualMachineStatusChecker.checkIfRunning(NamingHelper.getSsnName(), true);
 		LOGGER.info("{} instance state is running", cloudProvider.toUpperCase());
 
 		LOGGER.info("2. Waiting for SSN service ...");
@@ -171,12 +178,13 @@
 
 		responseBody = login(ConfigPropertyValue.getNotDLabUsername(), ConfigPropertyValue.getNotDLabPassword(),
 				HttpStatusCode.UNAUTHORIZED, "Unauthorized user " + ConfigPropertyValue.getNotDLabUsername());
-		Assert.assertEquals(responseBody.asString(), "Username or password are not valid");
+
+		Assert.assertEquals(responseBody.path("message"), "Username or password are not valid");
 
 		if (!ConfigPropertyValue.isRunModeLocal()) {
 			responseBody = login(ConfigPropertyValue.getUsername(), ".", HttpStatusCode.UNAUTHORIZED,
 					"Unauthorized user " + ConfigPropertyValue.getNotDLabUsername());
-			Assert.assertEquals(responseBody.asString(), "Username or password are not valid");
+			Assert.assertEquals(responseBody.path("message"), "Username or password are not valid");
 		}
 
 		LOGGER.info("Logging in with credentials {}/***", ConfigPropertyValue.getUsername());
@@ -191,9 +199,9 @@
 		LOGGER.info("responseLogout.statusCode() is {}", responseLogout.statusCode());
 		Assert.assertEquals(responseLogout.statusCode(), HttpStatusCode.UNAUTHORIZED,
 				"User log out was not successful"/*
-													 * Replace to HttpStatusCode.OK when EPMCBDCCSS-938 will be fixed
-													 * and merged
-													 */);
+				 * Replace to HttpStatusCode.OK when EPMCBDCCSS-938 will be fixed
+				 * and merged
+				 */);
 	}
 
 	private String ssnLoginAndKeyUpload() throws Exception {
@@ -242,16 +250,23 @@
 		return token;
 	}
 
+	private void populateNotebookConfigWithSkippedLibs(NotebookConfig notebookCfg) {
+		if (Objects.isNull(notebookCfg.getSkippedLibraries())) {
+			notebookCfg.setSkippedLibraries(skippedLibs);
+		}
+	}
+
 	private void runTestsInNotebooks() throws Exception {
-		
-		LOGGER.info("Testing the following notebook templates: {}", ConfigPropertyValue.getNotebookTemplates());
+
 		ExecutorService executor = Executors.newFixedThreadPool(
 				ConfigPropertyValue.getExecutionThreads() > 0 ? ConfigPropertyValue.getExecutionThreads() : N_THREADS);
+		notebookConfigs.forEach(this::populateNotebookConfigWithSkippedLibs);
 		List<FutureTask<Boolean>> futureTasks = new ArrayList<>();
 		if (CloudProvider.GCP_PROVIDER.equals(ConfigPropertyValue.getCloudProvider())) {
 			LOGGER.debug("Image creation tests are skipped for all types of notebooks in GCP.");
 			notebookConfigs.forEach(config -> config.setImageTestRequired(false));
 		}
+		LOGGER.info("Testing the following notebook configs: {}", notebookConfigs);
 		for (NotebookConfig notebookConfig : notebookConfigs) {
 			if (!ConfigPropertyValue.isRunModeLocal() &&
 					CloudProvider.AZURE_PROVIDER.equals(ConfigPropertyValue.getCloudProvider())) {
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibraryNotFoundException.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibraryNotFoundException.java
index 227c886..b8fca93 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibraryNotFoundException.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibraryNotFoundException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.test.libs;
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibsHelper.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibsHelper.java
index 6df0a6e..471679c 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibsHelper.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/LibsHelper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2018, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestDescription.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestDescription.java
index 161bfe5..5c156b4 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestDescription.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestDescription.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibGroupStep.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibGroupStep.java
index 581809b..57d56d4 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibGroupStep.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibGroupStep.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibInstallStep.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibInstallStep.java
index f1468a4..9b9d521 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibInstallStep.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibInstallStep.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibListStep.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibListStep.java
index 987f9a3..89566c2 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibListStep.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibListStep.java
@@ -1,19 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibStep.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibStep.java
index 481c16c..5930f77 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibStep.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/TestLibStep.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibInstallRequest.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibInstallRequest.java
index 23d68ff..ad48b07 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibInstallRequest.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibInstallRequest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.automation.test.libs.models;
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibSearchRequest.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibSearchRequest.java
index f8eeb4e..45ffa32 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibSearchRequest.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibSearchRequest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs.models;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibStatusResponse.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibStatusResponse.java
index 9f3cda8..cf79d82 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibStatusResponse.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibStatusResponse.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs.models;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibToSearchData.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibToSearchData.java
index e093fb9..e6aa205 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibToSearchData.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibToSearchData.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs.models;
 
diff --git a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibraryStatus.java b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibraryStatus.java
index 292ed95..1be3139 100644
--- a/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibraryStatus.java
+++ b/integration-tests/src/test/java/com/epam/dlab/automation/test/libs/models/LibraryStatus.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.automation.test.libs.models;
 
diff --git a/integration-tests/src/test/resources/log4j2.xml b/integration-tests/src/test/resources/log4j2.xml
index 3d50d38..91d23a2 100644
--- a/integration-tests/src/test/resources/log4j2.xml
+++ b/integration-tests/src/test/resources/log4j2.xml
@@ -1,22 +1,23 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <Configuration>
 
diff --git a/pom.xml b/pom.xml
index 378f4ba..f044123 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -67,6 +68,7 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <io.dropwizard.version>1.3.2</io.dropwizard.version>
+        <dropwizard.swagger.version>1.3.5-1</dropwizard.swagger.version>
         <com.google.inject.version>4.2.0</com.google.inject.version>
         <dropwizard-template-config.version>1.4.0</dropwizard-template-config.version>
         <com.aegisql.conveyor.version>1.1.7</com.aegisql.conveyor.version>
@@ -130,6 +132,12 @@
                 <artifactId>dropwizard-util</artifactId>
                 <version>${io.dropwizard.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.smoketurner</groupId>
+                <artifactId>dropwizard-swagger</artifactId>
+                <version>${dropwizard.swagger.version}</version>
+            </dependency>
+
 
         </dependencies>
     </dependencyManagement>
@@ -235,13 +243,25 @@
                         <exclude>.git/**</exclude>
                         <exclude>.idea/**</exclude>
                         <exclude>**/.gitignore</exclude>
+                        <exclude>**/.idea/**</exclude>
                         <exclude>**/*.ini</exclude>
+                        <exclude>**/*.ipynb</exclude>
+                        <exclude>**/*.iml</exclude>
                         <exclude>**/*.json</exclude>
+                        <exclude>**/*.r</exclude>
                         <exclude>**/__init__.py</exclude>
                         <exclude>**/*.conf</exclude>
                         <exclude>**/.gitkeep</exclude>
                         <exclude>**/*.lst</exclude>
                         <exclude>**/*template</exclude>
+                        <exclude>**/*.pub</exclude>
+                        <exclude>**/*.md</exclude>
+                        <exclude>**/*.MD</exclude>
+                        <exclude>**/*.txt</exclude>
+                        <exclude>**/*.svg</exclude>
+                        <exclude>**/*.MockMaker</exclude>
+                        <exclude>**/*.BillingToolConfigurationFactory</exclude>
+                        <exclude>**/assets/**</exclude>
                     </excludes>
                 </configuration>
                 <executions>
@@ -253,6 +273,13 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <useSystemClassLoader>false</useSystemClassLoader>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/services/billing-aws/billing.yml b/services/billing-aws/billing.yml
index 837af9d..8b0c62e 100644
--- a/services/billing-aws/billing.yml
+++ b/services/billing-aws/billing.yml
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 #
 # ******************************************************************************
 
diff --git a/services/billing-aws/pom.xml b/services/billing-aws/pom.xml
index 1681568..a411c20 100644
--- a/services/billing-aws/pom.xml
+++ b/services/billing-aws/pom.xml
@@ -1,18 +1,20 @@
 <!--
-  ~         Licensed to the Apache Software Foundation (ASF) under one or more
-  ~         contributor license agreements. See the NOTICE file distributed with
-  ~         this work for additional information regarding copyright ownership.
-  ~         The ASF licenses this file to You under the Apache License, Version 2.0
-  ~         (the "License"); you may not use this file except in compliance with
-  ~         the License. You may obtain a copy of the License at
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~         http://www.apache.org/licenses/LICENSE-2.0
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~         Unless required by applicable law or agreed to in writing, software
-  ~         distributed under the License is distributed on an "AS IS" BASIS,
-  ~         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~         See the License for the specific language governing permissions and
-  ~         limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/BillingScheduler.java b/services/billing-aws/src/main/java/com/epam/dlab/BillingScheduler.java
index 8a02338..5db8269 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/BillingScheduler.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/BillingScheduler.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/BillingTool.java b/services/billing-aws/src/main/java/com/epam/dlab/BillingTool.java
index 3daba1c..cf2b8d6 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/BillingTool.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/BillingTool.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/Help.java b/services/billing-aws/src/main/java/com/epam/dlab/Help.java
index b5aa099..2a043c2 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/Help.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/Help.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfiguration.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfiguration.java
index d2e01a7..803d232 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfiguration.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfiguration.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfigurationFactory.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfigurationFactory.java
index 675a09a..1de80af 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfigurationFactory.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/BillingToolConfigurationFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigJsonGenerator.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigJsonGenerator.java
index 534dd61..0ed8a18 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigJsonGenerator.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigJsonGenerator.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigurationValidator.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigurationValidator.java
index 6388aed..422f9ae 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigurationValidator.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/ConfigurationValidator.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/FreeMarkerConfig.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/FreeMarkerConfig.java
index f79646d..36b7c45 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/FreeMarkerConfig.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/FreeMarkerConfig.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/LoggingConfigurationFactory.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/LoggingConfigurationFactory.java
index 4e410c7..7fb91bb 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/LoggingConfigurationFactory.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/LoggingConfigurationFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/configuration/SchedulerConfiguration.java b/services/billing-aws/src/main/java/com/epam/dlab/configuration/SchedulerConfiguration.java
index 6710afc..b0624d6 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/configuration/SchedulerConfiguration.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/configuration/SchedulerConfiguration.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/AdapterBase.java b/services/billing-aws/src/main/java/com/epam/dlab/core/AdapterBase.java
index a8bb4be..1569530 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/AdapterBase.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/AdapterBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/BillingUtils.java b/services/billing-aws/src/main/java/com/epam/dlab/core/BillingUtils.java
index 1871387..50eb871 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/BillingUtils.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/BillingUtils.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/DBAdapterBase.java b/services/billing-aws/src/main/java/com/epam/dlab/core/DBAdapterBase.java
index b21ac59..65aa2a0 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/DBAdapterBase.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/DBAdapterBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/FilterBase.java b/services/billing-aws/src/main/java/com/epam/dlab/core/FilterBase.java
index e21cdfc..5b51cc5 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/FilterBase.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/FilterBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleBase.java b/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleBase.java
index a1bb060..13e0204 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleBase.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleData.java b/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleData.java
index 7a632de..2322c05 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleData.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleData.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleType.java b/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleType.java
index 46cdf29..fd15ec2 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleType.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/ModuleType.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/AggregateGranularity.java b/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/AggregateGranularity.java
index 579773e..b6803e8 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/AggregateGranularity.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/AggregateGranularity.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.core.aggregate;
 
 /** Aggregate granularity for aggregation. */
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/DataAggregator.java b/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/DataAggregator.java
index 62363bc..e6f2285 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/DataAggregator.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/DataAggregator.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.aggregate;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/UsageDataList.java b/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/UsageDataList.java
index f538894..5237290 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/UsageDataList.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/aggregate/UsageDataList.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.aggregate;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnInfo.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnInfo.java
index f6b40a4..c2f592f 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnInfo.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnInfo.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnMeta.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnMeta.java
index 8b025d5..42b40f0 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnMeta.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ColumnMeta.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/CommonFormat.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/CommonFormat.java
index 9170d30..e07ae0b 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/CommonFormat.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/CommonFormat.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ConditionEvaluate.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ConditionEvaluate.java
index c1914d5..708fea8 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ConditionEvaluate.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ConditionEvaluate.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserBase.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserBase.java
index 245fbee..f9f0eaa 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserBase.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserByLine.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserByLine.java
index f5b8999..37f2070 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserByLine.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserByLine.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserStatistics.java b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserStatistics.java
index 3fa8995..55123a4 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserStatistics.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/core/parser/ParserStatistics.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderBase.java b/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderBase.java
index 7f440e9..55e5159 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderBase.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.logging;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderConsole.java b/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderConsole.java
index 918df7f..780802f 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderConsole.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderConsole.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.logging;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderFile.java b/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderFile.java
index 5dcdf86..29f5d7f 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderFile.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/logging/AppenderFile.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.logging;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterConsole.java b/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterConsole.java
index 9668830..59c866d 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterConsole.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterConsole.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterFile.java b/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterFile.java
index ddb9dfd..7fb38f3 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterFile.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/AdapterFile.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/ModuleName.java b/services/billing-aws/src/main/java/com/epam/dlab/module/ModuleName.java
index f44c35e..58a31b8 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/ModuleName.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/ModuleName.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/ParserCsv.java b/services/billing-aws/src/main/java/com/epam/dlab/module/ParserCsv.java
index 6b95e62..aaaa73b 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/ParserCsv.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/ParserCsv.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/aws/AdapterS3File.java b/services/billing-aws/src/main/java/com/epam/dlab/module/aws/AdapterS3File.java
index 97e71ef..9ae8768 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/aws/AdapterS3File.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/aws/AdapterS3File.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module.aws;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/aws/FilterAWS.java b/services/billing-aws/src/main/java/com/epam/dlab/module/aws/FilterAWS.java
index d462bd2..d388271 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/aws/FilterAWS.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/aws/FilterAWS.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module.aws;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/module/aws/S3FileList.java b/services/billing-aws/src/main/java/com/epam/dlab/module/aws/S3FileList.java
index 9a76767..b286a43 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/module/aws/S3FileList.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/module/aws/S3FileList.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module.aws;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java
index cca83fe..a13ed05 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java
index df95353..f576dbf 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoConstants.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoConstants.java
index f63ee86..b7c49a4 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoConstants.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoConstants.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoDbConnection.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoDbConnection.java
index adb4676..7cd4a44 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoDbConnection.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/MongoDbConnection.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItem.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItem.java
index f985a60..fb066d3 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItem.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItem.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItemList.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItemList.java
index f8448ba..d364b7c 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItemList.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/ResourceItemList.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/configuration/BillingToolConfigurationTest.java b/services/billing-aws/src/test/java/com/epam/dlab/configuration/BillingToolConfigurationTest.java
index 153c845..4577516 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/configuration/BillingToolConfigurationTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/configuration/BillingToolConfigurationTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigJsonGeneratorTest.java b/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigJsonGeneratorTest.java
index 3c96598..15d3224 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigJsonGeneratorTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigJsonGeneratorTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigurationValidatorTest.java b/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigurationValidatorTest.java
index db55777..9d75413 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigurationValidatorTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/configuration/ConfigurationValidatorTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/configuration/LoggingConfigurationFactoryTest.java b/services/billing-aws/src/test/java/com/epam/dlab/configuration/LoggingConfigurationFactoryTest.java
index 356db6a..82f5ef5 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/configuration/LoggingConfigurationFactoryTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/configuration/LoggingConfigurationFactoryTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.configuration;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/BillingUtilsTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/BillingUtilsTest.java
index 4730a85..70d1127 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/BillingUtilsTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/BillingUtilsTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/DataAggregatorTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/DataAggregatorTest.java
index 042225e..d77ef71 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/DataAggregatorTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/DataAggregatorTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.aggregate;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/UsageDataListTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/UsageDataListTest.java
index d525120..275a30b 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/UsageDataListTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/aggregate/UsageDataListTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.aggregate;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/BillingResourceTypeTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/BillingResourceTypeTest.java
index 7a950e8..9aaa383 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/BillingResourceTypeTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/BillingResourceTypeTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnInfoTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnInfoTest.java
index ceeeb77..adc1a5e 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnInfoTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnInfoTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnMetaTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnMetaTest.java
index 9da88c0..c03f87f 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnMetaTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ColumnMetaTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/CommonFormatTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/CommonFormatTest.java
index d84964b..632fa96 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/CommonFormatTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/CommonFormatTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ConditionEvaluateTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ConditionEvaluateTest.java
index 5c6d1d2..548aa5c 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ConditionEvaluateTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ConditionEvaluateTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ParserStatisticsTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ParserStatisticsTest.java
index 457b1a1..49d44dd 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ParserStatisticsTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ParserStatisticsTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ReportLineTest.java b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ReportLineTest.java
index 464e100..72380a4 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ReportLineTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/core/parser/ReportLineTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.core.parser;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderConsoleTest.java b/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderConsoleTest.java
index 07cec42..deae3f6 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderConsoleTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderConsoleTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.logging;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderFileTest.java b/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderFileTest.java
index aeb8d92..f330771 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderFileTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/logging/AppenderFileTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.logging;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterConsoleTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterConsoleTest.java
index fc1d981..9df26c1 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterConsoleTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterConsoleTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterFileTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterFileTest.java
index ef8a223..0894f30 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterFileTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterFileTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterMongoDBTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterMongoDBTest.java
index 4213f9b..034c32c 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterMongoDBTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/AdapterMongoDBTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/ParserCsvTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/ParserCsvTest.java
index a278d81..63ec202 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/ParserCsvTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/ParserCsvTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/aws/AdapterS3FileTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/aws/AdapterS3FileTest.java
index cec76aa..7d29792 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/aws/AdapterS3FileTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/aws/AdapterS3FileTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module.aws;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/aws/FilterAWSTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/aws/FilterAWSTest.java
index 27db94d..03deeb9 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/aws/FilterAWSTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/aws/FilterAWSTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module.aws;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/module/aws/S3FileListTest.java b/services/billing-aws/src/test/java/com/epam/dlab/module/aws/S3FileListTest.java
index 0d7c43a..f061351 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/module/aws/S3FileListTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/module/aws/S3FileListTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.module.aws;
 
diff --git a/services/billing-aws/src/test/java/com/epam/dlab/mongo/ResourceItemListTest.java b/services/billing-aws/src/test/java/com/epam/dlab/mongo/ResourceItemListTest.java
index af7f5ca..28769bd 100644
--- a/services/billing-aws/src/test/java/com/epam/dlab/mongo/ResourceItemListTest.java
+++ b/services/billing-aws/src/test/java/com/epam/dlab/mongo/ResourceItemListTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/billing-azure/billing.yml b/services/billing-azure/billing.yml
index a1bbaa1..c149cb8 100644
--- a/services/billing-azure/billing.yml
+++ b/services/billing-azure/billing.yml
@@ -1,18 +1,23 @@
-#/*
-# * Copyright (c) 2017, EPAM SYSTEMS INC
-# *
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# *     http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
 
 # Authentication info
 
diff --git a/services/billing-azure/pom.xml b/services/billing-azure/pom.xml
index 7dcaa0c..41edc3c 100644
--- a/services/billing-azure/pom.xml
+++ b/services/billing-azure/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java
index 1630ac7..9fdcb32 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure;
@@ -43,8 +46,8 @@
  */
 @Slf4j
 public class AzureBillableResourcesService {
-	private static final String[] USER_INSTANCES_EXCLUDED_FIELDS = {"scheduler_data", "computational_resources" +
-			".scheduler_data"};
+	private static final String[] USER_INSTANCES_EXCLUDED_FIELDS = {"scheduler_data", "last_activity",
+			"computational_resources.scheduler_data", "computational_resources.last_activity"};
 	private final ObjectMapper objectMapper = new ObjectMapper();
 
 	private MongoDbBillingClient mongoDbBillingClient;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillingDetailsService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillingDetailsService.java
index d7407dc..cd4f713 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillingDetailsService.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillingDetailsService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
index f4ec099..0fd6098 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/BillingSchedulerAzure.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/BillingSchedulerAzure.java
index a05344a..cdb2c0f 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/BillingSchedulerAzure.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/BillingSchedulerAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure;
@@ -26,7 +29,7 @@
 import com.epam.dlab.billing.azure.model.BillingPeriod;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.exceptions.InitializationException;
-import com.epam.dlab.util.mongo.IsoDateModule;
+import com.epam.dlab.util.mongo.modules.IsoDateModule;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDbBillingClient.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDbBillingClient.java
index ffc5c95..b5ae73b 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDbBillingClient.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDbBillingClient.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDocument.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDocument.java
index 48f7c36..f41de08 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDocument.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/MongoDocument.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AggregationOutputMongoDataSource.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AggregationOutputMongoDataSource.java
index e5fd3af..345586d 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AggregationOutputMongoDataSource.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AggregationOutputMongoDataSource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.config;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AzureAuthFile.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AzureAuthFile.java
index 98711c1..1d1993c 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AzureAuthFile.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/AzureAuthFile.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.config;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
index fd646bd..a58f4ba 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.config;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/LoggingConfigurationFactory.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/LoggingConfigurationFactory.java
index 5fd6a7f..2bd185e 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/LoggingConfigurationFactory.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/LoggingConfigurationFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.billing.azure.config;
 
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderBase.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderBase.java
index e6cd33e..405b56b 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderBase.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.billing.azure.logging;
 
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderConsole.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderConsole.java
index 4c376df..262e414 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderConsole.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderConsole.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.billing.azure.logging;
 
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderFile.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderFile.java
index 4d3b0bf..34a11b3 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderFile.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/logging/AppenderFile.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.billing.azure.logging;
 
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDailyResourceInvoice.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDailyResourceInvoice.java
index d58a637..8d45587 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDailyResourceInvoice.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDailyResourceInvoice.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.model;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDlabBillableResource.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDlabBillableResource.java
index 7f1a2d1..9c04d40 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDlabBillableResource.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/AzureDlabBillableResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.model;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/BillingPeriod.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/BillingPeriod.java
index 4da23a2..e4a8647 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/BillingPeriod.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/model/BillingPeriod.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.model;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/AzureRateCardClient.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/AzureRateCardClient.java
index e083950..39e2ec1 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/AzureRateCardClient.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/AzureRateCardClient.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.rate;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/Meter.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/Meter.java
index c71e8b2..68cdd7f 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/Meter.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/Meter.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.rate;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/RateCardResponse.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/RateCardResponse.java
index 7979039..3797d52 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/RateCardResponse.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/rate/RateCardResponse.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.rate;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/AzureUsageAggregateClient.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/AzureUsageAggregateClient.java
index 2b670f3..9247d4f 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/AzureUsageAggregateClient.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/AzureUsageAggregateClient.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.usage;
 
 import com.epam.dlab.billing.azure.config.BillingConfigurationAzure;
+import com.epam.dlab.exceptions.DlabException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.HttpHeaders;
@@ -28,6 +32,7 @@
 
 import java.io.IOException;
 import java.net.URISyntaxException;
+import java.util.Objects;
 
 @Slf4j
 public class AzureUsageAggregateClient {
@@ -80,14 +85,19 @@
 		this.authToken = authToken;
 	}
 
-	private UsageAggregateResponse postProcess(UsageAggregateResponse usageAggregateResponse) throws IOException {
-		for (UsageAggregateRecord usageAggregateRecord : usageAggregateResponse.getValue()) {
-			InstanceData instanceData = objectMapper.readValue(usageAggregateRecord.getProperties().getInstanceData(),
-					InstanceData.class);
-
-			usageAggregateRecord.getProperties().setParsedInstanceData(instanceData);
-		}
-
+	private UsageAggregateResponse postProcess(UsageAggregateResponse usageAggregateResponse) {
+		usageAggregateResponse.getValue()
+				.stream()
+				.filter(r -> Objects.nonNull(r.getProperties().getInstanceData()))
+				.forEach(r -> r.getProperties().setParsedInstanceData(toInstanceData(r)));
 		return usageAggregateResponse;
 	}
+
+	private InstanceData toInstanceData(UsageAggregateRecord r) {
+		try {
+			return objectMapper.readValue(r.getProperties().getInstanceData(), InstanceData.class);
+		} catch (IOException e) {
+			throw new DlabException("Can not parse instance data", e);
+		}
+	}
 }
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/InstanceData.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/InstanceData.java
index ec47949..e175f2d 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/InstanceData.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/InstanceData.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.usage;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/MicrosoftResources.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/MicrosoftResources.java
index c8578e0..5217efb 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/MicrosoftResources.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/MicrosoftResources.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.usage;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecord.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecord.java
index 28ce04e..95f8e87 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecord.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecord.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.usage;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecordProperties.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecordProperties.java
index f91f3f4..d0a986e 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecordProperties.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateRecordProperties.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.usage;
diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateResponse.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateResponse.java
index 8af60ae..be9078b 100644
--- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateResponse.java
+++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/usage/UsageAggregateResponse.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.azure.usage;
diff --git a/services/billing-gcp/billing.yml b/services/billing-gcp/billing.yml
index 633ecda..b639f64 100644
--- a/services/billing-gcp/billing.yml
+++ b/services/billing-gcp/billing.yml
@@ -1,15 +1,20 @@
-#/*
-# * Copyright (c) 2017, EPAM SYSTEMS INC
-# *
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# *     http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
diff --git a/services/billing-gcp/pom.xml b/services/billing-gcp/pom.xml
index fb831cb..57e3812 100644
--- a/services/billing-gcp/pom.xml
+++ b/services/billing-gcp/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java
index f5c7921..deff3a3 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing.gcp;
diff --git a/services/common/pom.xml b/services/common/pom.xml
index aed68a6..1bf66dd 100644
--- a/services/common/pom.xml
+++ b/services/common/pom.xml
@@ -1,17 +1,20 @@
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/services/common/src/main/java/com/epam/dlab/auth/conf/AzureLoginConfiguration.java b/services/common/src/main/java/com/epam/dlab/auth/conf/AzureLoginConfiguration.java
index 007728a..cf6331c 100644
--- a/services/common/src/main/java/com/epam/dlab/auth/conf/AzureLoginConfiguration.java
+++ b/services/common/src/main/java/com/epam/dlab/auth/conf/AzureLoginConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.conf;
diff --git a/services/common/src/main/java/com/epam/dlab/auth/conf/GcpLoginConfiguration.java b/services/common/src/main/java/com/epam/dlab/auth/conf/GcpLoginConfiguration.java
index 3ae1c87..1ca2374 100644
--- a/services/common/src/main/java/com/epam/dlab/auth/conf/GcpLoginConfiguration.java
+++ b/services/common/src/main/java/com/epam/dlab/auth/conf/GcpLoginConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.config.gcp;
diff --git a/services/common/src/main/java/com/epam/dlab/billing/BillingCalculationUtils.java b/services/common/src/main/java/com/epam/dlab/billing/BillingCalculationUtils.java
index 64e404e..14edfc9 100644
--- a/services/common/src/main/java/com/epam/dlab/billing/BillingCalculationUtils.java
+++ b/services/common/src/main/java/com/epam/dlab/billing/BillingCalculationUtils.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing;
diff --git a/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java b/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java
index 47811bd..54a590e 100644
--- a/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java
+++ b/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.billing;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/AdapterException.java b/services/common/src/main/java/com/epam/dlab/exceptions/AdapterException.java
index f2a7b27..1ee4ab1 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/AdapterException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/AdapterException.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.exceptions;
 
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/DlabAuthenticationException.java b/services/common/src/main/java/com/epam/dlab/exceptions/DlabAuthenticationException.java
index a08c8e9..9db3a0a 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/DlabAuthenticationException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/DlabAuthenticationException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.exceptions;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/DlabException.java b/services/common/src/main/java/com/epam/dlab/exceptions/DlabException.java
index a2c0842..d6d5b6b 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/DlabException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/DlabException.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.exceptions;
 
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/DlabValidationException.java b/services/common/src/main/java/com/epam/dlab/exceptions/DlabValidationException.java
index bcdfb48..f4dd287 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/DlabValidationException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/DlabValidationException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.exceptions;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/GenericException.java b/services/common/src/main/java/com/epam/dlab/exceptions/GenericException.java
index d338991..677ea81 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/GenericException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/GenericException.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.exceptions;
 
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/InitializationException.java b/services/common/src/main/java/com/epam/dlab/exceptions/InitializationException.java
index 9b2769e..0a1e8b5 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/InitializationException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/InitializationException.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.exceptions;
 
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/ParseException.java b/services/common/src/main/java/com/epam/dlab/exceptions/ParseException.java
index 7706310..e18d891 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/ParseException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/ParseException.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.exceptions;
 
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceAlreadyExistException.java b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceAlreadyExistException.java
index ff91240..e4f8cb7 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceAlreadyExistException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceAlreadyExistException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.exceptions;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceConflictException.java b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceConflictException.java
index 6d4caaf..a6c7c23 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceConflictException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceConflictException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.exceptions;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceInappropriateStateException.java b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceInappropriateStateException.java
index 79f94f4..2172a0d 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceInappropriateStateException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceInappropriateStateException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.exceptions;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceNotFoundException.java b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceNotFoundException.java
index 73bb334..b5722aa 100644
--- a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceNotFoundException.java
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceNotFoundException.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.exceptions;
diff --git a/services/common/src/main/java/com/epam/dlab/exceptions/ResourceQuoteReachedException.java b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceQuoteReachedException.java
new file mode 100644
index 0000000..3ccdf50
--- /dev/null
+++ b/services/common/src/main/java/com/epam/dlab/exceptions/ResourceQuoteReachedException.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.exceptions;
+
+public class ResourceQuoteReachedException extends DlabException {
+	public ResourceQuoteReachedException(String message) {
+		super(message);
+	}
+
+	public ResourceQuoteReachedException(String message, Exception cause) {
+		super(message, cause);
+	}
+}
diff --git a/services/dlab-auth-common/pom.xml b/services/dlab-auth-common/pom.xml
index 3bd42f5..8d52383 100644
--- a/services/dlab-auth-common/pom.xml
+++ b/services/dlab-auth-common/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityAuthorizer.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityAuthorizer.java
index ba66b99..3758f67 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityAuthorizer.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityAuthorizer.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityUnauthorizedHandler.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityUnauthorizedHandler.java
index dc0fa3e..91df79f 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityUnauthorizedHandler.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/SecurityUnauthorizedHandler.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfo.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfo.java
index abd9eb9..8668a91 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfo.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfo.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfoDAO.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfoDAO.java
index d7c0bbb..38af702 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfoDAO.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserInfoDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserVerificationService.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserVerificationService.java
index 0c9daac..cffbf43 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserVerificationService.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/UserVerificationService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth;
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/contract/SecurityAPI.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/contract/SecurityAPI.java
index b4e6b4c..9ce14c3 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/contract/SecurityAPI.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/contract/SecurityAPI.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.contract;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/dto/UserCredentialDTO.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/dto/UserCredentialDTO.java
index 0ca7488..6c83cca 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/dto/UserCredentialDTO.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/dto/UserCredentialDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dto;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/oauth2/Oauth2AuthenticationService.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/oauth2/Oauth2AuthenticationService.java
index 4e84112..e998772 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/oauth2/Oauth2AuthenticationService.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/oauth2/Oauth2AuthenticationService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.oauth2;
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/AbstractAuthenticationService.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/AbstractAuthenticationService.java
index b1e010a..1ef65f7 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/AbstractAuthenticationService.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/AbstractAuthenticationService.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.auth.rest;
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/ConfigurableResource.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/ConfigurableResource.java
index 836da16..e7af37d 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/ConfigurableResource.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/ConfigurableResource.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.rest;
 
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationAuthorizer.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationAuthorizer.java
index 4f52919..2f346e8 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationAuthorizer.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationAuthorizer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.rest;
diff --git a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationCallback.java b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationCallback.java
index 8b32f57..9f1cb28 100644
--- a/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationCallback.java
+++ b/services/dlab-auth-common/src/main/java/com/epam/dlab/auth/rest/UserSessionDurationCallback.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.rest;
diff --git a/services/dlab-model/pom.xml b/services/dlab-model/pom.xml
index 17f706d..17e5b31 100644
--- a/services/dlab-model/pom.xml
+++ b/services/dlab-model/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/MongoKeyWords.java b/services/dlab-model/src/main/java/com/epam/dlab/MongoKeyWords.java
index dc01e6d..6553f2a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/MongoKeyWords.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/MongoKeyWords.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/LibListComputationalDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/LibListComputationalDTO.java
index aa1aa9d..df92c54 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/LibListComputationalDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/LibListComputationalDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceBaseDTO.java
index aa869c0..de34af9 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceBaseDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
@@ -23,7 +26,7 @@
 import com.google.common.base.MoreObjects.ToStringHelper;
 
 
-@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "@class")
 public abstract class ResourceBaseDTO<T extends ResourceBaseDTO<?>> {
 	@SuppressWarnings("unchecked")
 	private final T self = (T) this;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceEnvBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceEnvBaseDTO.java
index ee6d5ce..045cf12 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceEnvBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceEnvBaseDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceSysBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceSysBaseDTO.java
index 1d780a0..8ed3822 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceSysBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceSysBaseDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java
index 3be5bb7..fac4891 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java
@@ -1,19 +1,20 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/SchedulerJobDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/SchedulerJobDTO.java
index 73a0a58..52d56a0 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/SchedulerJobDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/SchedulerJobDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
@@ -64,4 +67,9 @@
 	@JsonProperty("sync_start_required")
 	private boolean syncStartRequired = true;
 
+	@JsonProperty("max_inactivity")
+	private Long maxInactivity;
+	@JsonProperty("check_inactivity_required")
+	private boolean checkInactivityRequired;
+
 }
\ No newline at end of file
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusBaseDTO.java
index f1ac86c..14dc5ce 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusBaseDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.dto;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusEnvBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusEnvBaseDTO.java
index a4ff924..65fb838 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusEnvBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/StatusEnvBaseDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.dto;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/UserEnvironmentResources.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/UserEnvironmentResources.java
index 6d03416..d563d14 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/UserEnvironmentResources.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/UserEnvironmentResources.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceDTO.java
index 5941845..a4a3e47 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceDTO.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto;
 
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import com.epam.dlab.dto.exploratory.LibInstallDTO;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -23,6 +27,7 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -66,6 +71,10 @@
 	private boolean reuploadKeyRequired = false;
 	@JsonInclude(JsonInclude.Include.NON_EMPTY)
 	private List<LibInstallDTO> libs = Collections.emptyList();
+	@JsonProperty("last_activity")
+	private LocalDateTime lastActivity;
+	@JsonProperty("cluster_config")
+	private List<ClusterConfig> clusterConfig;
 
 	/**
 	 * Sets the user login name.
@@ -99,6 +108,11 @@
 		return this;
 	}
 
+	public UserInstanceDTO withClusterConfig(List<ClusterConfig> config) {
+		setClusterConfig(config);
+		return this;
+	}
+
 	/**
 	 * Sets the image version.
 	 */
@@ -132,30 +146,6 @@
 	}
 
 	/**
-	 * Sets the URL of exploratory.
-	 */
-	public UserInstanceDTO withExploratoryUrl(List<ResourceURL> resourceUrl) {
-		setResourceUrl(resourceUrl);
-		return this;
-	}
-
-	/**
-	 * Sets the date and time when the notebook has created.
-	 */
-	public UserInstanceDTO withUptime(Date uptime) {
-		setUptime(uptime);
-		return this;
-	}
-
-	/**
-	 * Sets private IP address.
-	 */
-	public UserInstanceDTO withPrivateIp(String privateIp) {
-		setPrivateIp(privateIp);
-		return this;
-	}
-
-	/**
 	 * Sets a list of user's computational resources for notebook.
 	 */
 	public UserInstanceDTO withResources(List<UserComputationalResource> resources) {
@@ -164,22 +154,6 @@
 	}
 
 	/**
-	 * Sets scheduler data.
-	 */
-	public UserInstanceDTO withSchedulerData(SchedulerJobDTO schedulerData) {
-		setSchedulerData(schedulerData);
-		return this;
-	}
-
-	/**
-	 * Sets value of requirement key reuploading.
-	 */
-	public UserInstanceDTO withReuploadKeyRequirement(boolean reuploadKeyRequired) {
-		setReuploadKeyRequired(reuploadKeyRequired);
-		return this;
-	}
-
-	/**
 	 * Sets library list.
 	 */
 	public UserInstanceDTO withLibs(List<LibInstallDTO> libs) {
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceStatus.java
index eda52df..463a61b 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceStatus.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/UserInstanceStatus.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto;
 
@@ -30,6 +31,7 @@
 	TERMINATED("terminated"),
 	FAILED("failed"),
 	CREATING_IMAGE("creating image"),
+	RECONFIGURING("reconfiguring"),
 	REUPLOADING_KEY("reuploading key");
 
 	private String name;
@@ -44,22 +46,22 @@
 	}
 
 	public static UserInstanceStatus of(String status) {
-        if (status != null) {
-            for (UserInstanceStatus uis : UserInstanceStatus.values()) {
-                if (status.equalsIgnoreCase(uis.toString())) {
-                    return uis;
-                }
-            }
-        }
-        return null;
-    }
-    
-    public boolean in(UserInstanceStatus ... statusList) {
-    	for (UserInstanceStatus status : statusList) {
+		if (status != null) {
+			for (UserInstanceStatus uis : UserInstanceStatus.values()) {
+				if (status.equalsIgnoreCase(uis.toString())) {
+					return uis;
+				}
+			}
+		}
+		return null;
+	}
+
+	public boolean in(UserInstanceStatus... statusList) {
+		for (UserInstanceStatus status : statusList) {
 			if (this.equals(status)) {
 				return true;
 			}
 		}
 		return false;
-    }
+	}
 }
\ No newline at end of file
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java
index 6dec1ee..1225624 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws;
@@ -24,37 +27,31 @@
 @Data
 @ToString(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
+@AllArgsConstructor
 @NoArgsConstructor
+@Builder
 public class AwsCloudSettings extends CloudSettings {
 
-    @JsonProperty("aws_iam_user")
-    private String awsIamUser;
-    @JsonProperty("aws_region")
-    private String awsRegion;
-    @JsonProperty("aws_subnet_id")
-    private String awsSubnetId;
-    @JsonProperty("aws_security_groups_ids")
-    private String awsSecurityGroupIds;
-    @JsonProperty("aws_vpc_id")
-    private String awsVpcId;
-    @JsonProperty("conf_tag_resource_id")
-    private String confTagResourceId;
+	@JsonProperty("aws_iam_user")
+	private String awsIamUser;
+	@JsonProperty("aws_region")
+	private String awsRegion;
+	@JsonProperty("aws_subnet_id")
+	private String awsSubnetId;
+	@JsonProperty("aws_security_groups_ids")
+	private String awsSecurityGroupIds;
+	@JsonProperty("aws_vpc_id")
+	private String awsVpcId;
+	@JsonProperty("conf_tag_resource_id")
+	private String confTagResourceId;
+	@JsonProperty("aws_notebook_subnet_id")
+	private String awsNotebookSubnetId;
+	@JsonProperty("aws_notebook_vpc_id")
+	private String awsNotebookVpcId;
 
-    @Builder
-    public AwsCloudSettings(String awsIamUser, String awsRegion, String awsSubnetId,
-                            String awsSecurityGroupIds, String awsVpcId, String confTagResourceId) {
-
-        this.awsIamUser = awsIamUser;
-        this.awsRegion = awsRegion;
-        this.awsSubnetId = awsSubnetId;
-        this.awsSecurityGroupIds = awsSecurityGroupIds;
-        this.awsVpcId = awsVpcId;
-        this.confTagResourceId = confTagResourceId;
-    }
-
-    @Override
-    @JsonIgnore
-    public String getIamUser() {
-        return awsIamUser;
-    }
+	@Override
+	@JsonIgnore
+	public String getIamUser() {
+		return awsIamUser;
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalResource.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalResource.java
index 9f53d0e..928733d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalResource.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.computational;
@@ -25,6 +28,7 @@
 import lombok.Getter;
 import lombok.ToString;
 
+import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.List;
 
@@ -36,37 +40,39 @@
 @EqualsAndHashCode(callSuper = true)
 public class AwsComputationalResource extends UserComputationalResource {
 
-    @JsonProperty("instance_id")
-    private String instanceId;
-    @JsonProperty("master_node_shape")
-    private String masterShape;
-    @JsonProperty("slave_node_shape")
-    private String slaveShape;
-    @JsonProperty("slave_node_spot")
-    private Boolean slaveSpot = false;
-    @JsonProperty("slave_node_spot_pct_price")
-    private Integer slaveSpotPctPrice;
-    @JsonProperty("total_instance_number")
-    private String slaveNumber;
-    @JsonProperty("emr_version")
-    private String version;
+	@JsonProperty("instance_id")
+	private String instanceId;
+	@JsonProperty("master_node_shape")
+	private String masterShape;
+	@JsonProperty("slave_node_shape")
+	private String slaveShape;
+	@JsonProperty("slave_node_spot")
+	private Boolean slaveSpot;
+	@JsonProperty("slave_node_spot_pct_price")
+	private Integer slaveSpotPctPrice;
+	@JsonProperty("total_instance_number")
+	private String slaveNumber;
+	@JsonProperty("emr_version")
+	private String version;
 
-    @Builder
-    public AwsComputationalResource(String computationalName, String computationalId, String imageName,
+	@Builder
+	public AwsComputationalResource(String computationalName, String computationalId, String imageName,
 									String templateName, String status, Date uptime,
 									SchedulerJobDTO schedulerJobData, boolean reuploadKeyRequired,
 									String instanceId, String masterShape, String slaveShape, Boolean slaveSpot,
 									Integer slaveSpotPctPrice, String slaveNumber, String version,
-									List<ResourceURL> resourceURL) {
+									List<ResourceURL> resourceURL, LocalDateTime lastActivity,
+									List<ClusterConfig> config) {
 
 		super(computationalName, computationalId, imageName, templateName, status, uptime, schedulerJobData,
-				reuploadKeyRequired, resourceURL);
-        this.instanceId = instanceId;
-        this.masterShape = masterShape;
-        this.slaveShape = slaveShape;
-        this.slaveSpot = slaveSpot;
-        this.slaveSpotPctPrice = slaveSpotPctPrice;
-        this.slaveNumber = slaveNumber;
-        this.version = version;
-    }
+				reuploadKeyRequired, resourceURL, lastActivity);
+		this.instanceId = instanceId;
+		this.masterShape = masterShape;
+		this.slaveShape = slaveShape;
+		this.slaveSpot = slaveSpot;
+		this.slaveSpotPctPrice = slaveSpotPctPrice;
+		this.slaveNumber = slaveNumber;
+		this.version = version;
+		this.config = config;
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalTerminateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalTerminateDTO.java
index d45ec0a..2775f68 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalTerminateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/AwsComputationalTerminateDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ClusterConfig.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ClusterConfig.java
new file mode 100644
index 0000000..e8f791e
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ClusterConfig.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.dto.aws.computational;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+import java.util.Map;
+
+@Data
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class ClusterConfig {
+	@JsonProperty("Classification")
+	@NotEmpty(message = "'Classification' field should not be empty")
+	private String classification;
+	@JsonProperty("Properties")
+	@NotNull(message = "'Properties' field should not be empty")
+	private Map<String, Object> properties;
+	@JsonProperty("Configurations")
+	private List<ClusterConfig> configurations;
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalConfigAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalConfigAws.java
index ac04018..87996cc 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalConfigAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalConfigAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalCreateAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalCreateAws.java
index a6c2f59..5a7abdf 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalCreateAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/ComputationalCreateAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.computational;
@@ -20,111 +23,128 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects.ToStringHelper;
 
+import java.util.List;
+
 public class ComputationalCreateAws extends ComputationalBase<ComputationalCreateAws> {
-    @JsonProperty("emr_instance_count")
-    private String instanceCount;
-    @JsonProperty("emr_master_instance_type")
-    private String masterInstanceType;
-    @JsonProperty("emr_slave_instance_type")
-    private String slaveInstanceType;
-    @JsonProperty("emr_slave_instance_spot")
-    private Boolean slaveInstanceSpot;
-    @JsonProperty("emr_slave_instance_spot_pct_price")
-    private Integer slaveInstanceSpotPctPrice;
-    @JsonProperty("emr_version")
-    private String version;
+	@JsonProperty("emr_instance_count")
+	private String instanceCount;
+	@JsonProperty("emr_master_instance_type")
+	private String masterInstanceType;
+	@JsonProperty("emr_slave_instance_type")
+	private String slaveInstanceType;
+	@JsonProperty("emr_slave_instance_spot")
+	private Boolean slaveInstanceSpot;
+	@JsonProperty("emr_slave_instance_spot_pct_price")
+	private Integer slaveInstanceSpotPctPrice;
+	@JsonProperty("emr_version")
+	private String version;
+	@JsonProperty("emr_configurations")
+	private List<ClusterConfig> config;
 
-    public String getInstanceCount() {
-        return instanceCount;
-    }
+	public String getInstanceCount() {
+		return instanceCount;
+	}
 
-    public void setInstanceCount(String instanceCount) {
-        this.instanceCount = instanceCount;
-    }
+	public void setInstanceCount(String instanceCount) {
+		this.instanceCount = instanceCount;
+	}
 
-    public ComputationalCreateAws withInstanceCount(String instanceCount) {
-        setInstanceCount(instanceCount);
-        return this;
-    }
+	public ComputationalCreateAws withInstanceCount(String instanceCount) {
+		setInstanceCount(instanceCount);
+		return this;
+	}
 
-    public String getMasterInstanceType() {
-        return masterInstanceType;
-    }
+	public String getMasterInstanceType() {
+		return masterInstanceType;
+	}
 
-    public void setMasterInstanceType(String masterInstanceType) {
-        this.masterInstanceType = masterInstanceType;
-    }
+	public void setMasterInstanceType(String masterInstanceType) {
+		this.masterInstanceType = masterInstanceType;
+	}
 
-    public ComputationalCreateAws withMasterInstanceType(String masterInstanceType) {
-        setMasterInstanceType(masterInstanceType);
-        return this;
-    }
+	public ComputationalCreateAws withMasterInstanceType(String masterInstanceType) {
+		setMasterInstanceType(masterInstanceType);
+		return this;
+	}
 
-    public String getSlaveInstanceType() {
-        return slaveInstanceType;
-    }
+	public String getSlaveInstanceType() {
+		return slaveInstanceType;
+	}
 
-    public void setSlaveInstanceType(String slaveInstanceType) {
-        this.slaveInstanceType = slaveInstanceType;
-    }
+	public void setSlaveInstanceType(String slaveInstanceType) {
+		this.slaveInstanceType = slaveInstanceType;
+	}
 
-    public ComputationalCreateAws withSlaveInstanceType(String slaveInstanceType) {
-        setSlaveInstanceType(slaveInstanceType);
-        return this;
-    }
+	public ComputationalCreateAws withSlaveInstanceType(String slaveInstanceType) {
+		setSlaveInstanceType(slaveInstanceType);
+		return this;
+	}
 
-    public Boolean getSlaveInstanceSpot() {
-        return slaveInstanceSpot;
-    }
+	public Boolean getSlaveInstanceSpot() {
+		return slaveInstanceSpot;
+	}
 
-    public void setSlaveInstanceSpot(Boolean slaveInstanceSpot) {
-        this.slaveInstanceSpot = slaveInstanceSpot;
-    }
+	public void setSlaveInstanceSpot(Boolean slaveInstanceSpot) {
+		this.slaveInstanceSpot = slaveInstanceSpot;
+	}
 
-    public ComputationalCreateAws withSlaveInstanceSpot(Boolean slaveInstanceSpot) {
-        setSlaveInstanceSpot(slaveInstanceSpot);
-        return this;
-    }
+	public ComputationalCreateAws withSlaveInstanceSpot(Boolean slaveInstanceSpot) {
+		setSlaveInstanceSpot(slaveInstanceSpot);
+		return this;
+	}
 
-    public Integer getSlaveInstanceSpotPctPrice() {
-        return slaveInstanceSpotPctPrice;
-    }
+	public Integer getSlaveInstanceSpotPctPrice() {
+		return slaveInstanceSpotPctPrice;
+	}
 
-    public void setSlaveInstanceSpotPctPrice(Integer slaveInstanceSpotPctPrice) {
-        this.slaveInstanceSpotPctPrice = slaveInstanceSpotPctPrice;
-    }
+	public void setSlaveInstanceSpotPctPrice(Integer slaveInstanceSpotPctPrice) {
+		this.slaveInstanceSpotPctPrice = slaveInstanceSpotPctPrice;
+	}
 
-    public ComputationalCreateAws withSlaveInstanceSpotPctPrice(Integer slaveInstanceSpotPctPrice) {
-        setSlaveInstanceSpotPctPrice(slaveInstanceSpotPctPrice);
-        return this;
-    }
+	public ComputationalCreateAws withSlaveInstanceSpotPctPrice(Integer slaveInstanceSpotPctPrice) {
+		setSlaveInstanceSpotPctPrice(slaveInstanceSpotPctPrice);
+		return this;
+	}
 
-    public String getVersion() {
-        return version;
-    }
+	public String getVersion() {
+		return version;
+	}
 
-    public void setVersion(String version) {
-        this.version = version;
-    }
+	public void setVersion(String version) {
+		this.version = version;
+	}
 
-    public ComputationalCreateAws withVersion(String version) {
-        setVersion(version);
-        return this;
-    }
+	public ComputationalCreateAws withVersion(String version) {
+		setVersion(version);
+		return this;
+	}
 
-    @Override
-    public ToStringHelper toStringHelper(Object self) {
-        return super.toStringHelper(self)
-                .add("version", version)
-                .add("masterInstanceType", masterInstanceType)
-                .add("slaveInstanceType", slaveInstanceType)
-                .add("slaveInstanceSpot", slaveInstanceSpot)
-                .add("slaveInstanceSpotPctPrice", slaveInstanceSpotPctPrice)
-                .add("instanceCount", instanceCount);
-    }
+	public List<ClusterConfig> getConfig() {
+		return config;
+	}
 
-    @Override
-    public String toString() {
-        return toStringHelper(this).toString();
-    }
+	public void setConfig(List<ClusterConfig> config) {
+		this.config = config;
+	}
+
+	public ComputationalCreateAws withConfig(List<ClusterConfig> config) {
+		setConfig(config);
+		return this;
+	}
+
+	@Override
+	public ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("version", version)
+				.add("masterInstanceType", masterInstanceType)
+				.add("slaveInstanceType", slaveInstanceType)
+				.add("slaveInstanceSpot", slaveInstanceSpot)
+				.add("slaveInstanceSpotPctPrice", slaveInstanceSpotPctPrice)
+				.add("instanceCount", instanceCount);
+	}
+
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalConfigAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalConfigAws.java
index 2136207..51712f7 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalConfigAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalConfigAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalCreateAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalCreateAws.java
index 14f33d9..d82628d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalCreateAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/computational/SparkComputationalCreateAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.computational;
@@ -20,52 +23,49 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
 
+import java.util.List;
+
 public class SparkComputationalCreateAws extends ComputationalBase<SparkComputationalCreateAws> {
 
-    @JsonProperty("dataengine_instance_count")
-    private String dataEngineInstanceCount;
-    @JsonProperty("aws_dataengine_slave_shape")
-    private String dataEngineSlaveShape;
-    @JsonProperty("aws_dataengine_master_shape")
-    private String dataEngineMasterShape;
+	@JsonProperty("dataengine_instance_count")
+	private String dataEngineInstanceCount;
+	@JsonProperty("aws_dataengine_slave_shape")
+	private String dataEngineSlaveShape;
+	@JsonProperty("aws_dataengine_master_shape")
+	private String dataEngineMasterShape;
+	@JsonProperty("spark_configurations")
+	private List<ClusterConfig> config;
 
-    public SparkComputationalCreateAws withDataEngineInstanceCount(String dataEngineInstanceCount) {
-        this.dataEngineInstanceCount = dataEngineInstanceCount;
-        return this;
-    }
+	public SparkComputationalCreateAws withDataEngineInstanceCount(String dataEngineInstanceCount) {
+		this.dataEngineInstanceCount = dataEngineInstanceCount;
+		return this;
+	}
 
-    public SparkComputationalCreateAws withDataEngineSlaveShape(String dataEngineSlaveSize) {
-        this.dataEngineSlaveShape = dataEngineSlaveSize;
-        return this;
-    }
+	public SparkComputationalCreateAws withDataEngineSlaveShape(String dataEngineSlaveSize) {
+		this.dataEngineSlaveShape = dataEngineSlaveSize;
+		return this;
+	}
 
-    public SparkComputationalCreateAws withDataEngineMasterShape(String dataEngineMasterSize) {
-        this.dataEngineMasterShape = dataEngineMasterSize;
-        return this;
-    }
+	public SparkComputationalCreateAws withDataEngineMasterShape(String dataEngineMasterSize) {
+		this.dataEngineMasterShape = dataEngineMasterSize;
+		return this;
+	}
 
-    public String getDataEngineInstanceCount() {
-        return dataEngineInstanceCount;
-    }
+	public SparkComputationalCreateAws withConfig(List<ClusterConfig> config) {
+		this.config = config;
+		return this;
+	}
 
-    public String getDataEngineSlaveShape() {
-        return dataEngineSlaveShape;
-    }
+	@Override
+	public MoreObjects.ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("dataEngineInstanceCount", dataEngineInstanceCount)
+				.add("dataEngineSlaveShape", dataEngineSlaveShape)
+				.add("dataEngineMasterShape", dataEngineMasterShape);
+	}
 
-    public String getDataEngineMasterShape() {
-        return dataEngineMasterShape;
-    }
-
-    @Override
-    public MoreObjects.ToStringHelper toStringHelper(Object self) {
-        return super.toStringHelper(self)
-                .add("dataEngineInstanceCount", dataEngineInstanceCount)
-                .add("dataEngineSlaveShape", dataEngineSlaveShape)
-                .add("dataEngineMasterShape", dataEngineMasterShape);
-    }
-
-    @Override
-    public String toString() {
-        return toStringHelper(this).toString();
-    }
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeCreateAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeCreateAws.java
index a4ad7d6..8cc787d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeCreateAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeCreateAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeInfoAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeInfoAws.java
index 49e65ae..7ba2755 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeInfoAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/edge/EdgeInfoAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/exploratory/ExploratoryCreateAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/exploratory/ExploratoryCreateAws.java
index 9a3b4d3..58d83df 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/exploratory/ExploratoryCreateAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/exploratory/ExploratoryCreateAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/keyload/UploadFileAws.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/keyload/UploadFileAws.java
index 715a249..b5bdd29 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/keyload/UploadFileAws.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/keyload/UploadFileAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.aws.keyload;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java
index 38d005e..af72b5f 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/auth/AuthorizationCodeFlowResponse.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/auth/AuthorizationCodeFlowResponse.java
index 3725cde..14f186b 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/auth/AuthorizationCodeFlowResponse.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/auth/AuthorizationCodeFlowResponse.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.auth;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalConfigAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalConfigAzure.java
index d2905d2..882ddbe 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalConfigAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalConfigAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalCreateAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalCreateAzure.java
index 8e762a6..89c1a5a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalCreateAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/computational/SparkComputationalCreateAzure.java
@@ -1,106 +1,95 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.computational;
 
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
 
+import java.util.List;
+
 public class SparkComputationalCreateAzure extends ComputationalBase<SparkComputationalCreateAzure> {
-    @JsonProperty("dataengine_instance_count")
-    private String dataEngineInstanceCount;
-    @JsonProperty("azure_dataengine_slave_size")
-    private String dataEngineSlaveSize;
-    @JsonProperty("azure_dataengine_master_size")
-    private String dataEngineMasterSize;
-    @JsonProperty("azure_client_id")
-    private String azureClientId;
-    @JsonProperty("azure_datalake_enable")
-    private String azureDataLakeEnabled;
-    @JsonProperty("azure_user_refresh_token")
-    private String azureUserRefreshToken;
+	@JsonProperty("dataengine_instance_count")
+	private String dataEngineInstanceCount;
+	@JsonProperty("azure_dataengine_slave_size")
+	private String dataEngineSlaveSize;
+	@JsonProperty("azure_dataengine_master_size")
+	private String dataEngineMasterSize;
+	@JsonProperty("azure_client_id")
+	private String azureClientId;
+	@JsonProperty("azure_datalake_enable")
+	private String azureDataLakeEnabled;
+	@JsonProperty("azure_user_refresh_token")
+	private String azureUserRefreshToken;
+	@JsonProperty("spark_configurations")
+	private List<ClusterConfig> config;
 
-    public SparkComputationalCreateAzure withDataEngineInstanceCount(String dataEngineInstanceCount) {
-        this.dataEngineInstanceCount = dataEngineInstanceCount;
-        return this;
-    }
+	public SparkComputationalCreateAzure withDataEngineInstanceCount(String dataEngineInstanceCount) {
+		this.dataEngineInstanceCount = dataEngineInstanceCount;
+		return this;
+	}
 
-    public SparkComputationalCreateAzure withDataEngineSlaveSize(String dataEngineSlaveSize) {
-        this.dataEngineSlaveSize = dataEngineSlaveSize;
-        return this;
-    }
+	public SparkComputationalCreateAzure withDataEngineSlaveSize(String dataEngineSlaveSize) {
+		this.dataEngineSlaveSize = dataEngineSlaveSize;
+		return this;
+	}
 
-    public SparkComputationalCreateAzure withDataEngineMasterSize(String dataEngineMasterSize) {
-        this.dataEngineMasterSize = dataEngineMasterSize;
-        return this;
-    }
+	public SparkComputationalCreateAzure withDataEngineMasterSize(String dataEngineMasterSize) {
+		this.dataEngineMasterSize = dataEngineMasterSize;
+		return this;
+	}
 
-    public SparkComputationalCreateAzure withAzureClientId(String azureClientId) {
-        this.azureClientId = azureClientId;
-        return this;
-    }
+	public SparkComputationalCreateAzure withAzureClientId(String azureClientId) {
+		this.azureClientId = azureClientId;
+		return this;
+	}
 
-    public SparkComputationalCreateAzure withAzureDataLakeEnabled(String azureDataLakeEnabled) {
-        this.azureDataLakeEnabled = azureDataLakeEnabled;
-        return this;
-    }
+	public SparkComputationalCreateAzure withAzureDataLakeEnabled(String azureDataLakeEnabled) {
+		this.azureDataLakeEnabled = azureDataLakeEnabled;
+		return this;
+	}
 
-    public SparkComputationalCreateAzure withAzureUserRefreshToken(String azureUserRefreshToken) {
-        this.azureUserRefreshToken = azureUserRefreshToken;
-        return this;
-    }
+	public SparkComputationalCreateAzure withAzureUserRefreshToken(String azureUserRefreshToken) {
+		this.azureUserRefreshToken = azureUserRefreshToken;
+		return this;
+	}
 
-    public String getDataEngineInstanceCount() {
-        return dataEngineInstanceCount;
-    }
+	public SparkComputationalCreateAzure withConfig(List<ClusterConfig> config) {
+		this.config = config;
+		return this;
+	}
 
-    public String getDataEngineSlaveSize() {
-        return dataEngineSlaveSize;
-    }
+	@Override
+	public MoreObjects.ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("dataEngineInstanceCount", dataEngineInstanceCount)
+				.add("dataEngineSlaveSize", dataEngineSlaveSize)
+				.add("dataEngineMasterSize", dataEngineMasterSize)
+				.add("azureClientId", azureClientId != null ? "***" : null)
+				.add("azureDataLakeEnabled", azureDataLakeEnabled)
+				.add("azureUserRefreshToken", azureUserRefreshToken != null ? "***" : null);
+	}
 
-    public String getDataEngineMasterSize() {
-        return dataEngineMasterSize;
-    }
-
-    public String getAzureClientId() {
-        return azureClientId;
-    }
-
-    public String getAzureDataLakeEnabled() {
-        return azureDataLakeEnabled;
-    }
-
-    public String getAzureUserRefreshToken() {
-        return azureUserRefreshToken;
-    }
-
-    @Override
-    public MoreObjects.ToStringHelper toStringHelper(Object self) {
-        return super.toStringHelper(self)
-                .add("dataEngineInstanceCount", dataEngineInstanceCount)
-                .add("dataEngineSlaveSize", dataEngineSlaveSize)
-                .add("dataEngineMasterSize", dataEngineMasterSize)
-                .add("azureClientId", azureClientId != null ? "***" : null)
-                .add("azureDataLakeEnabled", azureDataLakeEnabled)
-                .add("azureUserRefreshToken", azureUserRefreshToken != null ? "***" : null);
-    }
-
-    @Override
-    public String toString() {
-        return toStringHelper(this).toString();
-    }
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeCreateAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeCreateAzure.java
index e288b8d..9297150 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeCreateAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeCreateAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeInfoAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeInfoAzure.java
index 2727cd7..9564261 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeInfoAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/edge/EdgeInfoAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStartAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStartAzure.java
index d80727f..5869b90 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStartAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStartAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStopAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStopAzure.java
index bb47b32..1915106 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStopAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryActionStopAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryCreateAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryCreateAzure.java
index 4c45402..371c316 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryCreateAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/exploratory/ExploratoryCreateAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/keyload/UploadFileAzure.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/keyload/UploadFileAzure.java
index ab4c919..398ef6d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/keyload/UploadFileAzure.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/keyload/UploadFileAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.azure.keyload;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupDTO.java
index 7131191..5442cb8 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.backup;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatus.java
index fb9e929..13c3efb 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatus.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatus.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.backup;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatusDTO.java
index a8c6515..6beae62 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/backup/EnvBackupStatusDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.backup;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/CloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/CloudSettings.java
index ccb35f4..16f0bed 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/CloudSettings.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/CloudSettings.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/DataEngineType.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/DataEngineType.java
index fd8a2c2..39b1c63 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/DataEngineType.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/DataEngineType.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/ComputationalBase.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/ComputationalBase.java
index 28a16ec..0b233b5 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/ComputationalBase.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/ComputationalBase.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base.computational;
@@ -20,68 +23,68 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects.ToStringHelper;
 
-abstract public class ComputationalBase<T extends ComputationalBase<?>> extends ResourceEnvBaseDTO<T> {
-    @SuppressWarnings("unchecked")
-    private final T self = (T) this;
+public abstract class ComputationalBase<T extends ComputationalBase<?>> extends ResourceEnvBaseDTO<T> {
+	@SuppressWarnings("unchecked")
+	private final T self = (T) this;
 
-    @JsonProperty("computational_name")
-    private String computationalName;
+	@JsonProperty("computational_name")
+	private String computationalName;
 
-    @JsonProperty("notebook_instance_name")
-    private String notebookInstanceName;
+	@JsonProperty("notebook_instance_name")
+	private String notebookInstanceName;
 
-    @JsonProperty("notebook_template_name")
-    private String notebookTemplateName;
+	@JsonProperty("notebook_template_name")
+	private String notebookTemplateName;
 
-    public String getComputationalName() {
-        return computationalName;
-    }
+	public String getComputationalName() {
+		return computationalName;
+	}
 
-    public void setComputationalName(String computationalName) {
-        this.computationalName = computationalName;
-    }
+	public void setComputationalName(String computationalName) {
+		this.computationalName = computationalName;
+	}
 
-    public T withComputationalName(String computationalName) {
-        setComputationalName(computationalName);
-        return self;
-    }
+	public T withComputationalName(String computationalName) {
+		setComputationalName(computationalName);
+		return self;
+	}
 
-    public String getNotebookInstanceName() {
-        return notebookInstanceName;
-    }
+	public String getNotebookInstanceName() {
+		return notebookInstanceName;
+	}
 
-    public void setNotebookInstanceName(String notebookInstanceName) {
-        this.notebookInstanceName = notebookInstanceName;
-    }
+	public void setNotebookInstanceName(String notebookInstanceName) {
+		this.notebookInstanceName = notebookInstanceName;
+	}
 
-    public T withNotebookInstanceName(String notebookInstanceName) {
-        setNotebookInstanceName(notebookInstanceName);
-        return self;
-    }
+	public T withNotebookInstanceName(String notebookInstanceName) {
+		setNotebookInstanceName(notebookInstanceName);
+		return self;
+	}
 
-    public String getNotebookTemplateName() {
-        return notebookTemplateName;
-    }
+	public String getNotebookTemplateName() {
+		return notebookTemplateName;
+	}
 
-    public void setNotebookTemplateName(String notebookTemplateName) {
-        this.notebookTemplateName = notebookTemplateName;
-    }
+	public void setNotebookTemplateName(String notebookTemplateName) {
+		this.notebookTemplateName = notebookTemplateName;
+	}
 
-    public T withNotebookTemplateName(String notebookTemplateName) {
-        setNotebookTemplateName(notebookTemplateName);
-        return self;
-    }
+	public T withNotebookTemplateName(String notebookTemplateName) {
+		setNotebookTemplateName(notebookTemplateName);
+		return self;
+	}
 
-    @Override
-    public ToStringHelper toStringHelper(Object self) {
-        return super.toStringHelper(self)
-                .add("computationalName", computationalName)
-                .add("notebookInstanceName", notebookInstanceName)
-                .add("notebookTemplateName", notebookTemplateName);
-    }
+	@Override
+	public ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("computationalName", computationalName)
+				.add("notebookInstanceName", notebookInstanceName)
+				.add("notebookTemplateName", notebookTemplateName);
+	}
 
-    @Override
-    public String toString() {
-        return toStringHelper(this).toString();
-    }
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/FullComputationalTemplate.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/FullComputationalTemplate.java
index 7ea2652..0c23ef2 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/FullComputationalTemplate.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/computational/FullComputationalTemplate.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/edge/EdgeInfo.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/edge/EdgeInfo.java
index 287ed57..19ae1cc 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/edge/EdgeInfo.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/edge/EdgeInfo.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/ReuploadFile.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/ReuploadFile.java
index 5ffca30..109f0b1 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/ReuploadFile.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/ReuploadFile.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base.keyload;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFile.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFile.java
index 3cb5737..65ee00c 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFile.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFile.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base.keyload;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFileResult.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFileResult.java
index 5177016..96c9943 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFileResult.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/base/keyload/UploadFileResult.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.base.keyload;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityCallbackDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityCallbackDTO.java
new file mode 100644
index 0000000..d7b790b
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityCallbackDTO.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.dto.computational;
+
+import com.epam.dlab.dto.ResourceBaseDTO;
+import com.epam.dlab.dto.status.EnvResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Setter
+@Getter
+public class CheckInactivityCallbackDTO extends ResourceBaseDTO<CheckInactivityCallbackDTO> {
+
+	@JsonProperty
+	private List<EnvResource> resources;
+
+	@JsonProperty
+	private String id;
+
+	public CheckInactivityCallbackDTO withClusters(List<EnvResource> clusters) {
+		setResources(clusters);
+		return this;
+	}
+
+	public CheckInactivityCallbackDTO withId(String id) {
+		this.id = id;
+		return this;
+	}
+
+	@Override
+	public String toString() {
+		return toStringHelper(this)
+				.add("resources", resources)
+				.add("id", id)
+				.toString();
+	}
+
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityStatus.java
new file mode 100644
index 0000000..38212d9
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityStatus.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.dto.computational;
+
+import java.util.Arrays;
+
+public enum CheckInactivityStatus {
+
+	COMPLETED("N/A"), FAILED("N/A");
+
+	private String message;
+
+	CheckInactivityStatus(String message) {
+		this.message = message;
+	}
+
+	public CheckInactivityStatus withErrorMessage(String message) {
+		this.message = message;
+		return this;
+	}
+
+	public String message() {
+		return message;
+	}
+
+	public static CheckInactivityStatus fromValue(String value) {
+		return Arrays.stream(values())
+				.filter(v -> v.name().equalsIgnoreCase(value))
+				.findAny()
+				.orElseThrow(() ->
+						new IllegalArgumentException("Wrong value for CheckInactivityStatus: " + value));
+	}
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityStatusDTO.java
new file mode 100644
index 0000000..04ac54d
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/CheckInactivityStatusDTO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.dto.computational;
+
+import com.epam.dlab.dto.StatusBaseDTO;
+import com.epam.dlab.dto.status.EnvResource;
+import com.google.common.base.MoreObjects;
+import lombok.Getter;
+
+import java.util.List;
+
+@Getter
+public class CheckInactivityStatusDTO extends StatusBaseDTO<CheckInactivityStatusDTO> {
+
+	private List<EnvResource> resources;
+	private CheckInactivityStatus checkInactivityStatus;
+
+	public CheckInactivityStatusDTO withResources(List<EnvResource> clusters) {
+		this.resources = clusters;
+		return this;
+	}
+
+	public CheckInactivityStatusDTO withStatus(CheckInactivityStatus checkInactivityStatus) {
+		this.checkInactivityStatus = checkInactivityStatus;
+		return this;
+	}
+
+	@Override
+	public MoreObjects.ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("resources", resources)
+				.add("checkInactivityStatus", checkInactivityStatus);
+	}
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalClusterConfigDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalClusterConfigDTO.java
new file mode 100644
index 0000000..df60cb9
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalClusterConfigDTO.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.dto.computational;
+
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
+import com.epam.dlab.dto.base.computational.ComputationalBase;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ComputationalClusterConfigDTO extends ComputationalBase<ComputationalClusterConfigDTO> {
+
+    @JsonProperty("computational_id")
+    private String copmutationalId;
+    @JsonProperty("spark_configurations")
+    private List<ClusterConfig> config;
+    @JsonProperty("azure_user_refresh_token")
+    private String azureUserRefreshToken;
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStartDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStartDTO.java
index 69cb17f..aae7f7b 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStartDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStartDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStatusDTO.java
index 055cbb1..241f92f 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStatusDTO.java
@@ -1,87 +1,118 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.computational;
 
 import com.epam.dlab.dto.ResourceURL;
 import com.epam.dlab.dto.StatusEnvBaseDTO;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects.ToStringHelper;
 
+import java.util.Date;
 import java.util.List;
 
 public class ComputationalStatusDTO extends StatusEnvBaseDTO<ComputationalStatusDTO> {
 	@JsonProperty("computational_url")
 	private List<ResourceURL> resourceUrl;
-    @JsonProperty("computational_id")
-    private String computationalId;
-    @JsonProperty("computational_name")
-    private String computationalName;
-    
-    public String getComputationalId() {
-        return computationalId;
-    }
+	@JsonProperty("computational_id")
+	private String computationalId;
+	@JsonProperty("computational_name")
+	private String computationalName;
+	@JsonProperty("last_activity")
+	private Date lastActivity;
+	@JsonProperty
+	private List<ClusterConfig> config;
 
-    public void setComputationalId(String computationalId) {
-        this.computationalId = computationalId;
-    }
+	public String getComputationalId() {
+		return computationalId;
+	}
 
-    public ComputationalStatusDTO withComputationalId(String computationalId) {
-        setComputationalId(computationalId);
-        return this;
-    }
+	public void setComputationalId(String computationalId) {
+		this.computationalId = computationalId;
+	}
+
+	public ComputationalStatusDTO withComputationalId(String computationalId) {
+		setComputationalId(computationalId);
+		return this;
+	}
 
 	public List<ResourceURL> getResourceUrl() {
 		return resourceUrl;
 	}
 
-    public String getComputationalName() {
-        return computationalName;
-    }
+	public String getComputationalName() {
+		return computationalName;
+	}
 
-    public void setComputationalName(String computationalName) {
-        this.computationalName = computationalName;
-    }
+	public void setComputationalName(String computationalName) {
+		this.computationalName = computationalName;
+	}
 
 	public void setResourceUrl(List<ResourceURL> resourceUrl) {
 		this.resourceUrl = resourceUrl;
 	}
 
+	public void setLastActivity(Date lastActivity) {
+		this.lastActivity = lastActivity;
+	}
+
 	public ComputationalStatusDTO withComputationalUrl(List<ResourceURL> resourceUrl) {
 		setResourceUrl(resourceUrl);
 		return this;
 	}
 
-    public ComputationalStatusDTO withComputationalName(String computationalName) {
-        setComputationalName(computationalName);
-        return this;
-    }
+	public ComputationalStatusDTO withComputationalName(String computationalName) {
+		setComputationalName(computationalName);
+		return this;
+	}
 
-    @Override
-    public ToStringHelper toStringHelper(Object self) {
-    	return super.toStringHelper(self)
-				.add("ComputationalUrl", resourceUrl)
-    	        .add("computationalId", computationalId)
-    	        .add("computationalName", computationalName);
-    }
-    
-    @Override
-    public String toString() {
-    	return toStringHelper(this).toString();
-    }
+	public ComputationalStatusDTO withConfig(List<ClusterConfig> config) {
+		this.config = config;
+		return this;
+	}
+
+	public Date getLastActivity() {
+		return lastActivity;
+	}
+
+	public ComputationalStatusDTO withLastActivity(Date lastActivity) {
+		setLastActivity(lastActivity);
+		return this;
+	}
+
+	public List<ClusterConfig> getConfig() {
+		return config;
+	}
+
+	@Override
+	public ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("computationalUrl", resourceUrl)
+				.add("computationalId", computationalId)
+				.add("computationalName", computationalName)
+				.add("lastActivity", lastActivity)
+				.add("config", config);
+	}
+
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStopDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStopDTO.java
index 7a7f4bc..7d3c5f6 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStopDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalStopDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalTerminateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalTerminateDTO.java
index 6f9969f..44b6460 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalTerminateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/ComputationalTerminateDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/SparkStandaloneClusterResource.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/SparkStandaloneClusterResource.java
index 741134d..50d2c48 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/SparkStandaloneClusterResource.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/SparkStandaloneClusterResource.java
@@ -1,23 +1,27 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.computational;
 
 import com.epam.dlab.dto.ResourceURL;
 import com.epam.dlab.dto.SchedulerJobDTO;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Builder;
 import lombok.Data;
@@ -25,6 +29,7 @@
 import lombok.ToString;
 import org.hibernate.validator.constraints.NotBlank;
 
+import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.List;
 
@@ -32,24 +37,26 @@
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
 public class SparkStandaloneClusterResource extends UserComputationalResource {
-    @NotBlank
-    @JsonProperty("dataengine_instance_count")
-    private String dataEngineInstanceCount;
+	@NotBlank
+	@JsonProperty("dataengine_instance_count")
+	private String dataEngineInstanceCount;
 
-    @NotBlank
-    @JsonProperty("dataengine_instance_shape")
-    private String dataEngineInstanceShape;
+	@NotBlank
+	@JsonProperty("dataengine_instance_shape")
+	private String dataEngineInstanceShape;
 
-    @Builder
-    public SparkStandaloneClusterResource(String computationalName, String computationalId, String imageName,
+	@Builder
+	public SparkStandaloneClusterResource(String computationalName, String computationalId, String imageName,
 										  String templateName, String status, Date uptime,
 										  SchedulerJobDTO schedulerJobData, boolean reuploadKeyRequired,
 										  String dataEngineInstanceCount, String dataEngineInstanceShape,
-										  List<ResourceURL> resourceURL) {
+										  List<ResourceURL> resourceURL, LocalDateTime lastActivity,
+										  List<ClusterConfig> config) {
 
 		super(computationalName, computationalId, imageName, templateName, status, uptime, schedulerJobData,
-				reuploadKeyRequired, resourceURL);
-        this.dataEngineInstanceCount = dataEngineInstanceCount;
-        this.dataEngineInstanceShape = dataEngineInstanceShape;
-    }
+				reuploadKeyRequired, resourceURL, lastActivity);
+		this.dataEngineInstanceCount = dataEngineInstanceCount;
+		this.dataEngineInstanceShape = dataEngineInstanceShape;
+		this.config = config;
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/UserComputationalResource.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/UserComputationalResource.java
index f42267f..14f2b4a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/UserComputationalResource.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/computational/UserComputationalResource.java
@@ -1,53 +1,86 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.computational;
 
 import com.epam.dlab.dto.ResourceURL;
 import com.epam.dlab.dto.SchedulerJobDTO;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
+import com.epam.dlab.dto.base.DataEngineType;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.List;
 
 @Data
 @NoArgsConstructor
-@AllArgsConstructor
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class UserComputationalResource {
-    @JsonProperty("computational_name")
-    private String computationalName;
-    @JsonProperty("computational_id")
-    private String computationalId;
-    @JsonProperty("image")
-    private String imageName;
-    @JsonProperty("template_name")
-    private String templateName;
-    @JsonProperty
-    private String status;
-    @JsonProperty("up_time")
-    private Date uptime;
+	@JsonProperty("computational_name")
+	private String computationalName;
+	@JsonProperty("computational_id")
+	private String computationalId;
+	@JsonProperty("image")
+	private String imageName;
+	@JsonProperty("template_name")
+	private String templateName;
+	@JsonProperty
+	private String status;
+	@JsonProperty("up_time")
+	private Date uptime;
 	@JsonProperty("scheduler_data")
 	private SchedulerJobDTO schedulerData;
 	@JsonProperty("reupload_key_required")
 	private boolean reuploadKeyRequired = false;
 	@JsonProperty("computational_url")
 	private List<ResourceURL> resourceUrl;
+	@JsonProperty("last_activity")
+	private LocalDateTime lastActivity;
+	@JsonProperty("master_node_shape")
+	private String masterNodeShape;
+	@JsonProperty("dataengine_instance_shape")
+	private String dataengineShape;
+	@JsonProperty("instance_id")
+	private String instanceId;
+	protected List<ClusterConfig> config;
+
+	public UserComputationalResource(String computationalName, String computationalId, String imageName,
+									 String templateName, String status, Date uptime, SchedulerJobDTO schedulerData,
+									 boolean reuploadKeyRequired, List<ResourceURL> resourceUrl,
+									 LocalDateTime lastActivity) {
+		this.computationalName = computationalName;
+		this.computationalId = computationalId;
+		this.imageName = imageName;
+		this.templateName = templateName;
+		this.status = status;
+		this.uptime = uptime;
+		this.schedulerData = schedulerData;
+		this.reuploadKeyRequired = reuploadKeyRequired;
+		this.resourceUrl = resourceUrl;
+		this.lastActivity = lastActivity;
+	}
+
+	public DataEngineType getDataEngineType() {
+		return DataEngineType.fromDockerImageName(imageName);
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryActionDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryActionDTO.java
index 2907d49..9b4ea75 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryActionDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryActionDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
index 65dedc6..fe97f95 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java
index e2f3565..9eca961 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java
@@ -1,23 +1,25 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects.ToStringHelper;
 
@@ -25,56 +27,67 @@
 
 public class ExploratoryCreateDTO<T extends ExploratoryCreateDTO<?>> extends ExploratoryBaseDTO<T> {
 
-    @SuppressWarnings("unchecked")
-    private final T self = (T) this;
+	@SuppressWarnings("unchecked")
+	private final T self = (T) this;
 
-    @JsonProperty("git_creds")
-    private List<ExploratoryGitCreds> gitCreds;
-    @JsonProperty("notebook_image_name")
-    private String imageName;
+	@JsonProperty("git_creds")
+	private List<ExploratoryGitCreds> gitCreds;
+	@JsonProperty("notebook_image_name")
+	private String imageName;
+	@JsonProperty("spark_configurations")
+	private List<ClusterConfig> clusterConfig;
 
-    /**
-     * Return the list of GIT credentials.
-     */
-    public List<ExploratoryGitCreds> getGitCreds() {
-        return gitCreds;
-    }
+	/**
+	 * Return the list of GIT credentials.
+	 */
+	public List<ExploratoryGitCreds> getGitCreds() {
+		return gitCreds;
+	}
 
-    /**
-     * Set the list of GIT credentials.
-     */
-    public void setGitCreds(List<ExploratoryGitCreds> gitCreds) {
-        this.gitCreds = gitCreds;
-    }
+	/**
+	 * Set the list of GIT credentials.
+	 */
+	public void setGitCreds(List<ExploratoryGitCreds> gitCreds) {
+		this.gitCreds = gitCreds;
+	}
 
-    /**
-     * Set the list of GIT credentials and return this object.
-     */
-    public T withGitCreds(List<ExploratoryGitCreds> gitCreds) {
-        setGitCreds(gitCreds);
-        return self;
-    }
+	/**
+	 * Set the list of GIT credentials and return this object.
+	 */
+	public T withGitCreds(List<ExploratoryGitCreds> gitCreds) {
+		setGitCreds(gitCreds);
+		return self;
+	}
 
-    /**
-     * Set the image name and return this object.
-     */
-    public T withImageName(String imageName) {
-        setImageName(imageName);
-        return self;
-    }
+	/**
+	 * Set the image name and return this object.
+	 */
+	public T withImageName(String imageName) {
+		setImageName(imageName);
+		return self;
+	}
 
-    public String getImageName() {
-        return imageName;
-    }
+	public String getImageName() {
+		return imageName;
+	}
 
-    public void setImageName(String imageName) {
-        this.imageName = imageName;
-    }
+	public void setImageName(String imageName) {
+		this.imageName = imageName;
+	}
 
-    @Override
-    public ToStringHelper toStringHelper(Object self) {
-        return super.toStringHelper(self)
-                .add("gitCreds", gitCreds)
-                .add("imageName", imageName);
-    }
+	public T withClusterConfig(List<ClusterConfig> config) {
+		this.clusterConfig = config;
+		return self;
+	}
+
+	public List<ClusterConfig> getClusterConfig() {
+		return clusterConfig;
+	}
+
+	@Override
+	public ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
+				.add("gitCreds", gitCreds)
+				.add("imageName", imageName);
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCreds.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCreds.java
index 7c25e57..e547bde 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCreds.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCreds.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsDTO.java
index 9245961..6ba903d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsUpdateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsUpdateDTO.java
index 787171b..86536f0 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsUpdateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryGitCredsUpdateDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryImageDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryImageDTO.java
index 426cae3..9e8cfcf 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryImageDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryImageDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryReconfigureSparkClusterActionDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryReconfigureSparkClusterActionDTO.java
new file mode 100644
index 0000000..3a7f6ab
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryReconfigureSparkClusterActionDTO.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.dto.exploratory;
+
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class ExploratoryReconfigureSparkClusterActionDTO extends ExploratoryActionDTO<ExploratoryReconfigureSparkClusterActionDTO> {
+
+    @JsonProperty("spark_configurations")
+    private List<ClusterConfig> config;
+    @JsonProperty("azure_user_refresh_token")
+    private String azureUserRefreshToken;
+
+    public ExploratoryReconfigureSparkClusterActionDTO withConfig(List<ClusterConfig> config) {
+        this.config = config;
+        return this;
+    }
+
+    public ExploratoryReconfigureSparkClusterActionDTO withAzureUserRefreshToken(String azureUserRefreshToken) {
+        this.azureUserRefreshToken = azureUserRefreshToken;
+        return this;
+    }
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryStatusDTO.java
index 99c7aa6..4303bf6 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryStatusDTO.java
@@ -1,102 +1,116 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
 import com.epam.dlab.dto.ResourceURL;
 import com.epam.dlab.dto.StatusEnvBaseDTO;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects.ToStringHelper;
 
 import java.util.List;
 
 public class ExploratoryStatusDTO extends StatusEnvBaseDTO<ExploratoryStatusDTO> {
-    @JsonProperty("exploratory_url")
+	@JsonProperty("exploratory_url")
 	private List<ResourceURL> resourceUrl;
-    @JsonProperty("exploratory_user")
-    private String exploratoryUser;
-    @JsonProperty("exploratory_pass")
-    private String exploratoryPassword;
-    @JsonProperty("private_ip")
-    private String privateIp;
+	@JsonProperty("exploratory_user")
+	private String exploratoryUser;
+	@JsonProperty("exploratory_pass")
+	private String exploratoryPassword;
+	@JsonProperty("private_ip")
+	private String privateIp;
+	@JsonProperty
+	private List<ClusterConfig> config;
 
-    public String getPrivateIp() {
-        return privateIp;
-    }
+	public String getPrivateIp() {
+		return privateIp;
+	}
 
-    public void setPrivateIp(String privateIp) {
-        this.privateIp = privateIp;
-    }
+	public void setPrivateIp(String privateIp) {
+		this.privateIp = privateIp;
+	}
 
-    public ExploratoryStatusDTO withPrivateIp(String privateIp) {
-        setPrivateIp(privateIp);
-        return this;
-    }
+	public ExploratoryStatusDTO withPrivateIp(String privateIp) {
+		setPrivateIp(privateIp);
+		return this;
+	}
 
 	public List<ResourceURL> getResourceUrl() {
 		return resourceUrl;
-    }
+	}
 
 	public void setResourceUrl(List<ResourceURL> resourceUrl) {
 		this.resourceUrl = resourceUrl;
-    }
+	}
 
 	public ExploratoryStatusDTO withExploratoryUrl(List<ResourceURL> resourceUrl) {
 		setResourceUrl(resourceUrl);
-        return this;
-    }
+		return this;
+	}
 
-    public String getExploratoryUser() {
-        return exploratoryUser;
-    }
+	public String getExploratoryUser() {
+		return exploratoryUser;
+	}
 
-    public void setExploratoryUser(String exploratoryUser) {
-        this.exploratoryUser = exploratoryUser;
-    }
+	public void setExploratoryUser(String exploratoryUser) {
+		this.exploratoryUser = exploratoryUser;
+	}
 
-    public ExploratoryStatusDTO withExploratoryUser(String exploratoryUser) {
-        setExploratoryUser(exploratoryUser);
-        return this;
-    }
+	public ExploratoryStatusDTO withExploratoryUser(String exploratoryUser) {
+		setExploratoryUser(exploratoryUser);
+		return this;
+	}
 
-    public String getExploratoryPassword() {
-        return exploratoryPassword;
-    }
+	public String getExploratoryPassword() {
+		return exploratoryPassword;
+	}
 
-    public void setExploratoryPassword(String exploratoryPassword) {
-        this.exploratoryPassword = exploratoryPassword;
-    }
+	public void setExploratoryPassword(String exploratoryPassword) {
+		this.exploratoryPassword = exploratoryPassword;
+	}
 
-    public ExploratoryStatusDTO withExploratoryPassword(String exploratoryPassword) {
-        setExploratoryPassword(exploratoryPassword);
-        return this;
-    }
+	public ExploratoryStatusDTO withExploratoryPassword(String exploratoryPassword) {
+		setExploratoryPassword(exploratoryPassword);
+		return this;
+	}
 
-    @Override
-    public ToStringHelper toStringHelper(Object self) {
-        return super.toStringHelper(self)
+	public ExploratoryStatusDTO withConfig(List<ClusterConfig> config) {
+		this.config = config;
+		return this;
+	}
+
+	public List<ClusterConfig> getConfig() {
+		return config;
+	}
+
+	@Override
+	public ToStringHelper toStringHelper(Object self) {
+		return super.toStringHelper(self)
 				.add("exploratoryUrl", resourceUrl)
-                .add("exploratoryUser", exploratoryUser)
-                .add("exploratoryPassword", exploratoryPassword);
-    }
+				.add("exploratoryUser", exploratoryUser)
+				.add("exploratoryPassword", exploratoryPassword)
+				.add("config", config);
+	}
 
-    @Override
-    public String toString() {
-        return toStringHelper(this).toString();
-    }
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageCreateStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageCreateStatusDTO.java
index be4d5fb..23da13a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageCreateStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageCreateStatusDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageStatus.java
index c8d773b..b25a40c 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageStatus.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ImageStatus.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
index 202d873..bcb452a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.exploratory;
 
@@ -45,6 +46,9 @@
 	@JsonProperty("error_message")
 	private String errorMessage;
 
+	@JsonProperty
+	private boolean override;
+
 	public LibInstallDTO(String group, String name, String version) {
 		this.group = group;
 		this.name = name;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallStatusDTO.java
index d20c5c8..e78847c 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallStatusDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibListStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibListStatusDTO.java
index 7f1e5f8..56f82af 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibListStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibListStatusDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibStatus.java
index 740fe05..c5d0016 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibStatus.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibStatus.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.dto.exploratory;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibraryInstallDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibraryInstallDTO.java
index 66c1c81..28cac77 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibraryInstallDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibraryInstallDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java
index 31ace87..d749e7a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/auth/GcpOauth2AuthorizationCodeResponse.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/auth/GcpOauth2AuthorizationCodeResponse.java
index 9c53051..fbbdf83 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/auth/GcpOauth2AuthorizationCodeResponse.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/auth/GcpOauth2AuthorizationCodeResponse.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.auth;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/ComputationalCreateGcp.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/ComputationalCreateGcp.java
index bdf1395..c65d2ff 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/ComputationalCreateGcp.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/ComputationalCreateGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalResource.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalResource.java
index 897edfe..061fa06 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalResource.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.computational;
@@ -25,6 +28,7 @@
 import lombok.Getter;
 import lombok.ToString;
 
+import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.List;
 
@@ -36,36 +40,36 @@
 @EqualsAndHashCode(callSuper = true)
 public class GcpComputationalResource extends UserComputationalResource {
 
-    @JsonProperty("instance_id")
-    private String instanceId;
-    @JsonProperty("master_node_shape")
-    private String masterShape;
-    @JsonProperty("slave_node_shape")
-    private String slaveShape;
-    @JsonProperty("total_slave_instance_number")
-    private String slaveNumber;
-    @JsonProperty("total_master_instance_number")
-    private String masterNumber;
+	@JsonProperty("instance_id")
+	private String instanceId;
+	@JsonProperty("master_node_shape")
+	private String masterShape;
+	@JsonProperty("slave_node_shape")
+	private String slaveShape;
+	@JsonProperty("total_slave_instance_number")
+	private String slaveNumber;
+	@JsonProperty("total_master_instance_number")
+	private String masterNumber;
 	@JsonProperty("total_preemptible_number")
 	private String preemptibleNumber;
-    @JsonProperty("dataproc_version")
-    private String version;
+	@JsonProperty("dataproc_version")
+	private String version;
 
-    @Builder
+	@Builder
 	public GcpComputationalResource(String computationalName, String computationalId, String imageName,
 									String templateName, String status, Date uptime,
 									SchedulerJobDTO schedulerJobData, boolean reuploadKeyRequired,
 									String instanceId, String masterShape, String slaveShape, String slaveNumber,
 									String masterNumber, String preemptibleNumber, String version,
-									List<ResourceURL> resourceURL) {
+									List<ResourceURL> resourceURL, LocalDateTime lastActivity) {
 		super(computationalName, computationalId, imageName, templateName, status, uptime, schedulerJobData,
-				reuploadKeyRequired, resourceURL);
-        this.instanceId = instanceId;
-        this.masterShape = masterShape;
-        this.slaveShape = slaveShape;
-        this.slaveNumber = slaveNumber;
-        this.masterNumber = masterNumber;
-        this.version = version;
-        this.preemptibleNumber = preemptibleNumber;
-    }
+				reuploadKeyRequired, resourceURL, lastActivity);
+		this.instanceId = instanceId;
+		this.masterShape = masterShape;
+		this.slaveShape = slaveShape;
+		this.slaveNumber = slaveNumber;
+		this.masterNumber = masterNumber;
+		this.version = version;
+		this.preemptibleNumber = preemptibleNumber;
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalTerminateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalTerminateDTO.java
index d161ba0..648b75f 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalTerminateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/GcpComputationalTerminateDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.computational;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/SparkComputationalCreateGcp.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/SparkComputationalCreateGcp.java
index 13f6934..98cfb32 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/SparkComputationalCreateGcp.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/computational/SparkComputationalCreateGcp.java
@@ -1,25 +1,31 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.computational;
 
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
 
+import java.util.List;
+
 
 public class SparkComputationalCreateGcp extends ComputationalBase<SparkComputationalCreateGcp> {
 
@@ -29,6 +35,8 @@
 	private String dataEngineSlaveSize;
 	@JsonProperty("gcp_dataengine_master_size")
 	private String dataEngineMasterSize;
+	@JsonProperty("spark_configurations")
+	private List<ClusterConfig> config;
 
 	public SparkComputationalCreateGcp withDataEngineInstanceCount(String dataEngineInstanceCount) {
 		this.dataEngineInstanceCount = dataEngineInstanceCount;
@@ -45,6 +53,11 @@
 		return this;
 	}
 
+	public SparkComputationalCreateGcp withConfig(List<ClusterConfig> config) {
+		this.config = config;
+		return this;
+	}
+
 
 	@Override
 	public MoreObjects.ToStringHelper toStringHelper(Object self) {
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeCreateGcp.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeCreateGcp.java
index d049ebb..5de6acf 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeCreateGcp.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeCreateGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeInfoGcp.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeInfoGcp.java
index d0f91a8..b70fbfd 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeInfoGcp.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/edge/EdgeInfoGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.edge;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/exploratory/ExploratoryCreateGcp.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/exploratory/ExploratoryCreateGcp.java
index ebc86d2..2b123b8 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/exploratory/ExploratoryCreateGcp.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/exploratory/ExploratoryCreateGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.exploratory;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/keyload/UploadFileGcp.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/keyload/UploadFileGcp.java
index fdecb28..7204cae 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/keyload/UploadFileGcp.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/keyload/UploadFileGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.gcp.keyload;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ApplicationDto.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ApplicationDto.java
index ebd52e6..03bd04f 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ApplicationDto.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ApplicationDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.imagemetadata;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalMetadataDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalMetadataDTO.java
index 62da4b8..30f648d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalMetadataDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalMetadataDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.imagemetadata;
@@ -21,30 +24,30 @@
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
-import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @Data
 @NoArgsConstructor
 @EqualsAndHashCode(callSuper = false)
 public class ComputationalMetadataDTO extends ImageMetadataDTO {
-    @JsonProperty
-    protected String image;
-    @JsonProperty("template_name")
-    private String templateName;
-    @JsonProperty
-    private String description;
-    @JsonProperty("environment_type")
-    private String type;
-    @JsonProperty
-    private List<TemplateDTO> templates;
-    @JsonProperty("request_id")
-    private String requestId;
-    @JsonProperty(value = "computation_resources_shapes")
-    private HashMap<String, List<ComputationalResourceShapeDto>> computationResourceShapes;
+	@JsonProperty
+	protected String image;
+	@JsonProperty("template_name")
+	private String templateName;
+	@JsonProperty
+	private String description;
+	@JsonProperty("environment_type")
+	private String type;
+	@JsonProperty
+	private List<TemplateDTO> templates;
+	@JsonProperty("request_id")
+	private String requestId;
+	@JsonProperty(value = "computation_resources_shapes")
+	private Map<String, List<ComputationalResourceShapeDto>> computationResourceShapes;
 
-    public ComputationalMetadataDTO(String imageName) {
-        this.image = imageName;
-        setImageType(ImageType.COMPUTATIONAL);
-    }
+	public ComputationalMetadataDTO(String imageName) {
+		this.image = imageName;
+		setImageType(ImageType.COMPUTATIONAL);
+	}
 }
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalResourceShapeDto.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalResourceShapeDto.java
index 60f159f..4364e63 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalResourceShapeDto.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ComputationalResourceShapeDto.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.imagemetadata;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryEnvironmentVersion.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryEnvironmentVersion.java
index 5ca092a..78bccee 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryEnvironmentVersion.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryEnvironmentVersion.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.dto.imagemetadata;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryMetadataDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryMetadataDTO.java
index b66255a..dfa94a2 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryMetadataDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ExploratoryMetadataDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageMetadataDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageMetadataDTO.java
index d7f0d61..8fc7ba3 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageMetadataDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageMetadataDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.imagemetadata;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageType.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageType.java
index 941ac2c..a030ee7 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageType.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/ImageType.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.imagemetadata;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/TemplateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/TemplateDTO.java
index d0827b1..92c6647 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/TemplateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/imagemetadata/TemplateDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.imagemetadata;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/KeyLoadStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/KeyLoadStatus.java
index 8fae830..80429c4 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/KeyLoadStatus.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/KeyLoadStatus.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.keyload;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/UserKeyDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/UserKeyDTO.java
index 7312924..5a4ecbe 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/UserKeyDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/keyload/UserKeyDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.keyload;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyCallbackDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyCallbackDTO.java
index 7bc0b88..fa0f49b 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyCallbackDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyCallbackDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.reuploadkey;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyDTO.java
index b9de09c..7fd4e04 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.dto.reuploadkey;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatus.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatus.java
index b7293e6..49203ba 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatus.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatus.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.dto.reuploadkey;
 
 import java.util.Arrays;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatusDTO.java
index f8276da..72a790a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/reuploadkey/ReuploadKeyStatusDTO.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.dto.reuploadkey;
 
 import com.epam.dlab.dto.StatusBaseDTO;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResource.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResource.java
index 9213dd3..84e33f9 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResource.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResource.java
@@ -1,31 +1,38 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.status;
 
 import com.epam.dlab.model.ResourceType;
+import com.epam.dlab.util.mongo.IsoLocalDateTimeDeSerializer;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.MoreObjects.ToStringHelper;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
 
 /**
  * Describe the resource (host, cluster, storage) for check status in Cloud.
  */
+@NoArgsConstructor
 public class EnvResource {
 	@JsonProperty
 	private String id;
@@ -35,6 +42,15 @@
 	private String name;
 	@JsonProperty
 	private ResourceType resourceType;
+	@JsonDeserialize(using = IsoLocalDateTimeDeSerializer.class)
+	@JsonProperty
+	private LocalDateTime lastActivity;
+
+	public EnvResource(String id, String name, ResourceType resourceType) {
+		this.id = id;
+		this.name = name;
+		this.resourceType = resourceType;
+	}
 
 	/**
 	 * Return the id of resource. instanceId for host, clusterId for cluster, path for storage.
@@ -106,12 +122,26 @@
 		this.resourceType = resourceType;
 	}
 
+	public LocalDateTime getLastActivity() {
+		return lastActivity;
+	}
+
+	public void setLastActivity(LocalDateTime lastActivity) {
+		this.lastActivity = lastActivity;
+	}
+
+	public EnvResource withLastActivity(LocalDateTime lastActivity) {
+		setLastActivity(lastActivity);
+		return this;
+	}
+
 	public ToStringHelper toStringHelper(Object self) {
 		return MoreObjects.toStringHelper(self)
 				.add("id", id)
 				.add("status", status)
 				.add("name", name)
-				.add("resourceType", resourceType);
+				.add("resourceType", resourceType)
+				.add("lastActivity", lastActivity);
 	}
 
 	@Override
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResourceList.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResourceList.java
index 79784d8..1deb175 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResourceList.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvResourceList.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.status;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvStatusDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvStatusDTO.java
index c4e9ca0..caf3cf3 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvStatusDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/status/EnvStatusDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.status;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceData.java b/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceData.java
index 5de77ad..dc4526d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceData.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceData.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.model;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceEnum.java b/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceEnum.java
index dd7bd0f..4ee7d2c 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceEnum.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceEnum.java
@@ -1,19 +1,20 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package com.epam.dlab.model;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceType.java b/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceType.java
index ab61494..2baf91d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceType.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/ResourceType.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.model;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/aws/BillingResourceType.java b/services/dlab-model/src/main/java/com/epam/dlab/model/aws/BillingResourceType.java
index 708517a..ce3803a 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/aws/BillingResourceType.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/aws/BillingResourceType.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.model.aws;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/aws/ReportLine.java b/services/dlab-model/src/main/java/com/epam/dlab/model/aws/ReportLine.java
index 38e4697..f80544d 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/aws/ReportLine.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/aws/ReportLine.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.model.aws;
 
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/exloratory/Exploratory.java b/services/dlab-model/src/main/java/com/epam/dlab/model/exloratory/Exploratory.java
deleted file mode 100644
index 2432001..0000000
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/exloratory/Exploratory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2018, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.model.exloratory;
-
-import lombok.Builder;
-import lombok.Data;
-
-@Data
-@Builder
-public class Exploratory {
-	private final String name;
-	private final String dockerImage;
-	private final String version;
-	private final String templateName;
-	private final String shape;
-	private final String imageName;
-}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/exloratory/Image.java b/services/dlab-model/src/main/java/com/epam/dlab/model/exloratory/Image.java
deleted file mode 100644
index 67ff5d5..0000000
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/exloratory/Image.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.model.exloratory;
-
-import com.epam.dlab.dto.exploratory.ImageStatus;
-import com.epam.dlab.model.library.Library;
-import lombok.Builder;
-import lombok.Data;
-
-import java.util.List;
-import java.util.Map;
-
-@Data
-@Builder
-public class Image {
-	private final String name;
-	private final String description;
-	private final ImageStatus status;
-	private final String exploratoryId;
-	private final String user;
-	private final String fullName;
-	private final String externalName;
-	private final String application;
-	private final String dockerImage;
-	private final List<Library> libraries;
-	private final Map<String, List<Library>> computationalLibraries;
-}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/exploratory/Exploratory.java b/services/dlab-model/src/main/java/com/epam/dlab/model/exploratory/Exploratory.java
new file mode 100644
index 0000000..923adab
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/exploratory/Exploratory.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.model.exploratory;
+
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
+import lombok.Builder;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@Builder
+public class Exploratory {
+	private final String name;
+	private final String dockerImage;
+	private final String version;
+	private final String templateName;
+	private final String shape;
+	private final String imageName;
+	private final List<ClusterConfig> clusterConfig;
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/exploratory/Image.java b/services/dlab-model/src/main/java/com/epam/dlab/model/exploratory/Image.java
new file mode 100644
index 0000000..405fc64
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/exploratory/Image.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.model.exploratory;
+
+import com.epam.dlab.dto.exploratory.ImageStatus;
+import com.epam.dlab.model.library.Library;
+import lombok.Builder;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+@Data
+@Builder
+public class Image {
+	private final String name;
+	private final String description;
+	private final ImageStatus status;
+	private final String exploratoryId;
+	private final String user;
+	private final String fullName;
+	private final String externalName;
+	private final String application;
+	private final String dockerImage;
+	private final List<Library> libraries;
+	private final Map<String, List<Library>> computationalLibraries;
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/library/Library.java b/services/dlab-model/src/main/java/com/epam/dlab/model/library/Library.java
index 20b1159..0ca4562 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/library/Library.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/library/Library.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.model.library;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/scheduler/SchedulerJobData.java b/services/dlab-model/src/main/java/com/epam/dlab/model/scheduler/SchedulerJobData.java
index 01f9b37..4fe86a1 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/model/scheduler/SchedulerJobData.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/scheduler/SchedulerJobData.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.model.scheduler;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/DiskInfo.java b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/DiskInfo.java
new file mode 100644
index 0000000..0a8527b
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/DiskInfo.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.model.systeminfo;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+@Getter
+public class DiskInfo {
+
+	@JsonProperty
+	private String serialNumber;
+	@JsonProperty
+	private long usedByteSpace;
+	@JsonProperty
+	private long totalByteSpace;
+
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/MemoryInfo.java b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/MemoryInfo.java
new file mode 100644
index 0000000..1930386
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/MemoryInfo.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.model.systeminfo;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+@Getter
+public class MemoryInfo {
+
+	@JsonProperty
+	private long availableMemory;
+	@JsonProperty
+	private long totalMemory;
+
+	private long swapTotal;
+	private long swapUsed;
+	private long pagesPageIn;
+	private long pagesPageOut;
+
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/OsInfo.java b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/OsInfo.java
new file mode 100644
index 0000000..533605c
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/OsInfo.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.model.systeminfo;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+@Getter
+public class OsInfo {
+
+	@JsonProperty
+	private String manufacturer;
+	@JsonProperty
+	private String family;
+	@JsonProperty
+	private String version;
+	@JsonProperty
+	private String buildNumber;
+
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/ProcessorInfo.java b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/ProcessorInfo.java
new file mode 100644
index 0000000..735f814
--- /dev/null
+++ b/services/dlab-model/src/main/java/com/epam/dlab/model/systeminfo/ProcessorInfo.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.model.systeminfo;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+@Getter
+public class ProcessorInfo {
+
+	private String model;
+	private String family;
+
+	@JsonProperty
+	private String name;
+
+	private String id;
+	private String vendor;
+	private int logicalCoreCount;
+	private int physicalCoreCount;
+	private boolean isCpu64Bit;
+
+	@JsonProperty
+	private double currentSystemLoad;
+	@JsonProperty
+	private double systemLoadAverage;
+
+}
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/util/CloudSettingsDeserializer.java b/services/dlab-model/src/main/java/com/epam/dlab/util/CloudSettingsDeserializer.java
index 393b4ac..86d7468 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/util/CloudSettingsDeserializer.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/util/CloudSettingsDeserializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util;
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/util/JsonGenerator.java b/services/dlab-model/src/main/java/com/epam/dlab/util/JsonGenerator.java
index c0ebbf2..366fed9 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/util/JsonGenerator.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/util/JsonGenerator.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util;
diff --git a/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvResourceDTOTest.java b/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvResourceDTOTest.java
index 4eca63d..3017bb8 100644
--- a/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvResourceDTOTest.java
+++ b/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvResourceDTOTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.status;
 
diff --git a/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvStatusDTOTest.java b/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvStatusDTOTest.java
index 6fcd66b..c2e0ab6 100644
--- a/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvStatusDTOTest.java
+++ b/services/dlab-model/src/test/java/com/epam/dlab/dto/status/EnvStatusDTOTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.dto.status;
 
diff --git a/services/dlab-model/src/test/java/com/epam/dlab/util/JsonGeneratorTest.java b/services/dlab-model/src/test/java/com/epam/dlab/util/JsonGeneratorTest.java
index b67d456..55327ba 100644
--- a/services/dlab-model/src/test/java/com/epam/dlab/util/JsonGeneratorTest.java
+++ b/services/dlab-model/src/test/java/com/epam/dlab/util/JsonGeneratorTest.java
@@ -1,19 +1,20 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package com.epam.dlab.util;
 
diff --git a/services/dlab-mongo-migration/pom.xml b/services/dlab-mongo-migration/pom.xml
index c652595..1f7b38f 100644
--- a/services/dlab-mongo-migration/pom.xml
+++ b/services/dlab-mongo-migration/pom.xml
@@ -1,21 +1,20 @@
 <!--
-  ~ ***************************************************************************
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Copyright (c) 2018, EPAM SYSTEMS INC
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  ~
-  ~ ****************************************************************************
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/DbMigration.java b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/DbMigration.java
index 84cb29d..492b2a7 100644
--- a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/DbMigration.java
+++ b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/DbMigration.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.migration;
diff --git a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/exception/DlabDbMigrationException.java b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/exception/DlabDbMigrationException.java
index 32a912a..75034df 100644
--- a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/exception/DlabDbMigrationException.java
+++ b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/exception/DlabDbMigrationException.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.migration.exception;
diff --git a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/DlabMongoMigration.java b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/DlabMongoMigration.java
index 7d1f076..36c6288 100644
--- a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/DlabMongoMigration.java
+++ b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/DlabMongoMigration.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.migration.mongo;
diff --git a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/changelog/DlabChangeLog.java b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/changelog/DlabChangeLog.java
index 4c028a0..c718378 100644
--- a/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/changelog/DlabChangeLog.java
+++ b/services/dlab-mongo-migration/src/main/java/com/epam/dlab/migration/mongo/changelog/DlabChangeLog.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.migration.mongo.changelog;
diff --git a/services/dlab-process/pom.xml b/services/dlab-process/pom.xml
index 32120ff..56b315a 100644
--- a/services/dlab-process/pom.xml
+++ b/services/dlab-process/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/ProcessConveyor.java b/services/dlab-process/src/main/java/com/epam/dlab/process/ProcessConveyor.java
index 0bc126c..07d20c4 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/ProcessConveyor.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/ProcessConveyor.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process;
 
 import java.util.concurrent.TimeUnit;
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/builder/ProcessInfoBuilder.java b/services/dlab-process/src/main/java/com/epam/dlab/process/builder/ProcessInfoBuilder.java
index e940857..f790fea 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/builder/ProcessInfoBuilder.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/builder/ProcessInfoBuilder.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.builder;
 
 import com.aegisql.conveyor.Expireable;
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/exception/DlabProcessException.java b/services/dlab-process/src/main/java/com/epam/dlab/process/exception/DlabProcessException.java
index cdd76b4..a7acc68 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/exception/DlabProcessException.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/exception/DlabProcessException.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.exception;
 
 public class DlabProcessException extends RuntimeException {
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/model/DlabProcess.java b/services/dlab-process/src/main/java/com/epam/dlab/process/model/DlabProcess.java
index 0f1860c..6f65e30 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/model/DlabProcess.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/model/DlabProcess.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.model;
 
 import com.epam.dlab.process.ProcessConveyor;
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessId.java b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessId.java
index 49f6844..a66559e 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessId.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessId.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.model;
 
 public class ProcessId {
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessInfo.java b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessInfo.java
index a28976c..629fd0d 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessInfo.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessInfo.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.model;
 
 import java.util.ArrayList;
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStatus.java b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStatus.java
index 31cd18a..35985b5 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStatus.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStatus.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.model;
 
 public enum ProcessStatus {
diff --git a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStep.java b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStep.java
index b5f3c31..d45d5b6 100644
--- a/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStep.java
+++ b/services/dlab-process/src/main/java/com/epam/dlab/process/model/ProcessStep.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process.model;
 
 import com.aegisql.conveyor.SmartLabel;
diff --git a/services/dlab-process/src/test/java/com/epam/dlab/process/ProcessConveyorTest.java b/services/dlab-process/src/test/java/com/epam/dlab/process/ProcessConveyorTest.java
index f9c8479..b1e5ad3 100644
--- a/services/dlab-process/src/test/java/com/epam/dlab/process/ProcessConveyorTest.java
+++ b/services/dlab-process/src/test/java/com/epam/dlab/process/ProcessConveyorTest.java
@@ -1,18 +1,21 @@
 /*
-Copyright 2016 EPAM Systems, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.process;
 
 import com.epam.dlab.process.model.DlabProcess;
diff --git a/services/dlab-rest-client/pom.xml b/services/dlab-rest-client/pom.xml
index 542352c..296410e 100644
--- a/services/dlab-rest-client/pom.xml
+++ b/services/dlab-rest-client/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTService.java b/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTService.java
index 619cf6a..bfd1ba1 100644
--- a/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTService.java
+++ b/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTService.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.client;
 
@@ -26,43 +27,51 @@
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
+import java.net.URI;
 import java.util.Collections;
 import java.util.Map;
 
 @Slf4j
 public class RESTService {
-    private Client client;
-    private String url;
-    private String userAgent;
+	private Client client;
+	private String url;
+	private String userAgent;
 
-    public RESTService() {
-    }
+	public RESTService() {
+	}
 
-    RESTService(Client client, String url, String userAgent) {
-        this.client = client;
-        this.url = url;
-        this.userAgent = userAgent;
-    }
+	RESTService(Client client, String url, String userAgent) {
+		this.client = client;
+		this.url = url;
+		this.userAgent = userAgent;
+	}
 
-    public <T> T get(String path, Class<T> clazz) {
-        Invocation.Builder builder = getBuilder(path);
-        log.debug("REST get {}", path);
-        return builder.get(clazz);
-    }
+	public <T> T get(String path, Class<T> clazz) {
+		Invocation.Builder builder = getBuilder(path);
+		log.debug("REST get {}", path);
+		return builder.get(clazz);
+	}
 
-    public <T> T post(String path, Object parameter, Class<T> clazz) {
-        Invocation.Builder builder = getBuilder(path);
-        log.debug("REST post {}", path);
-        return builder.post(Entity.json(parameter), clazz);
-    }
+	public <T> T get(URI path, Class<T> clazz) {
+		log.debug("REST get {}", path);
+		return client.target(URI.create(url + path.toString()))
+				.request()
+				.get(clazz);
+	}
 
-    public <T> T get(String path, String accessToken, Class<T> clazz) {
+	public <T> T post(String path, Object parameter, Class<T> clazz) {
+		Invocation.Builder builder = getBuilder(path);
+		log.debug("REST post {}", path);
+		return builder.post(Entity.json(parameter), clazz);
+	}
+
+	public <T> T get(String path, String accessToken, Class<T> clazz) {
 		Invocation.Builder builder = getBuilder(path, accessToken, Collections.emptyMap());
-        log.debug("REST get secured {} {}", path, accessToken);
-        return builder.get(clazz);
-    }
+		log.debug("REST get secured {} {}", path, accessToken);
+		return builder.get(clazz);
+	}
 
-    public <T> T post(String path, String accessToken, Object parameter, Class<T> clazz) {
+	public <T> T post(String path, String accessToken, Object parameter, Class<T> clazz) {
 		Invocation.Builder builder = getBuilder(path, accessToken, Collections.emptyMap());
 		log.debug("REST post secured {} {}", path, accessToken);
 		return builder.post(Entity.json(parameter), clazz);
@@ -75,7 +84,7 @@
 		return builder.post(Entity.json(parameter), clazz);
 	}
 
-    private Invocation.Builder getBuilder(String path) {
+	private Invocation.Builder getBuilder(String path) {
 		return getBuilder(path, null, Collections.emptyMap());
 	}
 
@@ -86,23 +95,23 @@
 		}
 
 		Invocation.Builder builder = webTarget
-                .request(MediaType.APPLICATION_JSON)
-                .accept(MediaType.APPLICATION_JSON);
+				.request(MediaType.APPLICATION_JSON)
+				.accept(MediaType.APPLICATION_JSON);
 
-        if (token != null) {
-            builder.header(HttpHeaders.AUTHORIZATION, "Bearer " + token);
-        }
+		if (token != null) {
+			builder.header(HttpHeaders.AUTHORIZATION, "Bearer " + token);
+		}
 
-        if (userAgent != null) {
-            builder.header(HttpHeaders.USER_AGENT, userAgent);
-        }
+		if (userAgent != null) {
+			builder.header(HttpHeaders.USER_AGENT, userAgent);
+		}
 
-        return builder;
-    }
+		return builder;
+	}
 
-    private WebTarget getWebTarget(String path) {
-        return client
-                .target(url)
-                .path(path);
-    }
+	private WebTarget getWebTarget(String path) {
+		return client
+				.target(url)
+				.path(path);
+	}
 }
diff --git a/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTServiceFactory.java b/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTServiceFactory.java
index 11b4469..66ce8da 100644
--- a/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTServiceFactory.java
+++ b/services/dlab-rest-client/src/main/java/com/epam/dlab/rest/client/RESTServiceFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.client;
 
diff --git a/services/dlab-utils/pom.xml b/services/dlab-utils/pom.xml
index b3955f7..d79a326 100644
--- a/services/dlab-utils/pom.xml
+++ b/services/dlab-utils/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/AnnotationUtils.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/AnnotationUtils.java
new file mode 100644
index 0000000..64c75b3
--- /dev/null
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/AnnotationUtils.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.util;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Map;
+
+@Slf4j
+public class AnnotationUtils {
+
+	private static final String ANNOTATION_METHOD = "annotationData";
+	private static final String ANNOTATIONS = "annotations";
+
+	private AnnotationUtils() {
+	}
+
+	public static void updateAnnotation(Class<?> targetClass, Class<? extends Annotation> targetAnnotation,
+										Annotation targetValue) {
+		alterAnnotationValue(targetClass, targetAnnotation, targetValue);
+	}
+
+	@SuppressWarnings("unchecked")
+	private static void alterAnnotationValue(Class<?> targetClass, Class<? extends Annotation> targetAnnotation,
+											 Annotation targetValue) {
+		try {
+			Method method = Class.class.getDeclaredMethod(ANNOTATION_METHOD);
+			method.setAccessible(true);
+
+			Object annotationData = method.invoke(targetClass);
+
+			Field annotations = annotationData.getClass().getDeclaredField(ANNOTATIONS);
+			annotations.setAccessible(true);
+
+			Map<Class<? extends Annotation>, Annotation> map = (Map<Class<? extends Annotation>, Annotation>)
+					annotations.get(annotationData);
+			map.put(targetAnnotation, targetValue);
+		} catch (Exception e) {
+			log.error("An exception occured: {}", e.getLocalizedMessage());
+		}
+	}
+}
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/FileUtils.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/FileUtils.java
index 9690319..f48a5af 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/FileUtils.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/FileUtils.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/ObjectUtils.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/ObjectUtils.java
index 606b584..94a2e32 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/ObjectUtils.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/ObjectUtils.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.util;
 
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/SecurityUtils.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/SecurityUtils.java
index 3bd3a68..03c2760 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/SecurityUtils.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/SecurityUtils.java
@@ -1,35 +1,38 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package com.epam.dlab.util;
 
+import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 public class SecurityUtils {
 
+	private static final String PASS_REGEX = "\"password\":\".+?\"";
+	private static final String PASS_REPLACEMENT = "\"password\":\"\\*\\*\\*\"";
+
 	private SecurityUtils() {
 	}
 
 	public static String hideCreds(String... strings) {
-		StringBuilder sb = new StringBuilder();
-		Stream.of(strings).forEach(str ->
-				sb.append(str.replaceAll("\"password\":\".*\"", "\"password\":\"\\*\\*\\*\""))
-						.append(" "));
-		return sb.toString();
+		return Stream.of(strings)
+				.map(str -> str.replaceAll(PASS_REGEX, PASS_REPLACEMENT))
+				.collect(Collectors.joining(" "));
 	}
 
 }
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/ServiceUtils.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/ServiceUtils.java
index 08ca02f..5a2beeb 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/ServiceUtils.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/ServiceUtils.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/UsernameUtils.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/UsernameUtils.java
index 20d1374..32488a4 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/UsernameUtils.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/UsernameUtils.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.util;
 
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateDeSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateDeSerializer.java
index 1bdea07..1a337ea 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateDeSerializer.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateDeSerializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateSerializer.java
index 2cd6154..4ffee23 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateSerializer.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateSerializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateDeSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateDeSerializer.java
index dceb576..f6803cf 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateDeSerializer.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateDeSerializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateSerializer.java
index 60c9f1d..c5e428e 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateSerializer.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateSerializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializer.java
index d8b8740..0e271ed 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializer.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializer.java
index a5604ef..87e0608 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializer.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/LongDeSerializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/LongDeSerializer.java
new file mode 100644
index 0000000..c7a5ee3
--- /dev/null
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/LongDeSerializer.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.util.mongo;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.ObjectCodec;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonNode;
+
+import java.io.IOException;
+
+public class LongDeSerializer extends JsonDeserializer<Long> {
+	private static final String NUMBER_NODE = "$numberLong";
+
+	@Override
+	public Long deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
+		ObjectCodec oc = p.getCodec();
+		JsonNode node = oc.readTree(p);
+
+		final JsonNode numberNode = node.get(NUMBER_NODE);
+		if (numberNode != null) {
+			return numberNode.asLong();
+		} else {
+			return node.asLong();
+		}
+	}
+}
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/MongoStringDeserializer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/MongoStringDeserializer.java
new file mode 100644
index 0000000..4c1a37a
--- /dev/null
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/MongoStringDeserializer.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.util.mongo;
+
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.KeyDeserializer;
+
+import static com.epam.dlab.util.mongo.MongoStringSerializaer.DOT_UNICODE;
+
+public class MongoStringDeserializer extends KeyDeserializer {
+
+	@Override
+	public Object deserializeKey(String key, DeserializationContext ctxt) {
+		return key.contains(DOT_UNICODE) ? key.replace(DOT_UNICODE, ".") : key;
+	}
+}
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/MongoStringSerializaer.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/MongoStringSerializaer.java
new file mode 100644
index 0000000..5b9fdca
--- /dev/null
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/MongoStringSerializaer.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.util.mongo;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+
+import java.io.IOException;
+
+public class MongoStringSerializaer extends JsonSerializer<String> {
+	public static final String DOT_UNICODE = "U+FF0E";
+
+	@Override
+	public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+		if (value.contains(".")) {
+			gen.writeFieldName(value.replace(".", DOT_UNICODE));
+		} else {
+			gen.writeFieldName(value);
+		}
+	}
+}
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateModule.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/IsoDateModule.java
similarity index 62%
rename from services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateModule.java
rename to services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/IsoDateModule.java
index d9fe6b2..290f5ab 100644
--- a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/IsoDateModule.java
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/IsoDateModule.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package com.epam.dlab.util.mongo;
+package com.epam.dlab.util.mongo.modules;
 
+import com.epam.dlab.util.mongo.*;
 import com.fasterxml.jackson.databind.module.SimpleModule;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.fasterxml.jackson.datatype.jsr310.deser.JSR310StringParsableDeserializer;
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/JavaPrimitiveModule.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/JavaPrimitiveModule.java
new file mode 100644
index 0000000..83011ff
--- /dev/null
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/JavaPrimitiveModule.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.util.mongo.modules;
+
+import com.epam.dlab.util.mongo.LongDeSerializer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+
+public class JavaPrimitiveModule extends SimpleModule {
+
+	public JavaPrimitiveModule() {
+		addDeserializer(Long.class, new LongDeSerializer());
+	}
+
+}
diff --git a/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/MongoModule.java b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/MongoModule.java
new file mode 100644
index 0000000..2218b6f
--- /dev/null
+++ b/services/dlab-utils/src/main/java/com/epam/dlab/util/mongo/modules/MongoModule.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.util.mongo.modules;
+
+import com.epam.dlab.util.mongo.MongoStringDeserializer;
+import com.epam.dlab.util.mongo.MongoStringSerializaer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+
+public class MongoModule extends SimpleModule {
+
+	public MongoModule() {
+		addKeySerializer(String.class, new MongoStringSerializaer());
+		addKeyDeserializer(String.class, new MongoStringDeserializer());
+	}
+}
diff --git a/services/dlab-utils/src/test/java/com/epam/dlab/util/SecurityUtilsTest.java b/services/dlab-utils/src/test/java/com/epam/dlab/util/SecurityUtilsTest.java
index 60966dc..b77429a 100644
--- a/services/dlab-utils/src/test/java/com/epam/dlab/util/SecurityUtilsTest.java
+++ b/services/dlab-utils/src/test/java/com/epam/dlab/util/SecurityUtilsTest.java
@@ -1,19 +1,20 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package com.epam.dlab.util;
 
@@ -28,7 +29,7 @@
 				"\"password\":\"12345\""};
 		String actual = SecurityUtils.hideCreds(strings);
 		String expected = "bash -c \"edge_user_name\":\"edgeUserName\",\"conf_service_base_name\":\"SBN\", " +
-				"\"password\":\"***\" ";
+				"\"password\":\"***\"";
 		Assert.assertEquals(expected, actual);
 	}
 }
diff --git a/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializerTest.java b/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializerTest.java
index 6b1054f..8d2d7af 100644
--- a/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializerTest.java
+++ b/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeDeSerializerTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerDeTest.java b/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerDeTest.java
index 61c0286..96a6e4c 100644
--- a/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerDeTest.java
+++ b/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerDeTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializerTest.java b/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializerTest.java
index 105d8af..a588bb5 100644
--- a/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializerTest.java
+++ b/services/dlab-utils/src/test/java/com/epam/dlab/util/mongo/IsoLocalDateTimeSerializerTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.util.mongo;
diff --git a/services/dlab-webapp-common/pom.xml b/services/dlab-webapp-common/pom.xml
index 671bb7f..33a85d3 100644
--- a/services/dlab-webapp-common/pom.xml
+++ b/services/dlab-webapp-common/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/ModuleBase.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/ModuleBase.java
index 03dcd37..8aa9eb2 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/ModuleBase.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/ModuleBase.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/ServiceConfiguration.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/ServiceConfiguration.java
index c48be96..85d4318 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/ServiceConfiguration.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/ServiceConfiguration.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityFactory.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityFactory.java
index 3893db0..67fe166 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityFactory.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityRestAuthenticator.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityRestAuthenticator.java
index 3c32b10..9ff1339 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityRestAuthenticator.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SecurityRestAuthenticator.java
@@ -1,32 +1,34 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
+import com.epam.dlab.auth.contract.SecurityAPI;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.rest.client.RESTService;
-import com.epam.dlab.auth.contract.SecurityAPI;
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import io.dropwizard.auth.AuthenticationException;
 import io.dropwizard.auth.Authenticator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
 
 import java.util.Optional;
 
@@ -44,7 +46,9 @@
 	public Optional<UserInfo> authenticate(String credentials) throws AuthenticationException {
 		LOGGER.debug("authenticate token {}", credentials);
 
-		return Optional.ofNullable(systemUserInfoService.getUser(credentials).orElseGet(
+		final Optional<UserInfo> userInfo = Optional.ofNullable(systemUserInfoService.getUser(credentials).orElseGet(
 				() -> securityService.post(SecurityAPI.GET_USER_INFO, credentials, UserInfo.class)));
+		userInfo.ifPresent(ui -> MDC.put("user", ui.getName()));
+		return userInfo;
 	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoService.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoService.java
index ecd9ad5..8b53b20 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoService.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoServiceImpl.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoServiceImpl.java
index 242d903..1f3fc50 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoServiceImpl.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/auth/SystemUserInfoServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudModule.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudModule.java
index 22b8e71..806e7e0 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudModule.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.cloud;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudProvider.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudProvider.java
index d6f4757..f148e29 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudProvider.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/cloud/CloudProvider.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.cloud;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
index 3b97949..d376665 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.constants;
@@ -19,6 +22,7 @@
 public final class ServiceConsts {
 	public static final String MONGO_NAME = "mongo";
 	public static final String PROVISIONING_SERVICE_NAME = "provisioningService";
+	public static final String MAVEN_SEARCH_API = "mavenSearchService";
 	public static final String SECURITY_SERVICE_NAME = "securityService";
 	public static final String SELF_SERVICE_NAME = "selfService";
 	public static final String PROVISIONING_USER_AGENT = "provisioning-service";
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoService.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoService.java
index 6580f41..e232551 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoService.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoService.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoServiceFactory.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoServiceFactory.java
index b1aa0be..b0194df 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoServiceFactory.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/mongo/MongoServiceFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.mongo;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ApiCallbacks.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ApiCallbacks.java
index 80c1348..209d49d 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ApiCallbacks.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ApiCallbacks.java
@@ -1,39 +1,43 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.contracts;
 
 public class ApiCallbacks {
-    public static final String API = "/api";
-    public static final String KEY_LOADER = API + "/user/access_key/callback";
-    public static final String INFRASTRUCTURE_PROVISION = API + "/infrastructure_provision";
-    public static final String COMPUTATIONAL = INFRASTRUCTURE_PROVISION + "/computational_resources";
-    public static final String EXPLORATORY = INFRASTRUCTURE_PROVISION + "/exploratory_environment";
-    public static final String LIBRARY = INFRASTRUCTURE_PROVISION + "/library";
-    public static final String UPDATE_LIBS_URI = LIBRARY + "/update_lib_list";
-    public static final String INFRASTRUCTURE = API + "/infrastructure";
-    public static final String EDGE = INFRASTRUCTURE + "/edge";
-    public static final String STATUS_URI = "/status";
-    public static final String LIB_STATUS_URI = LIBRARY + "/lib_status";
-    public static final String GIT_CREDS = API + "/user/git_creds" + STATUS_URI;
-    public static final String IMAGE = INFRASTRUCTURE_PROVISION + "/image";
-    public static final String IMAGE_STATUS_URI = IMAGE + "/image_status";
-    public static final String BACKUP_URI = API + "/infrastructure/backup" + STATUS_URI;
+	public static final String API = "/api";
+	public static final String KEY_LOADER = API + "/user/access_key/callback";
+	public static final String INFRASTRUCTURE_PROVISION = API + "/infrastructure_provision";
+	public static final String COMPUTATIONAL = INFRASTRUCTURE_PROVISION + "/computational_resources";
+	public static final String EXPLORATORY = INFRASTRUCTURE_PROVISION + "/exploratory_environment";
+	public static final String LIBRARY = INFRASTRUCTURE_PROVISION + "/library";
+	public static final String UPDATE_LIBS_URI = LIBRARY + "/update_lib_list";
+	public static final String INFRASTRUCTURE = API + "/infrastructure";
+	public static final String EDGE = INFRASTRUCTURE + "/edge";
+	public static final String STATUS_URI = "/status";
+	public static final String LIB_STATUS_URI = LIBRARY + "/lib_status";
+	public static final String GIT_CREDS = API + "/user/git_creds" + STATUS_URI;
+	public static final String IMAGE = INFRASTRUCTURE_PROVISION + "/image";
+	public static final String IMAGE_STATUS_URI = IMAGE + "/image_status";
+	public static final String BACKUP_URI = API + "/infrastructure/backup" + STATUS_URI;
 	public static final String REUPLOAD_KEY_URI = API + "/infrastructure/reupload_key/callback";
+	public static final String CHECK_INACTIVITY_CLUSTERS_URI = API + "/infrastructure/inactivity/callback";
 
-    private ApiCallbacks() {
-    }
+	private ApiCallbacks() {
+	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/BackupAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/BackupAPI.java
index 7b4efb4..8217089 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/BackupAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/BackupAPI.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.contracts;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ComputationalAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ComputationalAPI.java
index 073d71f..a909635 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ComputationalAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ComputationalAPI.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.contracts;
@@ -24,6 +27,7 @@
 	String COMPUTATIONAL_START = COMPUTATIONAL + "/start";
 	String SPARK = "/spark";
 	String COMPUTATIONAL_CREATE_SPARK = COMPUTATIONAL_CREATE + SPARK;
+	String COMPUTATIONAL_RECONFIGURE_SPARK = COMPUTATIONAL + SPARK + "/reconfigure";
 	String COMPUTATIONAL_CREATE_CLOUD_SPECIFIC = COMPUTATIONAL_CREATE + "/cloud";
 	String COMPUTATIONAL_TERMINATE = COMPUTATIONAL + "/terminate";
 	String COMPUTATIONAL_TERMINATE_SPARK = COMPUTATIONAL_TERMINATE + SPARK;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/DockerAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/DockerAPI.java
index 40a5958..4fe59a2 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/DockerAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/DockerAPI.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.contracts;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/EdgeAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/EdgeAPI.java
index cd7eb6d..2fce5cc 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/EdgeAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/EdgeAPI.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.contracts;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ExploratoryAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ExploratoryAPI.java
index b4c053b..0191a20 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ExploratoryAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/ExploratoryAPI.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.contracts;
 
@@ -22,6 +23,7 @@
     String LIBRARY = "library/";
     String EXPLORATORY = "exploratory";
     String EXPLORATORY_CREATE = EXPLORATORY + "/create";
+    String EXPLORATORY_RECONFIGURE_SPARK = EXPLORATORY + "/reconfigure_spark";
     String EXPLORATORY_START = EXPLORATORY + "/start";
     String EXPLORATORY_TERMINATE = EXPLORATORY + "/terminate";
     String EXPLORATORY_STOP = EXPLORATORY + "/stop";
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/InfrasctructureAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/InfrasctructureAPI.java
index 855dd48..ebd8a01 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/InfrasctructureAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/InfrasctructureAPI.java
@@ -1,25 +1,27 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.rest.contracts;
 
 public final class InfrasctructureAPI {
 	public static final String INFRASTRUCTURE = "/infrastructure";
 	public static final String INFRASTRUCTURE_STATUS = INFRASTRUCTURE + "/status";
+	public static final String INFRASTRUCTURE_CHECK_INACTIVITY = INFRASTRUCTURE + "/check_inactivity";
 
 	private InfrasctructureAPI() {
 	}
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/KeyAPI.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/KeyAPI.java
index e487758..422d36b 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/KeyAPI.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/contracts/KeyAPI.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.contracts;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/dto/ErrorDTO.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/dto/ErrorDTO.java
new file mode 100644
index 0000000..c800c9b
--- /dev/null
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/dto/ErrorDTO.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.rest.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ErrorDTO {
+
+	@JsonProperty
+	private final int code;
+	@JsonProperty
+	private final String message;
+
+	public ErrorDTO(int code, String message) {
+		this.code = code;
+		this.message = message;
+	}
+}
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/AuthenticationExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/AuthenticationExceptionMapper.java
index 37e55df..db2bc61 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/AuthenticationExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/AuthenticationExceptionMapper.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.mappers;
 
 import com.epam.dlab.exceptions.DlabAuthenticationException;
+import com.epam.dlab.rest.dto.ErrorDTO;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
@@ -25,7 +29,10 @@
 public class AuthenticationExceptionMapper implements ExceptionMapper<DlabAuthenticationException> {
 	@Override
 	public Response toResponse(DlabAuthenticationException exception) {
-		return Response.status(Response.Status.UNAUTHORIZED).entity(exception.getMessage()).type(MediaType
-				.TEXT_PLAIN_TYPE).build();
+		final Response.Status unauthorized = Response.Status.UNAUTHORIZED;
+		return Response.status(unauthorized)
+				.entity(new ErrorDTO(unauthorized.getStatusCode(), exception.getMessage()))
+				.type(MediaType.APPLICATION_JSON)
+				.build();
 	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/DlabValidationExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/DlabValidationExceptionMapper.java
index d893de5..f3ce67f 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/DlabValidationExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/DlabValidationExceptionMapper.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.mappers;
 
 import com.epam.dlab.exceptions.DlabValidationException;
+import com.epam.dlab.rest.dto.ErrorDTO;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
@@ -25,9 +29,10 @@
 public class DlabValidationExceptionMapper implements ExceptionMapper<DlabValidationException> {
 	@Override
 	public Response toResponse(DlabValidationException exception) {
-		return Response.status(Response.Status.BAD_REQUEST)
-				.entity(exception.getMessage())
-				.type(MediaType.TEXT_PLAIN_TYPE)
+		final Response.Status badRequest = Response.Status.BAD_REQUEST;
+		return Response.status(badRequest)
+				.entity(new ErrorDTO(badRequest.getStatusCode(), exception.getMessage()))
+				.type(MediaType.APPLICATION_JSON)
 				.build();
 	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/GenericExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/GenericExceptionMapper.java
index 282627f..bd12539 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/GenericExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/GenericExceptionMapper.java
@@ -1,39 +1,43 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.mappers;
 
+import com.epam.dlab.rest.dto.ErrorDTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.ext.ExceptionMapper;
 
 public abstract class GenericExceptionMapper<E extends Exception> implements ExceptionMapper<E> {
-    static final Logger LOGGER = LoggerFactory.getLogger(GenericExceptionMapper.class);
+	static final Logger LOGGER = LoggerFactory.getLogger(GenericExceptionMapper.class);
 
-    @Override
-    public Response toResponse(E exception) {
-        LOGGER.error("Uncaught exception in application", exception);
+	@Override
+	public Response toResponse(E exception) {
+		LOGGER.error("Uncaught exception in application", exception);
 
-        return Response
-                .serverError()
-                .entity(exception.getMessage())
-                .build();
-    }
+		return Response
+				.serverError()
+				.entity(new ErrorDTO(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), exception.getMessage()))
+				.type(MediaType.APPLICATION_JSON)
+				.build();
+	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/JsonProcessingExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/JsonProcessingExceptionMapper.java
index eef4e82..24cf850 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/JsonProcessingExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/JsonProcessingExceptionMapper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.mappers;
 
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceConflictExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceConflictExceptionMapper.java
index 269242b..1f4e35e 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceConflictExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceConflictExceptionMapper.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.mappers;
 
 import com.epam.dlab.exceptions.ResourceConflictException;
+import com.epam.dlab.rest.dto.ErrorDTO;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
@@ -27,9 +31,10 @@
 public class ResourceConflictExceptionMapper implements ExceptionMapper<ResourceConflictException> {
 	@Override
 	public Response toResponse(ResourceConflictException e) {
-		return Response.status(Response.Status.CONFLICT)
-				.type(MediaType.TEXT_PLAIN_TYPE)
-				.entity(e.getMessage())
+		final Response.Status conflict = Response.Status.CONFLICT;
+		return Response.status(conflict)
+				.type(MediaType.APPLICATION_JSON)
+				.entity(new ErrorDTO(conflict.getStatusCode(), e.getMessage()))
 				.build();
 	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceNotFoundExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceNotFoundExceptionMapper.java
index 2fc6d8a..d98a57f 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceNotFoundExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceNotFoundExceptionMapper.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.mappers;
 
 import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.epam.dlab.rest.dto.ErrorDTO;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
@@ -27,9 +31,10 @@
 public class ResourceNotFoundExceptionMapper implements ExceptionMapper<ResourceNotFoundException> {
 	@Override
 	public Response toResponse(ResourceNotFoundException e) {
-		return Response.status(Response.Status.NOT_FOUND)
-				.type(MediaType.TEXT_PLAIN_TYPE)
-				.entity(e.getMessage()
-				).build();
+		final Response.Status notFound = Response.Status.NOT_FOUND;
+		return Response.status(notFound)
+				.type(MediaType.APPLICATION_JSON)
+				.entity(new ErrorDTO(notFound.getStatusCode(), e.getMessage()))
+				.build();
 	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceQuoteReachedExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceQuoteReachedExceptionMapper.java
new file mode 100644
index 0000000..7a60907
--- /dev/null
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ResourceQuoteReachedExceptionMapper.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.rest.mappers;
+
+import com.epam.dlab.exceptions.ResourceQuoteReachedException;
+import com.epam.dlab.rest.dto.ErrorDTO;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+
+public class ResourceQuoteReachedExceptionMapper implements ExceptionMapper<ResourceQuoteReachedException> {
+	@Override
+	public Response toResponse(ResourceQuoteReachedException exception) {
+		final Response.Status forbidden = Response.Status.FORBIDDEN;
+		return Response.status(forbidden)
+				.type(MediaType.APPLICATION_JSON_TYPE)
+				.entity(new ErrorDTO(forbidden.getStatusCode(), exception.getMessage()))
+				.build();
+	}
+}
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/RuntimeExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/RuntimeExceptionMapper.java
index 34ae0bc..e2eaa4d 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/RuntimeExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/RuntimeExceptionMapper.java
@@ -1,26 +1,29 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.mappers;
 
+import com.epam.dlab.rest.dto.ErrorDTO;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.ext.Provider;
 
@@ -28,30 +31,33 @@
 @Slf4j
 public class RuntimeExceptionMapper extends GenericExceptionMapper<RuntimeException> {
 
-    @Override
-    public Response toResponse(RuntimeException exception) {
-        if (exception instanceof WebApplicationException) {
-            return handleWebApplicationException(exception);
-        }
-        return super.toResponse(exception);
-    }
+	@Override
+	public Response toResponse(RuntimeException exception) {
+		if (exception instanceof WebApplicationException) {
+			return handleWebApplicationException(exception);
+		}
+		return super.toResponse(exception);
+	}
 
-    private Response handleWebApplicationException(RuntimeException exception) {
-        WebApplicationException webAppException = (WebApplicationException) exception;
+	private Response handleWebApplicationException(RuntimeException exception) {
+		WebApplicationException webAppException = (WebApplicationException) exception;
 
-        if (webAppException.getResponse().getStatusInfo() == Response.Status.UNAUTHORIZED
-                || webAppException.getResponse().getStatusInfo() == Response.Status.FORBIDDEN) {
+		if (webAppException.getResponse().getStatusInfo() == Response.Status.UNAUTHORIZED
+				|| webAppException.getResponse().getStatusInfo() == Response.Status.FORBIDDEN) {
 
-            return web(exception, Response.Status.UNAUTHORIZED);
-        } else if (webAppException.getResponse().getStatusInfo() == Response.Status.NOT_FOUND) {
-            return web(exception, Response.Status.NOT_FOUND);
-        }
+			return web(exception, Response.Status.UNAUTHORIZED);
+		} else if (webAppException.getResponse().getStatusInfo() == Response.Status.NOT_FOUND) {
+			return web(exception, Response.Status.NOT_FOUND);
+		}
 
-        return super.toResponse(exception);
-    }
+		return super.toResponse(exception);
+	}
 
-    private Response web(RuntimeException exception, Response.StatusType status) {
-        log.error("Web application exception: {}", exception.getMessage(), exception);
-        return Response.status(status).build();
-    }
+	private Response web(RuntimeException exception, Response.StatusType status) {
+		log.error("Web application exception: {}", exception.getMessage(), exception);
+		return Response.status(status)
+				.type(MediaType.APPLICATION_JSON)
+				.entity(new ErrorDTO(status.getStatusCode(), exception.getMessage()))
+				.build();
+	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ValidationExceptionMapper.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ValidationExceptionMapper.java
index 2f23a01..49ce81f 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ValidationExceptionMapper.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/mappers/ValidationExceptionMapper.java
@@ -1,25 +1,25 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.rest.mappers;
 
+import com.epam.dlab.rest.dto.ErrorDTO;
 import io.dropwizard.jersey.validation.ConstraintMessage;
 import io.dropwizard.jersey.validation.JerseyViolationException;
 import org.glassfish.jersey.server.model.Invocable;
@@ -34,11 +34,12 @@
 	public Response toResponse(JerseyViolationException exception) {
 		Invocable invocable = exception.getInvocable();
 		final String errors =
-				exception.getConstraintViolations().stream().map((violation) -> ConstraintMessage.getMessage(violation
-						, invocable)).collect(Collectors.joining());
+				exception.getConstraintViolations()
+						.stream().map(violation -> ConstraintMessage.getMessage(violation, invocable))
+						.collect(Collectors.joining());
 		return Response.status(Response.Status.BAD_REQUEST)
-				.entity(errors)
-				.type(MediaType.TEXT_PLAIN_TYPE)
+				.entity(new ErrorDTO(Response.Status.BAD_REQUEST.getStatusCode(), errors))
+				.type(MediaType.APPLICATION_JSON)
 				.build();
 	}
 }
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AwsValidation.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AwsValidation.java
index e24107c..715f27f 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AwsValidation.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AwsValidation.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.validation;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AzureValidation.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AzureValidation.java
index 5230436..14ec7d5 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AzureValidation.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/AzureValidation.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.validation;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/CloudConfigurationSequenceProvider.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/CloudConfigurationSequenceProvider.java
index 50f04c8..37503f4 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/CloudConfigurationSequenceProvider.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/CloudConfigurationSequenceProvider.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.validation;
diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/GcpValidation.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/GcpValidation.java
index 9e448e4..b2e2435 100644
--- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/GcpValidation.java
+++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/validation/GcpValidation.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.validation;
diff --git a/services/provisioning-service/pom.xml b/services/provisioning-service/pom.xml
index 0744b9e..6ce3160 100644
--- a/services/provisioning-service/pom.xml
+++ b/services/provisioning-service/pom.xml
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/services/provisioning-service/provisioning.yml b/services/provisioning-service/provisioning.yml
index d25e1d8..72dd1f3 100644
--- a/services/provisioning-service/provisioning.yml
+++ b/services/provisioning-service/provisioning.yml
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#  http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
 #
 # ******************************************************************************
 
@@ -56,6 +59,7 @@
     - type: https
       port: 8084
       certAlias: dlab
+      validateCerts: true
       keyStorePath: ${KEY_STORE_PATH}
       keyStorePassword: ${KEY_STORE_PASSWORD}
       trustStorePath: ${TRUST_STORE_PATH}
@@ -65,6 +69,7 @@
     - type: https
       port: 8085
       certAlias: dlab
+      validateCerts: true
       keyStorePath: ${KEY_STORE_PATH}
       keyStorePassword: ${KEY_STORE_PASSWORD}
       trustStorePath: ${TRUST_STORE_PATH}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java
index bb6c0ed..4f063c6 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java
@@ -1,23 +1,27 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
 package com.epam.dlab.backendapi;
 
 import com.epam.dlab.auth.SecurityFactory;
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.DirectoriesCreator;
 import com.epam.dlab.backendapi.core.DockerWarmuper;
 import com.epam.dlab.backendapi.core.response.handlers.ComputationalConfigure;
@@ -25,7 +29,7 @@
 import com.epam.dlab.backendapi.modules.ModuleFactory;
 import com.epam.dlab.backendapi.resources.*;
 import com.epam.dlab.backendapi.resources.base.KeyResource;
-import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
+import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
 import com.epam.dlab.cloud.CloudModule;
 import com.epam.dlab.process.model.DlabProcess;
 import com.epam.dlab.rest.client.RESTService;
@@ -75,11 +79,12 @@
 		final InjectableValues.Std injectableValues = new InjectableValues.Std();
 		injectableValues.addValue(RESTService.class, injector.getInstance(RESTService.class));
 		injectableValues.addValue(ComputationalConfigure.class, injector.getInstance(ComputationalConfigure.class));
+		injectableValues.addValue(SystemUserInfoService.class, injector.getInstance(SystemUserInfoService.class));
 		mapper.setInjectableValues(injectableValues);
 
 		environment.lifecycle().manage(injector.getInstance(DirectoriesCreator.class));
 		if (configuration.isHandlersPersistenceEnabled()) {
-			environment.lifecycle().manage(injector.getInstance(RestoreCallbackHandlerService.class));
+			environment.lifecycle().manage(injector.getInstance(RestoreCallbackHandlerServiceImpl.class));
 		}
 		environment.lifecycle().manage(injector.getInstance(DockerWarmuper.class));
 
@@ -96,6 +101,7 @@
 		jersey.register(injector.getInstance(ImageResource.class));
 		jersey.register(injector.getInstance(BackupResource.class));
 		jersey.register(injector.getInstance(KeyResource.class));
+		jersey.register(injector.getInstance(CallbackHandlerResource.class));
 
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
index 13e54ff..6a39c58 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Constants.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Constants.java
index b302c9e..1c31d5a 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Constants.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Constants.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Directories.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Directories.java
index ab0f4d2..1966f47 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Directories.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/Directories.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DirectoriesCreator.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DirectoriesCreator.java
index bb54abb..e8a17a0 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DirectoriesCreator.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DirectoriesCreator.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DockerWarmuper.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DockerWarmuper.java
index e0745ed..2799d37 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DockerWarmuper.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/DockerWarmuper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
@@ -62,7 +63,7 @@
 	public void start() throws Exception {
 		LOGGER.debug("warming up docker");
 		final ProcessInfo processInfo = commandExecutor.executeSync("warmup", DockerCommands.generateUUID(),
-                GET_IMAGES);
+				GET_IMAGES);
 		List<String> images = Arrays.asList(processInfo.getStdOut().split("\n"));
 		for (String image : images) {
 			String uuid = UUID.randomUUID().toString();
@@ -118,6 +119,11 @@
 		public void handleError(String errorMessage) {
 			LOGGER.warn("docker warmupper returned no result: {}", errorMessage);
 		}
+
+		@Override
+		public String getUser() {
+			return "DLAB";
+		}
 	}
 
 	public DockerFileHandlerCallback getFileHandlerCallback(String uuid) {
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/FileHandlerCallback.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/FileHandlerCallback.java
index ad49ad9..7e7df74 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/FileHandlerCallback.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/FileHandlerCallback.java
@@ -1,27 +1,28 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonTypeInfo;
 
-@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "@class")
 public interface FileHandlerCallback {
 	String getUUID();
 
@@ -31,6 +32,8 @@
 
 	void handleError(String errorMessage);
 
+	String getUser();
+
 	@JsonIgnore
 	default String getId() {
 		return this.getClass().getSimpleName() + "_" + getUUID();
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/MetadataHolder.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/MetadataHolder.java
index 31ec622..7ad52d7 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/MetadataHolder.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/MetadataHolder.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CmdCommand.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CmdCommand.java
index 5e196ed..d8fb126 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CmdCommand.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CmdCommand.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandBuilder.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandBuilder.java
index 4dda420..7721fe8 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandBuilder.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandBuilder.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutor.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutor.java
index 7506467..c74968f 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutor.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutor.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
@@ -26,12 +27,12 @@
 @Singleton
 public class CommandExecutor implements ICommandExecutor {
 
-    public ProcessInfo executeSync(final String username, final String uuid, String command) throws Exception {
-        return DlabProcess.getInstance().start(new ProcessId(username, uuid), "bash", "-c", command).get();
+	public ProcessInfo executeSync(final String username, final String uuid, String command) throws Exception {
+		return DlabProcess.getInstance().start(new ProcessId(username, uuid), "bash", "-c", command).get();
 
-    }
+	}
 
-    public void executeAsync(final String username, final String uuid, final String command) {
-        DlabProcess.getInstance().start(new ProcessId(username, uuid), "bash", "-c", command);
-    }
+	public void executeAsync(final String username, final String uuid, final String command) {
+		DlabProcess.getInstance().start(new ProcessId(username, uuid), "bash", "-c", command);
+	}
 }
\ No newline at end of file
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMock.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMock.java
index 15bc0ed..d1e2038 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMock.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMock.java
@@ -1,27 +1,28 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
 import com.epam.dlab.cloud.CloudProvider;
+import com.epam.dlab.process.builder.ProcessInfoBuilder;
 import com.epam.dlab.process.model.ProcessId;
 import com.epam.dlab.process.model.ProcessInfo;
-import com.epam.dlab.process.builder.ProcessInfoBuilder;
 import com.google.common.collect.Lists;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -32,80 +33,80 @@
 import java.util.concurrent.ExecutionException;
 
 public class CommandExecutorMock implements ICommandExecutor {
-    private static final Logger LOGGER = LoggerFactory.getLogger(CommandExecutorMock.class);
-    public static final String DOCKER_DLAB_DATAENGINE = "docker.dlab-dataengine:latest";
-    public static final String DOCKER_DLAB_DATAENGINE_SERVICE = "docker.dlab-dataengine-service:latest";
+	private static final Logger LOGGER = LoggerFactory.getLogger(CommandExecutorMock.class);
+	public static final String DOCKER_DLAB_DATAENGINE = "docker.dlab-dataengine:latest";
+	public static final String DOCKER_DLAB_DATAENGINE_SERVICE = "docker.dlab-dataengine-service:latest";
 
-    private CommandExecutorMockAsync execAsync = null;
-    private CompletableFuture<Boolean> future;
+	private CommandExecutorMockAsync execAsync = null;
+	private CompletableFuture<Boolean> future;
 
-    private CloudProvider cloudProvider;
+	private CloudProvider cloudProvider;
 
-    public CommandExecutorMock(CloudProvider cloudProvider) {
-        this.cloudProvider = cloudProvider;
-    }
+	public CommandExecutorMock(CloudProvider cloudProvider) {
+		this.cloudProvider = cloudProvider;
+	}
 
-    /**
-     * Return result of execution.
-     *
-     * @throws ExecutionException
-     * @throws InterruptedException
-     */
-    public boolean getResultSync() throws InterruptedException, ExecutionException {
-        return (future == null ? true : future.get());
-    }
+	/**
+	 * Return result of execution.
+	 *
+	 * @throws ExecutionException
+	 * @throws InterruptedException
+	 */
+	public boolean getResultSync() throws InterruptedException, ExecutionException {
+		return (future == null ? true : future.get());
+	}
 
-    /**
-     * Return variables for substitution into Json response file.
-     */
-    public Map<String, String> getVariables() {
-        return (execAsync == null ? null : execAsync.getParser().getVariables());
-    }
+	/**
+	 * Return variables for substitution into Json response file.
+	 */
+	public Map<String, String> getVariables() {
+		return (execAsync == null ? null : execAsync.getParser().getVariables());
+	}
 
-    /**
-     * Response file name.
-     */
-    public String getResponseFileName() {
-        return (execAsync == null ? null : execAsync.getResponseFileName());
-    }
+	/**
+	 * Response file name.
+	 */
+	public String getResponseFileName() {
+		return (execAsync == null ? null : execAsync.getResponseFileName());
+	}
 
-    @Override
-    public ProcessInfo executeSync(String user, String uuid, String command) {
-        LOGGER.debug("Run OS command for user {} with UUID {}: {}", user, uuid, command);
-        ProcessInfoBuilder builder = new ProcessInfoBuilder(new ProcessId(user, command), 1000l);
-        if (command.startsWith("docker images |")) {
-            List<String> list = Lists.newArrayList(
-                    "docker.dlab-deeplearning:latest",
-                    "docker.dlab-jupyter:latest",
-                    "docker.dlab-rstudio:latest",
-                    "docker.dlab-tensor:latest",
-                    "docker.dlab-zeppelin:latest",
-                    "docker.dlab-tensor-rstudio:latest");
+	@Override
+	public ProcessInfo executeSync(String user, String uuid, String command) {
+		LOGGER.debug("Run OS command for user {} with UUID {}: {}", user, uuid, command);
+		ProcessInfoBuilder builder = new ProcessInfoBuilder(new ProcessId(user, command), 1000l);
+		if (command.startsWith("docker images |")) {
+			List<String> list = Lists.newArrayList(
+					"docker.dlab-deeplearning:latest",
+					"docker.dlab-jupyter:latest",
+					"docker.dlab-rstudio:latest",
+					"docker.dlab-tensor:latest",
+					"docker.dlab-zeppelin:latest",
+					"docker.dlab-tensor-rstudio:latest");
 
-            list.addAll(getComputationalDockerImage());
+			list.addAll(getComputationalDockerImage());
 
-            ProcessInfoBuilder.stdOut(builder, String.join("\n", list));
-        }
-        return builder.get();
-    }
+			ProcessInfoBuilder.stdOut(builder, String.join("\n", list));
+		}
+		return builder.get();
+	}
 
-    @Override
-    public void executeAsync(String user, String uuid, String command) {
-        execAsync = new CommandExecutorMockAsync(user, uuid, command, cloudProvider);
-        future = CompletableFuture.supplyAsync(execAsync);
-    }
+	@Override
+	public void executeAsync(String user, String uuid, String command) {
+		execAsync = new CommandExecutorMockAsync(user, uuid, command, cloudProvider);
+		future = CompletableFuture.supplyAsync(execAsync);
+	}
 
-    private List<String> getComputationalDockerImage() {
-        switch (cloudProvider) {
-            case AWS:
-                return Lists.newArrayList(DOCKER_DLAB_DATAENGINE_SERVICE, DOCKER_DLAB_DATAENGINE);
-            case AZURE:
-                return Lists.newArrayList(DOCKER_DLAB_DATAENGINE);
-            case GCP:
-                return Lists.newArrayList(DOCKER_DLAB_DATAENGINE_SERVICE, DOCKER_DLAB_DATAENGINE);
-            default:
-                throw new IllegalArgumentException("Unsupported cloud provider " + cloudProvider);
-        }
-    }
+	private List<String> getComputationalDockerImage() {
+		switch (cloudProvider) {
+			case AWS:
+				return Lists.newArrayList(DOCKER_DLAB_DATAENGINE_SERVICE, DOCKER_DLAB_DATAENGINE);
+			case AZURE:
+				return Lists.newArrayList(DOCKER_DLAB_DATAENGINE);
+			case GCP:
+				return Lists.newArrayList(DOCKER_DLAB_DATAENGINE_SERVICE, DOCKER_DLAB_DATAENGINE);
+			default:
+				throw new IllegalArgumentException("Unsupported cloud provider " + cloudProvider);
+		}
+	}
 
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
index 5567921..5af48e3 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockAsync.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
@@ -132,6 +133,8 @@
 					case TERMINATE:
 					case GIT_CREDS:
 					case CREATE_IMAGE:
+					case RECONFIGURE_SPARK:
+					case CHECK_INACTIVITY:
 						action(user, action);
 						break;
 					case CONFIGURE:
@@ -167,8 +170,8 @@
 			final String scriptName = StringUtils.substringBefore(Paths.get(parser.getCommand()).getFileName()
 					.toString(), ".");
 			String templateFileName = "mock_response/" + cloudProvider.getName() + '/' + scriptName + JSON_FILE_ENDING;
-			responseFileName = getAbsolutePath(parser.getResponsePath(), scriptName + user + "_" + parser.getRequestId
-					() + JSON_FILE_ENDING);
+			responseFileName = getAbsolutePath(parser.getResponsePath(), scriptName + user + "_" +
+					parser.getRequestId() + JSON_FILE_ENDING);
 			setResponse(templateFileName, responseFileName);
 		}
 
@@ -187,8 +190,8 @@
 			IOException {
 		File to = new File(getAbsolutePath(destinationFolder, destinationFileName));
 
-		try (InputStream inputStream = CommandExecutorMockAsync.class.getClassLoader().getResourceAsStream
-				(sourceFilePath);
+		try (InputStream inputStream =
+					 CommandExecutorMockAsync.class.getClassLoader().getResourceAsStream(sourceFilePath);
 			 OutputStream outputStream = new FileOutputStream(to)) {
 			ByteStreams.copy(inputStream, outputStream);
 		}
@@ -292,12 +295,11 @@
 		String resourceType = parser.getResourceType();
 
 		String prefixFileName = (Lists.newArrayList("edge", "dataengine", "dataengine-service").contains
-				(resourceType) ?
-				resourceType : "notebook") + "_";
-		String templateFileName = "mock_response/" + cloudProvider.getName() + '/' + prefixFileName + action.toString
-				() + JSON_FILE_ENDING;
-		responseFileName = getAbsolutePath(parser.getResponsePath(), prefixFileName + user + "_" + parser.getRequestId
-				() + JSON_FILE_ENDING);
+				(resourceType) ? resourceType : "notebook") + "_";
+		String templateFileName = "mock_response/" + cloudProvider.getName() + '/' + prefixFileName +
+				action.toString() + JSON_FILE_ENDING;
+		responseFileName = getAbsolutePath(parser.getResponsePath(), prefixFileName + user + "_" +
+				parser.getRequestId() + JSON_FILE_ENDING);
 		setResponse(templateFileName, responseFileName);
 	}
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandParserMock.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandParserMock.java
index 644334d..fe20912 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandParserMock.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/CommandParserMock.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerAction.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerAction.java
index 8d9f7b4..dea80e9 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerAction.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerAction.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.commands;
@@ -29,7 +32,9 @@
     GIT_CREDS,
     CREATE_IMAGE,
     STATUS,
-    REUPLOAD_KEY;
+	REUPLOAD_KEY,
+    RECONFIGURE_SPARK,
+	CHECK_INACTIVITY;
 
     public static DockerAction of(String action) {
         if (action != null) {
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerCommands.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerCommands.java
index d53ca77..6a329ea 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerCommands.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/DockerCommands.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ICommandExecutor.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ICommandExecutor.java
index 2def2af..454bc05 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ICommandExecutor.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ICommandExecutor.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.core.commands;
 
 import com.epam.dlab.process.model.ProcessInfo;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ImagesDockerCommand.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ImagesDockerCommand.java
index 502b69c..ebff5c0 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ImagesDockerCommand.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/ImagesDockerCommand.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonBackupCommand.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonBackupCommand.java
index 4239bed..20ab144 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonBackupCommand.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonBackupCommand.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.commands;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonCommand.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonCommand.java
index 7f8afc6..c3bfe3c 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonCommand.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/PythonCommand.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.commands;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
index 500fb6f..4b194d9 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/UnixCommand.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/UnixCommand.java
index 7176e4e..9a9095a 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/UnixCommand.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/UnixCommand.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/AsyncFileHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/AsyncFileHandler.java
index 728e6e6..52a2066 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/AsyncFileHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/AsyncFileHandler.java
@@ -1,30 +1,30 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
 
+import com.epam.dlab.backendapi.core.FileHandlerCallback;
 import io.dropwizard.util.Duration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.epam.dlab.backendapi.core.FileHandlerCallback;
-
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
@@ -39,79 +39,97 @@
  */
 public final class AsyncFileHandler implements Supplier<Boolean> {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncFileHandler.class);
+	private static final Logger LOGGER = LoggerFactory.getLogger(AsyncFileHandler.class);
 
-    /** File name. */
-    private final String fileName;
-    /** Directory name. */
-    private final String directory;
-    /** Implement of the file handler. */
-    private final FileHandlerCallback fileHandlerCallback;
-    /** Timeout waiting for the file writing. */
-    private final Duration fileLengthCheckDelay;
+	/**
+	 * File name.
+	 */
+	private final String fileName;
+	/**
+	 * Directory name.
+	 */
+	private final String directory;
+	/**
+	 * Implement of the file handler.
+	 */
+	private final FileHandlerCallback fileHandlerCallback;
+	/**
+	 * Timeout waiting for the file writing.
+	 */
+	private final Duration fileLengthCheckDelay;
 
-    /** Create instance of the file handler.
-     * @param fileName file name.
-     * @param directory directory name.
-     * @param fileHandlerCallback file handler for processing 
-     * @param fileLengthCheckDelay timeout waiting for the file writing.
-     */
-    public AsyncFileHandler(String fileName, String directory, FileHandlerCallback fileHandlerCallback, Duration fileLengthCheckDelay) {
-        this.fileName = fileName;
-        this.directory = directory;
-        this.fileHandlerCallback = fileHandlerCallback;
-        this.fileLengthCheckDelay = fileLengthCheckDelay;
-    }
+	/**
+	 * Create instance of the file handler.
+	 *
+	 * @param fileName             file name.
+	 * @param directory            directory name.
+	 * @param fileHandlerCallback  file handler for processing
+	 * @param fileLengthCheckDelay timeout waiting for the file writing.
+	 */
+	public AsyncFileHandler(String fileName, String directory, FileHandlerCallback fileHandlerCallback,
+							Duration fileLengthCheckDelay) {
+		this.fileName = fileName;
+		this.directory = directory;
+		this.fileHandlerCallback = fileHandlerCallback;
+		this.fileLengthCheckDelay = fileLengthCheckDelay;
+	}
 
-    @Override
-    public Boolean get() {
-        Path path = Paths.get(directory, fileName);
-        try {
-        	boolean result = fileHandlerCallback.handle(fileName, readBytes(path));
-            if (result) {
-            	try {
-            		Files.deleteIfExists(path);
-            		Files.deleteIfExists(getLogFile());
-            		LOGGER.trace("Response {} and log files has been deleted", path.toAbsolutePath());
-            	} catch (IOException e) {
-            		LOGGER.warn("Can't delete file {}", path.toAbsolutePath(), e);
-            	}
-            }
-            return result;
-        } catch (Exception e) {
-            LOGGER.error("Could not handle file {} async", path.toAbsolutePath(), e);
-            fileHandlerCallback.handleError(e.getLocalizedMessage());
-        }
-        return false;
-    }
+	@Override
+	public Boolean get() {
+		Path path = Paths.get(directory, fileName);
+		try {
+			boolean result = fileHandlerCallback.handle(fileName, readBytes(path));
+			if (result) {
+				try {
+					Files.deleteIfExists(path);
+					Files.deleteIfExists(getLogFile());
+					LOGGER.trace("Response {} and log files has been deleted", path.toAbsolutePath());
+				} catch (IOException e) {
+					LOGGER.warn("Can't delete file {}", path.toAbsolutePath(), e);
+				}
+			}
+			return result;
+		} catch (Exception e) {
+			LOGGER.error("Could not handle file {} async", path.toAbsolutePath(), e);
+			fileHandlerCallback.handleError(e.getLocalizedMessage());
+		}
+		return false;
+	}
 
-    /** Returns the name of log file. */
-    private Path getLogFile() {
-        return Paths.get(directory, fileName.replaceAll(JSON_EXTENSION, LOG_EXTENSION));
-    }
+	/**
+	 * Returns the name of log file.
+	 */
+	private Path getLogFile() {
+		return Paths.get(directory, fileName.replaceAll(JSON_EXTENSION, LOG_EXTENSION));
+	}
 
-    /** Returns the content of file.
-     * @param path source file.
-     * @return File content.
-     * @throws IOException
-     * @throws InterruptedException
-     */
-    private byte[] readBytes(Path path) throws IOException, InterruptedException {
-        File file = path.toFile();
-        waitFileCompletelyWritten(file);
-        return Files.readAllBytes(path);
-    }
+	/**
+	 * Returns the content of file.
+	 *
+	 * @param path source file.
+	 * @return File content.
+	 * @throws IOException
+	 * @throws InterruptedException
+	 */
+	private byte[] readBytes(Path path) throws IOException, InterruptedException {
+		File file = path.toFile();
+		waitFileCompletelyWritten(file);
+		return Files.readAllBytes(path);
+	}
 
-    /** Waiting for the file writing. This method is blocking and return control when
-     * the file will no longer resize.
-     * @param file source file. */
-    private void waitFileCompletelyWritten(File file) throws InterruptedException {
-    	long before;
-    	long after = file.length();
-    	do {
-        	before = after;
-    		Thread.sleep(fileLengthCheckDelay.toMilliseconds());
-    		after = file.length();
-    	} while (before != after);
-    }
+	/**
+	 * Waiting for the file writing. This method is blocking and return control when
+	 * the file will no longer resize.
+	 *
+	 * @param file source file.
+	 */
+	private void waitFileCompletelyWritten(File file) throws InterruptedException {
+		long before;
+		long after = file.length();
+		do {
+			before = after;
+			Thread.sleep(fileLengthCheckDelay.toMilliseconds());
+			after = file.length();
+		} while (before != after);
+	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListener.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListener.java
index 6d2681d..3856a92 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListener.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListener.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerExecutor.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerExecutor.java
index 31d3ac0..30d8157 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerExecutor.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerExecutor.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItem.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItem.java
index 91234f2..ba72555 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItem.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItem.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemList.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemList.java
index f496a60..25141d9 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemList.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemList.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
@@ -80,6 +81,11 @@
 		}
 
 		@Override
+		public String getUser() {
+			return "DLAB";
+		}
+
+		@Override
 		public boolean handle(String fileName, byte[] content) throws Exception {
 			return false;
 		}
@@ -171,7 +177,7 @@
 	public void remove(int index) {
 
 		final WatchItem watchItem = list.remove(index);
-		if (Objects.nonNull(handlerDao)) {
+		if (Objects.nonNull(handlerDao) && watchItem.getStatus() != ItemStatus.IS_FAILED) {
 			handlerDao.remove(watchItem.getFileHandlerCallback().getId());
 		}
 	}
@@ -257,10 +263,8 @@
 		synchronized (list) {
 			for (int i = 0; i < size(); i++) {
 				WatchItem item = list.get(i);
-				if (item.getStatus() == ItemStatus.FILE_CAPTURED) {
-					if (processItem(item)) {
-						count++;
-					}
+				if (item.getStatus() == ItemStatus.FILE_CAPTURED && processItem(item)) {
+					count++;
 				}
 			}
 		}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/BackupCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/BackupCallbackHandler.java
index dea341f..9338431 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/BackupCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/BackupCallbackHandler.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
 import com.epam.dlab.dto.backup.EnvBackupDTO;
 import com.epam.dlab.dto.backup.EnvBackupStatus;
@@ -44,16 +48,20 @@
 	@JsonProperty
 	private final EnvBackupDTO dto;
 	private final RESTService selfService;
+	private final SystemUserInfoService systemUserInfoService;
 	@JsonProperty
 	private final String callbackUrl;
 	@JsonProperty
 	private final String user;
 
 	@JsonCreator
-	public BackupCallbackHandler(@JacksonInject RESTService selfService,
-								 @JsonProperty("callbackUrl") String callbackUrl, @JsonProperty("user") String user,
-								 @JsonProperty("dto") EnvBackupDTO dto) {
+	public BackupCallbackHandler(
+			@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService,
+			@JsonProperty("callbackUrl") String callbackUrl, @JsonProperty("user") String user,
+			@JsonProperty("dto") EnvBackupDTO dto) {
 		this.selfService = selfService;
+		this.systemUserInfoService = systemUserInfoService;
 		this.uuid = dto.getId();
 		this.callbackUrl = callbackUrl;
 		this.user = user;
@@ -92,7 +100,8 @@
 	private void selfServicePost(EnvBackupStatusDTO statusDTO) {
 		log.debug("Send post request to self service {} for UUID {}, object is {}", uuid, statusDTO);
 		try {
-			selfService.post(callbackUrl, statusDTO, Response.class);
+			selfService.post(callbackUrl, systemUserInfoService.create(user).getAccessToken(), statusDTO,
+					Response.class);
 		} catch (Exception e) {
 			log.error("Send request or response error for UUID {}: {}", uuid, e.getLocalizedMessage(), e);
 			throw new DlabException("Send request or response error for UUID " + uuid + ": " + e.getLocalizedMessage()
@@ -106,6 +115,11 @@
 				.withErrorMessage(errorMessage);
 	}
 
+	@Override
+	public String getUser() {
+		return user;
+	}
+
 	protected EnvBackupStatusDTO buildBackupStatusDto(EnvBackupStatus status) {
 		return new EnvBackupStatusDTO()
 				.withRequestId(uuid)
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/CheckInactivityCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/CheckInactivityCallbackHandler.java
new file mode 100644
index 0000000..4f25c72
--- /dev/null
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/CheckInactivityCallbackHandler.java
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.core.response.handlers;
+
+import com.epam.dlab.backendapi.core.FileHandlerCallback;
+import com.epam.dlab.dto.computational.CheckInactivityStatus;
+import com.epam.dlab.dto.computational.CheckInactivityStatusDTO;
+import com.epam.dlab.dto.status.EnvResource;
+import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.rest.client.RESTService;
+import com.fasterxml.jackson.annotation.JacksonInject;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectReader;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+@Slf4j
+public class CheckInactivityCallbackHandler implements FileHandlerCallback {
+	private static final ObjectMapper MAPPER = new ObjectMapper()
+			.configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true);
+	private static final String STATUS_FIELD = "status";
+	private static final String RESOURCES_FIELD = "resources";
+	private static final String ERROR_MESSAGE_FIELD = "error_message";
+	@JsonProperty
+	private final String uuid;
+	private final RESTService selfService;
+	@JsonProperty
+	private final String callbackUrl;
+	@JsonProperty
+	private final String user;
+
+	@JsonCreator
+	public CheckInactivityCallbackHandler(@JacksonInject RESTService selfService,
+										  @JsonProperty("callbackUrl") String callbackUrl,
+										  @JsonProperty("user") String user, String uuid) {
+		this.selfService = selfService;
+		this.uuid = uuid;
+		this.callbackUrl = callbackUrl;
+		this.user = user;
+	}
+
+	@Override
+	public String getUUID() {
+		return uuid;
+	}
+
+	@Override
+	public boolean checkUUID(String uuid) {
+		return this.uuid.equals(uuid);
+	}
+
+	@Override
+	@SuppressWarnings("unchecked")
+	public boolean handle(String fileName, byte[] content) throws Exception {
+		final String fileContent = new String(content);
+		log.debug("Got file {} while waiting for UUID {}, check inactivity resources response: {}", fileName, uuid,
+				fileContent);
+
+		final JsonNode treeNode = MAPPER.readTree(fileContent);
+		final String status = treeNode.get(STATUS_FIELD).textValue();
+		CheckInactivityStatusDTO checkInactivityStatusDTO = "ok".equals(status) ?
+				getOkStatusDto(treeNode) : getFailedStatusDto(treeNode);
+		selfServicePost(checkInactivityStatusDTO);
+		return "ok".equals(status);
+	}
+
+	private CheckInactivityStatusDTO getOkStatusDto(JsonNode jsonNode) throws IOException {
+		final JsonNode clustersNode = jsonNode.get(RESOURCES_FIELD);
+		ObjectReader reader = MAPPER.readerFor(new TypeReference<List<EnvResource>>() {
+		});
+		List<EnvResource> clusters = reader.readValue(clustersNode);
+		return buildCheckInactivityClustersStatusDTO(CheckInactivityStatus.COMPLETED, clusters);
+	}
+
+	private CheckInactivityStatusDTO getFailedStatusDto(JsonNode jsonNode) {
+		return buildCheckInactivityClustersStatusDTO(CheckInactivityStatus.FAILED,
+				Collections.emptyList())
+				.withErrorMessage(jsonNode.get(ERROR_MESSAGE_FIELD).textValue());
+	}
+
+	private void selfServicePost(CheckInactivityStatusDTO statusDTO) {
+		log.debug("Send post request to self service for UUID {}, object is {}", uuid, statusDTO);
+		try {
+			selfService.post(callbackUrl, statusDTO, Response.class);
+		} catch (Exception e) {
+			log.error("Send request or response error for UUID {}: {}", uuid, e.getLocalizedMessage(), e);
+			throw new DlabException("Send request or response error for UUID " + uuid + ": "
+					+ e.getLocalizedMessage(), e);
+		}
+	}
+
+	@Override
+	public void handleError(String errorMessage) {
+		buildCheckInactivityClustersStatusDTO(CheckInactivityStatus.FAILED, Collections.emptyList())
+				.withErrorMessage(errorMessage);
+	}
+
+	@Override
+	public String getUser() {
+		return user;
+	}
+
+	private CheckInactivityStatusDTO buildCheckInactivityClustersStatusDTO(CheckInactivityStatus status,
+																		   List<EnvResource> clusters) {
+		return new CheckInactivityStatusDTO()
+				.withRequestId(uuid)
+				.withResources(clusters)
+				.withStatus(status)
+				.withUser(user);
+	}
+
+}
+
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
index f6ec166..c270e1a 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.ResourceURL;
 import com.epam.dlab.dto.UserInstanceStatus;
@@ -31,9 +35,13 @@
 import lombok.extern.slf4j.Slf4j;
 
 import java.io.IOException;
-import java.util.ArrayList;
+import java.time.Instant;
 import java.util.Collections;
+import java.util.Date;
 import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
 
 @Slf4j
 public class ComputationalCallbackHandler extends ResourceCallbackHandler<ComputationalStatusDTO> {
@@ -46,13 +54,14 @@
 	private ComputationalConfigure computationalConfigure;
 
 	@JsonCreator
-	public ComputationalCallbackHandler(@JacksonInject ComputationalConfigure computationalConfigure,
+	public ComputationalCallbackHandler(@JacksonInject SystemUserInfoService systemUserInfoService,
+										@JacksonInject ComputationalConfigure computationalConfigure,
 										@JacksonInject RESTService selfService,
 										@JsonProperty("action") DockerAction action,
 										@JsonProperty("uuid") String uuid,
 										@JsonProperty("dto") ComputationalBase<?> dto) {
 
-		super(selfService, dto.getCloudSettings().getIamUser(), uuid, action);
+		super(systemUserInfoService, selfService, dto.getCloudSettings().getIamUser(), uuid, action);
 		this.computationalConfigure = computationalConfigure;
 		this.dto = dto;
 	}
@@ -72,6 +81,7 @@
 			return baseStatus;
 		}
 		baseStatus.withComputationalUrl(extractUrl(resultNode));
+		baseStatus.withLastActivity(Date.from(Instant.now()));
 
 		if (DockerAction.CREATE == getAction()) {
 			baseStatus
@@ -94,26 +104,29 @@
 
 	private String instanceId(JsonNode jsonNode) {
 		if (jsonNode != null && jsonNode.isArray()) {
-			List<String> ids = new ArrayList<>();
-			for (JsonNode id : jsonNode) {
-				ids.add(id.textValue());
-			}
-			return String.join(";", ids);
+			return StreamSupport.stream(jsonNode.spliterator(), false)
+					.map(JsonNode::textValue)
+					.collect(Collectors.joining(";"));
+		} else {
+			return getTextValue(jsonNode);
 		}
 
-		return getTextValue(jsonNode);
 	}
 
 	private List<ResourceURL> extractUrl(JsonNode resultNode) {
 		final JsonNode nodeUrl = resultNode.get(COMPUTATIONAL_URL_FIELD);
-		if (nodeUrl != null) {
-			try {
-				return mapper.readValue(nodeUrl.toString(), new TypeReference<List<ResourceURL>>() {
-				});
-			} catch (IOException e) {
-				log.warn("Cannot parse field {} for UUID {} in JSON", RESPONSE_NODE + "." + RESULT_NODE + "." +
-						COMPUTATIONAL_URL_FIELD, getUUID(), e);
-			}
+		return Optional.ofNullable(nodeUrl)
+				.map(this::getUrls)
+				.orElse(Collections.emptyList());
+	}
+
+	private List<ResourceURL> getUrls(JsonNode nodeUrl) {
+		try {
+			return mapper.readValue(nodeUrl.toString(), new TypeReference<List<ResourceURL>>() {
+			});
+		} catch (IOException e) {
+			log.warn("Cannot parse field {} for UUID {} in JSON", RESPONSE_NODE + "." + RESULT_NODE + "." +
+					COMPUTATIONAL_URL_FIELD, getUUID(), e);
 		}
 		return Collections.emptyList();
 	}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigure.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigure.java
index ca3ffa5..1838080 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigure.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigure.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
@@ -46,6 +50,8 @@
 	private CommandBuilder commandBuilder;
 	@Inject
 	private RESTService selfService;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
 	public String configure(String uuid, ComputationalBase<?> dto) {
 		switch (configuration.getCloudProvider()) {
@@ -104,7 +110,7 @@
 
 	private FileHandlerCallback getFileHandlerCallback(DockerAction action, String originalUuid, ComputationalBase<?>
 			dto) {
-		return new ComputationalConfigureCallbackHandler(selfService, action, originalUuid, dto);
+		return new ComputationalConfigureCallbackHandler(systemUserInfoService, selfService, action, originalUuid, dto);
 	}
 
 	private String nameContainer(String user, DockerAction action, String exploratoryName, String name) {
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigureCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigureCallbackHandler.java
index a68ca29..ba54317 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigureCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ComputationalConfigureCallbackHandler.java
@@ -1,25 +1,25 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
 import com.epam.dlab.dto.computational.ComputationalStatusDTO;
@@ -30,17 +30,21 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.databind.JsonNode;
 
+import java.time.Instant;
+import java.util.Date;
+
 public class ComputationalConfigureCallbackHandler extends ResourceCallbackHandler<ComputationalStatusDTO> {
 
 	@JsonProperty
 	private final ComputationalBase<?> dto;
 
 	@JsonCreator
-	public ComputationalConfigureCallbackHandler(@JacksonInject RESTService selfService,
+	public ComputationalConfigureCallbackHandler(@JacksonInject SystemUserInfoService systemUserInfoService,
+												 @JacksonInject RESTService selfService,
 												 @JsonProperty("action") DockerAction action,
 												 @JsonProperty("uuid") String uuid,
 												 @JsonProperty("dto") ComputationalBase<?> dto) {
-		super(selfService, dto.getCloudSettings().getIamUser(), uuid, action);
+		super(systemUserInfoService, selfService, dto.getCloudSettings().getIamUser(), uuid, action);
 		this.dto = dto;
 	}
 
@@ -54,6 +58,7 @@
 		return baseStatus
 				.withExploratoryName(dto.getExploratoryName())
 				.withComputationalName(dto.getComputationalName())
-				.withUptime(null);
+				.withUptime(null)
+				.withLastActivity(Date.from(Instant.now()));
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/EdgeCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/EdgeCallbackHandler.java
index e0bceaf..50dddea 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/EdgeCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/EdgeCallbackHandler.java
@@ -1,23 +1,25 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.base.edge.EdgeInfo;
@@ -38,13 +40,15 @@
 	private final Class<E> responseType;
 
 	@JsonCreator
-	public EdgeCallbackHandler(@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction action,
-							   @JsonProperty("uuid") String uuid, @JsonProperty("user") String user,
-							   @JsonProperty("callbackURI") String callbackURI,
-							   @JsonProperty("responseType") Class<E> responseType,
-							   @JsonProperty("resultType") Class<T> enclosingType) {
+	public EdgeCallbackHandler(
+			@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction action,
+			@JsonProperty("uuid") String uuid, @JsonProperty("user") String user,
+			@JsonProperty("callbackURI") String callbackURI,
+			@JsonProperty("responseType") Class<E> responseType,
+			@JsonProperty("resultType") Class<T> enclosingType) {
 
-		super(selfService, user, uuid, action, enclosingType);
+		super(systemUserInfoService, selfService, user, uuid, action, enclosingType);
 		this.callbackURI = callbackURI;
 		this.responseType = responseType;
 	}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryCallbackHandler.java
index 32b2bd2..9359ece 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryCallbackHandler.java
@@ -1,23 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.ResourceURL;
 import com.epam.dlab.dto.UserInstanceStatus;
@@ -39,62 +41,66 @@
 
 public class ExploratoryCallbackHandler extends ResourceCallbackHandler<ExploratoryStatusDTO> {
 	private static final Logger LOGGER = LoggerFactory.getLogger(ExploratoryCallbackHandler.class);
-	
-    private static final String INSTANCE_ID_FIELD = "instance_id";
-    private static final String EXPLORATORY_ID_FIELD = "notebook_name";
-    private static final String EXPLORATORY_PRIVATE_IP_FIELD = "ip";
-    private static final String EXPLORATORY_URL_FIELD = "exploratory_url";
-    private static final String EXPLORATORY_USER_FIELD = "exploratory_user";
-    private static final String EXPLORATORY_PASSWORD_FIELD = "exploratory_pass";
 
-    @JsonProperty
-    private final String exploratoryName;
+	private static final String INSTANCE_ID_FIELD = "instance_id";
+	private static final String EXPLORATORY_ID_FIELD = "notebook_name";
+	private static final String EXPLORATORY_PRIVATE_IP_FIELD = "ip";
+	private static final String EXPLORATORY_URL_FIELD = "exploratory_url";
+	private static final String EXPLORATORY_USER_FIELD = "exploratory_user";
+	private static final String EXPLORATORY_PASSWORD_FIELD = "exploratory_pass";
+
+	@JsonProperty
+	private final String exploratoryName;
 
 	@JsonCreator
-    public ExploratoryCallbackHandler(@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction action,
-									  @JsonProperty("uuid")String uuid, @JsonProperty("user") String user,
+	public ExploratoryCallbackHandler(@JacksonInject SystemUserInfoService systemUserInfoService,
+									  @JacksonInject RESTService selfService,
+									  @JsonProperty("action") DockerAction action,
+									  @JsonProperty("uuid") String uuid, @JsonProperty("user") String user,
 									  @JsonProperty("exploratoryName") String exploratoryName) {
-        super(selfService, user, uuid, action);
-        this.exploratoryName = exploratoryName;
-    }
+		super(systemUserInfoService, selfService, user, uuid, action);
+		this.exploratoryName = exploratoryName;
+	}
 
 	@Override
-    protected String getCallbackURI() {
-        return EXPLORATORY + STATUS_URI;
-    }
+	protected String getCallbackURI() {
+		return EXPLORATORY + STATUS_URI;
+	}
 
 	@Override
-    protected ExploratoryStatusDTO parseOutResponse(JsonNode resultNode, ExploratoryStatusDTO baseStatus) {
-    	if (resultNode == null) {
-    		return baseStatus;
-    	}
-    	final JsonNode nodeUrl = resultNode.get(EXPLORATORY_URL_FIELD);
+	protected ExploratoryStatusDTO parseOutResponse(JsonNode resultNode, ExploratoryStatusDTO baseStatus) {
+		if (resultNode == null) {
+			return baseStatus;
+		}
+		final JsonNode nodeUrl = resultNode.get(EXPLORATORY_URL_FIELD);
 		List<ResourceURL> url = null;
-    	if (nodeUrl != null) {
-    		try {
+		if (nodeUrl != null) {
+			try {
 				url = mapper.readValue(nodeUrl.toString(), new TypeReference<List<ResourceURL>>() {
 				});
 			} catch (IOException e) {
-				LOGGER.warn("Cannot parse field {} for UUID {} in JSON", RESPONSE_NODE + "." + RESULT_NODE + "." + EXPLORATORY_URL_FIELD, getUUID(), e);
+				LOGGER.warn("Cannot parse field {} for UUID {} in JSON",
+						RESPONSE_NODE + "." + RESULT_NODE + "." + EXPLORATORY_URL_FIELD, getUUID(), e);
 			}
-    	}
+		}
 
-    	String exploratoryId = getTextValue(resultNode.get(EXPLORATORY_ID_FIELD));
-    	if (getAction() == DockerAction.CREATE && exploratoryId == null) {
-            LOGGER.warn("Empty field {} for UUID {} in JSON", String.format("%s.%s.%s", RESPONSE_NODE, RESULT_NODE, EXPLORATORY_ID_FIELD), getUUID());
-        }
+		String exploratoryId = getTextValue(resultNode.get(EXPLORATORY_ID_FIELD));
+		if (getAction() == DockerAction.CREATE && exploratoryId == null) {
+			LOGGER.warn("Empty field {} for UUID {} in JSON", String.format("%s.%s.%s", RESPONSE_NODE, RESULT_NODE,
+					EXPLORATORY_ID_FIELD), getUUID());
+		}
 
-    	return baseStatus
-    			.withInstanceId(getTextValue(resultNode.get(INSTANCE_ID_FIELD)))
-                .withExploratoryId(exploratoryId)
-                .withExploratoryUrl(url)
-                .withPrivateIp(getTextValue(resultNode.get(EXPLORATORY_PRIVATE_IP_FIELD)))
-                .withExploratoryUser(getTextValue(resultNode.get(EXPLORATORY_USER_FIELD)))
-                .withExploratoryPassword(getTextValue(resultNode.get(EXPLORATORY_PASSWORD_FIELD)));
-    }
+		return baseStatus
+				.withInstanceId(getTextValue(resultNode.get(INSTANCE_ID_FIELD)))
+				.withExploratoryId(exploratoryId)
+				.withExploratoryUrl(url)
+				.withPrivateIp(getTextValue(resultNode.get(EXPLORATORY_PRIVATE_IP_FIELD)))
+				.withExploratoryUser(getTextValue(resultNode.get(EXPLORATORY_USER_FIELD)))
+				.withExploratoryPassword(getTextValue(resultNode.get(EXPLORATORY_PASSWORD_FIELD)));
+	}
 
-    @Override
-    protected ExploratoryStatusDTO getBaseStatusDTO(UserInstanceStatus status) {
-        return super.getBaseStatusDTO(status).withExploratoryName(exploratoryName);
-    }
+	@Override
+	protected ExploratoryStatusDTO getBaseStatusDTO(UserInstanceStatus status) {
+		return super.getBaseStatusDTO(status).withExploratoryName(exploratoryName);
+	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryGitCredsCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryGitCredsCallbackHandler.java
index 45b0785..4d07fbd 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryGitCredsCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ExploratoryGitCredsCallbackHandler.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.exploratory.ExploratoryStatusDTO;
@@ -34,12 +38,13 @@
 	private final String exploratoryName;
 
 	@JsonCreator
-	public ExploratoryGitCredsCallbackHandler(@JacksonInject RESTService selfService,
+	public ExploratoryGitCredsCallbackHandler(@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService,
 											  @JsonProperty("action") DockerAction action,
 											  @JsonProperty("uuid") String uuid,
 											  @JsonProperty("user") String user,
 											  @JsonProperty("exploratoryName") String exploratoryName) {
-		super(selfService, user, uuid, action);
+		super(systemUserInfoService, selfService, user, uuid, action);
 		this.exploratoryName = exploratoryName;
 	}
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ImageCreateCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ImageCreateCallbackHandler.java
index 4b2a5a9..cf905e1 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ImageCreateCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ImageCreateCallbackHandler.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.exploratory.ExploratoryImageDTO;
@@ -38,20 +42,24 @@
 	@JsonProperty
 	private final String exploratoryName;
 
-	public ImageCreateCallbackHandler(RESTService selfService, String uuid, DockerAction action,
-									  ExploratoryImageDTO image) {
-		super(selfService, image.getCloudSettings().getIamUser(), uuid, action);
+	public ImageCreateCallbackHandler(
+			SystemUserInfoService systemUserInfoService,
+			RESTService selfService, String uuid, DockerAction action,
+			ExploratoryImageDTO image) {
+		super(systemUserInfoService, selfService, image.getCloudSettings().getIamUser(), uuid, action);
 		this.imageName = image.getImageName();
 		this.exploratoryName = image.getExploratoryName();
 	}
 
 	@JsonCreator
-	private ImageCreateCallbackHandler(@JacksonInject RESTService selfService, @JsonProperty("uuid") String uuid,
-									  @JsonProperty("action") DockerAction action,
-									  @JsonProperty("user") String user,
-									  @JsonProperty("imageName") String imageName,
-									  @JsonProperty("exploratoryName") String exploratoryName) {
-		super(selfService, user, uuid, action);
+	private ImageCreateCallbackHandler(
+			@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService, @JsonProperty("uuid") String uuid,
+			@JsonProperty("action") DockerAction action,
+			@JsonProperty("user") String user,
+			@JsonProperty("imageName") String imageName,
+			@JsonProperty("exploratoryName") String exploratoryName) {
+		super(systemUserInfoService, selfService, user, uuid, action);
 		this.imageName = imageName;
 		this.exploratoryName = exploratoryName;
 	}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibInstallCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibInstallCallbackHandler.java
index d157b58..54406ba 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibInstallCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibInstallCallbackHandler.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.exploratory.LibInstallDTO;
@@ -67,11 +71,13 @@
 	 * @param dto         contains libraries to instal
 	 */
 	@JsonCreator
-	public LibInstallCallbackHandler(@JacksonInject RESTService selfService,
-									 @JsonProperty("action") DockerAction action,
-									 @JsonProperty("uuid") String uuid, @JsonProperty("user") String user,
-									 @JsonProperty("dto") LibraryInstallDTO dto) {
-		super(selfService, user, uuid, action);
+	public LibInstallCallbackHandler(
+			@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService,
+			@JsonProperty("action") DockerAction action,
+			@JsonProperty("uuid") String uuid, @JsonProperty("user") String user,
+			@JsonProperty("dto") LibraryInstallDTO dto) {
+		super(systemUserInfoService, selfService, user, uuid, action);
 		this.dto = dto;
 	}
 
@@ -83,14 +89,8 @@
 	@Override
 	protected LibInstallStatusDTO parseOutResponse(JsonNode resultNode, LibInstallStatusDTO status) {
 
-		if (UserInstanceStatus.FAILED == UserInstanceStatus.of(status.getStatus())) {
-			for (LibInstallDTO lib : dto.getLibs()) {
-				lib.withStatus(status.getStatus()).withErrorMessage(status.getErrorMessage());
-			}
-			return status.withLibs(dto.getLibs());
-		}
-		if (resultNode == null) {
-			throw new DlabException("Can't handle response result node is null");
+		if (UserInstanceStatus.FAILED == UserInstanceStatus.of(status.getStatus()) || resultNode == null) {
+			throw new DlabException("Can't handle response result node is null or response status is failed");
 		}
 
 		JsonNode nodeLibs = resultNode.get(LIBS);
@@ -98,8 +98,10 @@
 			throw new DlabException("Can't handle response without property " + LIBS_ABSOLUTE_PATH);
 		}
 		try {
-			status.withLibs(mapper.readValue(nodeLibs.toString(), new TypeReference<List<LibInstallDTO>>() {
-			}));
+			final List<LibInstallDTO> libs = mapper.readValue(nodeLibs.toString(),
+					new TypeReference<List<LibInstallDTO>>() {
+			});
+			status.withLibs(libs);
 		} catch (IOException e) {
 			log.warn("Can't parse field {} for UUID {} in JSON", LIBS_ABSOLUTE_PATH, getUUID(), e);
 		}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibListCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibListCallbackHandler.java
index 68757e4..fa38158 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibListCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/LibListCallbackHandler.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.exploratory.LibListStatusDTO;
@@ -58,10 +62,12 @@
 	 * @param imageName   the name of docker image.
 	 */
 	@JsonCreator
-	public LibListCallbackHandler(@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction action,
+	public LibListCallbackHandler(
+			@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction action,
 								  @JsonProperty("uuid") String uuid, @JsonProperty("user") String user,
 								  @JsonProperty("imageName") String imageName) {
-		super(selfService, user, uuid, action);
+		super(systemUserInfoService, selfService, user, uuid, action);
 		this.imageName = imageName;
 	}
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/PersistentFileHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/PersistentFileHandler.java
index 1182ba9..6cac2db 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/PersistentFileHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/PersistentFileHandler.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourceCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourceCallbackHandler.java
index 8070645..d207b35 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourceCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourceCallbackHandler.java
@@ -1,27 +1,29 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
-import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.StatusBaseDTO;
+import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.client.RESTService;
 import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -37,165 +39,178 @@
 import java.util.Date;
 
 public abstract class ResourceCallbackHandler<T extends StatusBaseDTO<?>> implements FileHandlerCallback {
-    private static final Logger log = LoggerFactory.getLogger(ResourceCallbackHandler.class);
-    final ObjectMapper mapper = new ObjectMapper().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true);
+	private static final Logger log = LoggerFactory.getLogger(ResourceCallbackHandler.class);
+	final ObjectMapper mapper = new ObjectMapper().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true);
 
-    private static final String STATUS_FIELD = "status";
-    protected static final String RESPONSE_NODE = "response";
-    protected static final String RESULT_NODE = "result";
-    private static final String ERROR_NODE = "error";
+	private static final String STATUS_FIELD = "status";
+	protected static final String RESPONSE_NODE = "response";
+	protected static final String RESULT_NODE = "result";
+	private static final String ERROR_NODE = "error";
 
-    private static final String OK_STATUS = "ok";
+	private static final String OK_STATUS = "ok";
 
-    @JsonIgnore
-    private final RESTService selfService;
-    @JsonProperty
-    private final String user;
-    @JsonProperty
-    private final String uuid;
-    @JsonProperty
-    private final DockerAction action;
-    @JsonProperty
-    private final Class<T> resultType;
+	@JsonIgnore
+	private final RESTService selfService;
+	@JsonIgnore
+	private final SystemUserInfoService systemUserInfoService;
+	@JsonProperty
+	private final String user;
+	@JsonProperty
+	private final String uuid;
+	@JsonProperty
+	private final DockerAction action;
+	@JsonProperty
+	private final Class<T> resultType;
 
-    @SuppressWarnings("unchecked")
-    public ResourceCallbackHandler(RESTService selfService, String user, String uuid, DockerAction action) {
-        this.selfService = selfService;
-        this.user = user;
-        this.uuid = uuid;
-        this.action = action;
-        this.resultType = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
-    }
+	@SuppressWarnings("unchecked")
+	public ResourceCallbackHandler(SystemUserInfoService systemUserInfoService, RESTService selfService, String user,
+								   String uuid, DockerAction action) {
+		this.systemUserInfoService = systemUserInfoService;
+		this.selfService = selfService;
+		this.user = user;
+		this.uuid = uuid;
+		this.action = action;
+		this.resultType =
+				(Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
+	}
 
-    public ResourceCallbackHandler(RESTService selfService, String user, String uuid, DockerAction action, Class<T> resultType) {
-        this.selfService = selfService;
-        this.user = user;
-        this.uuid = uuid;
-        this.action = action;
-        this.resultType = resultType;
-    }
+	public ResourceCallbackHandler(SystemUserInfoService systemUserInfoService, RESTService selfService, String user,
+								   String uuid,
+								   DockerAction action,
+								   Class<T> resultType) {
+		this.systemUserInfoService = systemUserInfoService;
+		this.selfService = selfService;
+		this.user = user;
+		this.uuid = uuid;
+		this.action = action;
+		this.resultType = resultType;
+	}
 
-    @Override
-    public String getUUID() {
-        return uuid;
-    }
+	@Override
+	public String getUUID() {
+		return uuid;
+	}
 
-    @Override
-    public boolean checkUUID(String uuid) {
-        return this.uuid.equals(uuid);
-    }
+	@Override
+	public boolean checkUUID(String uuid) {
+		return this.uuid.equals(uuid);
+	}
 
-    public String getUser() {
-        return user;
-    }
+	@Override
+	public String getUser() {
+		return user;
+	}
 
-    public DockerAction getAction() {
-        return action;
-    }
+	public DockerAction getAction() {
+		return action;
+	}
 
-    private void selfServicePost(T object) {
-        debugMessage("Send post request to self service {} for UUID {}, object is {}",
-                getCallbackURI(), uuid, object);
-        try {
-            selfService.post(getCallbackURI(), object, resultType);
-        } catch (Exception e) {
-            log.error("Send request or response error for UUID {}: {}", uuid, e.getLocalizedMessage(), e);
-            throw new DlabException("Send request or responce error for UUID " + uuid + ": " + e.getLocalizedMessage(), e);
-        }
-    }
+	private void selfServicePost(T object) {
+		debugMessage("Send post request to self service {} for UUID {}, object is {}",
+				getCallbackURI(), uuid, object);
+		try {
+			selfService.post(getCallbackURI(), systemUserInfoService.create(user).getAccessToken(), object,
+					resultType);
+		} catch (Exception e) {
+			log.error("Send request or response error for UUID {}: {}", uuid, e.getLocalizedMessage(), e);
+			throw new DlabException("Send request or responce error for UUID " + uuid + ": " + e.getLocalizedMessage()
+					, e);
+		}
+	}
 
-    @Override
-    public boolean handle(String fileName, byte[] content) throws Exception {
-        debugMessage("Got file {} while waiting for UUID {}, for action {}, docker response: {}",
-                fileName, uuid, action.name(), new String(content));
-        JsonNode document = mapper.readTree(content);
-        boolean success = isSuccess(document);
-        UserInstanceStatus status = calcStatus(action, success);
-        T result = getBaseStatusDTO(status);
+	@Override
+	public boolean handle(String fileName, byte[] content) throws Exception {
+		debugMessage("Got file {} while waiting for UUID {}, for action {}, docker response: {}",
+				fileName, uuid, action.name(), new String(content));
+		JsonNode document = mapper.readTree(content);
+		boolean success = isSuccess(document);
+		UserInstanceStatus status = calcStatus(action, success);
+		T result = getBaseStatusDTO(status);
 
-        JsonNode resultNode = document.get(RESPONSE_NODE).get(RESULT_NODE);
-        if (success) {
-            debugMessage("Did {} resource for user: {}, UUID: {}", action, user, uuid);
-        } else {
-            log.error("Could not {} resource for user: {}, UUID: {}", action, user, uuid);
-            result.setErrorMessage(getTextValue(resultNode.get(ERROR_NODE)));
-        }
-        result = parseOutResponse(resultNode, result);
+		JsonNode resultNode = document.get(RESPONSE_NODE).get(RESULT_NODE);
+		if (success) {
+			debugMessage("Did {} resource for user: {}, UUID: {}", action, user, uuid);
+		} else {
+			log.error("Could not {} resource for user: {}, UUID: {}", action, user, uuid);
+			result.setErrorMessage(getTextValue(resultNode.get(ERROR_NODE)));
+		}
+		result = parseOutResponse(resultNode, result);
 
-        selfServicePost(result);
-        return !UserInstanceStatus.FAILED.equals(status);
-    }
+		selfServicePost(result);
+		return !UserInstanceStatus.FAILED.equals(status);
+	}
 
-    @SuppressWarnings("unchecked")
-    @Override
-    public void handleError(String errorMessage) {
-        try {
-            selfServicePost((T) getBaseStatusDTO(UserInstanceStatus.FAILED)
-                    .withErrorMessage(errorMessage));
-        } catch (Exception t) {
-            throw new DlabException("Could not send error message to Self Service for UUID " + uuid + ", user " + user + ": " + errorMessage, t);
-        }
-    }
+	@SuppressWarnings("unchecked")
+	@Override
+	public void handleError(String errorMessage) {
+		try {
+			selfServicePost((T) getBaseStatusDTO(UserInstanceStatus.FAILED)
+					.withErrorMessage(errorMessage));
+		} catch (Exception t) {
+			throw new DlabException("Could not send error message to Self Service for UUID " + uuid + ", user " + user + ": " + errorMessage, t);
+		}
+	}
 
-    protected abstract String getCallbackURI();
+	protected abstract String getCallbackURI();
 
-    protected abstract T parseOutResponse(JsonNode document, T baseStatus);
+	protected abstract T parseOutResponse(JsonNode document, T baseStatus);
 
-    @SuppressWarnings("unchecked")
-    protected T getBaseStatusDTO(UserInstanceStatus status) {
-        try {
-            return (T) resultType.newInstance()
-                    .withRequestId(uuid)
-                    .withUser(user)
-                    .withStatus(status)
-                    .withUptime(getUptime(status));
-        } catch (Exception t) {
-            throw new DlabException("Something went wrong", t);
-        }
-    }
+	@SuppressWarnings("unchecked")
+	protected T getBaseStatusDTO(UserInstanceStatus status) {
+		try {
+			return (T) resultType.newInstance()
+					.withRequestId(uuid)
+					.withUser(user)
+					.withStatus(status)
+					.withUptime(getUptime(status));
+		} catch (Exception t) {
+			throw new DlabException("Something went wrong", t);
+		}
+	}
 
-    private boolean isSuccess(JsonNode document) {
-        return OK_STATUS.equals(document.get(STATUS_FIELD).textValue());
-    }
+	private boolean isSuccess(JsonNode document) {
+		return OK_STATUS.equals(document.get(STATUS_FIELD).textValue());
+	}
 
-    private UserInstanceStatus calcStatus(DockerAction action, boolean success) {
-        if (success) {
-            switch (action) {
-                case STATUS:
-                case GIT_CREDS:
-                case LIB_LIST:
-                case LIB_INSTALL:
-                case CREATE_IMAGE:
-                    return UserInstanceStatus.CREATED; // Any status besides failed
-                case CREATE:
-                case CONFIGURE:
-                case START:
-                    return UserInstanceStatus.RUNNING;
-                case STOP:
-                    return UserInstanceStatus.STOPPED;
-                case TERMINATE:
-                    return UserInstanceStatus.TERMINATED;
-                default:
-                    break;
-            }
-        }
-        return UserInstanceStatus.FAILED;
-    }
+	private UserInstanceStatus calcStatus(DockerAction action, boolean success) {
+		if (success) {
+			switch (action) {
+				case STATUS:
+				case GIT_CREDS:
+				case LIB_LIST:
+				case LIB_INSTALL:
+				case CREATE_IMAGE:
+					return UserInstanceStatus.CREATED; // Any status besides failed
+				case CREATE:
+				case CONFIGURE:
+				case START:
+				case RECONFIGURE_SPARK:
+					return UserInstanceStatus.RUNNING;
+				case STOP:
+					return UserInstanceStatus.STOPPED;
+				case TERMINATE:
+					return UserInstanceStatus.TERMINATED;
+				default:
+					break;
+			}
+		}
+		return UserInstanceStatus.FAILED;
+	}
 
-    protected Date getUptime(UserInstanceStatus status) {
-        return UserInstanceStatus.RUNNING == status ? Date.from(Instant.now()) : null;
-    }
+	protected Date getUptime(UserInstanceStatus status) {
+		return UserInstanceStatus.RUNNING == status ? Date.from(Instant.now()) : null;
+	}
 
-    protected String getTextValue(JsonNode jsonNode) {
-        return jsonNode != null ? jsonNode.textValue() : null;
-    }
+	protected String getTextValue(JsonNode jsonNode) {
+		return jsonNode != null ? jsonNode.textValue() : null;
+	}
 
-    private void debugMessage(String format, Object... arguments) {
-        if (action == DockerAction.STATUS) {
-            log.trace(format, arguments);
-        } else {
-            log.debug(format, arguments);
-        }
-    }
+	private void debugMessage(String format, Object... arguments) {
+		if (action == DockerAction.STATUS) {
+			log.trace(format, arguments);
+		} else {
+			log.debug(format, arguments);
+		}
+	}
 
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourcesStatusCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourcesStatusCallbackHandler.java
index c54076a..5f04882 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourcesStatusCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ResourcesStatusCallbackHandler.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.status.EnvResourceList;
 import com.epam.dlab.dto.status.EnvStatusDTO;
@@ -39,9 +43,11 @@
 public class ResourcesStatusCallbackHandler extends ResourceCallbackHandler<EnvStatusDTO> {
 
 	@JsonCreator
-	public ResourcesStatusCallbackHandler(@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction
-			action, @JsonProperty("uuid") String uuid, @JsonProperty("user") String user) {
-		super(selfService, user, uuid, action);
+	public ResourcesStatusCallbackHandler(
+			@JacksonInject SystemUserInfoService systemUserInfoService,
+			@JacksonInject RESTService selfService, @JsonProperty("action") DockerAction
+					action, @JsonProperty("uuid") String uuid, @JsonProperty("user") String user) {
+		super(systemUserInfoService, selfService, user, uuid, action);
 	}
 
 	@Override
@@ -60,7 +66,7 @@
 			resourceList = mapper.readValue(resultNode.toString(), EnvResourceList.class);
 		} catch (IOException e) {
 			throw new DlabException("Docker response for UUID " + getUUID() + " not valid: " + e.getLocalizedMessage()
-                    , e);
+					, e);
 		}
 
 		baseStatus.withResourceList(resourceList)
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ReuploadKeyCallbackHandler.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ReuploadKeyCallbackHandler.java
index 7e9a6b7..7ae47c5 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ReuploadKeyCallbackHandler.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/ReuploadKeyCallbackHandler.java
@@ -1,5 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.core.response.handlers;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyCallbackDTO;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyStatus;
@@ -27,6 +46,7 @@
 	@JsonProperty
 	private final ReuploadKeyCallbackDTO dto;
 	private final RESTService selfService;
+	private final SystemUserInfoService systemUserInfoService;
 	@JsonProperty
 	private final String callbackUrl;
 	@JsonProperty
@@ -34,10 +54,12 @@
 
 	@JsonCreator
 	public ReuploadKeyCallbackHandler(@JacksonInject RESTService selfService,
+									  @JacksonInject SystemUserInfoService systemUserInfoService,
 									  @JsonProperty("callbackUrl") String callbackUrl,
 									  @JsonProperty("user") String user,
 									  @JsonProperty("dto") ReuploadKeyCallbackDTO dto) {
 		this.selfService = selfService;
+		this.systemUserInfoService = systemUserInfoService;
 		this.uuid = dto.getId();
 		this.callbackUrl = callbackUrl;
 		this.user = user;
@@ -75,7 +97,8 @@
 	private void selfServicePost(ReuploadKeyStatusDTO statusDTO) {
 		log.debug("Send post request to self service for UUID {}, object is {}", uuid, statusDTO);
 		try {
-			selfService.post(callbackUrl, statusDTO, Response.class);
+			selfService.post(callbackUrl, systemUserInfoService.create(user).getAccessToken(), statusDTO,
+					Response.class);
 		} catch (Exception e) {
 			log.error("Send request or response error for UUID {}: {}", uuid, e.getLocalizedMessage(), e);
 			throw new DlabException("Send request or response error for UUID " + uuid + ": "
@@ -89,6 +112,11 @@
 				.withErrorMessage(errorMessage);
 	}
 
+	@Override
+	public String getUser() {
+		return user;
+	}
+
 	private ReuploadKeyStatusDTO buildReuploadKeyStatusDto(ReuploadKeyStatus status) {
 		return new ReuploadKeyStatusDTO()
 				.withRequestId(uuid)
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/CallbackHandlerDao.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/CallbackHandlerDao.java
index 7fcdc6a..02fccfa 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/CallbackHandlerDao.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/CallbackHandlerDao.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers.dao;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
index 77bcbf1..846e0d7 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers.dao;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AwsProvisioningModule.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AwsProvisioningModule.java
index 99298ef..70e7966 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AwsProvisioningModule.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AwsProvisioningModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AzureProvisioningModule.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AzureProvisioningModule.java
index d0f4e28..3a2cdcc 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AzureProvisioningModule.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/AzureProvisioningModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/CloudModuleConfigurator.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/CloudModuleConfigurator.java
index 18f20e3..aa86fd6 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/CloudModuleConfigurator.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/CloudModuleConfigurator.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/GcpProvisioningModule.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/GcpProvisioningModule.java
index e046075..4553592 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/GcpProvisioningModule.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/GcpProvisioningModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
index 0d9db68..2141d2d 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index 4cad80e..95ecc8f 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.modules;
 
@@ -28,6 +29,8 @@
 import com.epam.dlab.backendapi.core.commands.ICommandExecutor;
 import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
 import com.epam.dlab.backendapi.core.response.handlers.dao.FileSystemCallbackHandlerDao;
+import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
+import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.mongo.MongoService;
 import com.epam.dlab.rest.client.RESTService;
@@ -68,5 +71,6 @@
 		bind(MongoService.class).toInstance(configuration.getMongoFactory().build(environment));
 		bind(ObjectMapper.class).toInstance(new ObjectMapper().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true));
 		bind(CallbackHandlerDao.class).to(FileSystemCallbackHandlerDao.class);
+		bind(RestoreCallbackHandlerService.class).to(RestoreCallbackHandlerServiceImpl.class);
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProvisioningDevModule.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProvisioningDevModule.java
index 9da7c7f..c7721fe 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProvisioningDevModule.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProvisioningDevModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
@@ -29,13 +32,14 @@
 import com.epam.dlab.backendapi.core.commands.ICommandExecutor;
 import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
 import com.epam.dlab.backendapi.core.response.handlers.dao.FileSystemCallbackHandlerDao;
+import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
+import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.mongo.MongoService;
 import com.epam.dlab.rest.client.RESTService;
 import com.epam.dlab.rest.contracts.DockerAPI;
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.inject.Inject;
 import com.google.inject.name.Names;
 import io.dropwizard.setup.Environment;
 
@@ -73,11 +77,13 @@
 		bind(MongoService.class).toInstance(configuration.getMongoFactory().build(environment));
 		bind(ObjectMapper.class).toInstance(new ObjectMapper().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true));
 		bind(CallbackHandlerDao.class).to(FileSystemCallbackHandlerDao.class);
+		bind(RestoreCallbackHandlerService.class).to(RestoreCallbackHandlerServiceImpl.class);
 	}
 
 	/**
 	 * Creates and returns the mock object for authentication service.
 	 */
+	@SuppressWarnings("unchecked")
 	private RESTService createAuthenticationService() {
 		return new RESTService() {
 			@Override
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java
index 9601b58..dfe33a4 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.core.commands.ICommandExecutor;
@@ -51,12 +55,14 @@
 	protected ICommandExecutor commandExecutor;
 	@Inject
 	protected RESTService selfService;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
 
 	@POST
 	public Response createBackup(@Auth UserInfo ui, EnvBackupDTO dto) {
 		folderListenerExecutor.start(configuration.getBackupDirectory(), configuration.getProcessTimeout(),
-				new BackupCallbackHandler(selfService, ApiCallbacks.BACKUP_URI, ui.getName(), dto));
+				new BackupCallbackHandler(systemUserInfoService, selfService, ApiCallbacks.BACKUP_URI, ui.getName(), dto));
 		String command = new PythonBackupCommand(configuration.getBackupScriptPath())
 				.withConfig(dto.getConfigFiles())
 				.withJars(dto.getJars())
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/CallbackHandlerResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/CallbackHandlerResource.java
new file mode 100644
index 0000000..804b109
--- /dev/null
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/CallbackHandlerResource.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
+import com.google.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+
+@Path("/handler")
+@Slf4j
+public class CallbackHandlerResource {
+	private final RestoreCallbackHandlerService restoreCallbackHandlerService;
+
+	@Inject
+	public CallbackHandlerResource(RestoreCallbackHandlerService restoreCallbackHandlerService) {
+		this.restoreCallbackHandlerService = restoreCallbackHandlerService;
+	}
+
+	@POST
+	@Path("/restore")
+	public Response restoreHandlers() {
+		restoreCallbackHandlerService.restore();
+		return Response.ok().build();
+	}
+}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/DockerResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/DockerResource.java
index a528906..5f6bbc6 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/DockerResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/DockerResource.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources;
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/GitExploratoryResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/GitExploratoryResource.java
index c7a710a..6b80776 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/GitExploratoryResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/GitExploratoryResource.java
@@ -1,33 +1,37 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
-import com.epam.dlab.backendapi.core.commands.*;
-import com.epam.dlab.backendapi.core.response.handlers.ExploratoryGitCredsCallbackHandler;
-import com.epam.dlab.backendapi.service.DockerService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
+import com.epam.dlab.backendapi.core.commands.DockerCommands;
+import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
+import com.epam.dlab.backendapi.core.response.handlers.ExploratoryGitCredsCallbackHandler;
+import com.epam.dlab.backendapi.service.impl.DockerService;
 import com.epam.dlab.dto.exploratory.ExploratoryBaseDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsUpdateDTO;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
@@ -43,44 +47,48 @@
 @Slf4j
 public class GitExploratoryResource extends DockerService implements DockerCommands {
 
-    @Path("/git_creds")
-    @POST
-    public String gitCredsUpdate(@Auth UserInfo ui, ExploratoryGitCredsUpdateDTO dto) throws JsonProcessingException {
-        return action(ui.getName(), dto, DockerAction.GIT_CREDS);
-    }
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
-    private String action(String username, ExploratoryBaseDTO<?> dto, DockerAction action) throws JsonProcessingException {
-        log.debug("{} exploratory environment", action);
-        String uuid = DockerCommands.generateUUID();
-        folderListenerExecutor.start(configuration.getImagesDirectory(),
-                configuration.getResourceStatusPollTimeout(),
-                getFileHandlerCallback(action, uuid, dto));
+	@Path("/git_creds")
+	@POST
+	public String gitCredsUpdate(@Auth UserInfo ui, ExploratoryGitCredsUpdateDTO dto) throws JsonProcessingException {
+		return action(ui.getName(), dto, DockerAction.GIT_CREDS);
+	}
 
-        RunDockerCommand runDockerCommand = new RunDockerCommand()
-                .withInteractive()
-                .withName(nameContainer(dto.getEdgeUserName(), action, dto.getExploratoryName()))
-                .withVolumeForRootKeys(configuration.getKeyDirectory())
-                .withVolumeForResponse(configuration.getImagesDirectory())
-                .withVolumeForLog(configuration.getDockerLogDirectory(), getResourceType())
-                .withResource(getResourceType())
-                .withRequestId(uuid)
-                .withConfKeyName(configuration.getAdminKey())
-                .withImage(dto.getNotebookImage())
-                .withAction(action);
+	private String action(String username, ExploratoryBaseDTO<?> dto, DockerAction action) throws JsonProcessingException {
+		log.debug("{} exploratory environment", action);
+		String uuid = DockerCommands.generateUUID();
+		folderListenerExecutor.start(configuration.getImagesDirectory(),
+				configuration.getResourceStatusPollTimeout(),
+				getFileHandlerCallback(action, uuid, dto));
 
-        commandExecutor.executeAsync(username, uuid, commandBuilder.buildCommand(runDockerCommand, dto));
-        return uuid;
-    }
+		RunDockerCommand runDockerCommand = new RunDockerCommand()
+				.withInteractive()
+				.withName(nameContainer(dto.getEdgeUserName(), action, dto.getExploratoryName()))
+				.withVolumeForRootKeys(configuration.getKeyDirectory())
+				.withVolumeForResponse(configuration.getImagesDirectory())
+				.withVolumeForLog(configuration.getDockerLogDirectory(), getResourceType())
+				.withResource(getResourceType())
+				.withRequestId(uuid)
+				.withConfKeyName(configuration.getAdminKey())
+				.withImage(dto.getNotebookImage())
+				.withAction(action);
 
-    private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ExploratoryBaseDTO<?> dto) {
-        return new ExploratoryGitCredsCallbackHandler(selfService, action, uuid, dto.getCloudSettings().getIamUser(), dto.getExploratoryName());
-    }
+		commandExecutor.executeAsync(username, uuid, commandBuilder.buildCommand(runDockerCommand, dto));
+		return uuid;
+	}
 
-    private String nameContainer(String user, DockerAction action, String name) {
-        return nameContainer(user, action.toString(), "exploratory", name);
-    }
+	private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ExploratoryBaseDTO<?> dto) {
+		return new ExploratoryGitCredsCallbackHandler(systemUserInfoService, selfService, action, uuid,
+				dto.getCloudSettings().getIamUser(), dto.getExploratoryName());
+	}
 
-    public String getResourceType() {
-        return Directories.NOTEBOOK_LOG_DIRECTORY;
-    }
+	private String nameContainer(String user, DockerAction action, String name) {
+		return nameContainer(user, action.toString(), "exploratory", name);
+	}
+
+	public String getResourceType() {
+		return Directories.NOTEBOOK_LOG_DIRECTORY;
+	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ImageResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ImageResource.java
index cd0109c..9e71466 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ImageResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ImageResource.java
@@ -1,31 +1,36 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.backendapi.core.commands.DockerCommands;
 import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
 import com.epam.dlab.backendapi.core.response.handlers.ImageCreateCallbackHandler;
-import com.epam.dlab.backendapi.service.DockerService;
+import com.epam.dlab.backendapi.service.impl.DockerService;
 import com.epam.dlab.dto.exploratory.ExploratoryImageDTO;
 import com.epam.dlab.rest.contracts.ExploratoryAPI;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
@@ -42,12 +47,15 @@
 @Slf4j
 public class ImageResource extends DockerService implements DockerCommands {
 
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
+
 	@POST
 	public Response createImage(@Auth UserInfo ui, ExploratoryImageDTO image) throws JsonProcessingException {
 		final String uuid = DockerCommands.generateUUID();
 
 		folderListenerExecutor.start(configuration.getImagesDirectory(), configuration.getResourceStatusPollTimeout(),
-				new ImageCreateCallbackHandler(selfService, uuid,
+				new ImageCreateCallbackHandler(systemUserInfoService, selfService, uuid,
 						DockerAction.CREATE_IMAGE, image));
 		String command = commandBuilder.buildCommand(getDockerCommand(DockerAction.CREATE_IMAGE, uuid, image), image);
 		commandExecutor.executeAsync(ui.getName(), uuid, command);
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureResource.java
index 2e2e8fa..8f1aadf 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureResource.java
@@ -1,37 +1,45 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.core.commands.DockerAction;
+import com.epam.dlab.backendapi.service.impl.CheckInactivityService;
+import com.epam.dlab.dto.status.EnvResource;
 import com.epam.dlab.rest.contracts.InfrasctructureAPI;
+import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
+import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.List;
 
 @Path(InfrasctructureAPI.INFRASTRUCTURE)
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
 public class InfrastructureResource {
 
+	@Inject
+	private CheckInactivityService checkInactivityService;
+
 	/**
 	 * Return status of provisioning service.
 	 */
@@ -40,4 +48,9 @@
 		return Response.status(Response.Status.OK).build();
 	}
 
+	@POST
+	@Path("check_inactivity")
+	public String checkClusterInactivity(@Auth UserInfo ui, List<EnvResource> resources) {
+		return checkInactivityService.checkClusterAction(ui.getName(), resources, DockerAction.CHECK_INACTIVITY);
+	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/LibraryResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/LibraryResource.java
index 84c7f0e..23a0faa 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/LibraryResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/LibraryResource.java
@@ -1,29 +1,34 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
-import com.epam.dlab.backendapi.core.commands.*;
+import com.epam.dlab.backendapi.core.commands.DockerAction;
+import com.epam.dlab.backendapi.core.commands.DockerCommands;
+import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
 import com.epam.dlab.backendapi.core.response.handlers.LibInstallCallbackHandler;
 import com.epam.dlab.backendapi.core.response.handlers.LibListCallbackHandler;
-import com.epam.dlab.backendapi.service.DockerService;
-import com.epam.dlab.backendapi.core.commands.DockerAction;
+import com.epam.dlab.backendapi.service.impl.DockerService;
 import com.epam.dlab.dto.LibListComputationalDTO;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.exploratory.ExploratoryActionDTO;
@@ -32,6 +37,7 @@
 import com.epam.dlab.rest.contracts.ComputationalAPI;
 import com.epam.dlab.rest.contracts.ExploratoryAPI;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
@@ -47,129 +53,136 @@
 @Slf4j
 public class LibraryResource extends DockerService implements DockerCommands {
 
-    @POST
-    @Path(ExploratoryAPI.EXPLORATORY + "/lib_list")
-    public String getLibList(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
-        return actionExploratory(ui.getName(), dto, DockerAction.LIB_LIST);
-    }
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
-    @POST
-    @Path(ExploratoryAPI.EXPLORATORY + "/lib_install")
-    public String libInstall(@Auth UserInfo ui, LibraryInstallDTO dto) throws JsonProcessingException {
-        return actionExploratory(ui.getName(), dto, DockerAction.LIB_INSTALL);
-    }
+	@POST
+	@Path(ExploratoryAPI.EXPLORATORY + "/lib_list")
+	public String getLibList(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
+		return actionExploratory(ui.getName(), dto, DockerAction.LIB_LIST);
+	}
 
-    @POST
-    @Path(ComputationalAPI.COMPUTATIONAL + "/lib_list")
-    public String getLibList(@Auth UserInfo ui, LibListComputationalDTO dto) throws JsonProcessingException {
-        return actionComputational(ui.getName(), dto, DockerAction.LIB_LIST);
-    }
+	@POST
+	@Path(ExploratoryAPI.EXPLORATORY + "/lib_install")
+	public String libInstall(@Auth UserInfo ui, LibraryInstallDTO dto) throws JsonProcessingException {
+		return actionExploratory(ui.getName(), dto, DockerAction.LIB_INSTALL);
+	}
 
-    @POST
-    @Path(ComputationalAPI.COMPUTATIONAL + "/lib_install")
-    public String getLibList(@Auth UserInfo ui, LibraryInstallDTO dto) throws JsonProcessingException {
-        return actionComputational(ui.getName(), dto, DockerAction.LIB_INSTALL);
-    }
+	@POST
+	@Path(ComputationalAPI.COMPUTATIONAL + "/lib_list")
+	public String getLibList(@Auth UserInfo ui, LibListComputationalDTO dto) throws JsonProcessingException {
+		return actionComputational(ui.getName(), dto, DockerAction.LIB_LIST);
+	}
 
-    private String actionExploratory(String username, ExploratoryBaseDTO<?> dto, DockerAction action) throws JsonProcessingException {
-        log.debug("{} user {} exploratory environment {}", action, username, dto);
-        String uuid = DockerCommands.generateUUID();
-        folderListenerExecutor.start(configuration.getImagesDirectory(),
-                configuration.getResourceStatusPollTimeout(),
-                getFileHandlerCallbackExploratory(action, uuid, dto));
+	@POST
+	@Path(ComputationalAPI.COMPUTATIONAL + "/lib_install")
+	public String getLibList(@Auth UserInfo ui, LibraryInstallDTO dto) throws JsonProcessingException {
+		return actionComputational(ui.getName(), dto, DockerAction.LIB_INSTALL);
+	}
 
-        RunDockerCommand runDockerCommand = getDockerCommandExploratory(dto, action, uuid);
+	private String actionExploratory(String username, ExploratoryBaseDTO<?> dto, DockerAction action) throws JsonProcessingException {
+		log.debug("{} user {} exploratory environment {}", action, username, dto);
+		String uuid = DockerCommands.generateUUID();
+		folderListenerExecutor.start(configuration.getImagesDirectory(),
+				configuration.getResourceStatusPollTimeout(),
+				getFileHandlerCallbackExploratory(action, uuid, dto));
 
-        commandExecutor.executeAsync(username, uuid, commandBuilder.buildCommand(runDockerCommand, dto));
-        return uuid;
-    }
+		RunDockerCommand runDockerCommand = getDockerCommandExploratory(dto, action, uuid);
 
-    private String actionComputational(String username, ExploratoryActionDTO<?> dto, DockerAction action) throws JsonProcessingException {
-        log.debug("{} user {} exploratory environment {}", action, username, dto);
-        String uuid = DockerCommands.generateUUID();
-        folderListenerExecutor.start(configuration.getImagesDirectory(),
-                configuration.getResourceStatusPollTimeout(),
-                getFileHandlerCallbackComputational(action, uuid, dto));
+		commandExecutor.executeAsync(username, uuid, commandBuilder.buildCommand(runDockerCommand, dto));
+		return uuid;
+	}
 
-        RunDockerCommand runDockerCommand = getDockerCommandComputational(dto, action, uuid);
+	private String actionComputational(String username, ExploratoryActionDTO<?> dto, DockerAction action) throws JsonProcessingException {
+		log.debug("{} user {} exploratory environment {}", action, username, dto);
+		String uuid = DockerCommands.generateUUID();
+		folderListenerExecutor.start(configuration.getImagesDirectory(),
+				configuration.getResourceStatusPollTimeout(),
+				getFileHandlerCallbackComputational(action, uuid, dto));
 
-        commandExecutor.executeAsync(username, uuid, commandBuilder.buildCommand(runDockerCommand, dto));
-        return uuid;
-    }
+		RunDockerCommand runDockerCommand = getDockerCommandComputational(dto, action, uuid);
 
-    private RunDockerCommand getDockerCommandExploratory(ExploratoryBaseDTO<?> dto, DockerAction action, String uuid) {
-        return getDockerCommand(action, uuid)
-                .withName(nameContainer(dto.getEdgeUserName(), action.toString(), "exploratory", dto.getExploratoryName()))
-                .withVolumeForLog(configuration.getDockerLogDirectory(), getResourceType())
-                .withResource(getResourceType())
-                .withImage(dto.getNotebookImage());
-    }
+		commandExecutor.executeAsync(username, uuid, commandBuilder.buildCommand(runDockerCommand, dto));
+		return uuid;
+	}
 
-    private RunDockerCommand getDockerCommandComputational(ExploratoryActionDTO<?> dto, DockerAction action, String uuid) {
-        RunDockerCommand runDockerCommand = getDockerCommand(action, uuid);
-        if (dto instanceof LibraryInstallDTO) {
-            LibraryInstallDTO newDTO = (LibraryInstallDTO) dto;
-            runDockerCommand.withName(nameContainer(dto.getEdgeUserName(), action.toString(),
-                    "computational", newDTO.getComputationalId()))
-                    .withVolumeForLog(configuration.getDockerLogDirectory(),
-                            DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
-                    .withResource(DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
+	private RunDockerCommand getDockerCommandExploratory(ExploratoryBaseDTO<?> dto, DockerAction action, String uuid) {
+		return getDockerCommand(action, uuid)
+				.withName(nameContainer(dto.getEdgeUserName(), action.toString(), "exploratory",
+						dto.getExploratoryName()))
+				.withVolumeForLog(configuration.getDockerLogDirectory(), getResourceType())
+				.withResource(getResourceType())
+				.withImage(dto.getNotebookImage());
+	}
 
-                    .withImage(newDTO.getComputationalImage());
+	private RunDockerCommand getDockerCommandComputational(ExploratoryActionDTO<?> dto, DockerAction action,
+														   String uuid) {
+		RunDockerCommand runDockerCommand = getDockerCommand(action, uuid);
+		if (dto instanceof LibraryInstallDTO) {
+			LibraryInstallDTO newDTO = (LibraryInstallDTO) dto;
+			runDockerCommand.withName(nameContainer(dto.getEdgeUserName(), action.toString(),
+					"computational", newDTO.getComputationalId()))
+					.withVolumeForLog(configuration.getDockerLogDirectory(),
+							DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
+					.withResource(DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
 
-        } else {
-            LibListComputationalDTO newDTO = (LibListComputationalDTO) dto;
+					.withImage(newDTO.getComputationalImage());
 
-            runDockerCommand.withName(nameContainer(dto.getEdgeUserName(), action.toString(),
-                    "computational", newDTO.getComputationalId()))
-                    .withVolumeForLog(configuration.getDockerLogDirectory(),
-                            DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
-                    .withResource(DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
-                    .withImage(newDTO.getComputationalImage());
+		} else {
+			LibListComputationalDTO newDTO = (LibListComputationalDTO) dto;
 
-        }
-        return runDockerCommand;
-    }
+			runDockerCommand.withName(nameContainer(dto.getEdgeUserName(), action.toString(),
+					"computational", newDTO.getComputationalId()))
+					.withVolumeForLog(configuration.getDockerLogDirectory(),
+							DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
+					.withResource(DataEngineType.fromDockerImageName(newDTO.getComputationalImage()).getName())
+					.withImage(newDTO.getComputationalImage());
 
-    private RunDockerCommand getDockerCommand(DockerAction action, String uuid) {
-        return new RunDockerCommand()
-                .withInteractive()
-                .withVolumeForRootKeys(configuration.getKeyDirectory())
-                .withVolumeForResponse(configuration.getImagesDirectory())
-                .withRequestId(uuid)
-                .withConfKeyName(configuration.getAdminKey())
-                .withAction(action);
-    }
+		}
+		return runDockerCommand;
+	}
 
-    private FileHandlerCallback getFileHandlerCallbackExploratory(DockerAction action, String uuid,
-                                                                  ExploratoryBaseDTO<?> dto) {
-        switch (action) {
-            case LIB_INSTALL:
-                return new LibInstallCallbackHandler(selfService, action, uuid, dto.getCloudSettings().getIamUser(),
-                        (LibraryInstallDTO) dto);
-            case LIB_LIST:
-                return new LibListCallbackHandler(selfService, DockerAction.LIB_LIST, uuid,
-                        dto.getCloudSettings().getIamUser(), dto.getNotebookImage());
-            default:
-                throw new IllegalArgumentException("Unknown action " + action);
-        }
-    }
+	private RunDockerCommand getDockerCommand(DockerAction action, String uuid) {
+		return new RunDockerCommand()
+				.withInteractive()
+				.withVolumeForRootKeys(configuration.getKeyDirectory())
+				.withVolumeForResponse(configuration.getImagesDirectory())
+				.withRequestId(uuid)
+				.withConfKeyName(configuration.getAdminKey())
+				.withAction(action);
+	}
 
-    private FileHandlerCallback getFileHandlerCallbackComputational(DockerAction action, String uuid, ExploratoryBaseDTO<?> dto) {
-        switch (action) {
-            case LIB_LIST:
-                return new LibListCallbackHandler(selfService, action, uuid,
-                        dto.getCloudSettings().getIamUser(), ((LibListComputationalDTO) dto).getLibCacheKey());
-            case LIB_INSTALL:
-                return new LibInstallCallbackHandler(selfService, action, uuid,
-                        dto.getCloudSettings().getIamUser(), ((LibraryInstallDTO) dto));
+	private FileHandlerCallback getFileHandlerCallbackExploratory(DockerAction action, String uuid,
+																  ExploratoryBaseDTO<?> dto) {
+		switch (action) {
+			case LIB_INSTALL:
+				return new LibInstallCallbackHandler(systemUserInfoService, selfService, action, uuid,
+						dto.getCloudSettings().getIamUser(),
+						(LibraryInstallDTO) dto);
+			case LIB_LIST:
+				return new LibListCallbackHandler(systemUserInfoService, selfService, DockerAction.LIB_LIST, uuid,
+						dto.getCloudSettings().getIamUser(), dto.getNotebookImage());
+			default:
+				throw new IllegalArgumentException("Unknown action " + action);
+		}
+	}
 
-            default:
-                throw new IllegalArgumentException("Unknown action " + action);
-        }
-    }
+	private FileHandlerCallback getFileHandlerCallbackComputational(DockerAction action, String uuid,
+																	ExploratoryBaseDTO<?> dto) {
+		switch (action) {
+			case LIB_LIST:
+				return new LibListCallbackHandler(systemUserInfoService, selfService, action, uuid,
+						dto.getCloudSettings().getIamUser(), ((LibListComputationalDTO) dto).getLibCacheKey());
+			case LIB_INSTALL:
+				return new LibInstallCallbackHandler(systemUserInfoService, selfService, action, uuid,
+						dto.getCloudSettings().getIamUser(), ((LibraryInstallDTO) dto));
 
-    public String getResourceType() {
-        return Directories.NOTEBOOK_LOG_DIRECTORY;
-    }
+			default:
+				throw new IllegalArgumentException("Unknown action " + action);
+		}
+	}
+
+	public String getResourceType() {
+		return Directories.NOTEBOOK_LOG_DIRECTORY;
+	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
index aa35a28..a5848e1 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.aws;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
@@ -24,13 +28,14 @@
 import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
 import com.epam.dlab.backendapi.core.response.handlers.ComputationalCallbackHandler;
 import com.epam.dlab.backendapi.core.response.handlers.ComputationalConfigure;
-import com.epam.dlab.backendapi.service.DockerService;
-import com.epam.dlab.backendapi.service.SparkClusterService;
+import com.epam.dlab.backendapi.service.impl.DockerService;
+import com.epam.dlab.backendapi.service.impl.SparkClusterService;
 import com.epam.dlab.dto.aws.computational.AwsComputationalTerminateDTO;
 import com.epam.dlab.dto.aws.computational.ComputationalCreateAws;
 import com.epam.dlab.dto.aws.computational.SparkComputationalCreateAws;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
+import com.epam.dlab.dto.computational.ComputationalClusterConfigDTO;
 import com.epam.dlab.dto.computational.ComputationalStartDTO;
 import com.epam.dlab.dto.computational.ComputationalStopDTO;
 import com.epam.dlab.exceptions.DlabException;
@@ -60,6 +65,8 @@
 	private ComputationalConfigure computationalConfigure;
 	@Inject
 	private SparkClusterService sparkClusterService;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
 	@POST
 	@Path(ComputationalAPI.COMPUTATIONAL_CREATE_CLOUD_SPECIFIC)
@@ -171,8 +178,17 @@
 		return sparkClusterService.start(ui, dto);
 	}
 
+	@POST
+	@Path(ComputationalAPI.COMPUTATIONAL_RECONFIGURE_SPARK)
+	public String reconfigureSparkCluster(@Auth UserInfo ui, ComputationalClusterConfigDTO config) {
+		log.debug("User is reconfiguring {} spark cluster for exploratory {}", ui.getName(),
+				config.getComputationalName(), config.getNotebookInstanceName());
+		return sparkClusterService.updateConfig(ui, config);
+	}
+
 	private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ComputationalBase<?> dto) {
-		return new ComputationalCallbackHandler(computationalConfigure, selfService, action, uuid, dto);
+		return new ComputationalCallbackHandler(systemUserInfoService, computationalConfigure, selfService, action,
+				uuid, dto);
 	}
 
 	private String nameContainer(String user, DockerAction action, String exploratoryName, String name) {
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/EdgeResourceAws.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/EdgeResourceAws.java
index e8b755d..a44fbe8 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/EdgeResourceAws.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/EdgeResourceAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.aws;
@@ -85,7 +88,8 @@
 	@SuppressWarnings("unchecked")
 	protected FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, String user, String
 			callbackURI) {
-		return new EdgeCallbackHandler(selfService, action, uuid, user, callbackURI, EdgeInfoAws.class,
+		return new EdgeCallbackHandler(systemUserInfoService, selfService, action, uuid, user, callbackURI,
+				EdgeInfoAws.class,
 				UploadFileResult.class);
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ExploratoryResourceAws.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ExploratoryResourceAws.java
index 66ec5a8..9f7dfc5 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ExploratoryResourceAws.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ExploratoryResourceAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.aws;
@@ -22,6 +25,7 @@
 import com.epam.dlab.dto.aws.exploratory.ExploratoryCreateAws;
 import com.epam.dlab.dto.exploratory.ExploratoryActionDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsUpdateDTO;
+import com.epam.dlab.dto.exploratory.ExploratoryReconfigureSparkClusterActionDTO;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
@@ -37,31 +41,37 @@
 @Produces(MediaType.APPLICATION_JSON)
 public class ExploratoryResourceAws {
 
-    @Inject
-    private ExploratoryService exploratoryService;
+	@Inject
+	private ExploratoryService exploratoryService;
 
 
-    @Path("/create")
-    @POST
-    public String create(@Auth UserInfo ui, ExploratoryCreateAws dto) throws JsonProcessingException {
-        return exploratoryService.action(ui.getName(), dto, DockerAction.CREATE);
-    }
+	@Path("/create")
+	@POST
+	public String create(@Auth UserInfo ui, ExploratoryCreateAws dto) throws JsonProcessingException {
+		return exploratoryService.action(ui.getName(), dto, DockerAction.CREATE);
+	}
 
-    @Path("/start")
-    @POST
-    public String start(@Auth UserInfo ui, ExploratoryGitCredsUpdateDTO dto) throws JsonProcessingException {
-        return exploratoryService.action(ui.getName(), dto, DockerAction.START);
-    }
+	@Path("/start")
+	@POST
+	public String start(@Auth UserInfo ui, ExploratoryGitCredsUpdateDTO dto) throws JsonProcessingException {
+		return exploratoryService.action(ui.getName(), dto, DockerAction.START);
+	}
 
-    @Path("/terminate")
-    @POST
-    public String terminate(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
-        return exploratoryService.action(ui.getName(), dto, DockerAction.TERMINATE);
-    }
+	@Path("/terminate")
+	@POST
+	public String terminate(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
+		return exploratoryService.action(ui.getName(), dto, DockerAction.TERMINATE);
+	}
 
-    @Path("/stop")
-    @POST
-    public String stop(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
-        return exploratoryService.action(ui.getName(), dto, DockerAction.STOP);
-    }
+	@Path("/stop")
+	@POST
+	public String stop(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
+		return exploratoryService.action(ui.getName(), dto, DockerAction.STOP);
+	}
+
+	@Path("/reconfigure_spark")
+	@POST
+	public String reconfigureSpark(@Auth UserInfo ui, ExploratoryReconfigureSparkClusterActionDTO dto) throws JsonProcessingException {
+		return exploratoryService.action(ui.getName(), dto, DockerAction.RECONFIGURE_SPARK);
+	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/InfrastructureResourceAws.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/InfrastructureResourceAws.java
index 8068dd8..6efc41f 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/InfrastructureResourceAws.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/aws/InfrastructureResourceAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.aws;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java
index be20ca9..59b5f27 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java
@@ -1,24 +1,28 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.azure;
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.service.SparkClusterService;
+import com.epam.dlab.backendapi.service.impl.SparkClusterService;
 import com.epam.dlab.dto.azure.computational.SparkComputationalCreateAzure;
+import com.epam.dlab.dto.computational.ComputationalClusterConfigDTO;
 import com.epam.dlab.dto.computational.ComputationalStartDTO;
 import com.epam.dlab.dto.computational.ComputationalStopDTO;
 import com.epam.dlab.dto.computational.ComputationalTerminateDTO;
@@ -79,4 +83,12 @@
 		return sparkClusterService.start(ui, dto);
 	}
 
+	@POST
+	@Path(ComputationalAPI.COMPUTATIONAL_RECONFIGURE_SPARK)
+	public String reconfigureSparkCluster(@Auth UserInfo ui, ComputationalClusterConfigDTO config) {
+		log.debug("User is reconfiguring {} spark cluster for exploratory {}", ui.getName(),
+				config.getComputationalName(), config.getNotebookInstanceName());
+		return sparkClusterService.updateConfig(ui, config);
+	}
+
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/EdgeResourceAzure.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/EdgeResourceAzure.java
index 904d74b..c400d1b 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/EdgeResourceAzure.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/EdgeResourceAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.azure;
@@ -85,7 +88,8 @@
 	@SuppressWarnings("unchecked")
 	protected FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, String user, String
 			callbackURI) {
-		return new EdgeCallbackHandler(selfService, action, uuid, user, callbackURI, EdgeInfoAzure.class,
+		return new EdgeCallbackHandler(systemUserInfoService, selfService, action, uuid, user, callbackURI,
+				EdgeInfoAzure.class,
 				UploadFileResult.class);
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ExploratoryResourceAzure.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ExploratoryResourceAzure.java
index faf09d2..3fa4f6f 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ExploratoryResourceAzure.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ExploratoryResourceAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.azure;
@@ -22,6 +25,7 @@
 import com.epam.dlab.dto.azure.exploratory.ExploratoryActionStartAzure;
 import com.epam.dlab.dto.azure.exploratory.ExploratoryActionStopAzure;
 import com.epam.dlab.dto.azure.exploratory.ExploratoryCreateAzure;
+import com.epam.dlab.dto.exploratory.ExploratoryReconfigureSparkClusterActionDTO;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
@@ -62,4 +66,10 @@
     public String stop(@Auth UserInfo ui, ExploratoryActionStopAzure dto) throws JsonProcessingException {
         return exploratoryService.action(ui.getName(), dto, DockerAction.STOP);
     }
+
+    @Path("/reconfigure_spark")
+    @POST
+    public String reconfigureSpark(@Auth UserInfo ui, ExploratoryReconfigureSparkClusterActionDTO dto) throws JsonProcessingException {
+        return exploratoryService.action(ui.getName(), dto, DockerAction.RECONFIGURE_SPARK);
+    }
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/InfrastructureResourceAzure.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/InfrastructureResourceAzure.java
index 3d14280..0915c30 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/InfrastructureResourceAzure.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/azure/InfrastructureResourceAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.azure;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/EdgeService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/EdgeService.java
index 15d682f..2510dd7 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/EdgeService.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/EdgeService.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.base;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
@@ -37,6 +41,8 @@
 	@Inject
 	protected RESTService selfService;
 	@Inject
+	protected SystemUserInfoService systemUserInfoService;
+	@Inject
 	private ProvisioningServiceApplicationConfiguration configuration;
 	@Inject
 	private FolderListenerExecutor folderListenerExecutor;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/ExploratoryService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/ExploratoryService.java
index 376d1a7..74d7900 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/ExploratoryService.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/ExploratoryService.java
@@ -1,33 +1,40 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.base;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
 import com.epam.dlab.backendapi.core.commands.*;
 import com.epam.dlab.backendapi.core.response.handlers.ExploratoryCallbackHandler;
-import com.epam.dlab.backendapi.service.DockerService;
+import com.epam.dlab.backendapi.service.impl.DockerService;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.dto.exploratory.ExploratoryBaseDTO;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.inject.Inject;
 import lombok.extern.slf4j.Slf4j;
 
 @Slf4j
 public class ExploratoryService extends DockerService implements DockerCommands {
+    @Inject
+    private SystemUserInfoService systemUserInfoService;
 
     public String action(String username, ExploratoryBaseDTO<?> dto, DockerAction action) throws JsonProcessingException {
         log.debug("{} exploratory environment", action);
@@ -57,7 +64,8 @@
     }
 
     private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ExploratoryBaseDTO<?> dto) {
-        return new ExploratoryCallbackHandler(selfService, action, uuid, dto.getCloudSettings().getIamUser(),
+        return new ExploratoryCallbackHandler(systemUserInfoService, selfService, action, uuid,
+                dto.getCloudSettings().getIamUser(),
                 dto.getExploratoryName());
     }
 
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/InfrastructureService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/InfrastructureService.java
index 9525179..48af93b 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/InfrastructureService.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/InfrastructureService.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.base;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
@@ -50,6 +54,8 @@
 	private ICommandExecutor commandExecutor;
 	@Inject
 	private CommandBuilder commandBuilder;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
 	private static final String CONTAINER_NAME_REGEX_FORMAT = "%s_[^_\\W]+_%s(|_%s)_\\d+";
 
@@ -135,7 +141,7 @@
 	}
 
 	protected FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, String user) {
-		return new ResourcesStatusCallbackHandler(selfService, action, uuid, user);
+		return new ResourcesStatusCallbackHandler(systemUserInfoService, selfService, action, uuid, user);
 	}
 
 	private String nameContainer(String user, DockerAction action, String name) {
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/KeyResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/KeyResource.java
index 2fb385f..9e8b975 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/KeyResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/base/KeyResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
@@ -20,7 +23,7 @@
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
-import com.epam.dlab.backendapi.service.ReuploadKeyService;
+import com.epam.dlab.backendapi.service.impl.ReuploadKeyService;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyDTO;
 import com.epam.dlab.rest.contracts.KeyAPI;
 import com.epam.dlab.util.FileUtils;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java
index 487fd17..cf02061 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.gcp;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.FileHandlerCallback;
@@ -24,10 +28,11 @@
 import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
 import com.epam.dlab.backendapi.core.response.handlers.ComputationalCallbackHandler;
 import com.epam.dlab.backendapi.core.response.handlers.ComputationalConfigure;
-import com.epam.dlab.backendapi.service.DockerService;
-import com.epam.dlab.backendapi.service.SparkClusterService;
+import com.epam.dlab.backendapi.service.impl.DockerService;
+import com.epam.dlab.backendapi.service.impl.SparkClusterService;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
+import com.epam.dlab.dto.computational.ComputationalClusterConfigDTO;
 import com.epam.dlab.dto.computational.ComputationalStartDTO;
 import com.epam.dlab.dto.computational.ComputationalStopDTO;
 import com.epam.dlab.dto.gcp.computational.ComputationalCreateGcp;
@@ -60,6 +65,8 @@
 	private ComputationalConfigure computationalConfigure;
 	@Inject
 	private SparkClusterService sparkClusterService;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
 
 	@POST
 	@Path(ComputationalAPI.COMPUTATIONAL_CREATE_CLOUD_SPECIFIC)
@@ -170,8 +177,17 @@
 		return sparkClusterService.start(ui, dto);
 	}
 
+	@POST
+	@Path(ComputationalAPI.COMPUTATIONAL_RECONFIGURE_SPARK)
+	public String reconfigureSparkCluster(@Auth UserInfo ui, ComputationalClusterConfigDTO config) {
+		log.debug("User is reconfiguring {} spark cluster for exploratory {}", ui.getName(),
+				config.getComputationalName(), config.getNotebookInstanceName());
+		return sparkClusterService.updateConfig(ui, config);
+	}
+
 	private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ComputationalBase<?> dto) {
-		return new ComputationalCallbackHandler(computationalConfigure, selfService, action, uuid, dto);
+		return new ComputationalCallbackHandler(systemUserInfoService, computationalConfigure, selfService, action,
+				uuid, dto);
 	}
 
 	private String nameContainer(String user, DockerAction action, String exploratoryName, String name) {
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/EdgeResourceGcp.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/EdgeResourceGcp.java
index c994aab..5f4c2f2 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/EdgeResourceGcp.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/EdgeResourceGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.gcp;
@@ -85,7 +88,8 @@
 	@Override
 	protected FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, String user, String
 			callbackURI) {
-		return new EdgeCallbackHandler(selfService, action, uuid, user, callbackURI, EdgeInfoGcp.class,
+		return new EdgeCallbackHandler(systemUserInfoService, selfService, action, uuid, user, callbackURI,
+				EdgeInfoGcp.class,
 				UploadFileResult.class);
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ExploratoryResourceGcp.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ExploratoryResourceGcp.java
index 4e9ef10..778ee0c 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ExploratoryResourceGcp.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ExploratoryResourceGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.gcp;
@@ -21,6 +24,7 @@
 import com.epam.dlab.backendapi.resources.base.ExploratoryService;
 import com.epam.dlab.dto.exploratory.ExploratoryActionDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsUpdateDTO;
+import com.epam.dlab.dto.exploratory.ExploratoryReconfigureSparkClusterActionDTO;
 import com.epam.dlab.dto.gcp.exploratory.ExploratoryCreateGcp;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.google.inject.Inject;
@@ -64,4 +68,10 @@
     public String stop(@Auth UserInfo ui, ExploratoryActionDTO<?> dto) throws JsonProcessingException {
         return exploratoryService.action(ui.getName(), dto, DockerAction.STOP);
     }
+
+    @Path("/reconfigure_spark")
+    @POST
+    public String reconfigureSpark(@Auth UserInfo ui, ExploratoryReconfigureSparkClusterActionDTO dto) throws JsonProcessingException {
+        return exploratoryService.action(ui.getName(), dto, DockerAction.RECONFIGURE_SPARK);
+    }
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/InfrastructureResourceGcp.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/InfrastructureResourceGcp.java
index 991c78d..be80c02 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/InfrastructureResourceGcp.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/InfrastructureResourceGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.gcp;
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/DockerService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/DockerService.java
deleted file mode 100644
index 328f293..0000000
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/DockerService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2017, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.backendapi.service;
-
-import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.core.commands.CommandBuilder;
-import com.epam.dlab.backendapi.core.commands.ICommandExecutor;
-import com.epam.dlab.backendapi.core.response.folderlistener.FolderListenerExecutor;
-import com.epam.dlab.rest.client.RESTService;
-import com.google.inject.Inject;
-
-public abstract class DockerService {
-
-    @Inject
-    protected ProvisioningServiceApplicationConfiguration configuration;
-    @Inject
-    protected FolderListenerExecutor folderListenerExecutor;
-    @Inject
-    protected ICommandExecutor commandExecutor;
-    @Inject
-    protected CommandBuilder commandBuilder;
-    @Inject
-    protected RESTService selfService;
-
-}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerService.java
index 5d81a27..e057891 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerService.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerService.java
@@ -1,54 +1,24 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
-import com.epam.dlab.backendapi.core.response.folderlistener.FolderListenerExecutor;
-import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import io.dropwizard.lifecycle.Managed;
-import io.dropwizard.util.Duration;
-import lombok.extern.slf4j.Slf4j;
-
-@Singleton
-@Slf4j
-public class RestoreCallbackHandlerService implements Managed {
-
-	@Inject
-	private CallbackHandlerDao callbackHandlerDao;
-	@Inject
-	private FolderListenerExecutor folderListenerExecutor;
-
-	@Override
-	public void start() {
-		log.info("Restoring callback handlers");
-		callbackHandlerDao.findAll().forEach(persistentFileHandler ->
-				folderListenerExecutor.start(persistentFileHandler.getDirectory(),
-						Duration.milliseconds(persistentFileHandler.getTimeout()),
-						persistentFileHandler.getHandler()));
-		log.info("Successfully restored file handlers");
-	}
-
-	@Override
-	public void stop() {
-		log.info("RestoreCallbackHandlerService stopped");
-	}
+public interface RestoreCallbackHandlerService {
+	void restore();
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/SparkClusterService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/SparkClusterService.java
deleted file mode 100644
index e30dfae..0000000
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/SparkClusterService.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2017, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.backendapi.service;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.core.Directories;
-import com.epam.dlab.backendapi.core.FileHandlerCallback;
-import com.epam.dlab.backendapi.core.commands.DockerAction;
-import com.epam.dlab.backendapi.core.commands.DockerCommands;
-import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
-import com.epam.dlab.backendapi.core.response.handlers.ComputationalCallbackHandler;
-import com.epam.dlab.backendapi.core.response.handlers.ComputationalConfigure;
-import com.epam.dlab.dto.base.DataEngineType;
-import com.epam.dlab.dto.base.computational.ComputationalBase;
-import com.epam.dlab.dto.computational.ComputationalStartDTO;
-import com.epam.dlab.dto.computational.ComputationalStopDTO;
-import com.epam.dlab.dto.computational.ComputationalTerminateDTO;
-import com.epam.dlab.exceptions.DlabException;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
-import static com.epam.dlab.backendapi.core.commands.DockerAction.*;
-
-@Singleton
-public class SparkClusterService extends DockerService implements DockerCommands {
-
-	private static final DataEngineType SPARK_ENGINE = DataEngineType.SPARK_STANDALONE;
-
-	@Inject
-	private ComputationalConfigure computationalConfigure;
-
-	public String create(UserInfo ui, ComputationalBase<?> dto) {
-		return action(ui, dto, CREATE);
-	}
-
-	public String terminate(UserInfo ui, ComputationalTerminateDTO dto) {
-		return action(ui, dto, TERMINATE);
-	}
-
-	public String stop(UserInfo ui, ComputationalStopDTO dto) {
-		return action(ui, dto, STOP);
-	}
-
-	public String start(UserInfo ui, ComputationalStartDTO dto) {
-		return action(ui, dto, START);
-	}
-
-	private String action(UserInfo ui, ComputationalBase<?> dto, DockerAction action) {
-		String uuid = DockerCommands.generateUUID();
-		folderListenerExecutor.start(configuration.getImagesDirectory(),
-				configuration.getResourceStatusPollTimeout(),
-				getFileHandlerCallback(action, uuid, dto));
-		try {
-			final RunDockerCommand dockerCommand = new RunDockerCommand()
-					.withInteractive()
-					.withName(nameContainer(dto.getEdgeUserName(), action, dto.getExploratoryName(),
-							dto.getComputationalName()))
-					.withVolumeForRootKeys(configuration.getKeyDirectory())
-					.withVolumeForResponse(configuration.getImagesDirectory())
-					.withVolumeForLog(configuration.getDockerLogDirectory(), SPARK_ENGINE.getName())
-					.withResource(SPARK_ENGINE.getName())
-					.withRequestId(uuid)
-					.withConfKeyName(configuration.getAdminKey())
-					.withImage(DataEngineType.getDockerImageName(SPARK_ENGINE))
-					.withAction(action);
-
-			commandExecutor.executeAsync(ui.getName(), uuid, commandBuilder.buildCommand(dockerCommand, dto));
-		} catch (JsonProcessingException e) {
-			throw new DlabException("Could not" + action.toString() + "computational resources cluster", e);
-		}
-
-		return uuid;
-	}
-
-	private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ComputationalBase<?> dto) {
-		return new ComputationalCallbackHandler(computationalConfigure, selfService, action, uuid, dto);
-	}
-
-	private String nameContainer(String user, DockerAction action, String exploratoryName, String name) {
-		return nameContainer(user, action.toString(), "computational", exploratoryName, name);
-	}
-
-	@Override
-	public String getResourceType() {
-		return Directories.DATA_ENGINE_LOG_DIRECTORY;
-	}
-}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityService.java
new file mode 100644
index 0000000..19484ff
--- /dev/null
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityService.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.core.Directories;
+import com.epam.dlab.backendapi.core.commands.DockerAction;
+import com.epam.dlab.backendapi.core.commands.DockerCommands;
+import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
+import com.epam.dlab.backendapi.core.response.handlers.CheckInactivityCallbackHandler;
+import com.epam.dlab.dto.computational.CheckInactivityCallbackDTO;
+import com.epam.dlab.dto.status.EnvResource;
+import com.epam.dlab.rest.contracts.ApiCallbacks;
+import com.google.inject.Singleton;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+@Slf4j
+@Singleton
+public class CheckInactivityService extends DockerService implements DockerCommands {
+
+	private static final String CHECK_INACTIVITY_CLUSTERS_ACTION = "check_inactivity_clusters";
+
+	public String checkClusterAction(String userName, List<EnvResource> clusters, DockerAction action) {
+		log.debug("Admin {} is checking inactivity for resources...", userName);
+		log.debug("Obtained {} resources: {}", clusters.size(), clusters);
+		String uuid = getUuid();
+		CheckInactivityCallbackDTO dto = buildCallbackDTO(uuid, clusters);
+		startCallbackListener(userName, dto);
+		RunDockerCommand runDockerCommand = buildRunDockerCommand(dto, action);
+		runDockerCmd(userName, uuid, runDockerCommand, dto);
+		return uuid;
+	}
+
+	private String getUuid() {
+		return DockerCommands.generateUUID();
+	}
+
+	private void runDockerCmd(String userName, String uuid, RunDockerCommand runDockerCommand,
+							  CheckInactivityCallbackDTO callbackDto) {
+		try {
+			final String command = commandBuilder.buildCommand(runDockerCommand, callbackDto);
+			log.trace("Docker command: {}", command);
+			commandExecutor.executeAsync(userName, uuid, command);
+		} catch (Exception e) {
+			log.error("Exception occured during reuploading key: {} for command {}", e.getLocalizedMessage(),
+					runDockerCommand.toCMD());
+		}
+	}
+
+	private void startCallbackListener(String userName, CheckInactivityCallbackDTO dto) {
+		folderListenerExecutor.start(configuration.getKeyLoaderDirectory(),
+				configuration.getKeyLoaderPollTimeout(),
+				new CheckInactivityCallbackHandler(
+						selfService, ApiCallbacks.CHECK_INACTIVITY_CLUSTERS_URI, userName, dto.getId()));
+	}
+
+	@Override
+	public String getResourceType() {
+		return Directories.EDGE_LOG_DIRECTORY;
+	}
+
+	private RunDockerCommand buildRunDockerCommand(CheckInactivityCallbackDTO callbackDto,
+												   DockerAction action) {
+		return new RunDockerCommand()
+				.withInteractive()
+				.withName(getContainerName(callbackDto))
+				.withVolumeForRootKeys(configuration.getKeyDirectory())
+				.withVolumeForResponse(configuration.getKeyLoaderDirectory())
+				.withVolumeForLog(configuration.getDockerLogDirectory(), getResourceType())
+				.withResource("computational")
+				.withRequestId(callbackDto.getId())
+				.withConfKeyName(configuration.getAdminKey())
+				.withImage(configuration.getEdgeImage())
+				.withAction(action);
+	}
+
+	private CheckInactivityCallbackDTO buildCallbackDTO(String uuid, List<EnvResource> clusters) {
+		return new CheckInactivityCallbackDTO()
+				.withId(uuid)
+				.withClusters(clusters);
+	}
+
+	private String getContainerName(CheckInactivityCallbackDTO callbackDto) {
+		return nameContainer(callbackDto.getId(), CHECK_INACTIVITY_CLUSTERS_ACTION);
+	}
+}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/DockerService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/DockerService.java
new file mode 100644
index 0000000..98e89b6
--- /dev/null
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/DockerService.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.core.commands.CommandBuilder;
+import com.epam.dlab.backendapi.core.commands.ICommandExecutor;
+import com.epam.dlab.backendapi.core.response.folderlistener.FolderListenerExecutor;
+import com.epam.dlab.rest.client.RESTService;
+import com.google.inject.Inject;
+
+public abstract class DockerService {
+
+    @Inject
+    protected ProvisioningServiceApplicationConfiguration configuration;
+    @Inject
+    protected FolderListenerExecutor folderListenerExecutor;
+    @Inject
+    protected ICommandExecutor commandExecutor;
+    @Inject
+    protected CommandBuilder commandBuilder;
+    @Inject
+    protected RESTService selfService;
+
+}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/RestoreCallbackHandlerServiceImpl.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/RestoreCallbackHandlerServiceImpl.java
new file mode 100644
index 0000000..690e40a
--- /dev/null
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/RestoreCallbackHandlerServiceImpl.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.core.response.folderlistener.FolderListenerExecutor;
+import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
+import com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import io.dropwizard.lifecycle.Managed;
+import io.dropwizard.util.Duration;
+import lombok.extern.slf4j.Slf4j;
+
+@Singleton
+@Slf4j
+public class RestoreCallbackHandlerServiceImpl implements Managed, RestoreCallbackHandlerService {
+
+	@Inject
+	private CallbackHandlerDao callbackHandlerDao;
+	@Inject
+	private FolderListenerExecutor folderListenerExecutor;
+
+	@Override
+	public void start() {
+		restore();
+	}
+
+	@Override
+	public void stop() {
+		log.info("RestoreCallbackHandlerServiceImpl stopped");
+	}
+
+	public void restore() {
+		log.info("Restoring callback handlers");
+		callbackHandlerDao.findAll().forEach(persistentFileHandler ->
+				folderListenerExecutor.start(persistentFileHandler.getDirectory(),
+						Duration.milliseconds(persistentFileHandler.getTimeout()),
+						persistentFileHandler.getHandler()));
+		log.info("Successfully restored file handlers");
+	}
+}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyService.java
similarity index 76%
rename from services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
rename to services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyService.java
index 32eed9b..e3889cb 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyService.java
@@ -1,30 +1,36 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package com.epam.dlab.backendapi.service;
+package com.epam.dlab.backendapi.service.impl;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.core.Directories;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
 import com.epam.dlab.backendapi.core.commands.DockerCommands;
 import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
 import com.epam.dlab.backendapi.core.response.handlers.ReuploadKeyCallbackHandler;
+import com.epam.dlab.backendapi.service.impl.DockerService;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyCallbackDTO;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyDTO;
 import com.epam.dlab.model.ResourceData;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
+import com.google.inject.Inject;
 import com.google.inject.Singleton;
 import lombok.extern.slf4j.Slf4j;
 
@@ -34,6 +40,9 @@
 
 	private static final String REUPLOAD_KEY_ACTION = "reupload_key";
 
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
+
 	public void reuploadKeyAction(String userName, ReuploadKeyDTO dto, DockerAction action) {
 		log.debug("{} for edge user {}", action, dto.getEdgeUserName());
 
@@ -67,7 +76,8 @@
 	private void startCallbackListener(String userName, ReuploadKeyCallbackDTO dto) {
 		folderListenerExecutor.start(configuration.getKeyLoaderDirectory(),
 				configuration.getKeyLoaderPollTimeout(),
-				new ReuploadKeyCallbackHandler(selfService, ApiCallbacks.REUPLOAD_KEY_URI, userName, dto));
+				new ReuploadKeyCallbackHandler(selfService, systemUserInfoService, ApiCallbacks.REUPLOAD_KEY_URI,
+						userName, dto));
 	}
 
 	@Override
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/SparkClusterService.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/SparkClusterService.java
new file mode 100644
index 0000000..643a1a9
--- /dev/null
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/SparkClusterService.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.auth.SystemUserInfoService;
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.core.Directories;
+import com.epam.dlab.backendapi.core.FileHandlerCallback;
+import com.epam.dlab.backendapi.core.commands.DockerAction;
+import com.epam.dlab.backendapi.core.commands.DockerCommands;
+import com.epam.dlab.backendapi.core.commands.RunDockerCommand;
+import com.epam.dlab.backendapi.core.response.handlers.ComputationalCallbackHandler;
+import com.epam.dlab.backendapi.core.response.handlers.ComputationalConfigure;
+import com.epam.dlab.dto.base.DataEngineType;
+import com.epam.dlab.dto.base.computational.ComputationalBase;
+import com.epam.dlab.dto.computational.ComputationalClusterConfigDTO;
+import com.epam.dlab.dto.computational.ComputationalStartDTO;
+import com.epam.dlab.dto.computational.ComputationalStopDTO;
+import com.epam.dlab.dto.computational.ComputationalTerminateDTO;
+import com.epam.dlab.exceptions.DlabException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+import static com.epam.dlab.backendapi.core.commands.DockerAction.*;
+
+@Singleton
+public class SparkClusterService extends DockerService implements DockerCommands {
+
+	private static final DataEngineType SPARK_ENGINE = DataEngineType.SPARK_STANDALONE;
+
+	@Inject
+	private ComputationalConfigure computationalConfigure;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
+
+	public String create(UserInfo ui, ComputationalBase<?> dto) {
+		return action(ui, dto, CREATE);
+	}
+
+	public String terminate(UserInfo ui, ComputationalTerminateDTO dto) {
+		return action(ui, dto, TERMINATE);
+	}
+
+	public String stop(UserInfo ui, ComputationalStopDTO dto) {
+		return action(ui, dto, STOP);
+	}
+
+	public String start(UserInfo ui, ComputationalStartDTO dto) {
+		return action(ui, dto, START);
+	}
+
+	public String updateConfig(UserInfo ui, ComputationalClusterConfigDTO clusterConfigDTO) {
+		String uuid = DockerCommands.generateUUID();
+		folderListenerExecutor.start(configuration.getImagesDirectory(),
+				configuration.getResourceStatusPollTimeout(),
+				getFileHandlerCallback(RECONFIGURE_SPARK, uuid, clusterConfigDTO));
+		runReconfigureSparkDockerCommand(ui, clusterConfigDTO, uuid);
+		return uuid;
+	}
+
+	private void runReconfigureSparkDockerCommand(UserInfo ui, ComputationalClusterConfigDTO clusterConfigDTO, String uuid) {
+		try {
+			final RunDockerCommand dockerCommand = new RunDockerCommand()
+					.withInteractive()
+					.withName(nameContainer(clusterConfigDTO.getEdgeUserName(), RECONFIGURE_SPARK,
+							clusterConfigDTO.getExploratoryName(),
+							clusterConfigDTO.getComputationalName()))
+					.withVolumeForRootKeys(configuration.getKeyDirectory())
+					.withVolumeForResponse(configuration.getImagesDirectory())
+					.withVolumeForLog(configuration.getDockerLogDirectory(), SPARK_ENGINE.getName())
+					.withResource(SPARK_ENGINE.getName())
+					.withRequestId(uuid)
+					.withConfKeyName(configuration.getAdminKey())
+					.withImage(DataEngineType.getDockerImageName(SPARK_ENGINE))
+					.withAction(RECONFIGURE_SPARK);
+
+			commandExecutor.executeAsync(ui.getName(), uuid, commandBuilder.buildCommand(dockerCommand,
+					clusterConfigDTO));
+		} catch (JsonProcessingException e) {
+			throw new DlabException("Could not" + RECONFIGURE_SPARK.toString() + "computational resources cluster", e);
+		}
+	}
+
+	private String action(UserInfo ui, ComputationalBase<?> dto, DockerAction action) {
+		String uuid = DockerCommands.generateUUID();
+		folderListenerExecutor.start(configuration.getImagesDirectory(),
+				configuration.getResourceStatusPollTimeout(),
+				getFileHandlerCallback(action, uuid, dto));
+		try {
+			final RunDockerCommand dockerCommand = new RunDockerCommand()
+					.withInteractive()
+					.withName(nameContainer(dto.getEdgeUserName(), action, dto.getExploratoryName(),
+							dto.getComputationalName()))
+					.withVolumeForRootKeys(configuration.getKeyDirectory())
+					.withVolumeForResponse(configuration.getImagesDirectory())
+					.withVolumeForLog(configuration.getDockerLogDirectory(), SPARK_ENGINE.getName())
+					.withResource(SPARK_ENGINE.getName())
+					.withRequestId(uuid)
+					.withConfKeyName(configuration.getAdminKey())
+					.withImage(DataEngineType.getDockerImageName(SPARK_ENGINE))
+					.withAction(action);
+
+			commandExecutor.executeAsync(ui.getName(), uuid, commandBuilder.buildCommand(dockerCommand, dto));
+		} catch (JsonProcessingException e) {
+			throw new DlabException("Could not" + action.toString() + "computational resources cluster", e);
+		}
+
+		return uuid;
+	}
+
+	private FileHandlerCallback getFileHandlerCallback(DockerAction action, String uuid, ComputationalBase<?> dto) {
+		return new ComputationalCallbackHandler(systemUserInfoService, computationalConfigure, selfService, action,
+				uuid, dto);
+	}
+
+	private String nameContainer(String user, DockerAction action, String exploratoryName, String name) {
+		return nameContainer(user, action.toString(), "computational", exploratoryName, name);
+	}
+
+	@Override
+	public String getResourceType() {
+		return Directories.DATA_ENGINE_LOG_DIRECTORY;
+	}
+}
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/validation/ProvisioningServiceCloudConfigurationSequenceProvider.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/validation/ProvisioningServiceCloudConfigurationSequenceProvider.java
index fd6d193..b85af8a 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/validation/ProvisioningServiceCloudConfigurationSequenceProvider.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/validation/ProvisioningServiceCloudConfigurationSequenceProvider.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.validation;
diff --git a/services/provisioning-service/src/main/resources/mock_response/aws/dataengine_create.json b/services/provisioning-service/src/main/resources/mock_response/aws/dataengine_create.json
index c1dbcc8..9df4d36 100644
--- a/services/provisioning-service/src/main/resources/mock_response/aws/dataengine_create.json
+++ b/services/provisioning-service/src/main/resources/mock_response/aws/dataengine_create.json
@@ -12,7 +12,7 @@
       "computational_url": [
         {
           "url": "http://172.31.48.131:8080/",
-          "description": "Spark job tracker url"
+          "description": "Apache Spark job tracker url"
         }
       ]
     },
diff --git a/services/provisioning-service/src/main/resources/mock_response/aws/notebook_check_inactivity.json b/services/provisioning-service/src/main/resources/mock_response/aws/notebook_check_inactivity.json
new file mode 100644
index 0000000..ba941c6
--- /dev/null
+++ b/services/provisioning-service/src/main/resources/mock_response/aws/notebook_check_inactivity.json
@@ -0,0 +1,14 @@
+{
+  "status": "ok",
+  "request_id": "${REQUEST_ID}",
+  "resources": [
+    {
+      "id": "i-e649463cf6fd461bb",
+      "status": "running",
+      "name": "jup_sc",
+      "resourceType": "COMPUTATIONAL",
+      "lastActivity": 1575842400000
+    }
+  ]
+}
+
diff --git a/services/provisioning-service/src/main/resources/mock_response/aws/notebook_create.json b/services/provisioning-service/src/main/resources/mock_response/aws/notebook_create.json
index 2d9aa32..53193b4 100644
--- a/services/provisioning-service/src/main/resources/mock_response/aws/notebook_create.json
+++ b/services/provisioning-service/src/main/resources/mock_response/aws/notebook_create.json
@@ -7,7 +7,7 @@
          "exploratory_url": [
             {
                "url": "http://172.31.48.131:8080/",
-               "description": "Zeppelin"
+              "description": "Apache Zeppelin"
             }
          ],
          "instance_id": "${INSTANCE_ID}",
diff --git a/services/provisioning-service/src/main/resources/mock_response/azure/dataengine_create.json b/services/provisioning-service/src/main/resources/mock_response/azure/dataengine_create.json
index c1dbcc8..9df4d36 100644
--- a/services/provisioning-service/src/main/resources/mock_response/azure/dataengine_create.json
+++ b/services/provisioning-service/src/main/resources/mock_response/azure/dataengine_create.json
@@ -12,7 +12,7 @@
       "computational_url": [
         {
           "url": "http://172.31.48.131:8080/",
-          "description": "Spark job tracker url"
+          "description": "Apache Spark job tracker url"
         }
       ]
     },
diff --git a/services/provisioning-service/src/main/resources/mock_response/azure/notebook_check_inactivity.json b/services/provisioning-service/src/main/resources/mock_response/azure/notebook_check_inactivity.json
new file mode 100644
index 0000000..0cf2f32
--- /dev/null
+++ b/services/provisioning-service/src/main/resources/mock_response/azure/notebook_check_inactivity.json
@@ -0,0 +1,21 @@
+{
+  "status": "ok",
+  "request_id": "${REQUEST_ID}",
+  "resources": [
+    {
+      "id": "dev-test-dataengine-jup_1-sp_1",
+      "status": "running",
+      "name": "sp_1",
+      "resourceType": "COMPUTATIONAL",
+      "lastActivity": 1533652097582
+    },
+    {
+      "id": "dev-test-des-jup_1-emr_1-da3cd",
+      "status": "running",
+      "name": "emr_1",
+      "resourceType": "COMPUTATIONAL",
+      "lastActivity": 1533652114629
+    }
+  ]
+}
+
diff --git a/services/provisioning-service/src/main/resources/mock_response/azure/notebook_create.json b/services/provisioning-service/src/main/resources/mock_response/azure/notebook_create.json
index 2d9aa32..53193b4 100644
--- a/services/provisioning-service/src/main/resources/mock_response/azure/notebook_create.json
+++ b/services/provisioning-service/src/main/resources/mock_response/azure/notebook_create.json
@@ -7,7 +7,7 @@
          "exploratory_url": [
             {
                "url": "http://172.31.48.131:8080/",
-               "description": "Zeppelin"
+              "description": "Apache Zeppelin"
             }
          ],
          "instance_id": "${INSTANCE_ID}",
diff --git a/services/provisioning-service/src/main/resources/mock_response/gcp/dataengine_create.json b/services/provisioning-service/src/main/resources/mock_response/gcp/dataengine_create.json
index 93d3d4e..d6398fe 100644
--- a/services/provisioning-service/src/main/resources/mock_response/gcp/dataengine_create.json
+++ b/services/provisioning-service/src/main/resources/mock_response/gcp/dataengine_create.json
@@ -9,7 +9,7 @@
       "computational_url": [
         {
           "url": "http://172.31.48.131:8080/",
-          "description": "Spark job tracker url"
+          "description": "Apache Spark job tracker url"
         }
       ]
     },
diff --git a/services/provisioning-service/src/main/resources/mock_response/gcp/notebook_check_inactivity.json b/services/provisioning-service/src/main/resources/mock_response/gcp/notebook_check_inactivity.json
new file mode 100644
index 0000000..0cf2f32
--- /dev/null
+++ b/services/provisioning-service/src/main/resources/mock_response/gcp/notebook_check_inactivity.json
@@ -0,0 +1,21 @@
+{
+  "status": "ok",
+  "request_id": "${REQUEST_ID}",
+  "resources": [
+    {
+      "id": "dev-test-dataengine-jup_1-sp_1",
+      "status": "running",
+      "name": "sp_1",
+      "resourceType": "COMPUTATIONAL",
+      "lastActivity": 1533652097582
+    },
+    {
+      "id": "dev-test-des-jup_1-emr_1-da3cd",
+      "status": "running",
+      "name": "emr_1",
+      "resourceType": "COMPUTATIONAL",
+      "lastActivity": 1533652114629
+    }
+  ]
+}
+
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/CommandBuilderTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/CommandBuilderTest.java
index 55754e0..fbbeeaf 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/CommandBuilderTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/CommandBuilderTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/DockerWarmuperTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/DockerWarmuperTest.java
index 2d2df68..ed27d0f 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/DockerWarmuperTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/DockerWarmuperTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core;
 
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockTest.java
index 94de42b..08e68c5 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/commands/CommandExecutorMockTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.commands;
 
@@ -34,45 +35,45 @@
 
 @Ignore
 public class CommandExecutorMockTest {
-    private CommandExecutorMock getCommandExecutor() {
-    	return new CommandExecutorMock(CloudProvider.AWS);
-    }
-    
-    private CommandExecutorMock executeAsync(String cmd) throws IOException, InterruptedException, ExecutionException {
-    	String uuid = UUID.randomUUID().toString();
-    	CommandExecutorMock exec = new CommandExecutorMock(CloudProvider.AWS);
-    	exec.executeAsync("user", uuid, cmd);
-    	exec.getResultSync();
+	private CommandExecutorMock getCommandExecutor() {
+		return new CommandExecutorMock(CloudProvider.AWS);
+	}
 
-    	Files.deleteIfExists(Paths.get(exec.getResponseFileName()));
+	private CommandExecutorMock executeAsync(String cmd) throws IOException, InterruptedException, ExecutionException {
+		String uuid = UUID.randomUUID().toString();
+		CommandExecutorMock exec = new CommandExecutorMock(CloudProvider.AWS);
+		exec.executeAsync("user", uuid, cmd);
+		exec.getResultSync();
 
-    	return exec;
-    }
-    
-    private String getRequestId(CommandExecutorMock exec) {
-    	return exec.getVariables().get("request_id");
-    }
-    
-    private String getEdgeUserName(CommandExecutorMock exec) {
-    	return exec.getVariables().get("edge_user_name");
-    }
-    
-    private String getExploratoryName(CommandExecutorMock exec) {
-    	return exec.getVariables().get("exploratory_name");
-    }
-    
-    private void handleExploratory(String cmd, DockerAction action) throws Exception {
-    	String uuid = UUID.randomUUID().toString();
-    	CommandExecutorMock exec = getCommandExecutor();
-    	exec.executeAsync("user", uuid, cmd);
-    	exec.getResultSync();
+		Files.deleteIfExists(Paths.get(exec.getResponseFileName()));
 
-    	RESTServiceMock selfService = new RESTServiceMock();
-    	ExploratoryCallbackHandler handler = new ExploratoryCallbackHandler(selfService, action,
-    			getRequestId(exec), getEdgeUserName(exec), getExploratoryName(exec));
-    	handler.handle(exec.getResponseFileName(), Files.readAllBytes(Paths.get(exec.getResponseFileName())));
+		return exec;
+	}
 
-    	try {
+	private String getRequestId(CommandExecutorMock exec) {
+		return exec.getVariables().get("request_id");
+	}
+
+	private String getEdgeUserName(CommandExecutorMock exec) {
+		return exec.getVariables().get("edge_user_name");
+	}
+
+	private String getExploratoryName(CommandExecutorMock exec) {
+		return exec.getVariables().get("exploratory_name");
+	}
+
+	private void handleExploratory(String cmd, DockerAction action) throws Exception {
+		String uuid = UUID.randomUUID().toString();
+		CommandExecutorMock exec = getCommandExecutor();
+		exec.executeAsync("user", uuid, cmd);
+		exec.getResultSync();
+
+		RESTServiceMock selfService = new RESTServiceMock();
+		ExploratoryCallbackHandler handler = new ExploratoryCallbackHandler(null, selfService, action,
+				getRequestId(exec), getEdgeUserName(exec), getExploratoryName(exec));
+		handler.handle(exec.getResponseFileName(), Files.readAllBytes(Paths.get(exec.getResponseFileName())));
+
+		try {
 			Files.deleteIfExists(Paths.get(exec.getResponseFileName()));
 		} catch (IOException e) {
 			e.printStackTrace();
@@ -96,7 +97,8 @@
 				new LibListCallbackHandler(selfService, action,
 				getRequestId(exec), getEdgeUserName(exec), getExploratoryName(exec));
 		*/
-		ResourceCallbackHandler<?> handler = new LibListCallbackHandler(selfService, action, getRequestId(exec), getEdgeUserName(exec), getExploratoryName(exec));
+		ResourceCallbackHandler<?> handler = new LibListCallbackHandler(null, selfService, action, getRequestId(exec),
+				getEdgeUserName(exec), getExploratoryName(exec));
 
 		handler.handle(exec.getResponseFileName(), Files.readAllBytes(Paths.get(exec.getResponseFileName())));
 
@@ -107,225 +109,252 @@
 		}
 	}
 
-    @Test
-    public void describe() throws IOException, InterruptedException, ExecutionException {
-    	String cmd =
-    		"docker run " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/notebook:/logs/notebook " +
-    		"-e \"conf_resource=notebook\" " +
-    		"-e \"request_id=28ba67a4-b2ee-4753-a406-892977089ad9\" " +
-    		"docker.dlab-zeppelin:latest --action describe";
-    	executeAsync(cmd);
-    }
-    
-    @Test
-    public void edgeCreate() throws IOException, InterruptedException, ExecutionException {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
-    		"\"aws_vpc_id\":\"vpc-83c469e4\",\"aws_subnet_id\":\"subnet-22db937a\",\"aws_security_groups_ids\":\"sg-4d42dc35\"}' | " +
-    		"docker run -i --name user_create_edge_1487309918496 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/edge:/logs/edge " +
-    		"-e \"conf_resource=edge\" " +
-    		"-e \"request_id=b8267ae6-07b0-44ef-a489-7714b20cf0a4\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-edge --action create";
-    	executeAsync(cmd);
-    }
-    
-    @Test
-    public void edgeStop() throws IOException, InterruptedException, ExecutionException {
-    	String cmd =
-    	    "echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    	    "\"conf_service_base_name\":\"usein1122v4\",\"conf_os_family\":\"debian\"}' | " +
-    	    "docker run -i --name user_stop_edge_1487677431773 " +
-    	    "-v /home/ubuntu/keys:/root/keys " +
-    	    "-v /opt/dlab/tmp/result:/response " +
-    	    "-v /var/opt/dlab/log/edge:/logs/edge " +
-    	    "-e \"conf_resource=edge\" " +
-    	    "-e \"request_id=2ba3d8f7-654b-48aa-9386-e815b296a957\" " +
-    	    "-e \"conf_key_name=BDCC-DSS-POC\" " +
-    	    "docker.dlab-edge --action stop";
-    	executeAsync(cmd);
-    }
-    
-    @Test
-    public void edgeStart() throws IOException, InterruptedException, ExecutionException {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    	    "\"conf_service_base_name\":\"usein1122v4\",\"conf_os_family\":\"debian\"}' | " +
-    	    "docker run -i --name user_start_edge_1487677538220 " +
-    	    "-v /home/ubuntu/keys:/root/keys " +
-    	    "-v /opt/dlab/tmp/result:/response " +
-    	    "-v /var/opt/dlab/log/edge:/logs/edge " +
-    	    "-e \"conf_resource=edge\" " +
-    	    "-e \"request_id=d2f6fbae-979e-4b08-9c0d-559a103ec0cc\" " +
-    	    "-e \"conf_key_name=BDCC-DSS-POC\" " +
-    	    "docker.dlab-edge --action start";
-    	executeAsync(cmd);
-    }
-    
-    @Test
-    public void edgeStatus() throws IOException, InterruptedException, ExecutionException {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"edge_list_resources\":{\"host\":[{\"id\":\"i-05c1a0d0ad030cdc1\"}, {\"id\":\"i-05c1a0d0ad030cdc2\"}]}}' | " +
-    		"docker run -i --name user_status_resources_1487607145484 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/edge:/logs/edge " +
-    		"-e \"conf_resource=status\" " +
-    		"-e \"request_id=0fb82e16-deb2-4b18-9ab3-f9f1c12d9e62\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-edge --action status";
-    	executeAsync(cmd);
-    }
-    
-    
-    @Test
-    public void notebookCreate() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
-    		"\"exploratory_name\":\"useinxz1\",\"application\":\"zeppelin\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
-    		"\"aws_notebook_instance_type\":\"t2.medium\",\"aws_security_groups_ids\":\"sg-4d42dc35\"}' | " +
-    		"docker run -i --name user_create_exploratory_useinxz1_1487312574572 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/notebook:/logs/notebook " +
-    		"-e \"conf_resource=notebook\" " +
-    		"-e \"request_id=f720f30b-5949-4919-a50b-ce7af58d6fe9\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-zeppelin --action create";
-    	handleExploratory(cmd, DockerAction.CREATE);
-    }
-    
-    @Test
-    public void notebookStop() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1120v13\"," +
-    		"\"exploratory_name\":\"useinxz1\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
-    		"\"notebook_instance_name\":\"usein1120v13-user-nb-useinxz1-78af3\",\"conf_key_dir\":\"/root/keys\"}' | " +
-    		"docker run -i --name user_stop_exploratory_useinxz1_1487315364165 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/notebook:/logs/notebook " +
-    		"-e \"conf_resource=notebook\" " +
-    		"-e \"request_id=33998e05-7781-432e-b748-bf3f0e7f9342\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-zeppelin --action stop";
-    	handleExploratory(cmd, DockerAction.STOP);
-    }
-    
-    @Test
-    public void notebookStart() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
-    		"\"exploratory_name\":\"useinxz1\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
-    		"\"notebook_instance_name\":\"usein1120v13-user-nb-useinxz1-78af3\"}' | " +
-    		"docker run -i --name user_start_exploratory_useinxz1_1487316756857 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/notebook:/logs/notebook " +
-    		"-e \"conf_resource=notebook\" " +
-    		"-e \"request_id=d50b9d20-1b1a-415f-8e47-ed0aca029e73\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-zeppelin --action start";
-    	handleExploratory(cmd, DockerAction.START);
-    }
-    
-    @Test
-    public void notebookTerminate() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
-    		"\"exploratory_name\":\"useinxz1\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
-    		"\"notebook_instance_name\":\"usein1120v13-user-nb-useinxz1-78af3\"}' | " +
-    		"docker run -i --name user_terminate_exploratory_useinxz1_1487318040180 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/notebook:/logs/notebook " +
-    		"-e \"conf_resource=notebook\" " +
-    		"-e \"request_id=de217441-9757-4c4e-b020-548f66b58e00\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-zeppelin --action terminate";
-    	handleExploratory(cmd, DockerAction.TERMINATE);
-    }
-    
-    
-    @Test
-    public void emrCreate() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1122v3\",\"conf_os_family\":\"debian\"," +
-    	    "\"exploratory_name\":\"useinj1\",\"application\":\"jupyter\",\"computational_name\":\"useine1\"," +
-    	    "\"emr_instance_count\":\"2\",\"emr_master_instance_type\":\"c4.large\",\"emr_slave_instance_type\":\"c4.large\"," +
-    	    "\"emr_version\":\"emr-5.2.0\",\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\"," +
-    	    "\"notebook_template_name\":\"Jupyter 1.5\"}' | " +
-    	    "docker run -i --name user_create_computational_useine1_1487653987822 " +
-    	    "-v /home/ubuntu/keys:/root/keys " +
-    	    "-v /opt/dlab/tmp/result:/response " +
-    	    "-v /var/opt/dlab/log/emr:/logs/emr " +
-    	    "-e \"conf_resource=emr\" " +
-    	    "-e \"request_id=917db3fd-3c17-4e79-8462-482a71a5d96f\" " +
-    	    "-e \"ec2_role=EMR_EC2_DefaultRole\" " +
-    	    "-e \"emr_timeout=3600\" " +
-    	    "-e \"service_role=EMR_DefaultRole\" " +
-    	    "-e \"conf_key_name=BDCC-DSS-POC\" " +
-    	    "docker.dlab-emr --action create";
-    	executeAsync(cmd);
-    }
-    
-    @Test
-    public void emrConfigure() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"," +
-    		"\"conf_service_base_name\":\"usein1122v4\",\"exploratory_name\":\"useinj1\"," +
-    		"\"application\":\"jupyter\",\"computational_name\":\"useine2\",\"emr_version\":\"emr-5.2.0\"," +
-    		"\"notebook_instance_name\":\"usein1122v4-user-nb-useinj1-b0a2e\"}' | " +
-    		"docker run -i --name user_configure_computational_useine2_1487676513703 " +
-    		"-v /home/ubuntu/keys:/root/keys " +
-    		"-v /opt/dlab/tmp/result:/response " +
-    		"-v /var/opt/dlab/log/emr:/logs/emr " +
-    		"-e \"conf_resource=emr\" " +
-    		"-e \"request_id=dc3c1002-c07d-442b-99f9-18085aeb2881\" " +
-    		"-e \"conf_key_name=BDCC-DSS-POC\" " +
-    		"docker.dlab-jupyter --action configure";
-    	executeAsync(cmd);
-    }
-    
-    @Test
-    public void emrTerminate() throws Exception {
-    	String cmd =
-    		"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"" +
-    	    ",\"conf_service_base_name\":\"usein1122v3\",\"exploratory_name\":\"useinj1\"," +
-    	    "\"computational_name\":\"useine1\",\"emr_cluster_name\":\"usein1122v3-user-emr-useinj1-useine1-d2db9\"," +
-    	    "\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\",\"conf_key_dir\":\"/root/keys\"}' | " +
-    	    "docker run -i --name user_terminate_computational_useine1_1487657251858 " +
-    	    "-v /home/ubuntu/keys:/root/keys " +
-    	    "-v /opt/dlab/tmp/result:/response " +
-    	    "-v /var/opt/dlab/log/emr:/logs/emr " +
-    	    "-e \"conf_resource=emr\" " +
-    	    "-e \"request_id=2d5c23b8-d312-4fad-8a3c-0b813550d841\" " +
-    	    "-e \"conf_key_name=BDCC-DSS-POC\" " +
-    	    "docker.dlab-emr --action terminate";
-    	executeAsync(cmd);
-    }
+	@Test
+	public void describe() throws IOException, InterruptedException, ExecutionException {
+		String cmd =
+				"docker run " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/notebook:/logs/notebook " +
+						"-e \"conf_resource=notebook\" " +
+						"-e \"request_id=28ba67a4-b2ee-4753-a406-892977089ad9\" " +
+						"docker.dlab-zeppelin:latest --action describe";
+		executeAsync(cmd);
+	}
+
+	@Test
+	public void edgeCreate() throws IOException, InterruptedException, ExecutionException {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
+						"\"aws_vpc_id\":\"vpc-83c469e4\",\"aws_subnet_id\":\"subnet-22db937a\"," +
+						"\"aws_security_groups_ids\":\"sg-4d42dc35\"}' | " +
+						"docker run -i --name user_create_edge_1487309918496 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/edge:/logs/edge " +
+						"-e \"conf_resource=edge\" " +
+						"-e \"request_id=b8267ae6-07b0-44ef-a489-7714b20cf0a4\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-edge --action create";
+		executeAsync(cmd);
+	}
+
+	@Test
+	public void edgeStop() throws IOException, InterruptedException, ExecutionException {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1122v4\",\"conf_os_family\":\"debian\"}' | " +
+						"docker run -i --name user_stop_edge_1487677431773 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/edge:/logs/edge " +
+						"-e \"conf_resource=edge\" " +
+						"-e \"request_id=2ba3d8f7-654b-48aa-9386-e815b296a957\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-edge --action stop";
+		executeAsync(cmd);
+	}
+
+	@Test
+	public void edgeStart() throws IOException, InterruptedException, ExecutionException {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1122v4\",\"conf_os_family\":\"debian\"}' | " +
+						"docker run -i --name user_start_edge_1487677538220 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/edge:/logs/edge " +
+						"-e \"conf_resource=edge\" " +
+						"-e \"request_id=d2f6fbae-979e-4b08-9c0d-559a103ec0cc\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-edge --action start";
+		executeAsync(cmd);
+	}
+
+	@Test
+	public void edgeStatus() throws IOException, InterruptedException, ExecutionException {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"edge_list_resources\":{\"host\":[{\"id\":\"i-05c1a0d0ad030cdc1\"}, " +
+						"{\"id\":\"i-05c1a0d0ad030cdc2\"}]}}' | " +
+						"docker run -i --name user_status_resources_1487607145484 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/edge:/logs/edge " +
+						"-e \"conf_resource=status\" " +
+						"-e \"request_id=0fb82e16-deb2-4b18-9ab3-f9f1c12d9e62\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-edge --action status";
+		executeAsync(cmd);
+	}
+
+
+	@Test
+	public void notebookCreate() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
+						"\"exploratory_name\":\"useinxz1\",\"application\":\"zeppelin\",\"notebook_image\":\"docker" +
+						".dlab-zeppelin\"," +
+						"\"aws_notebook_instance_type\":\"t2.medium\",\"aws_security_groups_ids\":\"sg-4d42dc35\"}' " +
+						"|" +
+						" " +
+						"docker run -i --name user_create_exploratory_useinxz1_1487312574572 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/notebook:/logs/notebook " +
+						"-e \"conf_resource=notebook\" " +
+						"-e \"request_id=f720f30b-5949-4919-a50b-ce7af58d6fe9\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-zeppelin --action create";
+		handleExploratory(cmd, DockerAction.CREATE);
+	}
+
+	@Test
+	public void notebookStop() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1120v13\"," +
+						"\"exploratory_name\":\"useinxz1\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
+						"\"notebook_instance_name\":\"usein1120v13-user-nb-useinxz1-78af3\"," +
+						"\"conf_key_dir\":\"/root/keys\"}' | " +
+						"docker run -i --name user_stop_exploratory_useinxz1_1487315364165 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/notebook:/logs/notebook " +
+						"-e \"conf_resource=notebook\" " +
+						"-e \"request_id=33998e05-7781-432e-b748-bf3f0e7f9342\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-zeppelin --action stop";
+		handleExploratory(cmd, DockerAction.STOP);
+	}
+
+	@Test
+	public void notebookStart() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
+						"\"exploratory_name\":\"useinxz1\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
+						"\"notebook_instance_name\":\"usein1120v13-user-nb-useinxz1-78af3\"}' | " +
+						"docker run -i --name user_start_exploratory_useinxz1_1487316756857 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/notebook:/logs/notebook " +
+						"-e \"conf_resource=notebook\" " +
+						"-e \"request_id=d50b9d20-1b1a-415f-8e47-ed0aca029e73\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-zeppelin --action start";
+		handleExploratory(cmd, DockerAction.START);
+	}
+
+	@Test
+	public void notebookTerminate() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1120v13\",\"conf_os_family\":\"debian\"," +
+						"\"exploratory_name\":\"useinxz1\",\"notebook_image\":\"docker.dlab-zeppelin\"," +
+						"\"notebook_instance_name\":\"usein1120v13-user-nb-useinxz1-78af3\"}' | " +
+						"docker run -i --name user_terminate_exploratory_useinxz1_1487318040180 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/notebook:/logs/notebook " +
+						"-e \"conf_resource=notebook\" " +
+						"-e \"request_id=de217441-9757-4c4e-b020-548f66b58e00\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-zeppelin --action terminate";
+		handleExploratory(cmd, DockerAction.TERMINATE);
+	}
+
+
+	@Test
+	public void emrCreate() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1122v3\",\"conf_os_family\":\"debian\"," +
+						"\"exploratory_name\":\"useinj1\",\"application\":\"jupyter\"," +
+						"\"computational_name\":\"useine1\"," +
+						"\"emr_instance_count\":\"2\",\"emr_master_instance_type\":\"c4.large\"," +
+						"\"emr_slave_instance_type\":\"c4.large\"," +
+						"\"emr_version\":\"emr-5.2.0\",\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1" +
+						"-1b198" +
+						"\"," +
+						"\"notebook_template_name\":\"Jupyter 1.5\"}' | " +
+						"docker run -i --name user_create_computational_useine1_1487653987822 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/emr:/logs/emr " +
+						"-e \"conf_resource=emr\" " +
+						"-e \"request_id=917db3fd-3c17-4e79-8462-482a71a5d96f\" " +
+						"-e \"ec2_role=EMR_EC2_DefaultRole\" " +
+						"-e \"emr_timeout=3600\" " +
+						"-e \"service_role=EMR_DefaultRole\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-emr --action create";
+		executeAsync(cmd);
+	}
+
+	@Test
+	public void emrConfigure() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"," +
+						"\"conf_service_base_name\":\"usein1122v4\",\"exploratory_name\":\"useinj1\"," +
+						"\"application\":\"jupyter\",\"computational_name\":\"useine2\",\"emr_version\":\"emr-5.2" +
+						".0\"," +
+						"\"notebook_instance_name\":\"usein1122v4-user-nb-useinj1-b0a2e\"}' | " +
+						"docker run -i --name user_configure_computational_useine2_1487676513703 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/emr:/logs/emr " +
+						"-e \"conf_resource=emr\" " +
+						"-e \"request_id=dc3c1002-c07d-442b-99f9-18085aeb2881\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-jupyter --action configure";
+		executeAsync(cmd);
+	}
+
+	@Test
+	public void emrTerminate() throws Exception {
+		String cmd =
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"" +
+						",\"conf_service_base_name\":\"usein1122v3\",\"exploratory_name\":\"useinj1\"," +
+						"\"computational_name\":\"useine1\"," +
+						"\"emr_cluster_name\":\"usein1122v3-user-emr-useinj1-useine1-d2db9\"," +
+						"\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\"," +
+						"\"conf_key_dir\":\"/root/keys\"}' | " +
+						"docker run -i --name user_terminate_computational_useine1_1487657251858 " +
+						"-v /home/ubuntu/keys:/root/keys " +
+						"-v /opt/dlab/tmp/result:/response " +
+						"-v /var/opt/dlab/log/emr:/logs/emr " +
+						"-e \"conf_resource=emr\" " +
+						"-e \"request_id=2d5c23b8-d312-4fad-8a3c-0b813550d841\" " +
+						"-e \"conf_key_name=BDCC-DSS-POC\" " +
+						"docker.dlab-emr --action terminate";
+		executeAsync(cmd);
+	}
 
 
 	@Test
 	public void listLibs() throws Exception {
 		String cmd =
-				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"" +
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"" +
 						",\"conf_service_base_name\":\"usein1122v3\",\"exploratory_name\":\"useinj1\"," +
-						"\"computational_name\":\"useine1\",\"emr_cluster_name\":\"usein1122v3-user-emr-useinj1-useine1-d2db9\"," +
-						"\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\",\"conf_key_dir\":\"/root/keys\"}' | " +
+						"\"computational_name\":\"useine1\"," +
+						"\"emr_cluster_name\":\"usein1122v3-user-emr-useinj1-useine1-d2db9\"," +
+						"\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\"," +
+						"\"conf_key_dir\":\"/root/keys\"}' | " +
 						"docker run -i --name user_terminate_computational_useine1_1487657251858 " +
 						"-v /home/ubuntu/keys:/root/keys " +
 						"-v /opt/dlab/tmp/result:/response " +
@@ -342,10 +371,13 @@
 	@Test
 	public void installLibs() throws Exception {
 		String cmd =
-				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\",\"edge_user_name\":\"user\"" +
+				"echo -e '{\"aws_region\":\"us-west-2\",\"aws_iam_user\":\"user@epam.com\"," +
+						"\"edge_user_name\":\"user\"" +
 						",\"conf_service_base_name\":\"usein1122v3\",\"exploratory_name\":\"useinj1\"," +
-						"\"computational_name\":\"useine1\",\"emr_cluster_name\":\"usein1122v3-user-emr-useinj1-useine1-d2db9\"," +
-						"\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\",\"conf_key_dir\":\"/root/keys\"}' | " +
+						"\"computational_name\":\"useine1\"," +
+						"\"emr_cluster_name\":\"usein1122v3-user-emr-useinj1-useine1-d2db9\"," +
+						"\"notebook_instance_name\":\"usein1122v3-user-nb-useinj1-1b198\"," +
+						"\"conf_key_dir\":\"/root/keys\"}' | " +
 						"docker run -i --name user_terminate_computational_useine1_1487657251858 " +
 						"-v /home/ubuntu/keys:/root/keys " +
 						"-v /opt/dlab/tmp/result:/response " +
@@ -362,5 +394,5 @@
 		executeAsync(cmd);
 		handleExploratoryLibs(cmd, DockerAction.LIB_INSTALL);
 	}
-    
+
 }
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/ImagesDockerCommandTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/ImagesDockerCommandTest.java
index 52ca538..7656ac3 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/ImagesDockerCommandTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/ImagesDockerCommandTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.docker.command;
 
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/RunDockerCommandTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/RunDockerCommandTest.java
index 0877c32..068c0c1 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/RunDockerCommandTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/docker/command/RunDockerCommandTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.docker.command;
 
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerTest.java
index c86f209..1ba3aab 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/FolderListenerTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
 
@@ -67,6 +68,11 @@
 		public void handleError(String errorMessage) {
 			System.out.println("handleError called for UUID " + getUUID());
 		}
+
+		@Override
+		public String getUser() {
+			return null;
+		}
 	}
 
 	private String getFileName(String uuid) {
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemListTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemListTest.java
index 849fad6..780df37 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemListTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemListTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
 
@@ -63,6 +64,11 @@
 		public void handleError(String errorMessage) {
 			System.out.println("handleError called for UUID " + getUUID());
 		}
+
+		@Override
+		public String getUser() {
+			return null;
+		}
 	}
 
 
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemTest.java
index 70aa1d1..33798b9 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/folderlistener/WatchItemTest.java
@@ -1,36 +1,33 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.core.response.folderlistener;
 
-import static org.junit.Assert.assertEquals;
+import com.epam.dlab.backendapi.core.FileHandlerCallback;
+import com.epam.dlab.backendapi.core.response.folderlistener.WatchItem.ItemStatus;
+import io.dropwizard.util.Duration;
+import org.junit.Test;
 
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 
-import org.junit.Test;
-
-import com.epam.dlab.backendapi.core.FileHandlerCallback;
-import com.epam.dlab.backendapi.core.response.folderlistener.AsyncFileHandler;
-import com.epam.dlab.backendapi.core.response.folderlistener.WatchItem;
-import com.epam.dlab.backendapi.core.response.folderlistener.WatchItem.ItemStatus;
-
-import io.dropwizard.util.Duration;
+import static org.junit.Assert.assertEquals;
 
 public class WatchItemTest {
 
@@ -68,6 +65,11 @@
 		public void handleError(String errorMessage) {
 			System.out.println("handleError called for UUID " + getUUID());
 		}
+
+		@Override
+		public String getUser() {
+			return null;
+		}
 	}
 
 	
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDaoTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDaoTest.java
index e457750..2623097 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDaoTest.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDaoTest.java
@@ -1,25 +1,25 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.core.response.handlers.dao;
 
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.core.DockerWarmuper;
 import com.epam.dlab.backendapi.core.commands.DockerAction;
@@ -56,6 +56,8 @@
 	private ProvisioningServiceApplicationConfiguration configuration;
 	@Mock
 	private CallbackHandlerDao dao;
+	@Mock
+	private SystemUserInfoService systemUserInfoService;
 	@InjectMocks
 	private FileSystemCallbackHandlerDao fileSystemCallbackHandlerDao;
 
@@ -75,8 +77,9 @@
 		final String handlersFolders = getHandlersFolder();
 		when(configuration.getHandlerDirectory()).thenReturn(handlersFolders);
 		when(mapper.writeValueAsBytes(any())).thenReturn("{'test': 'test'}".getBytes());
-		final PersistentFileHandler persistentFileHandler = new PersistentFileHandler(new LibListCallbackHandler(null,
-				DockerAction.LIB_LIST, "uuid", "test", "das"), 1L, "/opt/test");
+		final PersistentFileHandler persistentFileHandler =
+				new PersistentFileHandler(new LibListCallbackHandler(systemUserInfoService, null,
+						DockerAction.LIB_LIST, "uuid", "test", "das"), 1L, "/opt/test");
 
 		fileSystemCallbackHandlerDao.upsert(persistentFileHandler);
 
@@ -93,10 +96,12 @@
 		when(mapper.writeValueAsBytes(any())).thenReturn("{'test': 'test'}".getBytes());
 		final PersistentFileHandler persistentFileHandler1 = new PersistentFileHandler(new DockerWarmuper()
 				.new DockerFileHandlerCallback("sameUUID"), 1L, "/opt/test");
-		final PersistentFileHandler persistentFileHandler2 = new PersistentFileHandler(new LibListCallbackHandler(null,
-				DockerAction.LIB_LIST, "sameUUID", "test", "das1"), 1L, "/opt/test");
-		final PersistentFileHandler persistentFileHandler3 = new PersistentFileHandler(new LibListCallbackHandler(null,
-				DockerAction.LIB_LIST, "anotherUUID", "test", "das2"), 1L, "/opt/test");
+		final PersistentFileHandler persistentFileHandler2 =
+				new PersistentFileHandler(new LibListCallbackHandler(systemUserInfoService, null,
+						DockerAction.LIB_LIST, "sameUUID", "test", "das1"), 1L, "/opt/test");
+		final PersistentFileHandler persistentFileHandler3 =
+				new PersistentFileHandler(new LibListCallbackHandler(systemUserInfoService, null,
+						DockerAction.LIB_LIST, "anotherUUID", "test", "das2"), 1L, "/opt/test");
 
 
 		fileSystemCallbackHandlerDao.upsert(persistentFileHandler1);
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerServiceImplTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerServiceImplTest.java
new file mode 100644
index 0000000..aba84c3
--- /dev/null
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerServiceImplTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.core.response.folderlistener.FolderListenerExecutor;
+import com.epam.dlab.backendapi.core.response.handlers.PersistentFileHandler;
+import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
+import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
+import io.dropwizard.util.Duration;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.util.Arrays;
+
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class RestoreCallbackHandlerServiceImplTest {
+
+	@Mock
+	private CallbackHandlerDao dao;
+	@Mock
+	private FolderListenerExecutor folderListenerExecutor;
+	@InjectMocks
+	private RestoreCallbackHandlerServiceImpl restoreCallbackHandlerService;
+
+	@Test
+	public void start() throws Exception {
+
+		final PersistentFileHandler handler1 = new PersistentFileHandler(null, 1L, "test");
+		final PersistentFileHandler handler2 = new PersistentFileHandler(null, 2L, "test1");
+		when(dao.findAll()).thenReturn(Arrays.asList(handler1, handler2));
+
+		restoreCallbackHandlerService.start();
+
+		verify(dao).findAll();
+		verify(folderListenerExecutor).start(handler1.getDirectory(), Duration.milliseconds(handler1.getTimeout()),
+				handler1.getHandler());
+		verify(folderListenerExecutor).start(handler2.getDirectory(), Duration.milliseconds(handler2.getTimeout()),
+				handler2.getHandler());
+		verifyNoMoreInteractions(dao, folderListenerExecutor);
+	}
+}
\ No newline at end of file
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerServiceTest.java b/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerServiceTest.java
deleted file mode 100644
index 2da62c6..0000000
--- a/services/provisioning-service/src/test/java/com/epam/dlab/backendapi/service/RestoreCallbackHandlerServiceTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * **************************************************************************
- *
- * Copyright (c) 2018, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
- */
-
-package com.epam.dlab.backendapi.service;
-
-import com.epam.dlab.backendapi.core.response.folderlistener.FolderListenerExecutor;
-import com.epam.dlab.backendapi.core.response.handlers.PersistentFileHandler;
-import com.epam.dlab.backendapi.core.response.handlers.dao.CallbackHandlerDao;
-import io.dropwizard.util.Duration;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.util.Arrays;
-
-import static org.mockito.Mockito.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class RestoreCallbackHandlerServiceTest {
-
-	@Mock
-	private CallbackHandlerDao dao;
-	@Mock
-	private FolderListenerExecutor folderListenerExecutor;
-	@InjectMocks
-	private RestoreCallbackHandlerService restoreCallbackHandlerService;
-
-	@Test
-	public void start() throws Exception {
-
-		final PersistentFileHandler handler1 = new PersistentFileHandler(null, 1L, "test");
-		final PersistentFileHandler handler2 = new PersistentFileHandler(null, 2L, "test1");
-		when(dao.findAll()).thenReturn(Arrays.asList(handler1, handler2));
-
-		restoreCallbackHandlerService.start();
-
-		verify(dao).findAll();
-		verify(folderListenerExecutor).start(handler1.getDirectory(), Duration.milliseconds(handler1.getTimeout()),
-				handler1.getHandler());
-		verify(folderListenerExecutor).start(handler2.getDirectory(), Duration.milliseconds(handler2.getTimeout()),
-				handler2.getHandler());
-		verifyNoMoreInteractions(dao, folderListenerExecutor);
-	}
-}
\ No newline at end of file
diff --git a/services/provisioning-service/src/test/java/com/epam/dlab/rest/client/RESTServiceMock.java b/services/provisioning-service/src/test/java/com/epam/dlab/rest/client/RESTServiceMock.java
index bb24e22..3341d4f 100644
--- a/services/provisioning-service/src/test/java/com/epam/dlab/rest/client/RESTServiceMock.java
+++ b/services/provisioning-service/src/test/java/com/epam/dlab/rest/client/RESTServiceMock.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.rest.client;
 
diff --git a/services/readme.txt b/services/readme.txt
index 7014f79..f05eeda 100644
--- a/services/readme.txt
+++ b/services/readme.txt
@@ -1,18 +1,21 @@
 /***************************************************************************
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
 
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 
 ****************************************************************************/
 
diff --git a/services/security-aws/pom.xml b/services/security-aws/pom.xml
index 158d2d9..211e368 100644
--- a/services/security-aws/pom.xml
+++ b/services/security-aws/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAO.java b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAO.java
index 464edff..639513e 100644
--- a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAO.java
+++ b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.aws.dao;
 
diff --git a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAOImpl.java b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAOImpl.java
index 16cc24b..4398ccc 100644
--- a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAOImpl.java
+++ b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/dao/AwsUserDAOImpl.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.aws.dao;
 
diff --git a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsCredentialRefreshService.java b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsCredentialRefreshService.java
index 56f5b94..54bc300 100644
--- a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsCredentialRefreshService.java
+++ b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsCredentialRefreshService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.aws.service;
diff --git a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsUserVerificationService.java b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsUserVerificationService.java
index 9224755..bc7032c 100644
--- a/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsUserVerificationService.java
+++ b/services/security-aws/src/main/java/com/epam/dlab/auth/aws/service/AwsUserVerificationService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.aws.service;
diff --git a/services/security-azure/pom.xml b/services/security-azure/pom.xml
index 1850c9c..779efd0 100644
--- a/services/security-azure/pom.xml
+++ b/services/security-azure/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -63,6 +66,12 @@
         </dependency>
         <dependency>
             <groupId>com.epam.dlab</groupId>
+            <artifactId>dlab-webapp-common</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.epam.dlab</groupId>
             <artifactId>dlab-model</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationCodeSupplier.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationCodeSupplier.java
index 709bb46..4d4650c 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationCodeSupplier.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationCodeSupplier.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationSupplier.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationSupplier.java
index dcc432e..fef50a9 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationSupplier.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AuthorizationSupplier.java
@@ -1,18 +1,20 @@
 /*
-/*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureAuthenticationResource.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureAuthenticationResource.java
index 5f3b8d1..451e7c2 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureAuthenticationResource.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureAuthenticationResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
@@ -24,6 +27,7 @@
 import com.epam.dlab.auth.dto.UserCredentialDTO;
 import com.epam.dlab.auth.rest.AbstractAuthenticationService;
 import com.epam.dlab.dto.azure.auth.AuthorizationCodeFlowResponse;
+import com.epam.dlab.rest.dto.ErrorDTO;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.inject.Inject;
@@ -149,9 +153,9 @@
 					(azureLoginConfiguration, response))).build();
 		} catch (AuthenticationException e) {
 			log.error("OAuth authentication failed", e);
-			return Response.status(Response.Status.UNAUTHORIZED)
-					.entity(new AzureLocalAuthResponse(null, null,
-							"User authentication failed")).build();
+			final Response.Status unauthorized = Response.Status.UNAUTHORIZED;
+			return Response.status(unauthorized)
+					.entity(new ErrorDTO(unauthorized.getStatusCode(), "Username or password are not valid")).build();
 		}
 	}
 
@@ -183,8 +187,8 @@
 				log.warn("Cannot handle authentication exception", ioException);
 			}
 		}
-		return Response.status(Response.Status.UNAUTHORIZED)
-				.entity(new AzureLocalAuthResponse(null, null,
-						"User authentication failed")).build();
+		final Response.Status unauthorized = Response.Status.UNAUTHORIZED;
+		return Response.status(unauthorized)
+				.entity(new ErrorDTO(unauthorized.getStatusCode(), "Username or password are not valid")).build();
 	}
 }
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLocalAuthResponse.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLocalAuthResponse.java
index 24b5162..2616d57 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLocalAuthResponse.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLocalAuthResponse.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLoginUrlBuilder.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLoginUrlBuilder.java
index f81d706..52f701b 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLoginUrlBuilder.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureLoginUrlBuilder.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureSecurityResource.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureSecurityResource.java
index e5118e6..335da2d 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureSecurityResource.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/AzureSecurityResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
@@ -20,6 +23,7 @@
 import com.epam.dlab.auth.conf.AzureLoginConfiguration;
 import com.epam.dlab.dto.azure.auth.AuthorizationCodeFlowResponse;
 import com.epam.dlab.exceptions.DlabAuthenticationException;
+import com.epam.dlab.rest.dto.ErrorDTO;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import com.google.inject.Inject;
@@ -102,8 +106,9 @@
 			return Response.ok(response).build();
 		} catch (DlabAuthenticationException e) {
 			log.error(e.getMessage());
-			return Response.status(Response.Status.UNAUTHORIZED)
-					.entity(new AzureLocalAuthResponse(null, null, e.getMessage()))
+			final Response.Status unauthorized = Response.Status.UNAUTHORIZED;
+			return Response.status(unauthorized)
+					.entity(new ErrorDTO(unauthorized.getStatusCode(), e.getMessage()))
 					.build();
 		}
 	}
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignment.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignment.java
index da7f2f4..a11aff9 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignment.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignment.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentProperties.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentProperties.java
index e72a987..b6e6331 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentProperties.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentProperties.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentResponse.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentResponse.java
index 53cd228..bf05172 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentResponse.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/RoleAssignmentResponse.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/UsernamePasswordSupplier.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/UsernamePasswordSupplier.java
index d7165df..b80d4c0 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/UsernamePasswordSupplier.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/UsernamePasswordSupplier.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeService.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeService.java
index 47f003f..f8f2c32 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeService.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.azure.service;
diff --git a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeServiceImpl.java b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeServiceImpl.java
index 3fa1e69..0c3a0b5 100644
--- a/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeServiceImpl.java
+++ b/services/security-azure/src/main/java/com/epam/dlab/auth/azure/service/AzureAuthorizationCodeServiceImpl.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.auth.azure.service;
 
 import com.epam.dlab.auth.UserInfo;
diff --git a/services/security-gcp/pom.xml b/services/security-gcp/pom.xml
index dda8526..cc86be0 100644
--- a/services/security-gcp/pom.xml
+++ b/services/security-gcp/pom.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
   -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
diff --git a/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/resources/GcpOauth2SecurityResource.java b/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/resources/GcpOauth2SecurityResource.java
index 0a0ab49..5758a3f 100644
--- a/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/resources/GcpOauth2SecurityResource.java
+++ b/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/resources/GcpOauth2SecurityResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.gcp.resources;
diff --git a/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/service/GcpAuthenticationService.java b/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/service/GcpAuthenticationService.java
index 700c39b..2f338d5 100644
--- a/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/service/GcpAuthenticationService.java
+++ b/services/security-gcp/src/main/java/com/epam/dlab/auth/gcp/service/GcpAuthenticationService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.gcp.service;
diff --git a/services/security-service/pom.xml b/services/security-service/pom.xml
index 468c324..d9daede 100644
--- a/services/security-service/pom.xml
+++ b/services/security-service/pom.xml
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/services/security-service/security.yml b/services/security-service/security.yml
index bf9ae0f..c2430e9 100644
--- a/services/security-service/security.yml
+++ b/services/security-service/security.yml
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#  http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
 #
 # ******************************************************************************
 
@@ -24,10 +27,10 @@
   ldapHost: LDAP_HOST
 #  ldapPort: 3890
   ldapPort: 389
-  name: LDAP_USER
+  name: LDAP_USER,LDAP_DN
   credentials: LDAP_PASS
 useLdapBindTemplate: true
-ldapBindTemplate: uid=%s,ou=People,dc=example,dc=com
+ldapBindTemplate: uid=%s,LDAP_OU,LDAP_DN
 ldapBindAttribute: uid
 ldapSearchAttribute: uid
 ldapSearch:
@@ -41,7 +44,7 @@
       - uid
       - gidNumber
     timeLimit: 0
-    base: dc=example,dc=com
+    base: LDAP_DN
     filter: "(&(objectClass=inetOrgPerson)(uid=%uid%))"
   - name: userInfo
     cache: true
@@ -51,7 +54,7 @@
       - cn
       - gidNumber
     timeLimit: 0
-    base: dc=example,dc=com
+    base: LDAP_DN
     filter: "(&(objectClass=inetOrgPerson)(uid=%uid%))"
     searchResultProcessor:
       language: python
@@ -78,7 +81,7 @@
       - gidNumber
       - memberUid
     timeLimit: 0
-    base: dc=example,dc=com
+    base: LDAP_DN
     filter: "(&(objectClass=posixGroup))"
     searchResultProcessor:
       language: javascript
@@ -131,6 +134,7 @@
     - type: https
       port: 8090
       certAlias: dlab
+      validateCerts: true
       keyStorePath: ${KEY_STORE_PATH}
       keyStorePassword: ${KEY_STORE_PASSWORD}
       trustStorePath: ${TRUST_STORE_PATH}
@@ -139,6 +143,7 @@
     - type: https
       port: 8091
       certAlias: dlab
+      validateCerts: true
       keyStorePath: ${KEY_STORE_PATH}
       keyStorePassword: ${KEY_STORE_PASSWORD}
       trustStorePath: ${TRUST_STORE_PATH}
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceApplication.java b/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceApplication.java
index f0f7fa1..b7ef304 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceApplication.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceApplication.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceConfiguration.java b/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceConfiguration.java
index 5593978..ea5fdcd 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceConfiguration.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/SecurityServiceConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/CacheableReference.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/CacheableReference.java
index 60ff0d3..ff1f85f 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/CacheableReference.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/CacheableReference.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2016, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.core;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/DlabLdapConnection.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/DlabLdapConnection.java
index 51ee800..eaaecb6 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/DlabLdapConnection.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/DlabLdapConnection.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.core;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/LdapFilterCache.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/LdapFilterCache.java
index 7a37dcc..4ba561e 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/LdapFilterCache.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/LdapFilterCache.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginCache.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginCache.java
index 4c48172..12dece0 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginCache.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginCache.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginConveyor.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginConveyor.java
index 9c903ff..20b8bed 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginConveyor.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginConveyor.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginStep.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginStep.java
index 2f6e4fe..1559b73 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginStep.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/LoginStep.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/ReturnableConnection.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/ReturnableConnection.java
index 01d34a0..2a4aaca 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/ReturnableConnection.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/ReturnableConnection.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/SimpleConnection.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/SimpleConnection.java
index a1871ff..7afc5d7 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/SimpleConnection.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/SimpleConnection.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.core;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/core/UserInfoBuilder.java b/services/security-service/src/main/java/com/epam/dlab/auth/core/UserInfoBuilder.java
index 8e7b75e..f7e9ca4 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/core/UserInfoBuilder.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/core/UserInfoBuilder.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/LdapUserDAO.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/LdapUserDAO.java
index 0b9fa65..598fc22 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/LdapUserDAO.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/LdapUserDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/Request.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/Request.java
index 64f0f39..43fce47 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/Request.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/Request.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/SearchRequestBuilder.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/SearchRequestBuilder.java
index 3d608ac..49d0647 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/SearchRequestBuilder.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/SearchRequestBuilder.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAODumbImpl.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAODumbImpl.java
index 1ecf642..50562f9 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAODumbImpl.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAODumbImpl.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAOMongoImpl.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAOMongoImpl.java
index 67b28ea..583339f 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAOMongoImpl.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/UserInfoDAOMongoImpl.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultMapper.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultMapper.java
index 7b51a98..a2a1447 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultMapper.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultMapper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao.filter;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultProcessor.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultProcessor.java
index 936ac05..93ba572 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultProcessor.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/filter/SearchResultProcessor.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao.filter;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/DeepMap.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/DeepMap.java
index 9d54a8b..46048f0 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/DeepMap.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/DeepMap.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao.script;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/ScriptHolder.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/ScriptHolder.java
index 83cd4b5..e7f488a 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/ScriptHolder.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/ScriptHolder.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao.script;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/SearchResultToDictionaryMapper.java b/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/SearchResultToDictionaryMapper.java
index f9c7a47..f023c96 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/SearchResultToDictionaryMapper.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/dao/script/SearchResultToDictionaryMapper.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao.script;
 
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/modules/AwsSecurityServiceModule.java b/services/security-service/src/main/java/com/epam/dlab/auth/modules/AwsSecurityServiceModule.java
index d07bb7a..59ee4f5 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/modules/AwsSecurityServiceModule.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/modules/AwsSecurityServiceModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.modules;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/modules/AzureSecurityServiceModule.java b/services/security-service/src/main/java/com/epam/dlab/auth/modules/AzureSecurityServiceModule.java
index e517093..cf84c38 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/modules/AzureSecurityServiceModule.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/modules/AzureSecurityServiceModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.modules;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/modules/GcpSecurityServiceModule.java b/services/security-service/src/main/java/com/epam/dlab/auth/modules/GcpSecurityServiceModule.java
index ff59a84..1cd6a64 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/modules/GcpSecurityServiceModule.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/modules/GcpSecurityServiceModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.modules;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/modules/ModuleFactory.java b/services/security-service/src/main/java/com/epam/dlab/auth/modules/ModuleFactory.java
index fde7399..3d14901 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/modules/ModuleFactory.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/modules/ModuleFactory.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.modules;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/modules/SecurityServiceModule.java b/services/security-service/src/main/java/com/epam/dlab/auth/modules/SecurityServiceModule.java
index b2ba95d..f24b128 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/modules/SecurityServiceModule.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/modules/SecurityServiceModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.modules;
diff --git a/services/security-service/src/main/java/com/epam/dlab/auth/resources/SynchronousLdapAuthenticationService.java b/services/security-service/src/main/java/com/epam/dlab/auth/resources/SynchronousLdapAuthenticationService.java
index 983958f..7d60cbe 100644
--- a/services/security-service/src/main/java/com/epam/dlab/auth/resources/SynchronousLdapAuthenticationService.java
+++ b/services/security-service/src/main/java/com/epam/dlab/auth/resources/SynchronousLdapAuthenticationService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.auth.resources;
@@ -25,6 +28,7 @@
 import com.epam.dlab.auth.rest.AbstractAuthenticationService;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.rest.dto.ErrorDTO;
 import com.google.inject.Inject;
 
 import javax.servlet.http.HttpServletRequest;
@@ -71,13 +75,14 @@
 
 		log.debug("validating username:{} password:****** token:{} ip:{}", username, accessToken, remoteIp);
 
+		final Response.Status unauthorized = Response.Status.UNAUTHORIZED;
 		if (accessToken != null && !accessToken.isEmpty()) {
 			UserInfo ui = getUserInfo(accessToken, userAgent, remoteIp);
 			if (ui != null) {
 				return Response.ok(accessToken).build();
 			} else {
-				log.debug("User info not found on login by access_token for user", username);
-				return Response.status(Response.Status.UNAUTHORIZED).build();
+				log.debug("User info not found on login by access_token for user {}", username);
+				return Response.status(unauthorized).build();
 			}
 		}
 
@@ -96,7 +101,9 @@
 
 		} catch (Exception e) {
 			log.error("User {} is not authenticated", username, e);
-			return Response.status(Response.Status.UNAUTHORIZED).entity(e.getMessage()).build();
+			return Response.status(unauthorized)
+					.entity(new ErrorDTO(unauthorized.getStatusCode(), e.getMessage()))
+					.type(MediaType.APPLICATION_JSON).build();
 		}
 	}
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/aws/AwsTest.java b/services/security-service/src/test/java/com/epam/dlab/auth/aws/AwsTest.java
index 15c5b9d..2f3db5c 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/aws/AwsTest.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/aws/AwsTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.aws;
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/core/LoginConveyorTest.java b/services/security-service/src/test/java/com/epam/dlab/auth/core/LoginConveyorTest.java
index 4e7406b..5700957 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/core/LoginConveyorTest.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/core/LoginConveyorTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.core;
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/dao/script/ScriptHolderTest.java b/services/security-service/src/test/java/com/epam/dlab/auth/dao/script/ScriptHolderTest.java
index b449ae2..6dc1bd1 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/dao/script/ScriptHolderTest.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/dao/script/ScriptHolderTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.dao.script;
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/AuthTest.java b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/AuthTest.java
index c0a1110..e4a3acd 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/AuthTest.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/AuthTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.ldap;
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/BasicTest.java b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/BasicTest.java
index c976925..7450714 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/BasicTest.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/BasicTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.ldap;
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/JsonTest.java b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/JsonTest.java
index 932f60e..0bd69a5 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/JsonTest.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/JsonTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.ldap;
 
diff --git a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/ScriptList.java b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/ScriptList.java
index 75763a1..58b0db1 100644
--- a/services/security-service/src/test/java/com/epam/dlab/auth/ldap/ScriptList.java
+++ b/services/security-service/src/test/java/com/epam/dlab/auth/ldap/ScriptList.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.auth.ldap;
 
diff --git a/services/self-service/pom.xml b/services/self-service/pom.xml
index b5bc231..9ff451b 100644
--- a/services/self-service/pom.xml
+++ b/services/self-service/pom.xml
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -26,16 +27,29 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
+    <repositories>
+        <repository>
+            <id>michaelklishin</id>
+            <url>https://dl.bintray.com/michaelklishin/maven/</url>
+        </repository>
+    </repositories>
+
     <artifactId>self-service</artifactId>
 
     <properties>
         <com.fiestacabin.dropwizard.quartz.version>0.7.1</com.fiestacabin.dropwizard.quartz.version>
         <com.jcraft.jsch.version>0.1.54</com.jcraft.jsch.version>
         <org.glassfish.jersey.media.version>2.23.1</org.glassfish.jersey.media.version>
+        <com.github.oshi.core.version>3.8.0</com.github.oshi.core.version>
     </properties>
 
     <dependencies>
         <dependency>
+            <groupId>com.novemberain</groupId>
+            <artifactId>quartz-mongodb</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
             <groupId>com.epam.dlab</groupId>
             <artifactId>common</artifactId>
         </dependency>
@@ -68,7 +82,14 @@
             <groupId>com.fiestacabin.dropwizard.quartz</groupId>
             <artifactId>dropwizard-quartz</artifactId>
             <version>${com.fiestacabin.dropwizard.quartz.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.quartz-scheduler</groupId>
+                    <artifactId>quartz</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
+
         <dependency>
             <groupId>com.jcraft</groupId>
             <artifactId>jsch</artifactId>
@@ -109,6 +130,16 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>com.github.oshi</groupId>
+            <artifactId>oshi-core</artifactId>
+            <version>${com.github.oshi.core.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.smoketurner</groupId>
+            <artifactId>dropwizard-swagger</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.glassfish.jersey.test-framework.providers</groupId>
             <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
             <version>${org.glassfish.jersey.media.version}</version>
diff --git a/services/self-service/self-service.yml b/services/self-service/self-service.yml
index 3ba89f6..c001403 100644
--- a/services/self-service/self-service.yml
+++ b/services/self-service/self-service.yml
@@ -1,18 +1,21 @@
 # *****************************************************************************
 #
-# Copyright (c) 2016, EPAM SYSTEMS INC
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#  http://www.apache.org/licenses/LICENSE-2.0
 #
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
 #
 # ******************************************************************************
 
@@ -45,9 +48,9 @@
 checkEnvStatusTimeout: 5m
 
 # Restrict access to DLab features using roles policy
-rolePolicyEnabled : true
+rolePolicyEnabled: true
 # Default access to DLab features using roles policy
-roleDefaultAccess : true
+roleDefaultAccess: true
 
 # Set to true to enable the scheduler of billing report.
 billingSchedulerEnabled: false
@@ -66,32 +69,34 @@
 server:
   requestLog:
     appenders:
-      - type: file
-        currentLogFilename: ${LOG_ROOT_DIR}/ssn/request-selfservice.log
-        archive: true
-        archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/request-selfservice-%d{yyyy-MM-dd}.log.gz
-        archivedFileCount: 10
+    - type: file
+      currentLogFilename: ${LOG_ROOT_DIR}/ssn/request-selfservice.log
+      archive: true
+      archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/request-selfservice-%d{yyyy-MM-dd}.log.gz
+      archivedFileCount: 10
   rootPath: "/api"
   applicationConnectors:
-#    - type: http
-#      port: 8080
-    - type: https
-      port: 8443
-      certAlias: dlab
-      keyStorePath: ${KEY_STORE_PATH}
-      keyStorePassword: ${KEY_STORE_PASSWORD}
-      trustStorePath: ${TRUST_STORE_PATH}
-      trustStorePassword: ${TRUST_STORE_PASSWORD}
+  #    - type: http
+  #      port: 8080
+  - type: https
+    port: 8443
+    certAlias: dlab
+    validateCerts: true
+    keyStorePath: ${KEY_STORE_PATH}
+    keyStorePassword: ${KEY_STORE_PASSWORD}
+    trustStorePath: ${TRUST_STORE_PATH}
+    trustStorePassword: ${TRUST_STORE_PASSWORD}
   adminConnectors:
-#    - type: http
-#      port: 8081
-    - type: https
-      port: 8444
-      certAlias: dlab
-      keyStorePath: ${KEY_STORE_PATH}
-      keyStorePassword: ${KEY_STORE_PASSWORD}
-      trustStorePath: ${TRUST_STORE_PATH}
-      trustStorePassword: ${TRUST_STORE_PASSWORD}
+  #    - type: http
+  #      port: 8081
+  - type: https
+    port: 8444
+    certAlias: dlab
+    validateCerts: true
+    keyStorePath: ${KEY_STORE_PATH}
+    keyStorePassword: ${KEY_STORE_PASSWORD}
+    trustStorePath: ${TRUST_STORE_PATH}
+    trustStorePassword: ${TRUST_STORE_PASSWORD}
 
 mongoMigrationEnabled: false
 
@@ -99,12 +104,56 @@
   level: INFO
   loggers:
     com.epam: TRACE
+    com.novemberain: ERROR
   appenders:
 <#if DEV_MODE == "true">
-    - type: console
+  - type: console
 </#if>
-    - type: file
-      currentLogFilename: ${LOG_ROOT_DIR}/ssn/selfservice.log
-      archive: true
-      archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/selfservice-%d{yyyy-MM-dd}.log.gz
-      archivedFileCount: 10
+  - type: file
+    currentLogFilename: ${LOG_ROOT_DIR}/ssn/selfservice.log
+    archive: true
+    archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/selfservice-%d{yyyy-MM-dd}.log.gz
+    archivedFileCount: 10
+
+swaggerConfiguration:
+  resourcePackage: com.epam.dlab.backendapi.resources
+  title: DLab API
+  description: Essential toolset for analytics. Deployed on ${CLOUD_TYPE} provider
+  schemes: [https, http]
+  version: 2.0
+  contact: DLab
+  contactUrl: http://dlab.opensource.epam.com/
+  license: Apache 2.0
+  licenseUrl: https://www.apache.org/licenses/LICENSE-2.0
+
+mavenSearchService:
+  protocol: http
+  host: search.maven.org
+  port: 80
+  jerseyClient:
+    timeout: 5s
+    connectionTimeout: 5s
+
+schedulers:
+  inactivity:
+    enabled: false
+    cron: "0 0 0/2 ? * * *"
+  startComputationalScheduler:
+    enabled: true
+    cron: "*/20 * * ? * * *"
+  stopComputationalScheduler:
+    enabled: true
+    cron: "*/20 * * ? * * *"
+  startExploratoryScheduler:
+    enabled: true
+    cron: "*/20 * * ? * * *"
+  stopExploratoryScheduler:
+    enabled: true
+    cron: "*/20 * * ? * * *"
+  checkQuoteScheduler:
+    enabled: true
+    cron: "0 0 * ? * * *"
+  checkUserQuoteScheduler:
+    enabled: true
+    cron: "0 0 * ? * * *"
+
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java
index 1dfd788..7df4e47 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi;
@@ -21,18 +24,22 @@
 import com.epam.dlab.backendapi.domain.ExploratoryLibCache;
 import com.epam.dlab.backendapi.healthcheck.MongoHealthCheck;
 import com.epam.dlab.backendapi.healthcheck.ProvisioningServiceHealthCheck;
+import com.epam.dlab.backendapi.listeners.RestoreHandlerStartupListener;
 import com.epam.dlab.backendapi.modules.ModuleFactory;
 import com.epam.dlab.backendapi.resources.*;
 import com.epam.dlab.backendapi.resources.callback.*;
+import com.epam.dlab.backendapi.schedulers.internal.ManagedScheduler;
 import com.epam.dlab.cloud.CloudModule;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.migration.mongo.DlabMongoMigration;
 import com.epam.dlab.mongo.MongoServiceFactory;
+import com.epam.dlab.rest.client.RESTService;
 import com.epam.dlab.rest.mappers.*;
 import com.epam.dlab.util.ServiceUtils;
-import com.fiestacabin.dropwizard.quartz.ManagedScheduler;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
+import com.google.inject.Key;
+import com.google.inject.name.Names;
 import de.thomaskrille.dropwizard_template_config.TemplateConfigBundle;
 import de.thomaskrille.dropwizard_template_config.TemplateConfigBundleConfiguration;
 import io.dropwizard.Application;
@@ -41,6 +48,8 @@
 import io.dropwizard.jersey.setup.JerseyEnvironment;
 import io.dropwizard.setup.Bootstrap;
 import io.dropwizard.setup.Environment;
+import io.federecio.dropwizard.swagger.SwaggerBundle;
+import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;
 import lombok.extern.slf4j.Slf4j;
 
 /**
@@ -73,6 +82,12 @@
 		bootstrap.addBundle(new TemplateConfigBundle(
 				new TemplateConfigBundleConfiguration().fileIncludePath(ServiceUtils.getConfPath())
 		));
+		bootstrap.addBundle(new SwaggerBundle<SelfServiceApplicationConfiguration>() {
+			@Override
+			protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(SelfServiceApplicationConfiguration configuration) {
+				return configuration.getSwaggerConfiguration();
+			}
+		});
 	}
 
 	@Override
@@ -86,6 +101,10 @@
 		if (configuration.isMongoMigrationEnabled()) {
 			environment.lifecycle().addServerLifecycleListener(server -> applyMongoMigration(configuration));
 		}
+		final RestoreHandlerStartupListener restoreHandlerStartupListener =
+				new RestoreHandlerStartupListener(injector.getInstance(Key.get(RESTService.class,
+						Names.named(ServiceConsts.PROVISIONING_SERVICE_NAME))));
+		environment.lifecycle().addServerLifecycleListener(restoreHandlerStartupListener);
 		environment.lifecycle().manage(injector.getInstance(IndexCreator.class));
 		environment.lifecycle().manage(injector.getInstance(EnvStatusListener.class));
 		environment.lifecycle().manage(injector.getInstance(ExploratoryLibCache.class));
@@ -101,6 +120,7 @@
 		jersey.register(new ResourceNotFoundExceptionMapper());
 		jersey.register(new DlabValidationExceptionMapper());
 		jersey.register(new ValidationExceptionMapper());
+		jersey.register(new ResourceQuoteReachedExceptionMapper());
 		jersey.register(injector.getInstance(SecurityResource.class));
 		jersey.register(injector.getInstance(KeyUploaderResource.class));
 		jersey.register(injector.getInstance(EdgeResource.class));
@@ -129,6 +149,11 @@
 		jersey.register(injector.getInstance(BackupCallback.class));
 		jersey.register(injector.getInstance(EnvironmentResource.class));
 		jersey.register(injector.getInstance(ReuploadKeyCallback.class));
+		jersey.register(injector.getInstance(CheckInactivityCallback.class));
+		jersey.register(injector.getInstance(SystemInfoResource.class));
+		jersey.register(injector.getInstance(UserGroupResource.class));
+		jersey.register(injector.getInstance(UserRoleResource.class));
+		jersey.register(injector.getInstance(ApplicationSettingResource.class));
 	}
 
 	private void applyMongoMigration(SelfServiceApplicationConfiguration configuration) {
@@ -138,5 +163,4 @@
 				mongoFactory.getPassword(), mongoFactory.getDatabase()).migrate();
 	}
 
-
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplicationConfiguration.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplicationConfiguration.java
index ea8967f..78a074b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplicationConfiguration.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplicationConfiguration.java
@@ -1,30 +1,36 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi;
 
 import com.epam.dlab.ServiceConfiguration;
+import com.epam.dlab.backendapi.domain.SchedulerConfigurationData;
 import com.epam.dlab.backendapi.validation.SelfServiceCloudConfigurationSequenceProvider;
+import com.epam.dlab.constants.ServiceConsts;
+import com.epam.dlab.rest.client.RESTServiceFactory;
 import com.epam.dlab.validation.AwsValidation;
 import com.epam.dlab.validation.AzureValidation;
 import com.epam.dlab.validation.GcpValidation;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import io.dropwizard.client.JerseyClientConfiguration;
 import io.dropwizard.util.Duration;
+import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;
 import org.hibernate.validator.constraints.NotEmpty;
 import org.hibernate.validator.group.GroupSequenceProvider;
 
@@ -32,6 +38,7 @@
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotNull;
+import java.util.Map;
 
 /**
  * Configuration for Self Service.
@@ -97,11 +104,23 @@
 	private boolean mongoMigrationEnabled;
 	@JsonProperty
 	private int privateKeySize = 2048;
+	@JsonProperty
+	private SwaggerBundleConfiguration swaggerConfiguration;
+
+	@Valid
+	@NotNull
+	private Map<String, SchedulerConfigurationData> schedulers;
+
 
 	@Valid
 	@NotNull
 	private JerseyClientConfiguration jerseyClient = new JerseyClientConfiguration();
 
+	@Valid
+	@NotNull
+	@JsonProperty(ServiceConsts.MAVEN_SEARCH_API)
+	private RESTServiceFactory mavenApiFactory;
+
 	@JsonProperty("jerseyClient")
 	public JerseyClientConfiguration getJerseyClientConfiguration() {
 		return jerseyClient;
@@ -111,6 +130,14 @@
 		return maxSessionDurabilityMilliseconds;
 	}
 
+	public Map<String, SchedulerConfigurationData> getSchedulers() {
+		return schedulers;
+	}
+
+	public SwaggerBundleConfiguration getSwaggerConfiguration() {
+		return swaggerConfiguration;
+	}
+
 	public boolean isGcpOuauth2AuthenticationEnabled() {
 		return gcpOuauth2AuthenticationEnabled;
 	}
@@ -209,4 +236,9 @@
 	public boolean isMongoMigrationEnabled() {
 		return mongoMigrationEnabled;
 	}
+
+	@NotNull
+	public RESTServiceFactory getMavenApiFactory() {
+		return mavenApiFactory;
+	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/BudgetLimited.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/BudgetLimited.java
new file mode 100644
index 0000000..1d58792
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/BudgetLimited.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to disallow execution of method that is annotated by this annotation in case when
+ * budget limit in reached. Budget can be specified in self service configuration
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface BudgetLimited {
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthenticator.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthenticator.java
index 1906ec9..9399399 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthenticator.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthenticator.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.auth;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthorizer.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthorizer.java
index b1ed747..9b348e9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthorizer.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/SelfServiceSecurityAuthorizer.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.auth;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDao.java
index d8c7a8f..e48c5ea 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDao.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDao.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDaoImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDaoImpl.java
index d83ff66..f1b599c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDaoImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BackupDaoImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
new file mode 100644
index 0000000..f00b2b7
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
@@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.dao;
+
+import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.base.DataEngineType;
+import com.google.inject.Inject;
+import com.mongodb.client.FindIterable;
+import lombok.Getter;
+import lombok.ToString;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.bson.Document;
+import org.bson.conversions.Bson;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.function.Supplier;
+
+import static com.epam.dlab.backendapi.dao.ComputationalDAO.COMPUTATIONAL_ID;
+import static com.epam.dlab.backendapi.dao.ExploratoryDAO.COMPUTATIONAL_RESOURCES;
+import static com.epam.dlab.backendapi.dao.ExploratoryDAO.EXPLORATORY_ID;
+import static com.epam.dlab.backendapi.dao.MongoCollections.BILLING;
+import static com.epam.dlab.backendapi.dao.MongoCollections.USER_INSTANCES;
+import static com.mongodb.client.model.Accumulators.sum;
+import static com.mongodb.client.model.Aggregates.group;
+import static com.mongodb.client.model.Aggregates.match;
+import static com.mongodb.client.model.Filters.eq;
+import static com.mongodb.client.model.Projections.*;
+import static java.util.Collections.singletonList;
+
+@Slf4j
+public abstract class BaseBillingDAO<T> extends BaseDAO implements BillingDAO<T> {
+
+	public static final String SHAPE = "shape";
+	public static final String SERVICE_BASE_NAME = "service_base_name";
+	public static final String ITEMS = "lines";
+	public static final String COST_TOTAL = "cost_total";
+	public static final String FULL_REPORT = "full_report";
+
+	private static final String MASTER_NODE_SHAPE = "master_node_shape";
+	private static final String SLAVE_NODE_SHAPE = "slave_node_shape";
+	private static final String TOTAL_INSTANCE_NUMBER = "total_instance_number";
+
+	private static final String DATAENGINE_SHAPE = "dataengine_instance_shape";
+	private static final String DATAENGINE_INSTANCE_COUNT = "dataengine_instance_count";
+
+	private static final String DATAENGINE_DOCKER_IMAGE = "image";
+	private static final int ONE_HUNDRED = 100;
+	private static final String TOTAL_FIELD_NAME = "total";
+	private static final String COST_FIELD = "$cost";
+	private static final String SHARED_RESOURCE_NAME = "Shared resource";
+
+	@Inject
+	protected SettingsDAO settings;
+	@Inject
+	private UserSettingsDAO userSettingsDAO;
+
+	protected Map<String, ShapeInfo> getShapes(List<String> shapeNames) {
+		FindIterable<Document> userInstances = getUserInstances();
+		final Map<String, ShapeInfo> shapes = new HashMap<>();
+
+		for (Document d : userInstances) {
+			getExploratoryShape(shapeNames, d)
+					.ifPresent(shapeInfo -> shapes.put(d.getString(EXPLORATORY_ID), shapeInfo));
+			@SuppressWarnings("unchecked")
+			List<Document> comp = (List<Document>) d.get(COMPUTATIONAL_RESOURCES);
+			comp.forEach(computational ->
+					getComputationalShape(shapeNames, computational)
+							.ifPresent(shapeInfo -> shapes.put(computational.getString(COMPUTATIONAL_ID), shapeInfo)));
+		}
+
+		appendSsnAndEdgeNodeType(shapeNames, shapes);
+
+		log.trace("Loaded shapes is {}", shapes);
+		return shapes;
+	}
+
+	@Override
+	public Double getTotalCost() {
+		return aggregateBillingData(singletonList(group(null, sum(TOTAL_FIELD_NAME, COST_FIELD))));
+	}
+
+	@Override
+	public Double getUserCost(String user) {
+		final List<Bson> pipeline = Arrays.asList(match(eq(USER, user)),
+				group(null, sum(TOTAL_FIELD_NAME, COST_FIELD)));
+		return aggregateBillingData(pipeline);
+	}
+
+	@Override
+	public int getBillingQuoteUsed() {
+		return toPercentage(() -> settings.getMaxBudget(), getTotalCost());
+	}
+
+	@Override
+	public int getBillingUserQuoteUsed(String user) {
+		return toPercentage(() -> userSettingsDAO.getAllowedBudget(user), getUserCost(user));
+	}
+
+	@Override
+	public boolean isBillingQuoteReached() {
+		return getBillingQuoteUsed() >= ONE_HUNDRED;
+	}
+
+	@Override
+	public boolean isUserQuoteReached(String user) {
+		final Double userCost = getUserCost(user);
+		return userSettingsDAO.getAllowedBudget(user)
+				.filter(allowedBudget -> userCost.intValue() != 0 && allowedBudget <= userCost)
+				.isPresent();
+	}
+
+	protected String getUserOrDefault(String user) {
+		return StringUtils.isNotBlank(user) ? user : SHARED_RESOURCE_NAME;
+	}
+
+	private Integer toPercentage(Supplier<Optional<Integer>> allowedBudget, Double totalCost) {
+		return allowedBudget.get()
+				.map(userBudget -> (totalCost * ONE_HUNDRED) / userBudget)
+				.map(Double::intValue)
+				.orElse(BigDecimal.ZERO.intValue());
+	}
+
+
+	private Optional<ShapeInfo> getComputationalShape(List<String> shapeNames, Document c) {
+		return isDataEngine(c.getString(DATAENGINE_DOCKER_IMAGE)) ? getDataEngineShape(shapeNames, c) :
+				getDataEngineServiceShape(shapeNames, c);
+	}
+
+	private Double aggregateBillingData(List<Bson> pipeline) {
+		return Optional.ofNullable(aggregate(BILLING, pipeline).first())
+				.map(d -> d.getDouble(TOTAL_FIELD_NAME))
+				.orElse(BigDecimal.ZERO.doubleValue());
+	}
+
+	private FindIterable<Document> getUserInstances() {
+		return getCollection(USER_INSTANCES)
+				.find()
+				.projection(
+						fields(excludeId(),
+								include(SHAPE, EXPLORATORY_ID, STATUS,
+										COMPUTATIONAL_RESOURCES + "." + COMPUTATIONAL_ID,
+										COMPUTATIONAL_RESOURCES + "." + MASTER_NODE_SHAPE,
+										COMPUTATIONAL_RESOURCES + "." + SLAVE_NODE_SHAPE,
+										COMPUTATIONAL_RESOURCES + "." + TOTAL_INSTANCE_NUMBER,
+										COMPUTATIONAL_RESOURCES + "." + DATAENGINE_SHAPE,
+										COMPUTATIONAL_RESOURCES + "." + DATAENGINE_INSTANCE_COUNT,
+										COMPUTATIONAL_RESOURCES + "." + DATAENGINE_DOCKER_IMAGE,
+										COMPUTATIONAL_RESOURCES + "." + STATUS
+								)));
+	}
+
+	private Optional<ShapeInfo> getExploratoryShape(List<String> shapeNames, Document d) {
+		final String shape = d.getString(SHAPE);
+		if (isShapeAcceptable(shapeNames, shape)) {
+			return Optional.of(new ShapeInfo(shape, UserInstanceStatus.of(d.getString(STATUS))));
+		}
+		return Optional.empty();
+	}
+
+	private boolean isDataEngine(String dockerImage) {
+		return DataEngineType.fromDockerImageName(dockerImage) == DataEngineType.SPARK_STANDALONE;
+	}
+
+	private Optional<ShapeInfo> getDataEngineServiceShape(List<String> shapeNames,
+														  Document c) {
+		final String desMasterShape = c.getString(MASTER_NODE_SHAPE);
+		final String desSlaveShape = c.getString(SLAVE_NODE_SHAPE);
+		if (isShapeAcceptable(shapeNames, desMasterShape, desSlaveShape)) {
+			return Optional.of(new ShapeInfo(desMasterShape, desSlaveShape, c.getString(TOTAL_INSTANCE_NUMBER),
+					UserInstanceStatus.of(c.getString(STATUS))));
+		}
+		return Optional.empty();
+	}
+
+	private Optional<ShapeInfo> getDataEngineShape(List<String> shapeNames, Document c) {
+		final String dataEngineShape = c.getString(DATAENGINE_SHAPE);
+		if ((isShapeAcceptable(shapeNames, dataEngineShape))
+				&& StringUtils.isNotEmpty(c.getString(COMPUTATIONAL_ID))) {
+
+			return Optional.of(new ShapeInfo(dataEngineShape, c.getString(DATAENGINE_INSTANCE_COUNT),
+					UserInstanceStatus.of(c.getString(STATUS))));
+		}
+		return Optional.empty();
+	}
+
+	private boolean isShapeAcceptable(List<String> shapeNames, String... shapes) {
+		return shapeNames == null || shapeNames.isEmpty() || Arrays.stream(shapes).anyMatch(shapeNames::contains);
+	}
+
+	protected abstract void appendSsnAndEdgeNodeType(List<String> shapeNames, Map<String, ShapeInfo> shapes);
+
+	protected String generateShapeName(ShapeInfo shape) {
+		return Optional.ofNullable(shape).map(ShapeInfo::getName).orElse(StringUtils.EMPTY);
+	}
+
+	/**
+	 * Store shape info
+	 */
+	@Getter
+	@ToString
+	protected class ShapeInfo {
+		private static final String DES_NAME_FORMAT = "Master: %s%sSlave:  %d x %s";
+		private static final String DE_NAME_FORMAT = "%d x %s";
+		private final boolean isDataEngine;
+		private final String shape;
+		private final String slaveShape;
+		private final String slaveCount;
+		private final boolean isExploratory;
+		private final UserInstanceStatus status;
+
+		private ShapeInfo(boolean isDataEngine, String shape, String slaveShape, String slaveCount, boolean
+				isExploratory, UserInstanceStatus status) {
+			this.isDataEngine = isDataEngine;
+			this.shape = shape;
+			this.slaveShape = slaveShape;
+			this.slaveCount = slaveCount;
+			this.isExploratory = isExploratory;
+			this.status = status;
+		}
+
+		public ShapeInfo(String shape, UserInstanceStatus status) {
+			this(false, shape, null, null, true, status);
+		}
+
+		ShapeInfo(String shape, String slaveShape, String slaveCount, UserInstanceStatus status) {
+			this(false, shape, slaveShape, slaveCount, false, status);
+		}
+
+
+		ShapeInfo(String shape, String slaveCount, UserInstanceStatus status) {
+			this(true, shape, null, slaveCount, false, status);
+		}
+
+		public String getName() {
+			if (isExploratory) {
+				return shape;
+			} else {
+				return clusterName();
+			}
+		}
+
+		private String clusterName() {
+			try {
+				final Integer count = Integer.valueOf(slaveCount);
+				return isDataEngine ? String.format(DE_NAME_FORMAT, count, shape) :
+						String.format(DES_NAME_FORMAT, shape, System.lineSeparator(), count - 1, slaveShape);
+			} catch (NumberFormatException e) {
+				log.error("Cannot parse string {} to integer", slaveCount);
+				return StringUtils.EMPTY;
+			}
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseDAO.java
index 15f7cda..77f3284 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseDAO.java
@@ -1,35 +1,40 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.mongo.MongoService;
-import com.epam.dlab.util.mongo.IsoDateModule;
+import com.epam.dlab.util.mongo.modules.IsoDateModule;
+import com.epam.dlab.util.mongo.modules.JavaPrimitiveModule;
+import com.epam.dlab.util.mongo.modules.MongoModule;
 import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.inject.Inject;
+import com.mongodb.BasicDBObject;
 import com.mongodb.MongoException;
 import com.mongodb.client.*;
 import com.mongodb.client.model.UpdateOptions;
+import com.mongodb.client.result.DeleteResult;
 import com.mongodb.client.result.UpdateResult;
-import org.apache.commons.lang3.StringUtils;
 import org.bson.Document;
 import org.bson.conversions.Bson;
 import org.slf4j.Logger;
@@ -42,7 +47,7 @@
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
 
-import static com.mongodb.client.model.Aggregates.unwind;
+import static com.mongodb.client.model.Filters.*;
 
 /**
  * Implements the base API for Mongo database.
@@ -52,10 +57,11 @@
 
 	private static final ObjectMapper MAPPER = new ObjectMapper()
 			.configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, true)
-			.registerModule(new IsoDateModule());
+			.registerModule(new IsoDateModule())
+			.registerModule(new JavaPrimitiveModule())
+			.registerModule(new MongoModule());
 
 	static final String FIELD_SET_DELIMETER = ".$.";
-	private static final String FIELD_PROJECTION_DELIMITER = "$";
 	public static final String ID = "_id";
 	static final String SET = "$set";
 	public static final String USER = "user";
@@ -65,6 +71,12 @@
 	public static final String ERROR_MESSAGE = "error_message";
 	static final String TIMESTAMP = "timestamp";
 	static final String REUPLOAD_KEY_REQUIRED = "reupload_key_required";
+	protected static final String ADD_TO_SET = "$addToSet";
+	protected static final String UNSET_OPERATOR = "$unset";
+	private static final String PULL = "$pull";
+	private static final String PULL_ALL = "$pullAll";
+	private static final String EACH = "$each";
+	private static final String ELEMENT_AT_OPERATOR = "$arrayElemAt";
 
 	@Inject
 	protected MongoService mongoService;
@@ -202,6 +214,22 @@
 	}
 
 	/**
+	 * Removes single document in the collection by condition.
+	 *
+	 * @param collection collection name.
+	 * @param condition  condition for search documents in collection.
+	 */
+	protected DeleteResult deleteOne(String collection, Bson condition) {
+		try {
+			return mongoService.getCollection(collection)
+					.deleteOne(condition);
+		} catch (MongoException e) {
+			LOGGER.warn("Removing document from Mongo DB fails: {}", e.getLocalizedMessage(), e);
+			throw new DlabException("Removing document from Mongo DB fails: " + e.getLocalizedMessage(), e);
+		}
+	}
+
+	/**
 	 * Finds and returns all documents from the collection.
 	 *
 	 * @param collection collection name.
@@ -222,6 +250,20 @@
 	}
 
 	/**
+	 * Finds and returns all documents from the collection converted to resulted type.
+	 *
+	 * @param collection    collection name.
+	 * @param resultedClass type of class for deserialization.
+	 */
+	protected <T> List<T> find(String collection, Class<T> resultedClass) {
+		return find(collection)
+				.into(new ArrayList<>())
+				.stream()
+				.map(d -> convertFromDocument(d, resultedClass))
+				.collect(Collectors.toList());
+	}
+
+	/**
 	 * Finds and returns documents from the collection by condition.
 	 *
 	 * @param collection    collection name.
@@ -256,8 +298,8 @@
 	 * @param collection collection name.
 	 * @param pipeline   the aggregate pipeline.
 	 */
-	private AggregateIterable<Document> aggregate(String collection,
-												  List<? extends Bson> pipeline) {
+	public AggregateIterable<Document> aggregate(String collection,
+												 List<? extends Bson> pipeline) {
 		return mongoService.getCollection(collection)
 				.aggregate(pipeline);
 	}
@@ -304,7 +346,7 @@
 										 Bson condition,
 										 Bson projection) {
 		FindIterable<Document> found = find(collection, condition, projection);
-		return limitOne(found);
+			return limitOne(found);
 	}
 
 	/**
@@ -346,19 +388,6 @@
 	}
 
 	/**
-	 * Aggregates and returns one document according to the specified aggregation pipeline.
-	 *
-	 * @param collection collection name.
-	 * @param pipeline   the aggregate pipeline.
-	 * @throws DlabException if have more than one aggregated documents.
-	 */
-	Optional<Document> aggregateOne(String collection,
-									List<? extends Bson> pipeline) {
-		MongoIterable<Document> found = aggregate(collection, pipeline);
-		return limitOne(found);
-	}
-
-	/**
 	 * Deserializes given document to object and returns it.
 	 *
 	 * @param document element from database
@@ -372,6 +401,17 @@
 		}
 	}
 
+	<T> T convertFromDocument(List<Document> documents, TypeReference<T> valueTypeRef) {
+		final String jsonArray = documents.stream()
+				.map(Document::toJson)
+				.collect(Collectors.joining(",", "[", "]"));
+		try {
+			return MAPPER.readValue(jsonArray, valueTypeRef);
+		} catch (IOException e) {
+			throw new DlabException("error converting array " + jsonArray, e);
+		}
+	}
+
 	protected Document getGroupingFields(String... fieldNames) {
 		Document d = new Document();
 		for (String name : fieldNames) {
@@ -399,36 +439,31 @@
 		return UUID.randomUUID().toString();
 	}
 
-	static Bson unwindField(String fieldName) {
-		return unwind(FIELD_PROJECTION_DELIMITER + fieldName);
+	protected BasicDBObject addToSet(String columnName, Set<String> values) {
+		return new BasicDBObject(ADD_TO_SET, new BasicDBObject(columnName, new BasicDBObject(EACH, values)));
 	}
 
-	private static Object getDotted(Document d, String fieldName) {
-		if (fieldName.isEmpty()) {
-			return null;
-		}
-		final String[] fieldParts = StringUtils.split(fieldName, '.');
-		Object val = d.get(fieldParts[0]);
-		for (int i = 1; i < fieldParts.length; ++i) {
-			if (fieldParts[i].equals("$")
-					&& val instanceof ArrayList) {
-				ArrayList<?> array = (ArrayList<?>) val;
-				if (array.isEmpty()) {
-					return val;
-				} else {
-					val = array.get(0);
-				}
-			} else if (val instanceof Document) {
-				val = ((Document) val).get(fieldParts[i]);
-			} else {
-				return val;
-			}
-		}
-		return val;
+	protected Bson unset(String columnName, String value) {
+		return new BasicDBObject(UNSET_OPERATOR, new BasicDBObject(columnName, value));
 	}
 
-	static Object getDottedOrDefault(Document d, String fieldName, Object defaultValue) {
-		Object result = getDotted(d, fieldName);
-		return result == null ? defaultValue : result;
+	protected BasicDBObject pull(String columnName, String value) {
+		return new BasicDBObject(PULL, new BasicDBObject(columnName, value));
+	}
+
+	protected BasicDBObject pullAll(String columnName, Set<String> values) {
+		return new BasicDBObject(PULL_ALL, new BasicDBObject(columnName, values));
+	}
+
+	protected Document elementAt(String arrayColumnName, int index) {
+		return new Document(ELEMENT_AT_OPERATOR, Arrays.asList("$" + arrayColumnName, index));
+	}
+
+	protected Document elementAt(Bson bson, int index) {
+		return new Document(ELEMENT_AT_OPERATOR, Arrays.asList(bson, index));
+	}
+
+	protected Bson notNull(String fieldName) {
+		return and(exists(fieldName), ne(fieldName, null));
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BillingDAO.java
index af38da7..6d4c5e1 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BillingDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BillingDAO.java
@@ -1,202 +1,37 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
 package com.epam.dlab.backendapi.dao;
 
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.DataEngineType;
-import com.google.inject.Inject;
-import com.mongodb.client.FindIterable;
-import lombok.Getter;
-import lombok.ToString;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
+import com.epam.dlab.auth.UserInfo;
 import org.bson.Document;
 
-import java.util.*;
+public interface BillingDAO<T> {
+	Double getTotalCost();
 
-import static com.epam.dlab.backendapi.dao.ComputationalDAO.COMPUTATIONAL_ID;
-import static com.epam.dlab.backendapi.dao.ExploratoryDAO.COMPUTATIONAL_RESOURCES;
-import static com.epam.dlab.backendapi.dao.ExploratoryDAO.EXPLORATORY_ID;
-import static com.epam.dlab.backendapi.dao.MongoCollections.USER_INSTANCES;
-import static com.mongodb.client.model.Projections.*;
+	Double getUserCost(String user);
 
-@Slf4j
-public abstract class BillingDAO extends BaseDAO {
+	int getBillingQuoteUsed();
+	int getBillingUserQuoteUsed(String user);
 
-	public static final String SHAPE = "shape";
-	public static final String SERVICE_BASE_NAME = "service_base_name";
-	public static final String ITEMS = "lines";
-	public static final String COST_TOTAL = "cost_total";
-	public static final String FULL_REPORT = "full_report";
+	boolean isBillingQuoteReached();
 
-	private static final String MASTER_NODE_SHAPE = "master_node_shape";
-	private static final String SLAVE_NODE_SHAPE = "slave_node_shape";
-	private static final String TOTAL_INSTANCE_NUMBER = "total_instance_number";
+	boolean isUserQuoteReached(String user);
 
-	private static final String DATAENGINE_SHAPE = "dataengine_instance_shape";
-	private static final String DATAENGINE_INSTANCE_COUNT = "dataengine_instance_count";
-
-	private static final String DATAENGINE_DOCKER_IMAGE = "image";
-
-	@Inject
-	protected SettingsDAO settings;
-
-	protected Map<String, BillingDAO.ShapeInfo> getShapes(List<String> shapeNames) {
-		FindIterable<Document> userInstances = getUserInstances();
-		final Map<String, BillingDAO.ShapeInfo> shapes = new HashMap<>();
-
-		for (Document d : userInstances) {
-			getExploratoryShape(shapeNames, d)
-					.ifPresent(shapeInfo -> shapes.put(d.getString(EXPLORATORY_ID), shapeInfo));
-			@SuppressWarnings("unchecked")
-			List<Document> comp = (List<Document>) d.get(COMPUTATIONAL_RESOURCES);
-			comp.forEach(computational ->
-					getComputationalShape(shapeNames, computational)
-							.ifPresent(shapeInfo -> shapes.put(computational.getString(COMPUTATIONAL_ID), shapeInfo)));
-		}
-
-		appendSsnAndEdgeNodeType(shapeNames, shapes);
-
-		log.trace("Loaded shapes is {}", shapes);
-		return shapes;
-	}
-
-	private Optional<ShapeInfo> getComputationalShape(List<String> shapeNames, Document c) {
-		return isDataEngine(c.getString(DATAENGINE_DOCKER_IMAGE)) ? getDataEngineShape(shapeNames, c) :
-				getDataEngineServiceShape(shapeNames, c);
-	}
-
-	private FindIterable<Document> getUserInstances() {
-		return getCollection(USER_INSTANCES)
-				.find()
-				.projection(
-						fields(excludeId(),
-								include(SHAPE, EXPLORATORY_ID, STATUS,
-										COMPUTATIONAL_RESOURCES + "." + COMPUTATIONAL_ID,
-										COMPUTATIONAL_RESOURCES + "." + MASTER_NODE_SHAPE,
-										COMPUTATIONAL_RESOURCES + "." + SLAVE_NODE_SHAPE,
-										COMPUTATIONAL_RESOURCES + "." + TOTAL_INSTANCE_NUMBER,
-										COMPUTATIONAL_RESOURCES + "." + DATAENGINE_SHAPE,
-										COMPUTATIONAL_RESOURCES + "." + DATAENGINE_INSTANCE_COUNT,
-										COMPUTATIONAL_RESOURCES + "." + DATAENGINE_DOCKER_IMAGE,
-										COMPUTATIONAL_RESOURCES + "." + STATUS
-								)));
-	}
-
-	private Optional<ShapeInfo> getExploratoryShape(List<String> shapeNames, Document d) {
-		final String shape = d.getString(SHAPE);
-		if (isShapeAcceptable(shapeNames, shape)) {
-			return Optional.of(new ShapeInfo(shape, UserInstanceStatus.of(d.getString(STATUS))));
-		}
-		return Optional.empty();
-	}
-
-	private boolean isDataEngine(String dockerImage) {
-		return DataEngineType.fromDockerImageName(dockerImage) == DataEngineType.SPARK_STANDALONE;
-	}
-
-	private Optional<ShapeInfo> getDataEngineServiceShape(List<String> shapeNames,
-														  Document c) {
-		final String desMasterShape = c.getString(MASTER_NODE_SHAPE);
-		final String desSlaveShape = c.getString(SLAVE_NODE_SHAPE);
-		if (isShapeAcceptable(shapeNames, desMasterShape, desSlaveShape)) {
-			return Optional.of(new ShapeInfo(desMasterShape, desSlaveShape, c.getString(TOTAL_INSTANCE_NUMBER),
-					UserInstanceStatus.of(c.getString(STATUS))));
-		}
-		return Optional.empty();
-	}
-
-	private Optional<ShapeInfo> getDataEngineShape(List<String> shapeNames, Document c) {
-		final String dataEngineShape = c.getString(DATAENGINE_SHAPE);
-		if ((isShapeAcceptable(shapeNames, dataEngineShape))
-				&& StringUtils.isNotEmpty(c.getString(COMPUTATIONAL_ID))) {
-
-			return Optional.of(new ShapeInfo(dataEngineShape, c.getString(DATAENGINE_INSTANCE_COUNT),
-					UserInstanceStatus.of(c.getString(STATUS))));
-		}
-		return Optional.empty();
-	}
-
-	private boolean isShapeAcceptable(List<String> shapeNames, String... shapes) {
-		return shapeNames == null || shapeNames.isEmpty() || Arrays.stream(shapes).anyMatch(shapeNames::contains);
-	}
-
-	protected abstract void appendSsnAndEdgeNodeType(List<String> shapeNames, Map<String, BillingDAO.ShapeInfo>
-			shapes);
-
-	protected String generateShapeName(ShapeInfo shape) {
-		return Optional.ofNullable(shape).map(ShapeInfo::getName).orElse(StringUtils.EMPTY);
-	}
-
-	/**
-	 * Store shape info
-	 */
-	@Getter
-	@ToString
-	protected class ShapeInfo {
-		private static final String DES_NAME_FORMAT = "Master: %s%sSlave:  %d x %s";
-		private static final String DE_NAME_FORMAT = "%d x %s";
-		private final boolean isDataEngine;
-		private final String shape;
-		private final String slaveShape;
-		private final String slaveCount;
-		private final boolean isExploratory;
-		private final UserInstanceStatus status;
-
-		private ShapeInfo(boolean isDataEngine, String shape, String slaveShape, String slaveCount, boolean
-				isExploratory, UserInstanceStatus status) {
-			this.isDataEngine = isDataEngine;
-			this.shape = shape;
-			this.slaveShape = slaveShape;
-			this.slaveCount = slaveCount;
-			this.isExploratory = isExploratory;
-			this.status = status;
-		}
-
-		public ShapeInfo(String shape, UserInstanceStatus status) {
-			this(false, shape, null, null, true, status);
-		}
-
-		ShapeInfo(String shape, String slaveShape, String slaveCount, UserInstanceStatus status) {
-			this(false, shape, slaveShape, slaveCount, false, status);
-		}
-
-
-		ShapeInfo(String shape, String slaveCount, UserInstanceStatus status) {
-			this(true, shape, null, slaveCount, false, status);
-		}
-
-		public String getName() {
-			if (isExploratory) {
-				return shape;
-			} else {
-				return clusterName();
-			}
-		}
-
-		private String clusterName() {
-			try {
-				final Integer count = Integer.valueOf(slaveCount);
-				return isDataEngine ? String.format(DE_NAME_FORMAT, count, shape) :
-						String.format(DES_NAME_FORMAT, shape, System.lineSeparator(), count - 1, slaveShape);
-			} catch (NumberFormatException e) {
-				log.error("Cannot parse string {} to integer", slaveCount);
-				return StringUtils.EMPTY;
-			}
-		}
-	}
+	Document getReport(UserInfo userInfo, T filter);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ComputationalDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ComputationalDAO.java
index 9c8436d..b91e204 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ComputationalDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ComputationalDAO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao;
@@ -19,17 +22,21 @@
 
 import com.epam.dlab.backendapi.util.DateRemoverUtil;
 import com.epam.dlab.dto.*;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.computational.ComputationalStatusDTO;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import com.epam.dlab.exceptions.DlabException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.mongodb.client.model.Filters;
 import com.mongodb.client.result.UpdateResult;
 import lombok.extern.slf4j.Slf4j;
 import org.bson.Document;
 import org.bson.conversions.Bson;
 
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.*;
-import java.util.stream.Collectors;
 
 import static com.epam.dlab.backendapi.dao.ExploratoryDAO.*;
 import static com.epam.dlab.backendapi.dao.MongoCollections.USER_INSTANCES;
@@ -40,7 +47,7 @@
 import static com.mongodb.client.model.Projections.*;
 import static com.mongodb.client.model.Updates.push;
 import static com.mongodb.client.model.Updates.set;
-import static org.apache.commons.lang3.StringUtils.EMPTY;
+import static java.util.stream.Collectors.toList;
 
 /**
  * DAO for user computational resources.
@@ -51,20 +58,21 @@
 	static final String COMPUTATIONAL_ID = "computational_id";
 
 	static final String IMAGE = "image";
-	public static final String COMPUTATIONAL_NOT_FOUND_MSG = "Computational resource %s affiliated with exploratory " +
-			"%s for user %s not found";
 	private static final String COMPUTATIONAL_URL = "computational_url";
+	private static final String EXPLORATORY_NAME = "exploratory_name";
 	private static final String COMPUTATIONAL_URL_DESC = "description";
 	private static final String COMPUTATIONAL_URL_URL = "url";
+	private static final String COMPUTATIONAL_LAST_ACTIVITY = "last_activity";
+	private static final String CONFIG = "config";
 
 	private static String computationalFieldFilter(String fieldName) {
 		return COMPUTATIONAL_RESOURCES + FIELD_SET_DELIMETER + fieldName;
 	}
 
-	private static Bson computationalCondition(String user, String exploratoryField, String exploratoryFieldValue,
-											   String compResourceField, String compResourceFieldValue) {
-		return and(eq(USER, user), eq(exploratoryField, exploratoryFieldValue),
-				eq(COMPUTATIONAL_RESOURCES + "." + compResourceField, compResourceFieldValue));
+	private static Bson computationalCondition(String user, String exploratoryFieldValue,
+											   String compResourceFieldValue) {
+		return and(eq(USER, user), eq(EXPLORATORY_NAME, exploratoryFieldValue),
+				eq(COMPUTATIONAL_RESOURCES + "." + COMPUTATIONAL_NAME, compResourceFieldValue));
 	}
 
 	/**
@@ -76,35 +84,12 @@
 	 * @return <b>true</b> if operation was successful, otherwise <b>false</b>.
 	 */
 	public boolean addComputational(String user, String exploratoryName, UserComputationalResource computationalDTO) {
-		Optional<Document> optional = findOne(USER_INSTANCES,
+		final UpdateResult updateResult = updateOne(USER_INSTANCES,
 				and(exploratoryCondition(user, exploratoryName),
-						elemMatch(COMPUTATIONAL_RESOURCES,
-								eq(COMPUTATIONAL_NAME, computationalDTO.getComputationalName())))
-		);
-		if (!optional.isPresent()) {
-			updateOne(USER_INSTANCES,
-					exploratoryCondition(user, exploratoryName),
-					push(COMPUTATIONAL_RESOURCES, convertToBson(computationalDTO)));
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	/**
-	 * Finds and returns the unique id for computational resource.
-	 *
-	 * @param user              user name.
-	 * @param exploratoryName   the name of exploratory.
-	 * @param computationalName name of computational resource.
-	 */
-	public String fetchComputationalId(String user, String exploratoryName, String computationalName) {
-		Document doc = findOne(USER_INSTANCES,
-				exploratoryCondition(user, exploratoryName),
-				elemMatch(COMPUTATIONAL_RESOURCES, eq(COMPUTATIONAL_NAME, computationalName)))
-				.orElse(new Document());
-		return getDottedOrDefault(doc,
-				computationalFieldFilter(COMPUTATIONAL_ID), EMPTY).toString();
+						not(elemMatch(COMPUTATIONAL_RESOURCES,
+								eq(COMPUTATIONAL_NAME, computationalDTO.getComputationalName())))),
+				push(COMPUTATIONAL_RESOURCES, convertToBson(computationalDTO)));
+		return updateResult.getModifiedCount() > 0;
 	}
 
 	/**
@@ -113,27 +98,35 @@
 	 * @param user              user name.
 	 * @param exploratoryName   the name of exploratory.
 	 * @param computationalName name of computational resource.
-	 * @throws DlabException    if exception occurs
+	 * @throws DlabException if exception occurs
 	 */
 	public UserComputationalResource fetchComputationalFields(String user, String exploratoryName,
 															  String computationalName) {
 		Optional<UserInstanceDTO> opt = findOne(USER_INSTANCES,
 				and(exploratoryCondition(user, exploratoryName),
-						elemMatch(COMPUTATIONAL_RESOURCES, eq(COMPUTATIONAL_NAME, computationalName))),
-				fields(include(COMPUTATIONAL_RESOURCES), excludeId()),
+						Filters.elemMatch(COMPUTATIONAL_RESOURCES, eq(COMPUTATIONAL_NAME, computationalName))),
+				fields(include(COMPUTATIONAL_RESOURCES + ".$"), excludeId()),
 				UserInstanceDTO.class);
-		if (opt.isPresent()) {
-			List<UserComputationalResource> list = opt.get().getResources();
-			UserComputationalResource comp = list.stream()
-					.filter(r -> r.getComputationalName().equals(computationalName))
-					.findFirst()
-					.orElse(null);
-			if (comp != null) {
-				return comp;
-			}
-		}
-		throw new DlabException("Computational resource " + computationalName + " for user " + user + " with " +
-				"exploratory name " + exploratoryName + " not found.");
+		return opt.map(UserInstanceDTO::getResources)
+				.filter(l -> !l.isEmpty())
+				.map(l -> l.get(0))
+				.orElseThrow(() -> new DlabException("Computational resource " + computationalName + " for user " + user + " with " +
+						"exploratory name " + exploratoryName + " not found."));
+	}
+
+	public List<UserComputationalResource> findComputationalResourcesWithStatus(String user, String exploratoryName,
+																				UserInstanceStatus status) {
+		final UserInstanceDTO userInstanceDTO = findOne(USER_INSTANCES,
+				and(exploratoryCondition(user, exploratoryName),
+						elemMatch(COMPUTATIONAL_RESOURCES, eq(STATUS, status.toString()))),
+				fields(include(COMPUTATIONAL_RESOURCES), excludeId()),
+				UserInstanceDTO.class)
+				.orElseThrow(() -> new DlabException(String.format("Computational resource with status %s for user " +
+						"%s with exploratory name %s not found.", status, user, exploratoryName)));
+		return userInstanceDTO.getResources()
+				.stream()
+				.filter(computationalResource -> computationalResource.getStatus().equals(status.toString()))
+				.collect(toList());
 	}
 
 	/**
@@ -211,7 +204,7 @@
 		List<String> exploratoryNames = stream(find(USER_INSTANCES,
 				and(eq(USER, user), in(STATUS, statusList(exploratoryStatuses))),
 				fields(include(EXPLORATORY_NAME)))).map(d -> d.getString(EXPLORATORY_NAME))
-				.collect(Collectors.toList());
+				.collect(toList());
 
 		exploratoryNames.forEach(explName ->
 				getComputationalResourcesWhereStatusIn(user, computationalTypes, explName, oldComputationalStatuses)
@@ -286,6 +279,13 @@
 			if (dto.getResourceUrl() != null && !dto.getResourceUrl().isEmpty()) {
 				values.append(computationalFieldFilter(COMPUTATIONAL_URL), getResourceUrlData(dto));
 			}
+			if (dto.getLastActivity() != null) {
+				values.append(computationalFieldFilter(COMPUTATIONAL_LAST_ACTIVITY), dto.getLastActivity());
+			}
+			if (dto.getConfig() != null) {
+				values.append(computationalFieldFilter(CONFIG),
+						dto.getConfig().stream().map(this::convertToBson).collect(toList()));
+			}
 			return updateOne(USER_INSTANCES, and(exploratoryCondition(dto.getUser(), dto.getExploratoryName()),
 					elemMatch(COMPUTATIONAL_RESOURCES,
 							and(eq(COMPUTATIONAL_NAME, dto.getComputationalName()),
@@ -298,7 +298,8 @@
 
 	private List<Map<String, String>> getResourceUrlData(ComputationalStatusDTO dto) {
 		return dto.getResourceUrl().stream()
-				.map(this::toUrlDocument).collect(Collectors.toList());
+				.map(this::toUrlDocument)
+				.collect(toList());
 	}
 
 	private LinkedHashMap<String, String> toUrlDocument(ResourceURL url) {
@@ -315,7 +316,7 @@
 	 * @param user                  user name.
 	 * @param exploratoryStatuses   exploratory's status list.
 	 * @param computationalTypes    type list of computational resource (may contain 'dataengine' and/or
-	 *                                 'dataengine-service').
+	 *                              'dataengine-service').
 	 * @param reuploadKeyRequired   true/false.
 	 * @param computationalStatuses statuses of computational resource.
 	 */
@@ -329,7 +330,7 @@
 		List<String> exploratoryNames = stream(find(USER_INSTANCES,
 				and(eq(USER, user), in(STATUS, statusList(exploratoryStatuses))),
 				fields(include(EXPLORATORY_NAME)))).map(d -> d.getString(EXPLORATORY_NAME))
-				.collect(Collectors.toList());
+				.collect(toList());
 
 		exploratoryNames.forEach(explName ->
 				getComputationalResourcesWhereStatusIn(user, computationalTypes, explName, computationalStatuses)
@@ -349,7 +350,7 @@
 
 	public void updateReuploadKeyFlagForComputationalResource(String user, String exploratoryName,
 															  String computationalName, boolean
-																			reuploadKeyRequired) {
+																	  reuploadKeyRequired) {
 		updateComputationalField(user, exploratoryName, computationalName, REUPLOAD_KEY_REQUIRED, reuploadKeyRequired);
 	}
 
@@ -359,7 +360,7 @@
 	 *
 	 * @param user                  user name.
 	 * @param computationalTypes    type list of computational resource which may contain 'dataengine' and/or
-	 *                                 'dataengine-service'.
+	 *                              'dataengine-service'.
 	 * @param exploratoryName       name of exploratory.
 	 * @param computationalStatuses statuses of computational resource.
 	 * @return list of computational resources' names
@@ -374,7 +375,21 @@
 				.filter(doc ->
 						statusList(computationalStatuses).contains(doc.getString(STATUS)) &&
 								computationalTypes.contains(DataEngineType.fromDockerImageName(doc.getString(IMAGE))))
-				.map(doc -> doc.getString(COMPUTATIONAL_NAME)).collect(Collectors.toList());
+				.map(doc -> doc.getString(COMPUTATIONAL_NAME)).collect(toList());
+	}
+
+	@SuppressWarnings("unchecked")
+	public List<ClusterConfig> getClusterConfig(String user, String exploratoryName, String computationalName) {
+		return findOne(USER_INSTANCES,
+				and(exploratoryCondition(user, exploratoryName),
+						Filters.elemMatch(COMPUTATIONAL_RESOURCES, and(eq(COMPUTATIONAL_NAME, computationalName),
+								notNull(CONFIG)))),
+				fields(include(COMPUTATIONAL_RESOURCES + ".$"), excludeId())
+		).map(d -> ((List<Document>) d.get(COMPUTATIONAL_RESOURCES)).get(0))
+				.map(d -> convertFromDocument((List<Document>) d.get(CONFIG),
+						new TypeReference<List<ClusterConfig>>() {
+						}))
+				.orElse(Collections.emptyList());
 	}
 
 	/**
@@ -390,7 +405,7 @@
 	private <T> UpdateResult updateComputationalField(String user, String exploratoryName, String computationalName,
 													  String fieldName, T fieldValue) {
 		return updateOne(USER_INSTANCES,
-				computationalCondition(user, EXPLORATORY_NAME, exploratoryName, COMPUTATIONAL_NAME, computationalName),
+				computationalCondition(user, exploratoryName, computationalName),
 				set(computationalFieldFilter(fieldName), fieldValue));
 	}
 
@@ -412,16 +427,10 @@
 				Objects.isNull(dto) ? null : convertToBson(dto));
 	}
 
-	/**
-	 * Checks if computational resource exists.
-	 *
-	 * @param user              user name.
-	 * @param exploratoryName   the name of exploratory.
-	 * @param computationalName the name of computational resource.
-	 */
-	public boolean isComputationalExist(String user, String exploratoryName, String computationalName) {
-		return !Objects.isNull(fetchComputationalFields(user, exploratoryName, computationalName));
+
+	public void updateLastActivityDateForInstanceId(String instanceId, LocalDateTime lastActivity) {
+		updateOne(USER_INSTANCES, eq(computationalFieldFilter(COMPUTATIONAL_ID), instanceId),
+				set(computationalFieldFilter(COMPUTATIONAL_LAST_ACTIVITY),
+						Date.from(lastActivity.atZone(ZoneId.systemDefault()).toInstant())));
 	}
-
-
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/DockerDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/DockerDAO.java
index 1ec320f..c0ecfc4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/DockerDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/DockerDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvStatusDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java
similarity index 81%
rename from services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvStatusDAO.java
rename to services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java
index eaaa937..8d27fff 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvStatusDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
@@ -49,7 +50,7 @@
 import static com.epam.dlab.backendapi.dao.ExploratoryDAO.*;
 import static com.epam.dlab.backendapi.dao.MongoCollections.USER_EDGE;
 import static com.epam.dlab.backendapi.dao.MongoCollections.USER_INSTANCES;
-import static com.epam.dlab.dto.UserInstanceStatus.TERMINATED;
+import static com.epam.dlab.dto.UserInstanceStatus.*;
 import static com.mongodb.client.model.Filters.*;
 import static com.mongodb.client.model.Projections.elemMatch;
 import static com.mongodb.client.model.Projections.*;
@@ -59,8 +60,8 @@
  * DAO for updates of the status of environment resources.
  */
 @Singleton
-public class EnvStatusDAO extends BaseDAO {
-	private static final Logger LOGGER = LoggerFactory.getLogger(EnvStatusDAO.class);
+public class EnvDAO extends BaseDAO {
+	private static final Logger LOGGER = LoggerFactory.getLogger(EnvDAO.class);
 
 	private static final String EDGE_PUBLIC_IP = "public_ip";
 	private static final String COMPUTATIONAL_STATUS = COMPUTATIONAL_RESOURCES + "." + STATUS;
@@ -76,7 +77,7 @@
 			COMPUTATIONAL_RESOURCES + "." + ComputationalDAO.COMPUTATIONAL_NAME, COMPUTATIONAL_RESOURCES + "." +
 					INSTANCE_ID,
 			COMPUTATIONAL_STATUS, COMPUTATIONAL_RESOURCES + "." + IMAGE);
-	public static final String COMPUTATIONAL_NAME = "computational_name";
+	private static final String COMPUTATIONAL_NAME = "computational_name";
 
 	@Inject
 	private SelfServiceApplicationConfiguration configuration;
@@ -104,13 +105,44 @@
 	}
 
 	@SuppressWarnings("unchecked")
+	public List<EnvResource> findRunningResourcesForCheckInactivity() {
+		return stream(find(USER_INSTANCES, or(eq(STATUS, RUNNING.toString()),
+				elemMatch(COMPUTATIONAL_RESOURCES, eq(STATUS, RUNNING.toString())))))
+				.flatMap(ui -> getRunningEnvResources(ui).stream())
+				.collect(Collectors.toList());
+	}
+
+	private List<EnvResource> getRunningEnvResources(Document ui) {
+		final String exploratoryName = ui.getString(EXPLORATORY_NAME);
+		final List<EnvResource> envResources = getComputationalResources(ui)
+				.stream()
+				.filter(comp -> RUNNING.toString().equals(comp.getString(STATUS)))
+				.map(comp -> toEnvResource(String.join("_", exploratoryName,
+						comp.getString(COMPUTATIONAL_NAME)), comp.getString(INSTANCE_ID),
+						ResourceType.COMPUTATIONAL))
+				.collect(Collectors.toList());
+		if (UserInstanceStatus.of(ui.getString(STATUS)) == RUNNING) {
+			envResources.add(toEnvResource(exploratoryName, ui.getString(INSTANCE_ID),
+					ResourceType.EXPLORATORY));
+		}
+		return envResources;
+	}
+
+	private EnvResource toEnvResource(String name, String instanceId, ResourceType resType) {
+		return new EnvResource(instanceId, name, resType);
+	}
+
+	@SuppressWarnings("unchecked")
 	private void addComputationalResources(List<EnvResource> hostList, List<EnvResource> clusterList, Document exp,
-										   String
-												   exploratoryName) {
-		((List<Document>) exp.getOrDefault(COMPUTATIONAL_RESOURCES, Collections.emptyList()))
+										   String exploratoryName) {
+		getComputationalResources(exp)
 				.forEach(comp -> addComputational(hostList, clusterList, exploratoryName, comp));
 	}
 
+	private List<Document> getComputationalResources(Document userInstanceDocument) {
+		return (List<Document>) userInstanceDocument.getOrDefault(COMPUTATIONAL_RESOURCES, Collections.emptyList());
+	}
+
 	private void addComputational(List<EnvResource> hostList, List<EnvResource> clusterList, String exploratoryName,
 								  Document computational) {
 		final List<EnvResource> resourceList = DataEngineType.CLOUD_SERVICE ==
@@ -176,6 +208,12 @@
 		).collect(Collectors.toSet());
 	}
 
+	public Set<String> fetchUsersNotIn(Set<String> users) {
+		return stream(find(USER_EDGE, not(in(ID, users)),
+				fields(include(ID)))).map(d -> d.getString(ID))
+				.collect(Collectors.toSet());
+	}
+
 	public Set<String> fetchAllUsers() {
 		return stream(find(USER_EDGE)).map(d -> d.getString(ID))
 				.collect(Collectors.toSet());
@@ -188,7 +226,7 @@
 				.ifPresent(resource -> updateExploratoryStatus(user, exploratoryName, exp.getString(STATUS),
 						resource.getStatus()));
 
-		((List<Document>) exp.getOrDefault(COMPUTATIONAL_RESOURCES, Collections.emptyList()))
+		(getComputationalResources(exp))
 				.stream()
 				.filter(this::instanceIdPresent)
 				.forEach(comp -> updateComputational(user, list, exploratoryName, comp));
@@ -257,26 +295,26 @@
 		if ("pending".equalsIgnoreCase(newStatus) || "stopping".equalsIgnoreCase(newStatus)) {
 			return oldStatus;
 		} else if ("shutting-down".equalsIgnoreCase(newStatus)) {
-			status = UserInstanceStatus.TERMINATING;
+			status = TERMINATING;
 		} else {
 			status = UserInstanceStatus.of(newStatus);
 		}
 
 		switch (oldStatus) {
 			case CREATING_IMAGE:
-				return !status.in(UserInstanceStatus.TERMINATED, UserInstanceStatus.TERMINATING,
+				return !status.in(UserInstanceStatus.TERMINATED, TERMINATING,
 						UserInstanceStatus.RUNNING) ? status : oldStatus;
 			case CREATING:
 				return (status.in(UserInstanceStatus.TERMINATED, UserInstanceStatus.STOPPED) ? status : oldStatus);
 			case RUNNING:
 			case STOPPING:
-				return (status.in(UserInstanceStatus.TERMINATING, UserInstanceStatus.TERMINATED,
+				return (status.in(TERMINATING, UserInstanceStatus.TERMINATED,
 						UserInstanceStatus.STOPPING, UserInstanceStatus.STOPPED) ? status : oldStatus);
 			case STARTING:
-				return (status.in(UserInstanceStatus.TERMINATING, UserInstanceStatus.TERMINATED,
+				return (status.in(TERMINATING, UserInstanceStatus.TERMINATED,
 						UserInstanceStatus.STOPPING) ? status : oldStatus);
 			case STOPPED:
-				return (status.in(UserInstanceStatus.TERMINATING, UserInstanceStatus.TERMINATED,
+				return (status.in(TERMINATING, UserInstanceStatus.TERMINATED,
 						UserInstanceStatus.RUNNING) ? status : oldStatus);
 			case TERMINATING:
 				return (status.in(UserInstanceStatus.TERMINATED) ? status : oldStatus);
@@ -304,20 +342,22 @@
 	}
 
 	private void updateEdgeStatus(String user, Document edge, String instanceId, EnvResource r) {
+		final String oldStatus = edge.getString(EDGE_STATUS);
 		LOGGER.trace("Update EDGE status for user {} with instance_id {} from {} to {}",
-				user, instanceId, edge.getString(EDGE_STATUS), r.getStatus());
-		String oldStatus = edge.getString(EDGE_STATUS);
+				user, instanceId, oldStatus, r.getStatus());
 		UserInstanceStatus oStatus =
 				(oldStatus == null ? UserInstanceStatus.CREATING : UserInstanceStatus.of(oldStatus));
-		UserInstanceStatus status = getInstanceNewStatus(oStatus, r.getStatus());
+		UserInstanceStatus status = oStatus != FAILED ? getInstanceNewStatus(oStatus, r.getStatus()) :
+				UserInstanceStatus.of(r.getStatus());
 		LOGGER.trace("EDGE status translated for user {} with instanceId {} from {} to {}",
 				user, instanceId, r.getStatus(), status);
-		if (oStatus != status) {
-			LOGGER.debug("EDGE status will be updated from {} to {}", oldStatus, status);
-			updateOne(USER_EDGE,
-					eq(ID, user),
-					Updates.set(EDGE_STATUS, status.toString()));
-		}
+		Optional.ofNullable(status)
+				.filter(s -> s != oStatus)
+				.ifPresent(s -> {
+					LOGGER.debug("EDGE status will be updated from {} to {}", oldStatus, status);
+					updateOne(USER_EDGE, eq(ID, user),
+							Updates.set(EDGE_STATUS, status.toString()));
+				});
 	}
 
 	/**
@@ -365,7 +405,7 @@
 			case CREATING:
 			case CONFIGURING:
 			case RUNNING:
-				return (status.in(UserInstanceStatus.TERMINATED, UserInstanceStatus.TERMINATING,
+				return (status.in(UserInstanceStatus.TERMINATED, TERMINATING,
 						UserInstanceStatus.STOPPING, UserInstanceStatus.STOPPED) ? status : oldStatus);
 			case TERMINATING:
 				return (status.in(UserInstanceStatus.TERMINATED) ? status : oldStatus);
@@ -476,37 +516,16 @@
 	 * @param list            the list to add.
 	 * @param document        document with resource.
 	 * @param statusFieldName name of field that contains status information
-	 * @param resourceType
+	 * @param resourceType    type if resource EDGE/NOTEBOOK
 	 */
-	private void addResource(List<EnvResource> list, Document document, String statusFieldName, ResourceType
-			resourceType, String name) {
+	private void addResource(List<EnvResource> list, Document document, String statusFieldName,
+							 ResourceType resourceType, String name) {
 		LOGGER.trace("Add resource from {}", document);
-		getInstanceId(document).ifPresent(instanceId -> {
-			UserInstanceStatus status = UserInstanceStatus.of(document.getString(statusFieldName));
-			if (status == null) {
-				LOGGER.error("Unknown status {} from field {}, content is {}", document.getString(statusFieldName),
-						statusFieldName, document);
-				return;
-			}
-			switch (status) {
-				case CONFIGURING:
-				case CREATING:
-				case RUNNING:
-				case STARTING:
-				case STOPPED:
-				case STOPPING:
-				case TERMINATING:
-					EnvResource host = new EnvResource().withId(instanceId)
-							.withResourceType(resourceType)
-							.withName(name);
-					list.add(host);
-					break;
-				case FAILED:
-				case TERMINATED:
-				default:
-					break;
-			}
-		});
+		getInstanceId(document).ifPresent(instanceId ->
+				Optional.ofNullable(UserInstanceStatus.of(document.getString(statusFieldName)))
+						.filter(s -> s.in(CONFIGURING, CREATING, RUNNING, STARTING, STOPPED, STOPPING, TERMINATING) ||
+								(FAILED == s && ResourceType.EDGE == resourceType))
+						.ifPresent(s -> list.add(toEnvResource(name, instanceId, resourceType))));
 	}
 
 	private boolean notEmpty(List<EnvResource> hostList) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
index 13d18c5..becfb04 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
@@ -1,35 +1,40 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
 
 import com.epam.dlab.backendapi.util.DateRemoverUtil;
 import com.epam.dlab.dto.*;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.exploratory.ExploratoryStatusDTO;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.fasterxml.jackson.core.type.TypeReference;
 import com.google.inject.Singleton;
 import com.mongodb.client.result.UpdateResult;
 import lombok.extern.slf4j.Slf4j;
 import org.bson.Document;
 import org.bson.conversions.Bson;
 
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -38,6 +43,7 @@
 import static com.mongodb.client.model.Filters.*;
 import static com.mongodb.client.model.Projections.*;
 import static com.mongodb.client.model.Updates.set;
+import static java.util.stream.Collectors.toList;
 import static org.apache.commons.lang3.StringUtils.EMPTY;
 
 /**
@@ -57,8 +63,10 @@
 	private static final String EXPLORATORY_URL_URL = "url";
 	private static final String EXPLORATORY_USER = "exploratory_user";
 	private static final String EXPLORATORY_PASS = "exploratory_pass";
+	private static final String CLUSTER_CONFIG = "cluster_config";
 	private static final String EXPLORATORY_PRIVATE_IP = "private_ip";
 	public static final String EXPLORATORY_NOT_FOUND_MSG = "Exploratory for user %s with name %s not found";
+	private static final String EXPLORATORY_LAST_ACTIVITY = "last_activity";
 
 	public ExploratoryDAO() {
 		log.info("{} is initialized", getClass().getSimpleName());
@@ -113,21 +121,6 @@
 	}
 
 	/**
-	 * Finds and returns the status of exploratory.
-	 *
-	 * @param user            user name.
-	 * @param exploratoryName the name of exploratory.
-	 */
-	public UserInstanceStatus fetchExploratoryStatus(String user, String exploratoryName) {
-		return UserInstanceStatus.of(
-				findOne(USER_INSTANCES,
-						exploratoryCondition(user, exploratoryName),
-						fields(include(STATUS), excludeId()))
-						.orElse(new Document())
-						.getOrDefault(STATUS, EMPTY).toString());
-	}
-
-	/**
 	 * Finds and returns the info of all user's running notebooks.
 	 *
 	 * @param user user name.
@@ -139,9 +132,9 @@
 	/**
 	 * Finds and returns the info of all user's notebooks whose status is present among predefined ones.
 	 *
-	 * @param user                         user name.
-	 * @param computationalFieldsRequired  true/false.
-	 * @param statuses                     array of statuses.
+	 * @param user                        user name.
+	 * @param computationalFieldsRequired true/false.
+	 * @param statuses                    array of statuses.
 	 */
 	public List<UserInstanceDTO> fetchUserExploratoriesWhereStatusIn(String user, boolean computationalFieldsRequired,
 																	 UserInstanceStatus... statuses) {
@@ -211,13 +204,48 @@
 	}
 
 	/**
+	 * Finds and returns the info about all exploratories in database.
+	 **/
+	public List<UserInstanceDTO> getInstancesByComputationalIdsAndStatus(List<String> ids, UserInstanceStatus status) {
+		return instancesByCompResourceIds(and(in(INSTANCE_ID, ids), eq(STATUS, status.toString())));
+	}
+
+	public List<UserInstanceDTO> getInstancesByIdsAndStatus(List<String> ids, UserInstanceStatus status) {
+		return stream(getCollection(USER_INSTANCES)
+				.find(and(in(INSTANCE_ID, ids), eq(STATUS, status.toString())))
+				.projection(fields(exclude(COMPUTATIONAL_RESOURCES))))
+				.map(d -> convertFromDocument(d, UserInstanceDTO.class))
+				.collect(Collectors.toList());
+	}
+
+	public void updateLastActivityDateForInstanceId(String instanceId, LocalDateTime lastActivity) {
+		updateOne(USER_INSTANCES, eq(INSTANCE_ID, instanceId),
+				set(EXPLORATORY_LAST_ACTIVITY, Date.from(lastActivity.atZone(ZoneId.systemDefault()).toInstant())));
+	}
+
+	private List<UserInstanceDTO> instancesByCompResourceIds(Bson compCondition) {
+		return stream(getCollection(USER_INSTANCES)
+				.find(com.mongodb.client.model.Filters.elemMatch(COMPUTATIONAL_RESOURCES, compCondition))
+				.projection(include(COMPUTATIONAL_RESOURCES + ".$", EXPLORATORY_NAME, USER)))
+				.map(d -> convertFromDocument(d, UserInstanceDTO.class))
+				.collect(Collectors.toList());
+	}
+
+	/**
 	 * Finds and returns the info of exploratory (without info about computational resources).
 	 *
 	 * @param user            user name.
 	 * @param exploratoryName the name of exploratory.
 	 */
 	public UserInstanceDTO fetchExploratoryFields(String user, String exploratoryName) {
-		return getExploratory(user, exploratoryName).orElseThrow(() ->
+		return getExploratory(user, exploratoryName, false).orElseThrow(() ->
+				new ResourceNotFoundException(String.format(EXPLORATORY_NOT_FOUND_MSG, user, exploratoryName)));
+
+	}
+
+	public UserInstanceDTO fetchExploratoryFields(String user, String exploratoryName,
+												  boolean includeComputationalResources) {
+		return getExploratory(user, exploratoryName, includeComputationalResources).orElseThrow(() ->
 				new ResourceNotFoundException(String.format(EXPLORATORY_NOT_FOUND_MSG, user, exploratoryName)));
 
 	}
@@ -229,13 +257,14 @@
 	 * @param exploratoryName the name of exploratory.
 	 */
 	public boolean isExploratoryExist(String user, String exploratoryName) {
-		return getExploratory(user, exploratoryName).isPresent();
+		return getExploratory(user, exploratoryName, false).isPresent();
 	}
 
-	private Optional<UserInstanceDTO> getExploratory(String user, String exploratoryName) {
+	private Optional<UserInstanceDTO> getExploratory(String user, String exploratoryName,
+													 boolean includeCompResources) {
 		return findOne(USER_INSTANCES,
 				exploratoryCondition(user, exploratoryName),
-				fields(exclude(COMPUTATIONAL_RESOURCES)),
+				includeCompResources ? null : fields(exclude(COMPUTATIONAL_RESOURCES)),
 				UserInstanceDTO.class);
 	}
 
@@ -247,15 +276,12 @@
 	 * @param computationalName name of cluster
 	 */
 	public UserInstanceDTO fetchExploratoryFields(String user, String exploratoryName, String computationalName) {
-		Optional<UserInstanceDTO> opt = findOne(USER_INSTANCES,
+		return findOne(USER_INSTANCES,
 				runningExploratoryAndComputationalCondition(user, exploratoryName, computationalName),
-				UserInstanceDTO.class);
-
-		if (opt.isPresent()) {
-			return opt.get();
-		}
-		throw new DlabException(String.format("Running notebook %s with running cluster %s not found for user %s",
-				exploratoryName, computationalName, user));
+				UserInstanceDTO.class)
+				.orElseThrow(() -> new DlabException(String.format("Running notebook %s with running cluster %s not " +
+								"found for user %s",
+						exploratoryName, computationalName, user)));
 	}
 
 	/**
@@ -323,9 +349,9 @@
 	/**
 	 * Updates the scheduler's data for exploratory in Mongo database.
 	 *
-	 * @param user             user.
-	 * @param exploratoryName  name of exploratory.
-	 * @param dto              object of scheduler data.
+	 * @param user            user.
+	 * @param exploratoryName name of exploratory.
+	 * @param dto             object of scheduler data.
 	 * @return The result of an update operation.
 	 */
 	public UpdateResult updateSchedulerDataForUserAndExploratory(String user, String exploratoryName,
@@ -338,9 +364,9 @@
 	/**
 	 * Updates the requirement for reuploading key for all user's corresponding exploratories in Mongo database.
 	 *
-	 * @param user                 user name.
-	 * @param reuploadKeyRequired  true/false.
-	 * @param exploratoryStatuses  statuses of exploratory.
+	 * @param user                user name.
+	 * @param reuploadKeyRequired true/false.
+	 * @param exploratoryStatuses statuses of exploratory.
 	 */
 	public void updateReuploadKeyForExploratories(String user, boolean reuploadKeyRequired,
 												  UserInstanceStatus... exploratoryStatuses) {
@@ -392,8 +418,7 @@
 					).collect(Collectors.toList()));
 		} else if (dto.getPrivateIp() != null) {
 			UserInstanceDTO inst = fetchExploratoryFields(dto.getUser(), dto.getExploratoryName());
-			if (!inst.getPrivateIp().equals(dto.getPrivateIp()) && inst.getResourceUrl() != null) { // IP was
-				// changed
+			if (!inst.getPrivateIp().equals(dto.getPrivateIp()) && inst.getResourceUrl() != null) {
 				values.append(EXPLORATORY_URL, inst.getResourceUrl().stream()
 						.map(url -> replaceIp(dto.getPrivateIp(), inst, url))
 						.collect(Collectors.toList()));
@@ -409,6 +434,9 @@
 		if (dto.getExploratoryPassword() != null) {
 			values.append(EXPLORATORY_PASS, dto.getExploratoryPassword());
 		}
+		if (dto.getConfig() != null) {
+			values.append(CLUSTER_CONFIG, dto.getConfig().stream().map(this::convertToBson).collect(toList()));
+		}
 		return updateOne(USER_INSTANCES,
 				exploratoryCondition(dto.getUser(), dto.getExploratoryName()),
 				new Document(SET, values));
@@ -433,6 +461,16 @@
 
 	}
 
+	@SuppressWarnings("unchecked")
+	public List<ClusterConfig> getClusterConfig(String user, String exploratoryName) {
+		return findOne(USER_INSTANCES, and(exploratoryCondition(user, exploratoryName), notNull(CLUSTER_CONFIG)),
+				fields(include(CLUSTER_CONFIG), excludeId()))
+				.map(d -> convertFromDocument((List<Document>) d.get(CLUSTER_CONFIG),
+						new TypeReference<List<ClusterConfig>>() {
+						}))
+				.orElse(Collections.emptyList());
+	}
+
 	private Map<String, String> replaceIp(String ip, UserInstanceDTO inst, ResourceURL url) {
 		Map<String, String> map = new LinkedHashMap<>();
 		map.put(EXPLORATORY_URL_DESC, url.getDescription());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
index 5918c94..ebdd028 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
@@ -1,26 +1,27 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
 import com.epam.dlab.backendapi.util.DateRemoverUtil;
 import com.epam.dlab.dto.exploratory.LibInstallDTO;
 import com.epam.dlab.dto.exploratory.LibInstallStatusDTO;
-import com.epam.dlab.dto.exploratory.LibStatus;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.model.ResourceType;
 import com.epam.dlab.model.library.Library;
@@ -33,16 +34,16 @@
 import java.util.Date;
 import java.util.List;
 import java.util.Optional;
+import java.util.function.Predicate;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import static com.epam.dlab.backendapi.dao.ExploratoryDAO.*;
 import static com.epam.dlab.backendapi.dao.MongoCollections.USER_INSTANCES;
-import static com.mongodb.client.model.Filters.*;
-import static com.mongodb.client.model.Projections.elemMatch;
+import static com.mongodb.client.model.Filters.and;
+import static com.mongodb.client.model.Filters.eq;
 import static com.mongodb.client.model.Projections.*;
 import static com.mongodb.client.model.Updates.push;
-import static org.apache.commons.lang3.StringUtils.EMPTY;
 
 /**
  * DAO for user libraries.
@@ -60,13 +61,12 @@
 	/**
 	 * Return condition for search library into exploratory data.
 	 *
-	 * @param libraryGroup   the name of group.
-	 * @param libraryName    the name of library.
-	 * @param libraryVersion the name of library.
+	 * @param libraryGroup the name of group.
+	 * @param libraryName  the name of library.
 	 */
-	private static Bson libraryConditionExploratory(String libraryGroup, String libraryName, String libraryVersion) {
+	private static Bson libraryConditionExploratory(String libraryGroup, String libraryName) {
 		return elemMatch(EXPLORATORY_LIBS,
-				libCondition(libraryGroup, libraryName, libraryVersion));
+				libCondition(libraryGroup, libraryName));
 	}
 
 
@@ -76,12 +76,11 @@
 	 * @param computationalName computational name
 	 * @param libraryGroup      the name of group.
 	 * @param libraryName       the name of library.
-	 * @param libraryVersion    the name of library.
 	 */
 	private static Bson libraryConditionComputational(String computationalName, String libraryGroup,
-													  String libraryName, String libraryVersion) {
+													  String libraryName) {
 		return elemMatch(COMPUTATIONAL_LIBS + "." + computationalName,
-				libCondition(libraryGroup, libraryName, libraryVersion));
+				and(eq(LIB_GROUP, libraryGroup), eq(LIB_NAME, libraryName)));
 	}
 
 	/**
@@ -130,45 +129,35 @@
 		return findLibraries(user, exploratoryName, include(COMPUTATIONAL_LIBS + "." + computationalName));
 	}
 
-	/**
-	 * Finds and returns the status of library.
-	 *
-	 * @param user            user name.
-	 * @param exploratoryName the name of exploratory.
-	 * @param libraryGroup    the group name of library.
-	 * @param libraryName     the name of library.
-	 */
-	public LibStatus fetchLibraryStatus(String user, String exploratoryName,
-										String libraryGroup, String libraryName, String version) {
-		Optional<Document> libraryStatus = findOne(USER_INSTANCES,
-				and(exploratoryCondition(user, exploratoryName), libraryConditionExploratory(libraryGroup, libraryName
-						, version)),
-				Projections.fields(excludeId(), Projections.include("libs.status")));
+	@SuppressWarnings("unchecked")
+	public Library getLibrary(String user, String exploratoryName,
+							  String libraryGroup, String libraryName) {
+		Optional<Document> userInstance = findOne(USER_INSTANCES,
+				and(exploratoryCondition(user, exploratoryName),
+						elemMatch(EXPLORATORY_LIBS,
+								and(eq(LIB_GROUP, libraryGroup), eq(LIB_NAME, libraryName))
+						)),
+				Projections.fields(excludeId(), Projections.include(EXPLORATORY_LIBS)));
 
-		if (libraryStatus.isPresent()) {
-			Object lib = libraryStatus.get().get(EXPLORATORY_LIBS);
-			if (lib instanceof List && !((List) lib).isEmpty()) {
-				return LibStatus.of(((List<Document>) lib).get(0).getOrDefault(STATUS, EMPTY).toString());
-			}
+		if (userInstance.isPresent()) {
+			final Object exloratoryLibs = userInstance.get().get(EXPLORATORY_LIBS);
+			List<Document> libs = exloratoryLibs != null ? (List<Document>) exloratoryLibs : Collections.emptyList();
+			return libs.stream()
+					.filter(libraryPredicate(libraryGroup, libraryName))
+					.map(d -> convertFromDocument(d, Library.class))
+					.findAny().orElse(null);
+
 		}
 
-		return LibStatus.of(EMPTY);
+		return null;
 	}
 
-	/**
-	 * Finds and returns the status of library.
-	 *
-	 * @param user              user name.
-	 * @param exploratoryName   the name of exploratory.
-	 * @param computationalName the name of computational.
-	 * @param libraryGroup      the group name of library.
-	 * @param libraryName       the name of library.
-	 */
-	public LibStatus fetchLibraryStatus(String user, String exploratoryName, String computationalName,
-										String libraryGroup, String libraryName, String version) {
+	@SuppressWarnings("unchecked")
+	public Library getLibrary(String user, String exploratoryName, String computationalName,
+							  String libraryGroup, String libraryName) {
 		Optional<Document> libraryStatus = findOne(USER_INSTANCES,
 				and(runningExploratoryAndComputationalCondition(user, exploratoryName, computationalName),
-						libraryConditionComputational(computationalName, libraryGroup, libraryName, version)
+						libraryConditionComputational(computationalName, libraryGroup, libraryName)
 				),
 
 				Projections.fields(excludeId(),
@@ -179,17 +168,16 @@
 				)
 		);
 
-		if (libraryStatus.isPresent()) {
-			Object lib = ((Document) libraryStatus.get().get(COMPUTATIONAL_LIBS)).get(computationalName);
-			if (lib instanceof List && !((List) lib).isEmpty()) {
-				return LibStatus.of(((List<Document>) lib).stream()
-						.filter(e -> libraryGroup.equals(e.getString(LIB_GROUP))
-								&& libraryName.equals(e.getString(LIB_NAME))).findFirst()
-						.orElseGet(Document::new).getOrDefault(STATUS, EMPTY).toString());
-			}
-		}
+		return libraryStatus.map(document -> ((List<Document>) (((Document) document.get(COMPUTATIONAL_LIBS)).get(computationalName)))
+				.stream()
+				.filter(libraryPredicate(libraryGroup, libraryName))
+				.map(l -> convertFromDocument(l, Library.class))
+				.findAny().orElse(null)).orElse(null);
+	}
 
-		return LibStatus.of(EMPTY);
+	private Predicate<Document> libraryPredicate(String libraryGroup, String libraryName) {
+		return l -> libraryGroup.equals(l.getString(LIB_GROUP))
+				&& libraryName.equals(l.getString(LIB_NAME));
 	}
 
 	/**
@@ -203,7 +191,8 @@
 	public boolean addLibrary(String user, String exploratoryName, LibInstallDTO library, boolean reinstall) {
 		Optional<Document> opt = findOne(USER_INSTANCES,
 				and(exploratoryCondition(user, exploratoryName),
-						libraryConditionExploratory(library.getGroup(), library.getName(), library.getVersion())));
+						elemMatch(EXPLORATORY_LIBS,
+								and(eq(LIB_GROUP, library.getGroup()), eq(LIB_NAME, library.getName())))));
 		if (!opt.isPresent()) {
 			updateOne(USER_INSTANCES,
 					exploratoryCondition(user, exploratoryName),
@@ -217,9 +206,9 @@
 			}
 
 			updateOne(USER_INSTANCES, and(exploratoryCondition(user, exploratoryName),
-					libraryConditionExploratory(library.getGroup(), library.getName(), library.getVersion())),
+					elemMatch(EXPLORATORY_LIBS,
+							and(eq(LIB_GROUP, library.getGroup()), eq(LIB_NAME, library.getName())))),
 					new Document(SET, values));
-
 			return false;
 		}
 	}
@@ -288,7 +277,7 @@
 
 				updateOne(USER_INSTANCES,
 						and(exploratoryCondition(dto.getUser(), dto.getExploratoryName()),
-								libraryConditionExploratory(lib.getGroup(), lib.getName(), lib.getVersion())),
+								libraryConditionExploratory(lib.getGroup(), lib.getName())),
 						new Document(SET, values));
 			} catch (Exception e) {
 				throw new DlabException(String.format("Could not update library %s for %s",
@@ -305,7 +294,7 @@
 				updateOne(USER_INSTANCES,
 						and(exploratoryCondition(dto.getUser(), dto.getExploratoryName()),
 								elemMatch(COMPUTATIONAL_LIBS + "." + dto.getComputationalName(),
-										libCondition(lib.getGroup(), lib.getName(), lib.getVersion()))),
+										libCondition(lib.getGroup(), lib.getName()))),
 						new Document(SET, values));
 			} catch (Exception e) {
 				throw new DlabException(String.format("Could not update library %s for %s/%s",
@@ -314,9 +303,8 @@
 		}
 	}
 
-	private static Bson libCondition(String group, String name, String version) {
-		return and(eq(LIB_GROUP, group), eq(LIB_NAME, name),
-				or(eq(LIB_VERSION, version), eq(LIB_VERSION, "N/A")));
+	private static Bson libCondition(String group, String name) {
+		return and(eq(LIB_GROUP, group), eq(LIB_NAME, name));
 	}
 
 	private Document updateLibraryFields(LibInstallDTO lib, Date uptime) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/GitCredsDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/GitCredsDAO.java
index b9dee54..817f127 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/GitCredsDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/GitCredsDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java
index 36f2054..896806c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao;
@@ -20,7 +23,7 @@
 import com.epam.dlab.dto.exploratory.ImageStatus;
 import com.epam.dlab.dto.exploratory.LibStatus;
 import com.epam.dlab.model.ResourceType;
-import com.epam.dlab.model.exloratory.Image;
+import com.epam.dlab.model.exploratory.Image;
 import com.epam.dlab.model.library.Library;
 
 import java.util.List;
@@ -34,7 +37,7 @@
 
 	void updateImageFields(Image image);
 
-	List<ImageInfoRecord> getImages(String user, ImageStatus status, String dockerImage);
+	List<ImageInfoRecord> getImages(String user, String dockerImage, ImageStatus ... statuses);
 
 	Optional<ImageInfoRecord> getImage(String user, String name);
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java
index cd282d5..e896ff4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao;
@@ -20,20 +23,17 @@
 import com.epam.dlab.dto.exploratory.ImageStatus;
 import com.epam.dlab.dto.exploratory.LibStatus;
 import com.epam.dlab.model.ResourceType;
-import com.epam.dlab.model.exloratory.Image;
+import com.epam.dlab.model.exploratory.Image;
 import com.epam.dlab.model.library.Library;
 import com.google.inject.Singleton;
 import org.bson.Document;
 import org.bson.conversions.Bson;
 
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
-import static com.mongodb.client.model.Filters.and;
-import static com.mongodb.client.model.Filters.eq;
+import static com.mongodb.client.model.Filters.*;
+import static com.mongodb.client.model.Projections.elemMatch;
 import static com.mongodb.client.model.Projections.*;
 
 @Singleton
@@ -64,9 +64,9 @@
 	}
 
 	@Override
-	public List<ImageInfoRecord> getImages(String user, ImageStatus status, String dockerImage) {
+	public List<ImageInfoRecord> getImages(String user, String dockerImage, ImageStatus... statuses) {
 		return find(MongoCollections.IMAGES,
-				userImagesCondition(user, status, dockerImage),
+				userImagesCondition(user, dockerImage, statuses),
 				ImageInfoRecord.class);
 	}
 
@@ -101,8 +101,8 @@
 				elemMatch(LIBRARIES, eq(STATUS, status.name())));
 	}
 
-	private Bson userImagesCondition(String user, ImageStatus status, String dockerImage) {
-		final Bson userImagesCondition = userImagesCondition(user, status);
+	private Bson userImagesCondition(String user, String dockerImage, ImageStatus... statuses) {
+		final Bson userImagesCondition = userImagesCondition(user, statuses);
 		if (Objects.nonNull(dockerImage)) {
 			return and(userImagesCondition, eq(DOCKER_IMAGE, dockerImage));
 		} else {
@@ -111,8 +111,13 @@
 
 	}
 
-	private Bson userImagesCondition(String user, ImageStatus status) {
-		return and(eq(USER, user), eq(STATUS, status.name()));
+	private Bson userImagesCondition(String user, ImageStatus... statuses) {
+
+		final List<String> statusList = Arrays
+				.stream(statuses)
+				.map(ImageStatus::name)
+				.collect(Collectors.toList());
+		return and(eq(USER, user), in(STATUS, statusList));
 	}
 
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/IndexCreator.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/IndexCreator.java
index 889250c..3d3fb36 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/IndexCreator.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/IndexCreator.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java
index 8db9bb9..8bce841 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
@@ -40,23 +41,10 @@
  * DAO for manage the user key.
  */
 public abstract class KeyDAO extends BaseDAO {
-	static final String EDGE_STATUS = "edge_status";
+	private static final String EDGE_STATUS = "edge_status";
 	private static final String KEY_CONTENT = "content";
 
 	/**
-	 * Store the user key to Mongo database.
-	 *
-	 * @param user    user name
-	 * @param content key
-	 */
-	public void insertKey(final String user, String content) {
-		UserKeyDTO key = new UserKeyDTO()
-				.withContent(content)
-				.withStatus(KeyLoadStatus.NEW.getStatus());
-		insertOne(USER_KEYS, key, user);
-	}
-
-	/**
 	 * Write the status of user key to Mongo database.
 	 *
 	 * @param user   user name
@@ -86,30 +74,15 @@
 	public void upsertKey(final String user, String content, boolean insertRequired) {
 		Document doc = new Document(SET,
 				new Document()
-				.append(ID, user)
-				.append(KEY_CONTENT, content)
-				.append(STATUS, insertRequired ? KeyLoadStatus.NEW.getStatus() : KeyLoadStatus.SUCCESS.getStatus())
+						.append(ID, user)
+						.append(KEY_CONTENT, content)
+						.append(STATUS, insertRequired ? KeyLoadStatus.NEW.getStatus() :
+								KeyLoadStatus.SUCCESS.getStatus())
 						.append(TIMESTAMP, new Date()));
 		updateOne(USER_KEYS, eq(ID, user), doc, insertRequired);
 	}
 
 	/**
-	 * Finds and returns the user key.
-	 *
-	 * @param user user name.
-	 */
-	public UserKeyDTO fetchKey(String user) {
-		Optional<UserKeyDTO> opt = findOne(USER_KEYS,
-				eq(ID, user),
-				UserKeyDTO.class);
-
-		if (opt.isPresent()) {
-			return opt.get();
-		}
-		throw new DlabException("Key of user " + user + " not found.");
-	}
-
-	/**
 	 * Finds and returns the user key with the specified status
 	 *
 	 * @param user   user name.
@@ -150,7 +123,7 @@
 	public abstract Optional<? extends EdgeInfo> getEdgeInfoWhereStatusIn(String user, UserInstanceStatus... statuses);
 
 	protected <T extends EdgeInfo> Optional<T> getEdgeInfoWhereStatusIn(String user, Class<T> target,
-															  UserInstanceStatus... statuses) {
+																		UserInstanceStatus... statuses) {
 		return findOne(USER_EDGE,
 				and(eq(ID, user), in(EDGE_STATUS, statusList(statuses))),
 				target);
@@ -180,10 +153,6 @@
 				Updates.set(EDGE_STATUS, status));
 	}
 
-	public void deleteEdge(String user) {
-		mongoService.getCollection(USER_EDGE).deleteOne(eq(ID, user));
-	}
-
 	/**
 	 * Return the status of EDGE node.
 	 *
@@ -196,6 +165,10 @@
 		return (d == null ? "" : d.getString(EDGE_STATUS));
 	}
 
+	public void removeEdge(String user) {
+		deleteOne(USER_EDGE, eq(ID, user));
+	}
+
 	public boolean edgeNodeExist(String user) {
 		return findOne(USER_EDGE, and(eq(ID, user), not(in(EDGE_STATUS, UserInstanceStatus.TERMINATING.toString(),
 				UserInstanceStatus.TERMINATED.toString()))))
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoCollections.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoCollections.java
index 5a7286d..59343c9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoCollections.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoCollections.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
@@ -34,7 +35,7 @@
 	public static final String USER_INSTANCES = "userInstances";
     /** Name of shapes. */
 	public static final String SHAPES = "shapes";
-	static final String USER_UI_SETTINGS = "userUISettings";
+	static final String USER_SETTINGS = "userSettings";
     /* Billing data. */
 	public static final String BILLING = "billing";
     /** User roles. */
@@ -50,6 +51,8 @@
 	 */
 	public static final String BACKUPS = "backup";
 
+	public static final String USER_GROUPS = "userGroups";
+
 	private MongoCollections() {
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java
index c46a7a6..9539f65 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
@@ -31,6 +32,8 @@
     /** Name of OS family. */
     CONF_OS_FAMILY("conf_os_family"),
 
+    CONF_MAX_BUDGET("conf_max_budget"),
+
 
     // AWS Related properties
     /** Name of AWS region. */
@@ -41,6 +44,8 @@
     AWS_VPC_ID("aws_vpc_id"),
 	/** Id of virtual private cloud subnet for AWS account. */
     AWS_SUBNET_ID("aws_subnet_id"),
+    AWS_NOTEBOOK_VPC_ID("aws_notebook_vpc_id"),
+    AWS_NOTEBOOK_SUBNET_ID("aws_notebook_subnet_id"),
 
 
     // Azure related properties
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/RequestIdDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/RequestIdDAO.java
index 9d7bc7e..f90d2e1 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/RequestIdDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/RequestIdDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
index 32b84cc..37c14b7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2018, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
@@ -24,23 +25,27 @@
 import com.epam.dlab.model.scheduler.SchedulerJobData;
 import com.google.inject.Singleton;
 import com.mongodb.client.FindIterable;
+import com.mongodb.client.model.Filters;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.bson.Document;
 import org.bson.conversions.Bson;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Optional;
+import java.util.Set;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import static com.epam.dlab.dto.UserInstanceStatus.*;
 import static com.epam.dlab.backendapi.dao.ComputationalDAO.COMPUTATIONAL_NAME;
 import static com.epam.dlab.backendapi.dao.ComputationalDAO.IMAGE;
 import static com.epam.dlab.backendapi.dao.ExploratoryDAO.*;
 import static com.epam.dlab.backendapi.dao.MongoCollections.USER_INSTANCES;
 import static com.mongodb.client.model.Filters.*;
 import static com.mongodb.client.model.Projections.*;
+import static java.util.stream.Collectors.toList;
 
 /**
  * DAO for user's scheduler jobs.
@@ -49,41 +54,23 @@
 @Singleton
 public class SchedulerJobDAO extends BaseDAO {
 
-    static final String SCHEDULER_DATA = "scheduler_data";
+	static final String SCHEDULER_DATA = "scheduler_data";
 	public static final String TIMEZONE_PREFIX = "UTC";
+	private static final String CHECK_INACTIVITY_REQUIRED = "check_inactivity_required";
+	private static final String CHECK_INACTIVITY_FLAG = SCHEDULER_DATA + "." + CHECK_INACTIVITY_REQUIRED;
 
 	public SchedulerJobDAO() {
-        log.info("{} is initialized", getClass().getSimpleName());
-    }
-
-	/** Returns condition for search scheduler for exploratory which is not null.
-	 *
-	 * @return Bson condition.
-     */
-    private Bson schedulerNotNullCondition() {
-        return ne(SCHEDULER_DATA, null);
-    }
+		log.info("{} is initialized", getClass().getSimpleName());
+	}
 
 	/**
-	 * Returns condition for search exploratory which has stopped state for starting it, running state for stopping it
-	 * and stopped/running state for termination.
+	 * Returns condition for search scheduler for exploratory which is not null.
 	 *
-	 * @param desiredStatus 'running' value for searching stopped exploratories, 'stopped' - for searching
-	 *                       exploratories with 'running' state, 'terminated' for searching exploratories with
-	 *                       'stopped'
-	 *                       or 'running' state.
 	 * @return Bson condition.
 	 */
-	private Bson statusCondition(UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			return eq(STATUS, UserInstanceStatus.STOPPED.toString());
-		} else if (desiredStatus == STOPPED) {
-			return eq(STATUS, UserInstanceStatus.RUNNING.toString());
-		} else if (desiredStatus == TERMINATED) {
-			return or(eq(STATUS, UserInstanceStatus.STOPPED.toString()),
-					eq(STATUS, UserInstanceStatus.RUNNING.toString()));
-		} else return null;
-    }
+	private Bson schedulerNotNullCondition() {
+		return and(exists(SCHEDULER_DATA), ne(SCHEDULER_DATA, null));
+	}
 
 	/**
 	 * Finds and returns the info of user's single scheduler job by exploratory name.
@@ -121,92 +108,93 @@
 				.map(d -> convertFromDocument(d, SchedulerJobDTO.class));
 	}
 
-	public List<SchedulerJobData> getSchedulerJobsToAchieveStatus(UserInstanceStatus desiredStatus,
-																  boolean isAppliedForClusters) {
-		return isAppliedForClusters ? getSchedulerComputationalJobsToAchieveStatus(desiredStatus) :
-				getSchedulerExploratoryJobsToAchieveStatus(desiredStatus);
-	}
-
 	/**
 	 * Finds and returns the list of all scheduler jobs for starting/stopping/terminating exploratories regarding to
 	 * parameter passed.
 	 *
-	 * @param desiredStatus 'running' value for starting exploratory, 'stopped' - for stopping and 'terminated' - for
-	 *                        terminating.
+	 * @param status 'running' value for starting exploratory, 'stopped' - for stopping and 'terminated' -
+	 *               for
+	 *               terminating.
 	 * @return list of scheduler jobs.
 	 */
-	private List<SchedulerJobData> getSchedulerExploratoryJobsToAchieveStatus(UserInstanceStatus desiredStatus) {
-		FindIterable<Document> userInstances = find(USER_INSTANCES,
-				and(
-						statusCondition(desiredStatus),
-                        schedulerNotNullCondition()
-                ),
-                fields(excludeId(), include(USER, EXPLORATORY_NAME, SCHEDULER_DATA)));
+	public List<SchedulerJobData> getExploratorySchedulerDataWithStatus(UserInstanceStatus status) {
+		FindIterable<Document> userInstances = userInstancesWithScheduler(eq(STATUS, status.toString()));
 
 		return stream(userInstances).map(d -> convertFromDocument(d, SchedulerJobData.class))
-				.collect(Collectors.toList());
-    }
+				.collect(toList());
+	}
 
+	public List<SchedulerJobData> getExploratorySchedulerDataWithOneOfStatus(UserInstanceStatus... statuses) {
+		FindIterable<Document> userInstances = userInstancesWithScheduler(in(STATUS,
+				Arrays.stream(statuses).map(UserInstanceStatus::toString).collect(toList())));
 
-	/**
-	 * Finds and returns the list of all scheduler jobs for starting/stopping/terminating Spark clusters regarding to
-	 * parameter passed.
-	 *
-	 * @param desiredStatus 'running' value for starting computational resource, 'stopped' - for stopping and
-	 *                      'terminated' - for terminating.
-	 * @return list of scheduler jobs.
-	 */
+		return stream(userInstances).map(d -> convertFromDocument(d, SchedulerJobData.class))
+				.collect(toList());
+	}
 
-	@SuppressWarnings("unchecked")
-	private List<SchedulerJobData> getSchedulerComputationalJobsToAchieveStatus(UserInstanceStatus desiredStatus) {
+	public List<SchedulerJobData> getComputationalSchedulerDataWithOneOfStatus(UserInstanceStatus exploratoryStatus,
+																			   DataEngineType dataEngineType,
+																			   UserInstanceStatus... statuses) {
+		final Bson computationalSchedulerCondition = Filters.elemMatch(COMPUTATIONAL_RESOURCES,
+				and(schedulerNotNullCondition(), eq(CHECK_INACTIVITY_FLAG, false)));
 		FindIterable<Document> userInstances = find(USER_INSTANCES,
-				and(
-						eq(STATUS, RUNNING.toString()),
-						ne(COMPUTATIONAL_RESOURCES, null)
-				),
-				fields(excludeId(), include(USER, EXPLORATORY_NAME, COMPUTATIONAL_RESOURCES)));
+				and(eq(STATUS, exploratoryStatus.toString()), computationalSchedulerCondition),
+				fields(excludeId(), include(USER, EXPLORATORY_NAME, COMPUTATIONAL_RESOURCES + ".$")));
 
-		return stream(userInstances).map(doc ->
-				schedulerComputationalDataFromDocument(doc, DataEngineType.SPARK_STANDALONE, desiredStatus)
-		).flatMap(Function.identity()).collect(Collectors.toList());
+		return stream(userInstances)
+				.map(doc -> computationalSchedulerDataStream(doc, dataEngineType, statuses))
+				.flatMap(Function.identity())
+				.collect(toList());
 	}
 
-	private Stream<SchedulerJobData> schedulerComputationalDataFromDocument(Document doc,
-																			DataEngineType computationalType,
-																			UserInstanceStatus
-																					targetComputationalStatus) {
+	public void removeScheduler(String user, String exploratory) {
+		updateOne(USER_INSTANCES, and(eq(USER, user), eq(EXPLORATORY_NAME, exploratory)),
+				unset(SCHEDULER_DATA, StringUtils.EMPTY));
+	}
 
-		return computationalResourcesWithSchedulersFromDocument(doc, computationalType, targetComputationalStatus)
-				.stream().map(compResource ->
-						new SchedulerJobData(doc.getString(USER), doc.getString(EXPLORATORY_NAME),
-								compResource.getString(COMPUTATIONAL_NAME),
-								convertFromDocument((Document) compResource.get(SCHEDULER_DATA),
-										SchedulerJobDTO.class)));
+	public void removeScheduler(String user, String exploratory, String computational) {
+		updateOne(USER_INSTANCES, and(eq(USER, user), eq(EXPLORATORY_NAME, exploratory),
+				Filters.elemMatch(COMPUTATIONAL_RESOURCES, eq(COMPUTATIONAL_NAME, computational))),
+				unset(COMPUTATIONAL_RESOURCES + ".$." + SCHEDULER_DATA, StringUtils.EMPTY));
+	}
+
+	private FindIterable<Document> userInstancesWithScheduler(Bson statusCondition) {
+		return find(USER_INSTANCES,
+				and(
+						statusCondition,
+						schedulerNotNullCondition(), eq(CHECK_INACTIVITY_FLAG, false)
+				),
+				fields(excludeId(), include(USER, EXPLORATORY_NAME, SCHEDULER_DATA)));
+	}
+
+	private Stream<SchedulerJobData> computationalSchedulerDataStream(Document doc, DataEngineType computationalType,
+																	  UserInstanceStatus... computationalStatuses) {
+		return computationalSchedulerData(doc, computationalType, computationalStatuses)
+				.stream()
+				.map(compResource -> toSchedulerData(doc, compResource));
+	}
+
+	private SchedulerJobData toSchedulerData(Document userInstanceDocument, Document compResource) {
+		final String user = userInstanceDocument.getString(USER);
+		final String exploratoryName = userInstanceDocument.getString(EXPLORATORY_NAME);
+		final String computationalName = compResource.getString(COMPUTATIONAL_NAME);
+		final SchedulerJobDTO schedulerData = convertFromDocument((Document) compResource.get(SCHEDULER_DATA),
+				SchedulerJobDTO.class);
+		return new SchedulerJobData(user, exploratoryName, computationalName, schedulerData);
 	}
 
 	@SuppressWarnings("unchecked")
-	private List<Document> computationalResourcesWithSchedulersFromDocument(Document doc,
-																			DataEngineType computationalType,
-																			UserInstanceStatus
-																						targetComputationalStatus) {
-		return ((List<Document>) doc.get(COMPUTATIONAL_RESOURCES)).stream()
+	private List<Document> computationalSchedulerData(Document doc, DataEngineType computationalType,
+													  UserInstanceStatus... computationalStatuses) {
+		final Set<String> statusSet = Arrays.stream(computationalStatuses)
+				.map(UserInstanceStatus::toString)
+				.collect(Collectors.toSet());
+		return ((List<Document>) doc.get(COMPUTATIONAL_RESOURCES))
+				.stream()
 				.filter(compResource ->
 						DataEngineType.fromDockerImageName(compResource.getString(IMAGE)) ==
-								computationalType &&
-								computationalStatusCondition(compResource, targetComputationalStatus) &&
-								compResource.get(SCHEDULER_DATA) != null)
-				.collect(Collectors.toList());
+								computationalType && statusSet.contains(compResource.getString(STATUS)))
+				.collect(toList());
 	}
-
-	private boolean computationalStatusCondition(Document computationalResource, UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			return computationalResource.get(STATUS).equals(STOPPED.toString());
-		} else if (desiredStatus == STOPPED) {
-			return computationalResource.get(STATUS).equals(RUNNING.toString());
-		} else
-			return desiredStatus == TERMINATED && (computationalResource.get(STATUS).equals(STOPPED.toString()) ||
-					computationalResource.get(STATUS).equals(RUNNING.toString()));
-	}
-
 }
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java
index 4f19f44..bf46480 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
@@ -25,6 +26,9 @@
 import com.mongodb.client.FindIterable;
 import org.bson.Document;
 
+import java.util.*;
+import java.util.stream.Collectors;
+
 import static com.epam.dlab.backendapi.dao.MongoCollections.LOGIN_ATTEMPTS;
 import static com.epam.dlab.backendapi.dao.MongoCollections.ROLES;
 import static com.mongodb.client.model.Filters.ne;
@@ -41,9 +45,8 @@
 	 * Write the attempt of user login into Mongo database.
 	 *
 	 * @param credentials user credentials.
-	 * @throws DlabException
 	 */
-	public void writeLoginAttempt(UserCredentialDTO credentials) throws DlabException {
+	public void writeLoginAttempt(UserCredentialDTO credentials) {
 		insertOne(LOGIN_ATTEMPTS,
 				() -> new Document("login", credentials.getUsername()).append("iamlogin", UsernameUtils.removeDomain
 						(credentials.getUsername())));
@@ -51,13 +54,23 @@
 
 	/**
 	 * Return the roles or throw exception if roles collection does not exists.
-	 *
-	 * @throws DlabException
 	 */
-	public FindIterable<Document> getRoles() throws DlabException {
+	public FindIterable<Document> getRoles() {
 		if (!collectionExists(ROLES)) {
 			throw new DlabException("Collection \"" + ROLES + "\" does not exists.");
 		}
 		return find(ROLES, ne(ID, "_Example"), fields(exclude("description")));
 	}
+
+	public Map<String, Set<String>> getGroups() {
+		return stream(find("userGroups"))
+				.collect(Collectors.toMap(d -> d.getString(ID).toLowerCase(), this::toUsers));
+
+	}
+
+	@SuppressWarnings("unchecked")
+	private Set<String> toUsers(Document d) {
+		final Object users = d.get("users");
+		return users == null ? Collections.emptySet() : new HashSet<>((List<String>) users);
+	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java
index 28e2af0..16af300 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java
@@ -1,26 +1,32 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
 import com.epam.dlab.exceptions.DlabException;
+import com.mongodb.client.model.UpdateOptions;
 import org.bson.Document;
 
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
 import static com.epam.dlab.backendapi.dao.MongoCollections.SETTINGS;
 import static com.epam.dlab.backendapi.dao.MongoSetting.*;
 import static com.mongodb.client.model.Filters.eq;
@@ -30,147 +36,189 @@
  * Stores the environment settings.
  */
 public class SettingsDAO extends BaseDAO {
-    private static final String VALUE = "value";
+	private static final String VALUE = "value";
 
-    /**
-     * Returns the base name of service.
-     */
-    public String getServiceBaseName() {
-        return getSetting(SERIVICE_BASE_NAME);
-    }
+	/**
+	 * Returns the base name of service.
+	 */
+	public String getServiceBaseName() {
+		return getSetting(SERIVICE_BASE_NAME);
+	}
 
-    /**
-     * Returns the name of OS family.
-     */
-    public String getConfOsFamily() {
-        return getSetting(CONF_OS_FAMILY);
-    }
+	/**
+	 * Returns the name of OS family.
+	 */
+	public String getConfOsFamily() {
+		return getSetting(CONF_OS_FAMILY);
+	}
 
-    /**
-     * Returns the name of directory for user key.
-     */
-    public String getConfKeyDir() {
-        return getSetting(CONF_KEY_DIRECTORY);
-    }
+	/**
+	 * Returns the name of directory for user key.
+	 */
+	public String getConfKeyDir() {
+		return getSetting(CONF_KEY_DIRECTORY);
+	}
 
-    /**
-     * Returns the name of tag for resource id.
-     */
-    public String getConfTagResourceId() {
-        return getSetting(CONF_TAG_RESOURCE_ID);
-    }
+	/**
+	 * Returns the name of tag for resource id.
+	 */
+	public String getConfTagResourceId() {
+		return getSetting(CONF_TAG_RESOURCE_ID);
+	}
 
-    /**
-     * Returns the name of AWS region.
-     */
-    public String getAwsRegion() {
-        return getSetting(AWS_REGION);
-    }
+	public Optional<Integer> getMaxBudget() {
+		return getOptionalSetting(CONF_MAX_BUDGET)
+				.map(Integer::valueOf);
 
-    /**
-     * Returns the id of security group.
-     */
-    public String getAwsSecurityGroups() {
-        return getSetting(AWS_SECURITY_GROUPS);
-    }
+	}
 
-    /**
-     * Returns the id of virtual private cloud for AWS account.
-     */
-    public String getAwsVpcId() {
-        return getSetting(AWS_VPC_ID);
-    }
+	/**
+	 * Returns the name of AWS region.
+	 */
+	public String getAwsRegion() {
+		return getSetting(AWS_REGION);
+	}
 
-    /**
-     * Returns the id of virtual private cloud subnet for AWS account.
-     */
-    public String getAwsSubnetId() {
-        return getSetting(AWS_SUBNET_ID);
-    }
+	/**
+	 * Returns the id of security group.
+	 */
+	public String getAwsSecurityGroups() {
+		return getSetting(AWS_SECURITY_GROUPS);
+	}
 
-    public String getAzureRegion() {
-        return getSetting(AZURE_REGION);
-    }
+	/**
+	 * Returns the id of virtual private cloud for AWS account.
+	 */
+	public String getAwsVpcId() {
+		return getSetting(AWS_VPC_ID);
+	}
 
-    public String getAzureResourceGroupName() {
-        return getSetting(AZURE_RESOURCE_GROUP_NAME);
-    }
+	/**
+	 * Returns the id of virtual private cloud subnet for AWS account.
+	 */
+	public String getAwsSubnetId() {
+		return getSetting(AWS_SUBNET_ID);
+	}
 
-    public String getAzureSubnetName() {
-        return getSetting(AZURE_SUBNET_NAME);
-    }
+	public String getAwsNotebookVpcId() {
+		return getSetting(AWS_NOTEBOOK_VPC_ID);
+	}
 
-    public String getAzureVpcName() {
-        return getSetting(AZURE_VPC_NAME);
-    }
+	public String getAwsNotebookSubnetId() {
+		return getSetting(AWS_NOTEBOOK_SUBNET_ID);
+	}
 
-    public String getAzureSecurityGroupName() {
-        return getSetting(AZURE_SECURITY_GROUP_NAME);
-    }
+	public String getAzureRegion() {
+		return getSetting(AZURE_REGION);
+	}
 
-    public String getAzureEdgeInstanceSize() {
-        return getSetting(AZURE_EDGE_INSTANCE_SIZE);
-    }
+	public String getAzureResourceGroupName() {
+		return getSetting(AZURE_RESOURCE_GROUP_NAME);
+	}
 
-    public String getAzureSsnInstanceSize() {
-        return getSetting(AZURE_SSN_INSTANCE_SIZE);
-    }
+	public String getAzureSubnetName() {
+		return getSetting(AZURE_SUBNET_NAME);
+	}
 
-    public String getAzureDataLakeNameTag() {
-        return getSetting(AZURE_DATA_LAKE_NAME_TAG, "");
-    }
+	public String getAzureVpcName() {
+		return getSetting(AZURE_VPC_NAME);
+	}
 
-    public boolean isAzureDataLakeEnabled() {
-        String dataLakeTagName = getAzureDataLakeNameTag();
-        return dataLakeTagName != null && !dataLakeTagName.isEmpty();
-    }
+	public String getAzureSecurityGroupName() {
+		return getSetting(AZURE_SECURITY_GROUP_NAME);
+	}
 
-    public String getAzureDataLakeClientId() {
-        return getSetting(AZURE_DATA_LAKE_CLIENT_ID);
-    }
+	public String getAzureEdgeInstanceSize() {
+		return getSetting(AZURE_EDGE_INSTANCE_SIZE);
+	}
 
-    public String getGcpRegion() {
-        return getSetting(GCP_REGION);
-    }
+	public String getAzureSsnInstanceSize() {
+		return getSetting(AZURE_SSN_INSTANCE_SIZE);
+	}
 
-    public String getGcpZone() {
-        return getSetting(GCP_ZONE);
-    }
+	public String getAzureDataLakeNameTag() {
+		return getSetting(AZURE_DATA_LAKE_NAME_TAG, "");
+	}
 
-    public String getGcpSubnetName() {
-        return getSetting(GCP_SUBNET_NAME);
-    }
+	public boolean isAzureDataLakeEnabled() {
+		String dataLakeTagName = getAzureDataLakeNameTag();
+		return dataLakeTagName != null && !dataLakeTagName.isEmpty();
+	}
 
-    public String getGcpProjectId() {
-        return getSetting(GCP_PROJECT_ID);
-    }
+	public String getAzureDataLakeClientId() {
+		return getSetting(AZURE_DATA_LAKE_CLIENT_ID);
+	}
 
-    public String getGcpVpcName(){
-        return getSetting(GCP_VPC_NAME);
-    }
+	public String getGcpRegion() {
+		return getSetting(GCP_REGION);
+	}
 
-    /**
-     * Returns the value of property from Mongo database.
-     *
-     * @param setting the name of property.
-     */
-    private String getSetting(MongoSetting setting) {
-        Document d = mongoService
-                .getCollection(SETTINGS)
-                .find(eq(ID, setting.getId()))
-                .first();
-        if (d == null) {
-            throw new DlabException("Setting property " + setting + " not found");
-        }
-        return d.getOrDefault(VALUE, EMPTY).toString();
-    }
+	public String getGcpZone() {
+		return getSetting(GCP_ZONE);
+	}
+
+	public String getGcpSubnetName() {
+		return getSetting(GCP_SUBNET_NAME);
+	}
+
+	public String getGcpProjectId() {
+		return getSetting(GCP_PROJECT_ID);
+	}
+
+	public String getGcpVpcName() {
+		return getSetting(GCP_VPC_NAME);
+	}
+
+	public void setMaxBudget(Long budget) {
+		setSetting(CONF_MAX_BUDGET, budget.toString());
+	}
+
+	public void removeSetting(MongoSetting setting) {
+		getCollection(SETTINGS).deleteOne(eq(ID, setting.getId()));
+	}
+
+	public Map<String, Object> getSettings() {
+		return stream(getCollection(SETTINGS).find())
+				.collect(Collectors.toMap(d -> d.getString(ID), d -> d.get(VALUE)));
+	}
+
+	/**
+	 * Returns the value of property from Mongo database.
+	 *
+	 * @param setting the name of property.
+	 */
+	private String getSetting(MongoSetting setting) {
+		Document d = settingDocument(setting);
+		if (d == null) {
+			throw new DlabException("Setting property " + setting + " not found");
+		}
+		return d.getOrDefault(VALUE, EMPTY).toString();
+	}
+
+	private Optional<String> getOptionalSetting(MongoSetting setting) {
+		Document d = settingDocument(setting);
+		return Optional.ofNullable(d).map(doc -> doc.getString(VALUE));
+	}
+
+	private Document settingDocument(MongoSetting setting) {
+		return mongoService
+				.getCollection(SETTINGS)
+				.find(eq(ID, setting.getId()))
+				.first();
+	}
+
+	private void setSetting(MongoSetting mongoSetting, String value) {
+		mongoService.getCollection(SETTINGS)
+				.updateOne(eq(ID, mongoSetting.getId()), new Document("$set", new Document(VALUE, value)),
+						new UpdateOptions().upsert(true));
+	}
 
 
-    private String getSetting(MongoSetting setting, String defaultValue) {
-        Document d = mongoService.getCollection(SETTINGS).find(eq(ID, setting.getId())).first();
-        if (d == null) {
-            return defaultValue;
-        }
-        return d.getOrDefault(VALUE, defaultValue).toString();
-    }
+	private String getSetting(MongoSetting setting, String defaultValue) {
+		Document d = settingDocument(setting);
+		if (d == null) {
+			return defaultValue;
+		}
+		return d.getOrDefault(VALUE, defaultValue).toString();
+	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java
new file mode 100644
index 0000000..d8fb8ec
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.dao;
+
+import java.util.Set;
+
+public interface UserGroupDao {
+	void addUsers(String group, Set<String> users);
+
+	void updateUsers(String group, Set<String> users);
+
+	void removeUser(String group, String user);
+
+	void removeGroup(String groupId);
+
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java
new file mode 100644
index 0000000..a8e5a15
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.dao;
+
+import com.google.inject.Singleton;
+import org.bson.Document;
+
+import java.util.Set;
+
+import static com.epam.dlab.backendapi.dao.MongoCollections.USER_GROUPS;
+import static com.mongodb.client.model.Filters.eq;
+
+@Singleton
+public class UserGroupDaoImpl extends BaseDAO implements UserGroupDao {
+
+	private static final String USERS_FIELD = "users";
+
+	@Override
+	public void addUsers(String group, Set<String> users) {
+		updateOne(USER_GROUPS, eq(ID, group), addToSet(USERS_FIELD, users), true);
+	}
+
+	@Override
+	public void updateUsers(String group, Set<String> users) {
+		updateOne(USER_GROUPS, eq(ID, group), new Document(SET, new Document(USERS_FIELD, users)), true);
+	}
+
+	@Override
+	public void removeUser(String group, String user) {
+		updateOne(USER_GROUPS, eq(ID, group), pull(USERS_FIELD, user));
+	}
+
+	@Override
+	public void removeGroup(String groupId) {
+		deleteOne(USER_GROUPS, eq(ID, groupId));
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
new file mode 100644
index 0000000..a12cd5e
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.dao;
+
+import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+
+import java.util.List;
+import java.util.Set;
+
+public interface UserRoleDao {
+	List<UserRoleDto> findAll();
+
+	void insert(UserRoleDto dto);
+
+	boolean update(UserRoleDto dto);
+
+	boolean addGroupToRole(Set<String> groups, Set<String> roleIds);
+
+	boolean removeGroupFromRole(Set<String> groups, Set<String> roleIds);
+	void removeGroupWhenRoleNotIn(String group, Set<String> roleIds);
+
+	void remove(String roleId);
+
+	boolean removeGroup(String groupId);
+
+	List<UserGroupDto> aggregateRolesByGroup();
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
new file mode 100644
index 0000000..e73dd6b
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.dao;
+
+import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+import com.google.inject.Singleton;
+import com.mongodb.client.model.BsonField;
+import com.mongodb.client.result.UpdateResult;
+import org.bson.Document;
+import org.bson.conversions.Bson;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+import static com.epam.dlab.backendapi.dao.MongoCollections.USER_GROUPS;
+import static com.mongodb.client.model.Aggregates.*;
+import static com.mongodb.client.model.Filters.*;
+import static java.util.stream.Collectors.toList;
+
+@Singleton
+public class UserRoleDaoImpl extends BaseDAO implements UserRoleDao {
+
+	private static final String USERS_FIELD = "users";
+	private static final String GROUPS_FIELD = "groups";
+	private static final String DESCRIPTION = "description";
+	private static final String ROLES = "roles";
+	private static final String GROUPS = "$groups";
+	private static final String GROUP = "group";
+	private static final String EXPLORATORY_SHAPES_FIELD = "exploratory_shapes";
+	private static final String PAGES_FIELD = "pages";
+	private static final String EXPLORATORIES_FIELD = "exploratories";
+	private static final String COMPUTATIONALS_FIELD = "computationals";
+	private static final String GROUP_INFO = "groupInfo";
+
+
+	@Override
+	public List<UserRoleDto> findAll() {
+		return find(MongoCollections.ROLES, UserRoleDto.class);
+	}
+
+	@Override
+	public void insert(UserRoleDto dto) {
+		insertOne(MongoCollections.ROLES, dto, dto.getId());
+	}
+
+	@Override
+	public boolean update(UserRoleDto dto) {
+		final Document userRoleDocument = convertToBson(dto).append(TIMESTAMP, new Date());
+		return conditionMatched(updateOne(MongoCollections.ROLES,
+				eq(ID, dto.getId()),
+				new Document(SET, userRoleDocument)));
+	}
+
+	@Override
+	public boolean addGroupToRole(Set<String> groups, Set<String> roleIds) {
+		return conditionMatched(updateMany(MongoCollections.ROLES, in(ID, roleIds), addToSet(GROUPS_FIELD,
+				groups)));
+	}
+
+	@Override
+	public boolean removeGroupFromRole(Set<String> groups, Set<String> roleIds) {
+		return conditionMatched(updateMany(MongoCollections.ROLES, in(ID, roleIds), pullAll(GROUPS_FIELD, groups)));
+	}
+
+	@Override
+	public void removeGroupWhenRoleNotIn(String group, Set<String> roleIds) {
+		updateMany(MongoCollections.ROLES, not(in(ID, roleIds)), pull(GROUPS_FIELD, group));
+	}
+
+	@Override
+	public void remove(String roleId) {
+		deleteOne(MongoCollections.ROLES, eq(ID, roleId));
+	}
+
+	@Override
+	public boolean removeGroup(String groupId) {
+		return conditionMatched(updateMany(MongoCollections.ROLES, in(GROUPS_FIELD, groupId), pull(GROUPS_FIELD,
+				groupId)));
+	}
+
+	@Override
+	public List<UserGroupDto> aggregateRolesByGroup() {
+		final Document role = roleDocument();
+		final Bson groupBy = group(GROUPS, new BsonField(ROLES, new Document(ADD_TO_SET, role)));
+		final Bson lookup = lookup(USER_GROUPS, ID, ID, GROUP_INFO);
+		final List<Bson> pipeline = Arrays.asList(unwind(GROUPS), groupBy, lookup,
+				project(new Document(GROUP, "$" + ID).append(GROUP_INFO, elementAt(GROUP_INFO, 0))
+						.append(ROLES, "$" + ROLES)),
+				project(new Document(GROUP, "$" + ID).append(USERS_FIELD, "$" + GROUP_INFO + "." + USERS_FIELD)
+						.append(ROLES, "$" + ROLES)));
+
+		return stream(aggregate(MongoCollections.ROLES, pipeline))
+				.map(d -> convertFromDocument(d, UserGroupDto.class))
+				.collect(toList());
+	}
+
+	private Document roleDocument() {
+		return new Document().append(ID, "$" + ID)
+				.append(DESCRIPTION, "$" + DESCRIPTION)
+				.append(USERS_FIELD, "$" + USERS_FIELD)
+				.append(EXPLORATORY_SHAPES_FIELD, "$" + EXPLORATORY_SHAPES_FIELD)
+				.append(PAGES_FIELD, "$" + PAGES_FIELD)
+				.append(EXPLORATORIES_FIELD, "$" + EXPLORATORIES_FIELD)
+				.append(COMPUTATIONALS_FIELD, "$" + COMPUTATIONALS_FIELD);
+	}
+
+	private boolean conditionMatched(UpdateResult updateResult) {
+		return updateResult.getMatchedCount() > 0;
+	}
+
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserSettingsDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserSettingsDAO.java
index ec0a24e..695ae0c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserSettingsDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserSettingsDAO.java
@@ -1,70 +1,77 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.dao;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
 import io.dropwizard.auth.Auth;
-import org.bson.Document;
-import org.hibernate.validator.constraints.NotBlank;
+import org.apache.commons.lang3.StringUtils;
 
-import static com.epam.dlab.backendapi.dao.MongoCollections.USER_UI_SETTINGS;
+import java.util.Optional;
+
+import static com.epam.dlab.backendapi.dao.MongoCollections.USER_SETTINGS;
 import static com.mongodb.client.model.Filters.eq;
 import static com.mongodb.client.model.Updates.set;
-import static org.apache.commons.lang3.StringUtils.EMPTY;
 
-/** DAO for the user preferences.
+/**
+ * DAO for the user preferences.
  */
 public class UserSettingsDAO extends BaseDAO {
-    private static final String VALUE = "userSettings";
+	private static final String USER_UI_SETTINGS_FIELD = "userUISettings";
+	private static final String USER_ALLOWED_BUDGET = "allowedBudget";
 
-    /** Returns a value or empty string from collection.
-     * @param collectionName name of collection.
-     * @param id value identifier.
-     * @return value or empty string.
-     */
-	private String getValue(String collectionName, String id) {
-		Document d = mongoService
-				.getCollection(collectionName)
-				.find(eq(ID, id))
-				.first();
-		return (d == null ? EMPTY :
-					d.getOrDefault(VALUE, EMPTY).toString());
-	}
-
-	/** Returns the user preferences of UI dashboard.
+	/**
+	 * Returns the user preferences of UI dashboard.
+	 *
 	 * @param userInfo user info.
 	 * @return JSON content.
 	 */
 	public String getUISettings(@Auth UserInfo userInfo) {
-        return getValue(USER_UI_SETTINGS,
-        				userInfo.getName());
-    }
-    
-	/** Store the user preferences of UI dashboard.
+		return findOne(USER_SETTINGS, eq(ID, userInfo.getName()))
+				.map(d -> d.getString(USER_UI_SETTINGS_FIELD))
+				.orElse(StringUtils.EMPTY);
+	}
+
+	/**
+	 * Store the user preferences of UI dashboard.
+	 *
 	 * @param userInfo user info.
 	 * @param settings user preferences in JSON format.
 	 */
-    public void setUISettings(@Auth UserInfo userInfo, @NotBlank String settings) {
-    	updateOne(USER_UI_SETTINGS,
-    			eq(ID, userInfo.getName()),
-    			set(VALUE, settings),
-    			true);
-    }
+	public void setUISettings(UserInfo userInfo, String settings) {
+		updateOne(USER_SETTINGS,
+				eq(ID, userInfo.getName()),
+				set(USER_UI_SETTINGS_FIELD, settings),
+				true);
+	}
+
+	public void updateBudget(UserDTO allowedBudgetDTO) {
+		updateOne(USER_SETTINGS,
+				eq(ID, allowedBudgetDTO.getName()),
+				set(USER_ALLOWED_BUDGET, allowedBudgetDTO.getBudget()),
+				true);
+	}
+
+	public Optional<Integer> getAllowedBudget(String user) {
+		return findOne(USER_SETTINGS, eq(ID, user))
+				.flatMap(d -> Optional.ofNullable(d.getInteger(USER_ALLOWED_BUDGET)));
+	}
 
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java
index d319962..8677268 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao.aws;
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.dao.BaseBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.aws.AwsBillingFilter;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
@@ -51,7 +54,7 @@
 /**
  * DAO for user billing.
  */
-public class AwsBillingDAO extends BillingDAO {
+public class AwsBillingDAO extends BaseBillingDAO<AwsBillingFilter> {
 	private static final Logger LOGGER = LoggerFactory.getLogger(AwsBillingDAO.class);
 
 	public static final String DLAB_RESOURCE_TYPE = "dlab_resource_type";
@@ -150,11 +153,12 @@
 			costTotal += cost;
 
 			Document item = new Document()
-					.append(FIELD_USER_ID, id.getString(USER))
+					.append(FIELD_USER_ID, getUserOrDefault(id.getString(USER)))
 					.append(FIELD_DLAB_ID, resourceId)
 					.append(DLAB_RESOURCE_TYPE, resourceTypeId)
 					.append(SHAPE, shapeName)
-					.append(STATUS, status)
+					.append(STATUS,
+							Optional.ofNullable(status).map(UserInstanceStatus::toString).orElse(StringUtils.EMPTY))
 					.append(FIELD_PRODUCT, id.getString(FIELD_PRODUCT))
 					.append(FIELD_RESOURCE_TYPE, id.getString(FIELD_RESOURCE_TYPE))
 					.append(FIELD_COST, BillingCalculationUtils.formatDouble(cost))
@@ -195,18 +199,18 @@
 		}
 	}
 
-	protected void appendSsnAndEdgeNodeType(List<String> shapeNames, Map<String, BillingDAO.ShapeInfo> shapes) {
+	protected void appendSsnAndEdgeNodeType(List<String> shapeNames, Map<String, ShapeInfo> shapes) {
 		// Add SSN and EDGE nodes
 		final String ssnShape = "t2.medium";
 		if (shapeNames == null || shapeNames.isEmpty() || shapeNames.contains(ssnShape)) {
 			String serviceBaseName = settings.getServiceBaseName();
-			shapes.put(serviceBaseName + "-ssn", new BillingDAO.ShapeInfo(ssnShape, UserInstanceStatus.RUNNING));
+			shapes.put(serviceBaseName + "-ssn", new ShapeInfo(ssnShape, UserInstanceStatus.RUNNING));
 			FindIterable<Document> docs = getCollection(USER_EDGE)
 					.find()
 					.projection(fields(include(ID, EDGE_STATUS)));
 			for (Document d : docs) {
 				shapes.put(String.join("-", serviceBaseName, UsernameUtils.removeDomain(d.getString(ID)), "edge"),
-						new BillingDAO.ShapeInfo(ssnShape, UserInstanceStatus.of(d.getString(EDGE_STATUS))));
+						new ShapeInfo(ssnShape, UserInstanceStatus.of(d.getString(EDGE_STATUS))));
 			}
 		}
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java
index 5e24eb9..745a2cd 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao.aws;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java
index 08f1eb2..5aaa070 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java
@@ -1,24 +1,27 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao.azure;
 
 import com.epam.dlab.MongoKeyWords;
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.dao.BaseBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.azure.AzureBillingFilter;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
@@ -50,7 +53,7 @@
 
 @Singleton
 @Slf4j
-public class AzureBillingDAO extends BillingDAO {
+public class AzureBillingDAO extends BaseBillingDAO<AzureBillingFilter> {
 	public static final String SIZE = "size";
 
 	public Document getReport(UserInfo userInfo, AzureBillingFilter filter) {
@@ -111,10 +114,11 @@
 			costTotal += d.getDouble(MongoKeyWords.COST);
 
 			Document item = new Document()
-					.append(MongoKeyWords.DLAB_USER, id.getString(USER))
+					.append(MongoKeyWords.DLAB_USER, getUserOrDefault(id.getString(USER)))
 					.append(MongoKeyWords.DLAB_ID, resourceId)
 					.append(SIZE, generateShapeName(shape))
-					.append(STATUS, status)
+					.append(STATUS,
+							Optional.ofNullable(status).map(UserInstanceStatus::toString).orElse(StringUtils.EMPTY))
 					.append(MongoKeyWords.METER_CATEGORY, id.getString(MongoKeyWords.METER_CATEGORY))
 					.append(MongoKeyWords.RESOURCE_TYPE,
 							DlabResourceType.getResourceTypeName(id.getString(MongoKeyWords.RESOURCE_TYPE)))
@@ -200,7 +204,7 @@
 
 		final String ssnSize = settings.getAzureSsnInstanceSize();
 		if (shapeNames == null || shapeNames.isEmpty() || shapeNames.contains(ssnSize)) {
-			shapes.put(serviceBaseName + "-ssn", new BillingDAO.ShapeInfo(ssnSize, UserInstanceStatus.RUNNING));
+			shapes.put(serviceBaseName + "-ssn", new BaseBillingDAO.ShapeInfo(ssnSize, UserInstanceStatus.RUNNING));
 		}
 
 
@@ -211,7 +215,7 @@
 					.projection(fields(include(INSTANCE_ID, EDGE_STATUS)));
 			for (Document d : docs) {
 				shapes.put(d.getString(INSTANCE_ID),
-						new BillingDAO.ShapeInfo(edgeSize, UserInstanceStatus.of(d.getString(EDGE_STATUS))));
+						new BaseBillingDAO.ShapeInfo(edgeSize, UserInstanceStatus.of(d.getString(EDGE_STATUS))));
 			}
 		}
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java
index add8725..4a7ec1b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao.azure;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java
new file mode 100644
index 0000000..ae55181
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.dao.gcp;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import org.bson.Document;
+
+public class GcpBillingDao implements BillingDAO<Object> {
+	@Override
+	public Double getTotalCost() {
+		return null;
+	}
+
+	@Override
+	public Double getUserCost(String user) {
+		return null;
+	}
+
+	@Override
+	public int getBillingQuoteUsed() {
+		return 0;
+	}
+
+	@Override
+	public int getBillingUserQuoteUsed(String user) {
+		return 0;
+	}
+
+	@Override
+	public boolean isBillingQuoteReached() {
+		return false;
+	}
+
+	@Override
+	public boolean isUserQuoteReached(String user) {
+		return false;
+	}
+
+	@Override
+	public Document getReport(UserInfo userInfo, Object filter) {
+		return null;
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java
index 4e15808..7057f8d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.dao.gcp;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EnvStatusListener.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EnvStatusListener.java
index 514bda4..a1dae09 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EnvStatusListener.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EnvStatusListener.java
@@ -1,27 +1,28 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.domain;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.dao.EnvStatusDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.util.RequestBuilder;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.dto.UserEnvironmentResources;
@@ -52,7 +53,7 @@
 	private final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
 
 	private final Cache<String, UserInfo> sessions;
-	private final EnvStatusDAO dao;
+	private final EnvDAO dao;
 	private final RESTService provisioningService;
 	private final StatusChecker statusChecker = new StatusChecker();
 	private final long checkEnvStatusTimeout;
@@ -62,7 +63,7 @@
 	private RequestId requestId;
 
 	@Inject
-	public EnvStatusListener(SelfServiceApplicationConfiguration configuration, EnvStatusDAO dao,
+	public EnvStatusListener(SelfServiceApplicationConfiguration configuration, EnvDAO dao,
 							 @Named(ServiceConsts.PROVISIONING_SERVICE_NAME) RESTService provisioningService,
 							 RequestBuilder requestBuilder) {
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibCache.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibCache.java
index c90264c..2ff1148 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibCache.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibCache.java
@@ -1,19 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.domain;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
index 7d6d0d4..3c79963 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
@@ -1,19 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 package com.epam.dlab.backendapi.domain;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/MavenSearchArtifactResponse.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/MavenSearchArtifactResponse.java
index ea7a02a..3bf0154 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/MavenSearchArtifactResponse.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/MavenSearchArtifactResponse.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.domain;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestId.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestId.java
index 4de730c..7aa6bb0 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestId.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestId.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.domain;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestIdDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestIdDTO.java
index 77800c0..c4074e3 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestIdDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/RequestIdDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.domain;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/SchedulerConfigurationData.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/SchedulerConfigurationData.java
new file mode 100644
index 0000000..58090b2
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/SchedulerConfigurationData.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.domain;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class SchedulerConfigurationData {
+	private final boolean enabled;
+	@NotNull
+	private final String cron;
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/MongoHealthCheck.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/MongoHealthCheck.java
index e31e496..262671c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/MongoHealthCheck.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/MongoHealthCheck.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.healthcheck;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningServiceHealthCheck.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningServiceHealthCheck.java
index 941756e..0e16892 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningServiceHealthCheck.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningServiceHealthCheck.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.healthcheck;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/interceptor/BudgetLimitInterceptor.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/interceptor/BudgetLimitInterceptor.java
new file mode 100644
index 0000000..ebe3a54
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/interceptor/BudgetLimitInterceptor.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.interceptor;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.exceptions.ResourceQuoteReachedException;
+import com.google.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+@Slf4j
+public class BudgetLimitInterceptor implements MethodInterceptor {
+	@Inject
+	private BillingDAO billingDAO;
+
+	@Override
+	public Object invoke(MethodInvocation mi) throws Throwable {
+		if (userQuoteReached(mi) || billingDAO.isBillingQuoteReached()) {
+			final Method method = mi.getMethod();
+			log.warn("Execution of method {} failed because of reaching resource limit quote", method.getName());
+			throw new ResourceQuoteReachedException("Operation can not be finished. Resource quote is reached");
+		} else {
+			return mi.proceed();
+		}
+	}
+
+	private Boolean userQuoteReached(MethodInvocation mi) {
+		return Arrays.stream(mi.getArguments())
+				.filter(arg -> arg.getClass().equals(UserInfo.class))
+				.findAny()
+				.map(u -> ((UserInfo) u).getName())
+				.map(billingDAO::isUserQuoteReached)
+				.orElse(Boolean.FALSE);
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/listeners/RestoreHandlerStartupListener.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/listeners/RestoreHandlerStartupListener.java
new file mode 100644
index 0000000..7d94b77
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/listeners/RestoreHandlerStartupListener.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.listeners;
+
+import com.epam.dlab.rest.client.RESTService;
+import io.dropwizard.lifecycle.ServerLifecycleListener;
+import lombok.extern.slf4j.Slf4j;
+import org.eclipse.jetty.server.Server;
+
+@Slf4j
+public class RestoreHandlerStartupListener implements ServerLifecycleListener {
+
+	private final RESTService provisioningService;
+
+	public RestoreHandlerStartupListener(RESTService provisioningService) {
+		this.provisioningService = provisioningService;
+	}
+
+	@Override
+	public void serverStarted(Server server) {
+		try {
+			provisioningService.post("/handler/restore", new Object(), Object.class);
+		} catch (Exception e) {
+			log.error("Exception occurred during restore handler request: {}", e.getMessage());
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
index 615af34..d80e9fb 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
@@ -1,26 +1,34 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
 
 import com.epam.dlab.auth.SecurityFactory;
 import com.epam.dlab.backendapi.SelfServiceApplication;
+import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.auth.SelfServiceSecurityAuthenticator;
+import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
+import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
 import com.epam.dlab.backendapi.dao.aws.AwsKeyDao;
+import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
 import com.epam.dlab.backendapi.resources.aws.BillingResourceAws;
 import com.epam.dlab.backendapi.resources.aws.ComputationalResourceAws;
 import com.epam.dlab.backendapi.resources.callback.aws.EdgeCallbackAws;
@@ -32,6 +40,7 @@
 import com.epam.dlab.backendapi.service.aws.AwsInfrastructureInfoService;
 import com.epam.dlab.backendapi.service.aws.AwsInfrastructureTemplateService;
 import com.epam.dlab.cloud.CloudModule;
+import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
 import com.google.inject.Injector;
 import com.google.inject.Provides;
@@ -42,8 +51,15 @@
 import org.quartz.SchedulerException;
 import org.quartz.impl.StdSchedulerFactory;
 
+import static com.google.inject.matcher.Matchers.annotatedWith;
+import static com.google.inject.matcher.Matchers.any;
+
 public class AwsSelfServiceModule extends CloudModule {
 
+	private static final String MONGO_URI_FORMAT = "mongodb://%s:%s@%s:%d/%s";
+	private static final String QUARTZ_MONGO_URI_PROPERTY = "org.quartz.jobStore.mongoUri";
+	private static final String QUARTZ_DB_NAME = "org.quartz.jobStore.dbName";
+
 	@Override
 	protected void configure() {
 		bind(BillingService.class).to(AwsBillingService.class);
@@ -52,6 +68,10 @@
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
 		bind(InfrastructureTemplateService.class).to(AwsInfrastructureTemplateService.class);
+		bind(BillingDAO.class).to(AwsBillingDAO.class);
+		final BudgetLimitInterceptor budgetLimitInterceptor = new BudgetLimitInterceptor();
+		requestInjection(budgetLimitInterceptor);
+		bindInterceptor(any(), annotatedWith(BudgetLimited.class), budgetLimitInterceptor);
 	}
 
 	@Override
@@ -68,7 +88,13 @@
 
 	@Provides
 	@Singleton
-	Scheduler provideScheduler() throws SchedulerException {
+	Scheduler provideScheduler(SelfServiceApplicationConfiguration configuration) throws SchedulerException {
+		final MongoServiceFactory mongoFactory = configuration.getMongoFactory();
+		final String database = mongoFactory.getDatabase();
+		final String mongoUri = String.format(MONGO_URI_FORMAT, mongoFactory.getUsername(), mongoFactory.getPassword(),
+				mongoFactory.getHost(), mongoFactory.getPort(), database);
+		System.setProperty(QUARTZ_MONGO_URI_PROPERTY, mongoUri);
+		System.setProperty(QUARTZ_DB_NAME, database);
 		return StdSchedulerFactory.getDefaultScheduler();
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
index 5b2220a..c59c3d2 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
@@ -19,9 +22,14 @@
 import com.epam.dlab.auth.SecurityFactory;
 import com.epam.dlab.auth.rest.UserSessionDurationAuthorizer;
 import com.epam.dlab.backendapi.SelfServiceApplication;
+import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.auth.SelfServiceSecurityAuthenticator;
+import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
+import com.epam.dlab.backendapi.dao.azure.AzureBillingDAO;
 import com.epam.dlab.backendapi.dao.azure.AzureKeyDao;
+import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
 import com.epam.dlab.backendapi.resources.SecurityResource;
 import com.epam.dlab.backendapi.resources.azure.AzureOauthResource;
 import com.epam.dlab.backendapi.resources.azure.BillingResourceAzure;
@@ -35,6 +43,7 @@
 import com.epam.dlab.backendapi.service.azure.AzureInfrastructureInfoService;
 import com.epam.dlab.backendapi.service.azure.AzureInfrastructureTemplateService;
 import com.epam.dlab.cloud.CloudModule;
+import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
 import com.google.inject.Injector;
 import com.google.inject.Provides;
@@ -46,9 +55,15 @@
 import org.quartz.SchedulerException;
 import org.quartz.impl.StdSchedulerFactory;
 
+import static com.google.inject.matcher.Matchers.annotatedWith;
+import static com.google.inject.matcher.Matchers.any;
+
 @Slf4j
 public class AzureSelfServiceModule extends CloudModule {
 
+	private static final String MONGO_URI_FORMAT = "mongodb://%s:%s@%s:%d/%s";
+	private static final String QUARTZ_MONGO_URI_PROPERTY = "org.quartz.jobStore.mongoUri";
+	private static final String QUARTZ_DB_NAME = "org.quartz.jobStore.dbName";
 	private boolean useLdap;
 	private long maxSessionDurabilityMilliseconds;
 
@@ -65,6 +80,10 @@
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
 		bind(InfrastructureTemplateService.class).to(AzureInfrastructureTemplateService.class);
+		bind(BillingDAO.class).to(AzureBillingDAO.class);
+		final BudgetLimitInterceptor budgetLimitInterceptor = new BudgetLimitInterceptor();
+		requestInjection(budgetLimitInterceptor);
+		bindInterceptor(any(), annotatedWith(BudgetLimited.class), budgetLimitInterceptor);
 	}
 
 	@Override
@@ -85,11 +104,18 @@
 
 		injector.getInstance(SecurityFactory.class).configure(injector, environment,
 				SelfServiceSecurityAuthenticator.class, injector.getInstance(Authorizer.class));
+
 	}
 
 	@Provides
 	@Singleton
-	Scheduler provideScheduler() throws SchedulerException {
+	Scheduler provideScheduler(SelfServiceApplicationConfiguration configuration) throws SchedulerException {
+		final MongoServiceFactory mongoFactory = configuration.getMongoFactory();
+		final String database = mongoFactory.getDatabase();
+		final String mongoUri = String.format(MONGO_URI_FORMAT, mongoFactory.getUsername(), mongoFactory.getPassword(),
+				mongoFactory.getHost(), mongoFactory.getPort(), database);
+		System.setProperty(QUARTZ_MONGO_URI_PROPERTY, mongoUri);
+		System.setProperty(QUARTZ_DB_NAME, database);
 		return StdSchedulerFactory.getDefaultScheduler();
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
index 703596e..d09a63b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
@@ -24,25 +27,19 @@
 import com.epam.dlab.auth.dto.UserCredentialDTO;
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.auth.SelfServiceSecurityAuthorizer;
-import com.epam.dlab.backendapi.dao.BackupDao;
-import com.epam.dlab.backendapi.dao.BackupDaoImpl;
-import com.epam.dlab.backendapi.dao.ImageExploratoryDao;
-import com.epam.dlab.backendapi.dao.ImageExploratoryDaoImpl;
-import com.epam.dlab.backendapi.domain.EnvStatusListener;
-import com.epam.dlab.backendapi.domain.RequestId;
+import com.epam.dlab.backendapi.dao.*;
 import com.epam.dlab.backendapi.service.*;
 import com.epam.dlab.backendapi.service.impl.*;
-import com.epam.dlab.backendapi.util.RequestBuilder;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.mongo.MongoService;
 import com.epam.dlab.rest.client.RESTService;
 import com.epam.dlab.rest.contracts.DockerAPI;
+import com.epam.dlab.rest.dto.ErrorDTO;
 import com.google.inject.name.Names;
 import io.dropwizard.auth.Authorizer;
-import io.dropwizard.client.JerseyClientBuilder;
 import io.dropwizard.setup.Environment;
 
-import javax.ws.rs.client.Client;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 /**
@@ -71,7 +68,6 @@
 		bind(MongoService.class).toInstance(configuration.getMongoFactory().build(environment));
 		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.SECURITY_SERVICE_NAME))
 				.toInstance(createAuthenticationService());
-		requestStaticInjection(EnvStatusListener.class, RequestId.class, RequestBuilder.class);
 		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.PROVISIONING_SERVICE_NAME))
 				.toInstance(configuration.getProvisioningFactory()
 						.build(environment, ServiceConsts.PROVISIONING_SERVICE_NAME));
@@ -80,6 +76,7 @@
 		bind(BackupService.class).to(BackupServiceImpl.class);
 		bind(BackupDao.class).to(BackupDaoImpl.class);
 		bind(ExploratoryService.class).to(ExploratoryServiceImpl.class);
+		bind(InactivityService.class).to(InactivityServiceImpl.class);
 		bind(SystemUserInfoService.class).to(SystemUserInfoServiceImpl.class);
 		bind(Authorizer.class).to(SelfServiceSecurityAuthorizer.class);
 		bind(AccessKeyService.class).to(AccessKeyServiceImpl.class);
@@ -91,10 +88,17 @@
 		bind(EdgeService.class).to(EdgeServiceImpl.class);
 		bind(ReuploadKeyService.class).to(ReuploadKeyServiceImpl.class);
 		bind(UserResourceService.class).to(UserResourceServiceImpl.class);
-		bind(Client.class).toInstance(new JerseyClientBuilder(environment).using(configuration.getJerseyClientConfiguration())
-				.build(""));
+		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.MAVEN_SEARCH_API))
+				.toInstance(configuration.getMavenApiFactory().build(environment, ServiceConsts.MAVEN_SEARCH_API));
 
 		bind(ExternalLibraryService.class).to(MavenCentralLibraryService.class);
+		bind(SystemInfoService.class).to(SystemInfoServiceImpl.class);
+		bind(UserGroupService.class).to(UserGroupServiceImpl.class);
+		bind(UserRoleService.class).to(UserRoleServiceImpl.class);
+		bind(UserRoleDao.class).to(UserRoleDaoImpl.class);
+		bind(UserGroupDao.class).to(UserGroupDaoImpl.class);
+		bind(ApplicationSettingService.class).to(ApplicationSettingServiceImpl.class);
+		bind(UserSettingService.class).to(UserSettingServiceImpl.class);
 	}
 
 	/**
@@ -131,7 +135,9 @@
 					return (T) Response.ok(TOKEN).build();
 				} else {
 					return (T) Response.status(Response.Status.UNAUTHORIZED)
-							.entity("Username or password are not valid")
+							.entity(new ErrorDTO(Response.Status.UNAUTHORIZED.getStatusCode(), "Username or password" +
+									" are not valid"))
+							.type(MediaType.APPLICATION_JSON_TYPE)
 							.build();
 				}
 			}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
index 55e7d48..70dae00 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
@@ -20,7 +23,9 @@
 import com.epam.dlab.backendapi.SelfServiceApplication;
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.auth.SelfServiceSecurityAuthenticator;
+import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
+import com.epam.dlab.backendapi.dao.gcp.GcpBillingDao;
 import com.epam.dlab.backendapi.dao.gcp.GcpKeyDao;
 import com.epam.dlab.backendapi.resources.callback.gcp.EdgeCallbackGcp;
 import com.epam.dlab.backendapi.resources.callback.gcp.KeyUploaderCallbackGcp;
@@ -31,6 +36,7 @@
 import com.epam.dlab.backendapi.service.gcp.GcpInfrastructureInfoService;
 import com.epam.dlab.backendapi.service.gcp.GcpInfrastructureTemplateService;
 import com.epam.dlab.cloud.CloudModule;
+import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
 import com.google.inject.Injector;
 import com.google.inject.Provides;
@@ -43,6 +49,10 @@
 
 public class GcpSelfServiceModule extends CloudModule {
 
+	private static final String MONGO_URI_FORMAT = "mongodb://%s:%s@%s:%d/%s";
+	private static final String QUARTZ_MONGO_URI_PROPERTY = "org.quartz.jobStore.mongoUri";
+	private static final String QUARTZ_DB_NAME = "org.quartz.jobStore.dbName";
+
 	@Override
 	@SuppressWarnings("unchecked")
 	public void init(Environment environment, Injector injector) {
@@ -65,11 +75,18 @@
 		bind(InfrastructureTemplateService.class).to(GcpInfrastructureTemplateService.class);
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
+		bind(BillingDAO.class).toInstance(new GcpBillingDao());
 	}
 
 	@Provides
 	@Singleton
-	Scheduler provideScheduler() throws SchedulerException {
+	Scheduler provideScheduler(SelfServiceApplicationConfiguration configuration) throws SchedulerException {
+		final MongoServiceFactory mongoFactory = configuration.getMongoFactory();
+		final String database = mongoFactory.getDatabase();
+		final String mongoUri = String.format(MONGO_URI_FORMAT, mongoFactory.getUsername(), mongoFactory.getPassword(),
+				mongoFactory.getHost(), mongoFactory.getPort(), database);
+		System.setProperty(QUARTZ_MONGO_URI_PROPERTY, mongoUri);
+		System.setProperty(QUARTZ_DB_NAME, database);
 		return StdSchedulerFactory.getDefaultScheduler();
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
index 9b688ed..1722de6 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.modules;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index 26e63ce..e3ed4dc 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.modules;
@@ -21,25 +24,16 @@
 import com.epam.dlab.auth.SystemUserInfoServiceImpl;
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.auth.SelfServiceSecurityAuthorizer;
-import com.epam.dlab.backendapi.dao.BackupDao;
-import com.epam.dlab.backendapi.dao.BackupDaoImpl;
-import com.epam.dlab.backendapi.dao.ImageExploratoryDao;
-import com.epam.dlab.backendapi.dao.ImageExploratoryDaoImpl;
-import com.epam.dlab.backendapi.domain.EnvStatusListener;
-import com.epam.dlab.backendapi.domain.RequestId;
+import com.epam.dlab.backendapi.dao.*;
 import com.epam.dlab.backendapi.service.*;
 import com.epam.dlab.backendapi.service.impl.*;
-import com.epam.dlab.backendapi.util.RequestBuilder;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.mongo.MongoService;
 import com.epam.dlab.rest.client.RESTService;
 import com.google.inject.name.Names;
 import io.dropwizard.auth.Authorizer;
-import io.dropwizard.client.JerseyClientBuilder;
 import io.dropwizard.setup.Environment;
 
-import javax.ws.rs.client.Client;
-
 /**
  * Production class for an application configuration of SelfService.
  */
@@ -62,7 +56,6 @@
 		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.SECURITY_SERVICE_NAME))
 				.toInstance(configuration.getSecurityFactory().build(environment, ServiceConsts
 						.SECURITY_SERVICE_NAME));
-		requestStaticInjection(EnvStatusListener.class, RequestId.class, RequestBuilder.class);
 		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.PROVISIONING_SERVICE_NAME))
 				.toInstance(configuration.getProvisioningFactory().build(environment, ServiceConsts
 						.PROVISIONING_SERVICE_NAME));
@@ -82,8 +75,16 @@
 		bind(EdgeService.class).to(EdgeServiceImpl.class);
 		bind(ReuploadKeyService.class).to(ReuploadKeyServiceImpl.class);
 		bind(UserResourceService.class).to(UserResourceServiceImpl.class);
-		bind(Client.class).toInstance(new JerseyClientBuilder(environment).using(configuration.getJerseyClientConfiguration())
-				.build(""));
+		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.MAVEN_SEARCH_API))
+				.toInstance(configuration.getMavenApiFactory().build(environment, ServiceConsts.MAVEN_SEARCH_API));
 		bind(ExternalLibraryService.class).to(MavenCentralLibraryService.class);
+		bind(SystemInfoService.class).to(SystemInfoServiceImpl.class);
+		bind(UserGroupService.class).to(UserGroupServiceImpl.class);
+		bind(UserRoleService.class).to(UserRoleServiceImpl.class);
+		bind(UserRoleDao.class).to(UserRoleDaoImpl.class);
+		bind(UserGroupDao.class).to(UserGroupDaoImpl.class);
+		bind(InactivityService.class).to(InactivityServiceImpl.class);
+		bind(ApplicationSettingService.class).to(ApplicationSettingServiceImpl.class);
+		bind(UserSettingService.class).to(UserSettingServiceImpl.class);
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ApplicationSettingResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ApplicationSettingResource.java
new file mode 100644
index 0000000..ab8041e
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ApplicationSettingResource.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
+import com.epam.dlab.backendapi.service.ApplicationSettingService;
+import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.annotation.security.RolesAllowed;
+import javax.validation.constraints.Min;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Slf4j
+@Path("/settings")
+@RolesAllowed("/api/settings")
+@Api(value = "Application settings service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
+public class ApplicationSettingResource {
+
+
+	private final ApplicationSettingService settingService;
+
+	@Inject
+	public ApplicationSettingResource(ApplicationSettingService settingService) {
+		this.settingService = settingService;
+	}
+
+	@PUT
+	@Path("budget/{maxBudgetAllowed}")
+	@ApiOperation("Updates max budget allowed application setting")
+	@ApiResponses(@ApiResponse(code = 204, message = "Setting is updated"))
+	public Response setMaxBudget(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								 @ApiParam @PathParam("maxBudgetAllowed") @Min(1) Long maxBudget) {
+		settingService.setMaxBudget(maxBudget);
+		return Response.noContent().build();
+	}
+
+	@DELETE
+	@Path("budget")
+	@ApiOperation("Removes max budget allowed application setting")
+	@ApiResponses(@ApiResponse(code = 204, message = "Setting is removed"))
+	public Response removeAllowedBudget(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		log.debug("User {} is removing max budget application setting", userInfo.getName());
+		settingService.removeMaxBudget();
+		return Response.noContent().build();
+	}
+
+	@GET
+	@Produces(MediaType.APPLICATION_JSON)
+	@ApiOperation("Gets application settings")
+	@ApiResponses(@ApiResponse(code = 200, message = "Application settings value"))
+	public Response getSettings(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		return Response.ok(settingService.getSettings()).build();
+
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java
index 5bc7e4a..c0e0122 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BackupResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -19,11 +22,13 @@
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.dto.BackupFormDTO;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.BackupService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
 import com.epam.dlab.dto.backup.EnvBackupDTO;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.annotation.security.RolesAllowed;
@@ -37,6 +42,7 @@
 @Slf4j
 @Path("/infrastructure/backup")
 @RolesAllowed("/api/infrastructure/backup")
+@Api(value = "Backup service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 public class BackupResource {
 
 	private final BackupService backupService;
@@ -53,7 +59,11 @@
 	@POST
 	@Consumes(MediaType.APPLICATION_JSON)
 	@Produces(MediaType.TEXT_PLAIN)
-	public Response createBackup(@Auth UserInfo userInfo, @Valid BackupFormDTO backupFormDTO) {
+	@ApiOperation("Creates backup")
+	@ApiResponses(@ApiResponse(code = 202, message = "Backup has been created"))
+	public Response createBackup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								 @ApiParam(value = "Backup form DTO", required = true)
+								 @Valid BackupFormDTO backupFormDTO) {
 		log.debug("Creating backup for user {} with parameters {}", userInfo.getName(), backupFormDTO);
 		final EnvBackupDTO dto = requestBuilder.newBackupCreate(backupFormDTO, UUID.randomUUID().toString());
 		final String uuid = backupService.createBackup(dto, userInfo);
@@ -64,7 +74,10 @@
 
 	@GET
 	@Produces(MediaType.APPLICATION_JSON)
-	public Response getBackups(@Auth UserInfo userInfo) {
+	@ApiOperation("Fetches all backups")
+	@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid user's name"),
+			@ApiResponse(code = 200, message = "Backups were fetched successfully")})
+	public Response getBackups(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		log.debug("Getting backups for user {}", userInfo.getName());
 		return Response.ok(backupService.getBackups(userInfo.getName())).build();
 	}
@@ -72,7 +85,11 @@
 	@GET
 	@Path("{id}")
 	@Produces(MediaType.APPLICATION_JSON)
-	public Response getBackup(@Auth UserInfo userInfo, @PathParam("id") String id) {
+	@ApiOperation("Fetches backup by ID")
+	@ApiResponses({@ApiResponse(code = 404, message = "Backup with ID not found"),
+			@ApiResponse(code = 200, message = "Backup with ID fetched successfully")})
+	public Response getBackup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							  @ApiParam(value = "Backup's ID", required = true) @PathParam("id") String id) {
 		log.debug("Getting backup with id {} for user {}", id, userInfo.getName());
 		return Response.ok(backupService.getBackup(userInfo.getName(), id)).build();
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java
index f329c95..83f2b88 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java
@@ -1,26 +1,34 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.EdgeService;
 import com.epam.dlab.rest.contracts.EdgeAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.Authorization;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -35,6 +43,7 @@
 @Path("/infrastructure/edge")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "EDGE service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class EdgeResource implements EdgeAPI {
 
@@ -53,7 +62,8 @@
 	 */
 	@POST
 	@Path("/start")
-	public String start(@Auth UserInfo userInfo) {
+	@ApiOperation("Starts EDGE")
+	public String start(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		return edgeService.start(userInfo);
 	}
 
@@ -65,7 +75,8 @@
 	 */
 	@POST
 	@Path("/stop")
-	public String stop(@Auth UserInfo userInfo) {
+	@ApiOperation("Stops EDGE")
+	public String stop(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		return edgeService.stop(userInfo);
 	}
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
index ae65faa..51af7a6 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
@@ -1,25 +1,30 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.EnvironmentService;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 import org.hibernate.validator.constraints.NotEmpty;
 
@@ -31,6 +36,7 @@
 @Path("environment")
 @Slf4j
 @RolesAllowed("environment/*")
+@Api(value = "Environment service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 public class EnvironmentResource {
 
 	private EnvironmentService environmentService;
@@ -41,17 +47,21 @@
 	}
 
 	@GET
-	@Path("user/active")
+	@Path("user")
 	@Produces(MediaType.APPLICATION_JSON)
-	public Response getUsersWithActiveEnv(@Auth UserInfo userInfo) {
+	@ApiOperation("Fetches environment users")
+	@ApiResponses({@ApiResponse(code = 404, message = "Users not found"),
+			@ApiResponse(code = 200, message = "Users were fetched successfully")})
+	public Response getUsersWithActiveEnv(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		log.debug("User {} requested information about active environments", userInfo.getName());
-		return Response.ok(environmentService.getActiveUsers()).build();
+		return Response.ok(environmentService.getUsers()).build();
 	}
 
 	@GET
 	@Path("all")
 	@Produces(MediaType.APPLICATION_JSON)
-	public Response getAllEnv(@Auth UserInfo userInfo) {
+	@ApiOperation("Fetches user resources")
+	public Response getAllEnv(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		log.debug("Admin {} requested information about all user's environment", userInfo.getName());
 		return Response.ok(environmentService.getAllEnv()).build();
 	}
@@ -60,7 +70,10 @@
 	@Consumes(MediaType.TEXT_PLAIN)
 	@Produces(MediaType.APPLICATION_JSON)
 	@Path("terminate")
-	public Response terminateEnv(@Auth UserInfo userInfo, @NotEmpty String user) {
+	@ApiOperation("Terminates user's environment including EDGE, notebooks, clusters")
+	@ApiResponses(@ApiResponse(code = 200, message = "User's environment terminated successfully"))
+	public Response terminateEnv(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								 @ApiParam(value = "User's name", required = true) @NotEmpty String user) {
 		log.info("User {} is terminating {} environment", userInfo.getName(), user);
 		environmentService.terminateEnvironment(user);
 		return Response.ok().build();
@@ -70,7 +83,10 @@
 	@Consumes(MediaType.TEXT_PLAIN)
 	@Produces(MediaType.APPLICATION_JSON)
 	@Path("stop")
-	public Response stopEnv(@Auth UserInfo userInfo, @NotEmpty String user) {
+	@ApiOperation("Stops user's environment including EDGE, notebooks, Spark clusters")
+	@ApiResponses(@ApiResponse(code = 200, message = "User's environment stopped successfully"))
+	public Response stopEnv(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							@ApiParam(value = "User's name", required = true) @NotEmpty String user) {
 		log.info("User {} is stopping {} environment", userInfo.getName(), user);
 		environmentService.stopEnvironment(user);
 		return Response.ok().build();
@@ -80,7 +96,8 @@
 	@Consumes(MediaType.TEXT_PLAIN)
 	@Produces(MediaType.APPLICATION_JSON)
 	@Path("stop/edge")
-	public Response stopEdge(@Auth UserInfo userInfo, @NotEmpty String user) {
+	@ApiOperation("Stops user's EDGE node")
+	public Response stopEdge(@ApiParam(hidden = true) @Auth UserInfo userInfo, @NotEmpty String user) {
 		log.info("Admin {} is stopping edge of user {}", userInfo.getName(), user);
 		environmentService.stopEdge(user);
 		return Response.ok().build();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ExploratoryResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ExploratoryResource.java
index 55088b3..897255d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ExploratoryResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ExploratoryResource.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources;
 
@@ -22,14 +23,17 @@
 import com.epam.dlab.auth.rest.UserSessionDurationAuthorizer;
 import com.epam.dlab.backendapi.resources.dto.ExploratoryActionFormDTO;
 import com.epam.dlab.backendapi.resources.dto.ExploratoryCreateFormDTO;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.ExploratoryService;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.model.exploratory.Exploratory;
 import com.epam.dlab.rest.contracts.ExploratoryAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.annotation.security.RolesAllowed;
@@ -38,6 +42,7 @@
 import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.List;
 
 /**
  * Provides the REST API for the exploratory.
@@ -45,6 +50,7 @@
 @Path("/infrastructure_provision/exploratory_environment")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Notebook service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class ExploratoryResource implements ExploratoryAPI {
 
@@ -65,7 +71,12 @@
 	 */
 	@PUT
 	@RolesAllowed(UserSessionDurationAuthorizer.SHORT_USER_SESSION_DURATION)
-	public Response create(@Auth UserInfo userInfo, @Valid @NotNull ExploratoryCreateFormDTO formDTO) {
+	@ApiOperation("Creates notebook")
+	@ApiResponses({@ApiResponse(code = 302, message = "Notebook with current parameters already exists"),
+			@ApiResponse(code = 200, message = "Notebook created successfully")})
+	public Response create(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						   @ApiParam(value = "Notebook create form DTO", required = true)
+						   @Valid @NotNull ExploratoryCreateFormDTO formDTO) {
 		log.debug("Creating exploratory environment {} with name {} for user {}",
 				formDTO.getImage(), formDTO.getName(), userInfo.getName());
 		if (!UserRoles.checkAccess(userInfo, RoleType.EXPLORATORY, formDTO.getImage())) {
@@ -87,9 +98,12 @@
 	 */
 	@POST
 	@RolesAllowed(UserSessionDurationAuthorizer.SHORT_USER_SESSION_DURATION)
-	public String start(@Auth UserInfo userInfo, @Valid @NotNull ExploratoryActionFormDTO formDTO) {
-		log.debug("Starting exploratory environment {} for user {}", formDTO.getNotebookInstanceName(), userInfo
-				.getName());
+	@ApiOperation("Starts notebook by name")
+	public String start(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						@ApiParam(value = "Notebook action form DTO", required = true)
+						@Valid @NotNull ExploratoryActionFormDTO formDTO) {
+		log.debug("Starting exploratory environment {} for user {}", formDTO.getNotebookInstanceName(),
+				userInfo.getName());
 		return exploratoryService.start(userInfo, formDTO.getNotebookInstanceName());
 	}
 
@@ -102,7 +116,9 @@
 	 */
 	@DELETE
 	@Path("/{name}/stop")
-	public String stop(@Auth UserInfo userInfo, @PathParam("name") String name) {
+	@ApiOperation("Stops notebook by name")
+	public String stop(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+					   @ApiParam(value = "Notebook's name", required = true) @PathParam("name") String name) {
 		log.debug("Stopping exploratory environment {} for user {}", name, userInfo.getName());
 		return exploratoryService.stop(userInfo, name);
 	}
@@ -116,18 +132,41 @@
 	 */
 	@DELETE
 	@Path("/{name}/terminate")
-	public String terminate(@Auth UserInfo userInfo, @PathParam("name") String name) {
+	@ApiOperation("Terminates notebook by name")
+	public String terminate(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							@ApiParam(value = "Notebook's name", required = true) @PathParam("name") String name) {
 		log.debug("Terminating exploratory environment {} for user {}", name, userInfo.getName());
 		return exploratoryService.terminate(userInfo, name);
 	}
 
-	private Exploratory getExploratory(@Valid @NotNull ExploratoryCreateFormDTO formDTO) {
+	@PUT
+	@Path("/{name}/reconfigure")
+	@ApiOperation("Reconfigure notebook spark cluster")
+	public Response reconfigureSpark(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Notebook's name", required = true) @PathParam("name") String name,
+									 @ApiParam(value = "Notebook cluster configuration", required = true) List<ClusterConfig> config) {
+		log.debug("Updating exploratory {} spark cluster for user {}", name, userInfo.getName());
+		exploratoryService.updateClusterConfig(userInfo, name, config);
+		return Response.ok().build();
+	}
+
+	@GET
+	@Path("/{name}/cluster/config")
+	@ApiOperation("Gets notebook spark cluster config")
+	public Response getClusterConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Notebook's name", required = true) @PathParam("name") String name) {
+		log.debug("Getting exploratory {} spark cluster configuration for user {}", name, userInfo.getName());
+		return Response.ok(exploratoryService.getClusterConfig(userInfo, name)).build();
+	}
+
+	private Exploratory getExploratory(ExploratoryCreateFormDTO formDTO) {
 		return Exploratory.builder()
 				.name(formDTO.getName())
 				.dockerImage(formDTO.getImage())
 				.imageName(formDTO.getImageName())
 				.templateName(formDTO.getTemplateName())
 				.version(formDTO.getVersion())
+				.clusterConfig(formDTO.getClusterConfig())
 				.shape(formDTO.getShape()).build();
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/GitCredsResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/GitCredsResource.java
index 6be0b00..9f6e78a 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/GitCredsResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/GitCredsResource.java
@@ -1,27 +1,32 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.GitCredentialService;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsDTO;
 import com.epam.dlab.rest.contracts.ExploratoryAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.validation.Valid;
@@ -36,6 +41,8 @@
 @Path("/user/git_creds")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for updating or retrieving GIT credentials",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class GitCredsResource implements ExploratoryAPI {
 
@@ -54,18 +61,23 @@
 	 * @return {@link Response.Status#OK} request for provisioning service has been accepted.<br>
 	 */
 	@PUT
-	public Response updateGitCreds(@Auth UserInfo userInfo, @Valid @NotNull ExploratoryGitCredsDTO formDTO) {
+	@ApiOperation("Updates GIT credentials")
+	@ApiResponses(@ApiResponse(code = 200, message = "GIT credentials updated successfully"))
+	public Response updateGitCreds(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								   @ApiParam(value = "Notebook GIT credentials form DTO", required = true)
+								   @Valid @NotNull ExploratoryGitCredsDTO formDTO) {
 		gitCredentialService.updateGitCredentials(userInfo, formDTO);
 		return Response.ok().build();
 	}
 
 	/**
-	 * Returns the list of the provisioned user resources.
+	 * Returns info about GIT credentials for user.
 	 *
 	 * @param userInfo user info.
 	 */
 	@GET
-	public ExploratoryGitCredsDTO getGitCreds(@Auth UserInfo userInfo) {
+	@ApiOperation("Fetches info about GIT credentials")
+	public ExploratoryGitCredsDTO getGitCreds(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		return gitCredentialService.getGitCredentials(userInfo.getName());
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java
index 72e38ef..c06fe9a 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -20,9 +23,11 @@
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.dto.ExploratoryImageCreateFormDTO;
 import com.epam.dlab.backendapi.resources.dto.ImageInfoRecord;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.ImageExploratoryService;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.validation.Valid;
@@ -38,6 +43,7 @@
 @Path("/infrastructure_provision/exploratory_environment/image")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for machine images", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class ImageExploratoryResource {
 
@@ -51,8 +57,12 @@
 	}
 
 	@POST
-	public Response createImage(@Auth UserInfo ui, @Valid @NotNull ExploratoryImageCreateFormDTO formDTO,
-								@Context UriInfo uriInfo) {
+	@ApiOperation("Creates machine image from existing notebook")
+	@ApiResponses(@ApiResponse(code = 202, message = "Machine image has been created"))
+	public Response createImage(@ApiParam(hidden = true) @Auth UserInfo ui,
+								@ApiParam(value = "Notebook image create form DTO", required = true)
+								@Valid @NotNull ExploratoryImageCreateFormDTO formDTO,
+								@ApiParam(hidden = true) @Context UriInfo uriInfo) {
 		log.debug("Creating an image {} for user {}", formDTO, ui.getName());
 		String uuid = imageExploratoryService.createImage(ui, formDTO.getNotebookName(), formDTO.getName(), formDTO
 				.getDescription());
@@ -66,15 +76,23 @@
 
 
 	@GET
-	public Response getImages(@Auth UserInfo ui, @QueryParam("docker_image") String dockerImage) {
+	@ApiOperation("Fetches machine images created from specific Docker image")
+	@ApiResponses(@ApiResponse(code = 200, message = "Machine images were fetched successfully"))
+	public Response getImages(@ApiParam(hidden = true) @Auth UserInfo ui,
+							  @ApiParam(value = "Docker image", required = true)
+							  @QueryParam("docker_image") String dockerImage) {
 		log.debug("Getting images for user " + ui.getName());
-		final List<ImageInfoRecord> images = imageExploratoryService.getCreatedImages(ui.getName(), dockerImage);
+		final List<ImageInfoRecord> images = imageExploratoryService.getNotFailedImages(ui.getName(), dockerImage);
 		return Response.ok(images).build();
 	}
 
 	@GET
 	@Path("{name}")
-	public Response getImage(@Auth UserInfo ui, @PathParam("name") String name) {
+	@ApiOperation("Fetches machine image by name")
+	@ApiResponses({@ApiResponse(code = 400, message = "Invalid machine image's name"),
+			@ApiResponse(code = 200, message = "Machine image fetched successfully")})
+	public Response getImage(@ApiParam(hidden = true) @Auth UserInfo ui,
+							 @ApiParam(value = "Image's name", required = true) @PathParam("name") String name) {
 		log.debug("Getting image with name {} for user {}", name, ui.getName());
 		return Response.ok(imageExploratoryService.getImage(ui.getName(), name)).build();
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResource.java
index 3900518..dfedb8e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -19,10 +22,12 @@
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
 import com.epam.dlab.backendapi.resources.dto.InfrastructureInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.InfrastructureInfoService;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.*;
@@ -35,6 +40,7 @@
 @Path("/infrastructure")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Infrastructure info service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class InfrastructureInfoResource {
 
@@ -49,6 +55,8 @@
 	 * Return status of self-service.
 	 */
 	@GET
+	@ApiOperation("Returns status of self-service")
+	@ApiResponses(@ApiResponse(code = 200, message = "Self-service's status fetched successfully"))
 	public Response status() {
 		return Response.status(Response.Status.OK).build();
 	}
@@ -60,7 +68,10 @@
 	 */
 	@GET
 	@Path("/status")
-	public HealthStatusPageDTO status(@Auth UserInfo userInfo, @QueryParam("full") @DefaultValue("0") int fullReport) {
+	@ApiOperation("Returns EDGE's status")
+	public HealthStatusPageDTO status(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									  @ApiParam(value = "Full version of report required", defaultValue = "0")
+									  @QueryParam("full") @DefaultValue("0") int fullReport) {
 		return infrastructureInfoService
 				.getHeathStatus(userInfo.getName(), fullReport != 0, UserRoles.isAdmin(userInfo));
 	}
@@ -72,7 +83,8 @@
 	 */
 	@GET
 	@Path("/info")
-	public InfrastructureInfo getUserResources(@Auth UserInfo userInfo) {
+	@ApiOperation("Returns list of user's resources")
+	public InfrastructureInfo getUserResources(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		return infrastructureInfoService.getUserResources(userInfo.getName());
 
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResource.java
index 58669fd..5d8adfe 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResource.java
@@ -1,28 +1,36 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.InfrastructureTemplateService;
 import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
 import com.epam.dlab.dto.imagemetadata.ExploratoryMetadataDTO;
 import com.epam.dlab.rest.contracts.DockerAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.Authorization;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -36,6 +44,8 @@
 @Path("/infrastructure_templates")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for retrieving notebook and cluster templates",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 public class InfrastructureTemplateResource implements DockerAPI {
 
 	private InfrastructureTemplateService infrastructureTemplateService;
@@ -52,7 +62,9 @@
 	 */
 	@GET
 	@Path("/computational_templates")
-	public Iterable<FullComputationalTemplate> getComputationalTemplates(@Auth UserInfo userInfo) {
+	@ApiOperation("Returns list of cluster's templates")
+	public Iterable<FullComputationalTemplate> getComputationalTemplates(@ApiParam(hidden = true)
+																		 @Auth UserInfo userInfo) {
 		return infrastructureTemplateService.getComputationalTemplates(userInfo);
 	}
 
@@ -63,7 +75,8 @@
 	 */
 	@GET
 	@Path("/exploratory_templates")
-	public Iterable<ExploratoryMetadataDTO> getExploratoryTemplates(@Auth UserInfo userInfo) {
+	@ApiOperation("Returns list of notebook's templates")
+	public Iterable<ExploratoryMetadataDTO> getExploratoryTemplates(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		return infrastructureTemplateService.getExploratoryTemplates(userInfo);
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java
index 7dab386..27a9237 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java
@@ -1,28 +1,35 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.AccessKeyService;
 import com.epam.dlab.dto.keyload.KeyLoadStatus;
+import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.exceptions.DlabValidationException;
+import com.epam.dlab.exceptions.ResourceNotFoundException;
 import com.epam.dlab.rest.contracts.EdgeAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
@@ -38,6 +45,8 @@
 @Path("/user/access_key")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for uploading or reuploading user's access keys",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class KeyUploaderResource implements EdgeAPI {
 
@@ -61,8 +70,18 @@
 	 * </pre>
 	 */
 	@GET
-	public Response checkKey(@Auth UserInfo userInfo) {
+	@ApiOperation(value = "Checks the status of user's key")
+	@ApiResponses(value = {@ApiResponse(code = 404, message = "Key not found"),
+			@ApiResponse(code = 202, message = "Key is uploading now"),
+			@ApiResponse(code = 500, message = "Key's status is failed"),
+			@ApiResponse(code = 200, message = "Key is valid")})
+	public Response checkKey(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		final KeyLoadStatus status = keyService.getUserKeyStatus(userInfo.getName());
+		if (KeyLoadStatus.NONE == status) {
+			throw new ResourceNotFoundException("Key for user " + userInfo.getName() + " not found");
+		} else if (KeyLoadStatus.ERROR == status) {
+			throw new DlabException("Key for user " + userInfo.getName() + " is in error state");
+		}
 		return Response.status(status.getHttpStatus()).build();
 	}
 
@@ -79,8 +98,13 @@
 	 */
 	@POST
 	@Consumes(MediaType.MULTIPART_FORM_DATA)
-	public Response loadKey(@Auth UserInfo userInfo,
+	@ApiOperation(value = "Uploads/reuploads user's key to server")
+	@ApiResponses(value = @ApiResponse(code = 200, message = "Key was uploaded/reuploaded successfully"))
+	public Response loadKey(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							@ApiParam(value = "Key file's content", required = true)
 							@FormDataParam("file") String fileContent,
+							@ApiParam(value = "Primary uploading or secondary reuploading", allowableValues =
+									"true/false", defaultValue = "true")
 							@QueryParam("is_primary_uploading") @DefaultValue("true") boolean isPrimaryUploading) {
 
 		validate(fileContent);
@@ -96,7 +120,9 @@
 	 */
 	@POST
 	@Path("/recover")
-	public Response recover(@Auth UserInfo userInfo) {
+	@ApiOperation(value = "Creates EDGE node and uploads user's key to server")
+	@ApiResponses(value = @ApiResponse(code = 200, message = "EDGE node was created successfully"))
+	public Response recover(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
 		return Response.ok(keyService.recoverEdge(userInfo)).build();
 	}
 
@@ -104,7 +130,11 @@
 	@POST
 	@Path("/generate")
 	@Produces(MediaType.APPLICATION_OCTET_STREAM)
-	public Response generate(@Auth UserInfo userInfo,
+	@ApiOperation("Generate user's key")
+	@ApiResponses(@ApiResponse(code = 200, message = "User's key was generated successfully"))
+	public Response generate(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							 @ApiParam(value = "Primary uploading or secondary reuploading", allowableValues =
+									 "true/false", defaultValue = "true")
 							 @QueryParam("is_primary_uploading") @DefaultValue("true") boolean isPrimaryUploading) {
 		final Response.ResponseBuilder builder = Response.ok(keyService.generateKey(userInfo, isPrimaryUploading));
 		builder.header(HttpHeaders.CONTENT_DISPOSITION, String.format(FILE_ATTACHMENT_FORMAT, userInfo.getName()));
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/LibExploratoryResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/LibExploratoryResource.java
index 39c41a7..aa68ffb 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/LibExploratoryResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/LibExploratoryResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -19,24 +22,20 @@
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.domain.ExploratoryLibCache;
-import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.dto.LibInfoRecord;
 import com.epam.dlab.backendapi.resources.dto.LibInstallFormDTO;
+import com.epam.dlab.backendapi.resources.dto.LibraryDTO;
 import com.epam.dlab.backendapi.resources.dto.SearchLibsFormDTO;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.ExternalLibraryService;
 import com.epam.dlab.backendapi.service.LibraryService;
 import com.epam.dlab.backendapi.validation.annotation.LibNameValid;
-import com.epam.dlab.constants.ServiceConsts;
-import com.epam.dlab.backendapi.resources.dto.LibraryDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
-import com.epam.dlab.dto.exploratory.LibraryInstallDTO;
+import com.epam.dlab.dto.exploratory.LibInstallDTO;
 import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.rest.client.RESTService;
-import com.epam.dlab.rest.contracts.ComputationalAPI;
-import com.epam.dlab.rest.contracts.ExploratoryAPI;
 import com.google.inject.Inject;
-import com.google.inject.name.Named;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.bson.Document;
@@ -56,24 +55,21 @@
 @Path("/infrastructure_provision/exploratory_environment")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Library service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class LibExploratoryResource {
 
 
+	private static final String DROPWIZARD_ARTIFACT = "io.dropwizard:dropwizard-core:1.3.5";
 	private final ExternalLibraryService externalLibraryService;
 	private ExploratoryDAO exploratoryDAO;
 	private LibraryService libraryService;
-	private RESTService provisioningService;
-	private RequestId requestId;
 
 	@Inject
 	public LibExploratoryResource(ExploratoryDAO exploratoryDAO, LibraryService libraryService,
-								  @Named(ServiceConsts.PROVISIONING_SERVICE_NAME) RESTService provisioningService,
-								  RequestId requestId, ExternalLibraryService externalLibraryService) {
+								  ExternalLibraryService externalLibraryService) {
 		this.exploratoryDAO = exploratoryDAO;
 		this.libraryService = libraryService;
-		this.provisioningService = provisioningService;
-		this.requestId = requestId;
 		this.externalLibraryService = externalLibraryService;
 	}
 
@@ -87,8 +83,12 @@
 	 */
 	@GET
 	@Path("/lib_groups")
-	public Iterable<String> getLibGroupList(@Auth UserInfo userInfo,
+	@ApiOperation("Returns the list of library groups for notebook or cluster")
+	public Iterable<String> getLibGroupList(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+											@ApiParam(value = "Notebook's name", required = true)
 											@QueryParam("exploratory_name") @NotBlank String exploratoryName,
+											@ApiParam(value = "Cluster's name", required = true, allowEmptyValue =
+													true)
 											@QueryParam("computational_name") String computationalName) {
 
 		log.trace("Loading list of lib groups for user {} and exploratory {}, computational {}", userInfo.getName(),
@@ -126,8 +126,11 @@
 	 */
 	@GET
 	@Path("/lib_list")
-	public List<Document> getLibList(@Auth UserInfo userInfo,
+	@ApiOperation("Returns the list of installed/failed libraries for notebook or cluster")
+	public List<Document> getLibList(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Notebook's name", required = true)
 									 @QueryParam("exploratory_name") @NotBlank String exploratoryName,
+									 @ApiParam(value = "Cluster's name", required = true, allowEmptyValue = true)
 									 @QueryParam("computational_name") String computationalName) {
 
 		log.debug("Loading list of libraries for user {} and exploratory {} and computational {}", userInfo.getName(),
@@ -154,7 +157,9 @@
 	 */
 	@GET
 	@Path("/lib_list/formatted")
-	public List<LibInfoRecord> getLibListFormatted(@Auth UserInfo userInfo,
+	@ApiOperation("Returns formatted representation of installed/failed libraries for notebook")
+	public List<LibInfoRecord> getLibListFormatted(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+												   @ApiParam(value = "Notebook's name", required = true)
 												   @QueryParam("exploratory_name") @NotBlank String exploratoryName) {
 
 		log.debug("Loading formatted list of libraries for user {} and exploratory {}", userInfo.getName(),
@@ -178,30 +183,20 @@
 	 */
 	@POST
 	@Path("/lib_install")
-	public Response libInstall(@Auth UserInfo userInfo, @Valid @NotNull LibInstallFormDTO formDTO) {
+	@ApiOperation("Installs libraries on notebook or cluster")
+	@ApiResponses(@ApiResponse(code = 200, message = "Libraries were installed successfully"))
+	public Response libInstall(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							   @ApiParam(value = "Library install form DTO", required = true)
+							   @Valid @NotNull LibInstallFormDTO formDTO) {
 		log.debug("Installing libs to environment {} for user {}", formDTO, userInfo.getName());
-		try {
-
-			LibraryInstallDTO dto = libraryService.generateLibraryInstallDTO(userInfo, formDTO);
-			String uuid;
-
-			if (StringUtils.isEmpty(formDTO.getComputationalName())) {
-				uuid = provisioningService.post(ExploratoryAPI.EXPLORATORY_LIB_INSTALL, userInfo.getAccessToken(),
-						libraryService.prepareExploratoryLibInstallation(userInfo.getName(), formDTO, dto),
-						String.class);
-			} else {
-				uuid = provisioningService.post(ComputationalAPI.COMPUTATIONAL_LIB_INSTALL, userInfo.getAccessToken(),
-						libraryService.prepareComputationalLibInstallation(userInfo.getName(), formDTO, dto),
-						String.class);
-			}
-
-			requestId.put(userInfo.getName(), uuid);
-			return Response.ok(uuid).build();
-		} catch (DlabException e) {
-			log.error("Cannot install libs to exploratory environment {} for user {}: {}",
-					formDTO.getNotebookName(), userInfo.getName(), e.getLocalizedMessage(), e);
-			throw new DlabException("Cannot install libraries: " + e.getLocalizedMessage(), e);
-		}
+		final String exploratoryName = formDTO.getNotebookName();
+		final List<LibInstallDTO> libs = formDTO.getLibs();
+		final String computationalName = formDTO.getComputationalName();
+		String uuid = StringUtils.isEmpty(computationalName) ?
+				libraryService.installExploratoryLibs(userInfo, exploratoryName, libs) :
+				libraryService.installComputationalLibs(userInfo, exploratoryName, computationalName, libs);
+		return Response.ok(uuid)
+				.build();
 	}
 
 	/**
@@ -213,7 +208,10 @@
 	 */
 	@POST
 	@Path("search/lib_list")
-	public List<LibraryDTO> getLibList(@Auth UserInfo userInfo, @Valid @NotNull SearchLibsFormDTO formDTO) {
+	@ApiOperation("Returns the list of available libraries for notebook basing on search conditions")
+	public List<LibraryDTO> getLibList(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									   @ApiParam(value = "Search libraries form DTO", required = true)
+									   @Valid @NotNull SearchLibsFormDTO formDTO) {
 		log.trace("Search list of libs for user {} with condition {}", userInfo.getName(), formDTO);
 		try {
 
@@ -241,9 +239,12 @@
 		}
 	}
 
+
 	@GET
 	@Path("search/lib_list/maven")
-	public Response getMavenArtifactInfo(@Auth UserInfo userInfo,
+	@ApiOperation("Return information about maven artifact")
+	public Response getMavenArtifactInfo(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										 @ApiParam(required = true, example = DROPWIZARD_ARTIFACT, value = "artifact")
 										 @LibNameValid @QueryParam("artifact") String artifact) {
 		final String[] libNameParts = artifact.split(":");
 		return Response.ok(externalLibraryService.getLibrary(libNameParts[0], libNameParts[1], libNameParts[2])).build();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SchedulerJobResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SchedulerJobResource.java
index 3e08c1c..7d5fb33 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SchedulerJobResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SchedulerJobResource.java
@@ -1,27 +1,33 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.service.SchedulerJobService;
+import com.epam.dlab.backendapi.validation.annotation.SchedulerJobDTOValid;
 import com.epam.dlab.dto.SchedulerJobDTO;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.*;
@@ -32,8 +38,8 @@
  * Manages scheduler jobs for exploratory environment
  */
 @Path("/infrastructure_provision/exploratory_environment/scheduler")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for scheduling operations with notebooks or clusters",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 @Slf4j
 public class SchedulerJobResource {
 
@@ -55,14 +61,38 @@
 	 */
 	@POST
 	@Path("/{exploratoryName}")
-	public Response updateExploratoryScheduler(@Auth UserInfo userInfo,
+	@ApiOperation("Updates scheduler's data for notebook")
+	@ApiResponses(@ApiResponse(code = 200, message = "Scheduler's data for notebook was updated successfully"))
+	@Consumes(MediaType.APPLICATION_JSON)
+	public Response updateExploratoryScheduler(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+											   @ApiParam(value = "Notebook's name", required = true)
 											   @PathParam("exploratoryName") String exploratoryName,
-											   SchedulerJobDTO dto) {
+											   @ApiParam(value = "Scheduler's data", required = true)
+											   @SchedulerJobDTOValid SchedulerJobDTO dto) {
 		schedulerJobService.updateExploratorySchedulerData(userInfo.getName(), exploratoryName, dto);
 		return Response.ok().build();
 	}
 
 	/**
+	 * Removes exploratory <code>exploratoryName<code/> for user <code>userInfo<code/>
+	 *
+	 * @param userInfo        user info
+	 * @param exploratoryName name of exploratory resource
+	 * @return response
+	 */
+	@DELETE
+	@Path("/{exploratoryName}")
+	@ApiOperation("Removes scheduler for notebook")
+	@ApiResponses(@ApiResponse(code = 200, message = "Scheduler's data for notebook was updated successfully"))
+	public Response removeExploratoryScheduler(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+											   @ApiParam(value = "Notebook's name", required = true)
+											   @PathParam("exploratoryName") String exploratoryName) {
+		log.debug("User {} is trying to remove scheduler for exploratory {}", userInfo.getName(), exploratoryName);
+		schedulerJobService.removeScheduler(userInfo.getName(), exploratoryName);
+		return Response.ok().build();
+	}
+
+	/**
 	 * Updates computational resource <code>computationalName<code/> affiliated with exploratory
 	 * <code>exploratoryName<code/> for user <code>userInfo<code/> with new scheduler job data
 	 *
@@ -74,15 +104,47 @@
 	 */
 	@POST
 	@Path("/{exploratoryName}/{computationalName}")
-	public Response upsertComputationalScheduler(@Auth UserInfo userInfo,
+	@Consumes(MediaType.APPLICATION_JSON)
+	@ApiOperation("Updates scheduler's data for cluster")
+	@ApiResponses(@ApiResponse(code = 200, message = "Scheduler's data for cluster was updated successfully"))
+	public Response updateComputationalScheduler(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+												 @ApiParam(value = "Notebook's name", required = true)
 												 @PathParam("exploratoryName") String exploratoryName,
+												 @ApiParam(value = "Cluster's name affiliated with notebook",
+														 required = true)
 												 @PathParam("computationalName") String computationalName,
-												 SchedulerJobDTO dto) {
+												 @ApiParam(value = "Scheduler's data", required = true)
+												 @SchedulerJobDTOValid SchedulerJobDTO dto) {
 		schedulerJobService.updateComputationalSchedulerData(userInfo.getName(), exploratoryName,
 				computationalName, dto);
 		return Response.ok().build();
 	}
 
+	/**
+	 * Updates computational resource <code>computationalName<code/> affiliated with exploratory
+	 * <code>exploratoryName<code/> for user <code>userInfo<code/> with new scheduler job data
+	 *
+	 * @param userInfo          user info
+	 * @param exploratoryName   name of exploratory resource
+	 * @param computationalName name of computational resource
+	 * @return response
+	 */
+	@DELETE
+	@Path("/{exploratoryName}/{computationalName}")
+	@ApiOperation("Removes scheduler's data for cluster")
+	@ApiResponses(@ApiResponse(code = 200, message = "Scheduler's data for cluster was removed successfully"))
+	public Response removeComputationalScheduler(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+												 @ApiParam(value = "Notebook's name", required = true)
+												 @PathParam("exploratoryName") String exploratoryName,
+												 @ApiParam(value = "Cluster's name affiliated with notebook",
+														 required = true)
+												 @PathParam("computationalName") String computationalName) {
+		log.debug("User {} is trying to remove scheduler for computational {} connected with exploratory {}",
+				userInfo.getName(), computationalName, exploratoryName);
+		schedulerJobService.removeScheduler(userInfo.getName(), exploratoryName, computationalName);
+		return Response.ok().build();
+	}
+
 
 	/**
 	 * Returns scheduler job for exploratory resource <code>exploratoryName<code/>
@@ -93,7 +155,11 @@
 	 */
 	@GET
 	@Path("/{exploratoryName}")
-	public Response fetchSchedulerJobForUserAndExploratory(@Auth UserInfo userInfo,
+	@Produces(MediaType.APPLICATION_JSON)
+	@ApiOperation("Returns scheduler's data for notebook")
+	@ApiResponses(@ApiResponse(code = 200, message = "Scheduler's data for notebook fetched successfully"))
+	public Response fetchSchedulerJobForUserAndExploratory(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+														   @ApiParam(value = "Notebook's name", required = true)
 														   @PathParam("exploratoryName") String exploratoryName) {
 		log.debug("Loading scheduler job for user {} and exploratory {}...", userInfo.getName(), exploratoryName);
 		final SchedulerJobDTO schedulerJob =
@@ -112,10 +178,14 @@
 	 */
 	@GET
 	@Path("/{exploratoryName}/{computationalName}")
-	public Response fetchSchedulerJobForComputationalResource(@Auth UserInfo userInfo,
+	@Produces(MediaType.APPLICATION_JSON)
+	@ApiOperation("Returns scheduler's data for cluster")
+	@ApiResponses(@ApiResponse(code = 200, message = "Scheduler's data for cluster fetched successfully"))
+	public Response fetchSchedulerJobForComputationalResource(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+															  @ApiParam(value = "Notebook's name", required = true)
 															  @PathParam("exploratoryName") String exploratoryName,
-															  @PathParam("computationalName") String
-																		  computationalName) {
+															  @ApiParam(value = "Cluster's name", required = true)
+															  @PathParam("computationalName") String computationalName) {
 		log.debug("Loading scheduler job for user {}, exploratory {} and computational resource {}...",
 				userInfo.getName(), exploratoryName, computationalName);
 		final SchedulerJobDTO schedulerJob = schedulerJobService
@@ -123,5 +193,17 @@
 		return Response.ok(schedulerJob).build();
 	}
 
+	@GET
+	@Path("active")
+	@Produces(MediaType.APPLICATION_JSON)
+	@ApiOperation("Returns information about scheduler that will take place in defined time")
+	@ApiResponses(@ApiResponse(code = 200, message = "List of active schedulers"))
+	public Response getActiveSchedulers(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										@ApiParam(name = "minuteOffset", value = "Number of offset minutes from current time")
+										@QueryParam("minuteOffset") long minuteOffset) {
+		log.trace("Getting active schedulers for user {} and offset {}", userInfo.getName(), minuteOffset);
+		return Response.ok(schedulerJobService.getActiveSchedulers(userInfo.getName(), minuteOffset)).build();
+	}
+
 }
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SecurityResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SecurityResource.java
index 4914f3a..d996558 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SecurityResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SecurityResource.java
@@ -1,37 +1,41 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.auth.contract.SecurityAPI;
 import com.epam.dlab.auth.dto.UserCredentialDTO;
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.SecurityDAO;
 import com.epam.dlab.backendapi.domain.EnvStatusListener;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.client.RESTService;
-import com.epam.dlab.auth.contract.SecurityAPI;
+import com.epam.dlab.rest.dto.ErrorDTO;
 import com.epam.dlab.validation.AwsValidation;
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 import org.hibernate.validator.constraints.NotBlank;
 
@@ -51,13 +55,14 @@
 @Path("/user")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api("Authorization service")
 @Slf4j
 public class SecurityResource implements SecurityAPI {
 
-    private SecurityDAO dao;
-    private RESTService securityService;
-    private EnvStatusListener envStatusListener;
-    private SelfServiceApplicationConfiguration configuration;
+	private SecurityDAO dao;
+	private RESTService securityService;
+	private EnvStatusListener envStatusListener;
+	private SelfServiceApplicationConfiguration configuration;
 
 	@Inject
 	public SecurityResource(SecurityDAO dao, @Named(ServiceConsts.SECURITY_SERVICE_NAME) RESTService securityService,
@@ -68,69 +73,95 @@
 		this.configuration = configuration;
 	}
 
-    /**
-     * Login method for the DLab user.
-     *
-     * @param credential user credential.
-     * @return 500 Internal Server Error if post response fails.
-     */
-    @POST
-    @Path("/login")
-    public Response userLogin(@Valid @NotNull UserCredentialDTO credential) {
-        log.debug("Try login for user {}", credential.getUsername());
-        try {
-            dao.writeLoginAttempt(credential);
-            return securityService.post(LOGIN, credential, Response.class);
-        } catch (Exception e) {
-            log.error("Try login for user {} fail", credential.getUsername(), e);
-            return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getLocalizedMessage()).build();
-        }
-    }
+	/**
+	 * Login method for the DLab user.
+	 *
+	 * @param credential user credential.
+	 * @return 500 Internal Server Error if post response fails.
+	 */
+	@POST
+	@Produces(MediaType.TEXT_PLAIN)
+	@Path("/login")
+	@ApiOperation("Login attempt for user")
+	@ApiResponses({@ApiResponse(code = 500, message = "Internal server error occurred"),
+			@ApiResponse(code = 200, message = "User logged in successfully")})
+	public Response userLogin(@ApiParam(value = "User credential DTO", required = true)
+							  @Valid @NotNull UserCredentialDTO credential) {
+		log.debug("Try login for user {}", credential.getUsername());
+		try {
+			dao.writeLoginAttempt(credential);
+			return securityService.post(LOGIN, credential, Response.class);
+		} catch (Exception e) {
+			log.error("Try login for user {} fail", credential.getUsername(), e);
+			final Status internalServerError = Status.INTERNAL_SERVER_ERROR;
+			return Response.status(internalServerError)
+					.entity(new ErrorDTO(internalServerError.getStatusCode(), e.getMessage()))
+					.type(MediaType.APPLICATION_JSON)
+					.build();
+		}
+	}
 
 
-    /**
-     * Authorize method for the dlab user.
-     *
-     * @param userInfo user info.
-     * @param username user name.
-     * @return 500 Internal Server Error if post request fails.
-     */
-    @POST
-    @Path("/authorize")
-    public Response authorize(@Auth UserInfo userInfo, @Valid @NotBlank(groups = AwsValidation.class) String username) {
-        log.debug("Try authorize accessToken {} for user info {}", userInfo.getAccessToken(), userInfo);
-        try {
-        	Status status = userInfo.getName().equalsIgnoreCase(username) ?
-        			Status.OK :
-        			Status.FORBIDDEN;
-        	if (status == Status.OK) {
-        		envStatusListener.registerSession(userInfo);
-        		if (configuration.isRolePolicyEnabled()) {
-        			UserRoles.initialize(dao, configuration.getRoleDefaultAccess());
-        		}
-        	}
-            return Response.status(status).build();
-        } catch (Exception e) {
-            throw new DlabException("Cannot authorize user " + username + ". " + e.getLocalizedMessage(), e);
-        }
-    }
+	/**
+	 * Authorize method for the dlab user.
+	 *
+	 * @param userInfo user info.
+	 * @param username user name.
+	 * @return 500 Internal Server Error if post request fails.
+	 */
+	@POST
+	@Consumes(MediaType.TEXT_PLAIN)
+	@Path("/authorize")
+	@ApiOperation(value = "Authorize attempt for user", authorizations =
+	@Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
+	@ApiResponses({
+			@ApiResponse(code = 500, message = "Access forbidden"),
+			@ApiResponse(code = 200, message = "User authorized successfully")
+	})
+	public Response authorize(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							  @ApiParam(value = "User's name", required = true)
+							  @Valid @NotBlank(groups = AwsValidation.class) String username) {
+		log.debug("Try authorize accessToken {} for user info {}", userInfo.getAccessToken(), userInfo);
+		try {
+			Status status = userInfo.getName().equalsIgnoreCase(username) ?
+					Status.OK :
+					Status.FORBIDDEN;
+			if (status == Status.OK) {
+				envStatusListener.registerSession(userInfo);
+				if (configuration.isRolePolicyEnabled()) {
+					UserRoles.initialize(dao, configuration.getRoleDefaultAccess());
+				}
+			}
+			return Response.status(status).build();
+		} catch (Exception e) {
+			throw new DlabException("Cannot authorize user " + username + ". " + e.getLocalizedMessage(), e);
+		}
+	}
 
-    /**
-     * Logout method for the DLab user.
-     *
-     * @param userInfo user info.
-     * @return 200 OK or 403 Forbidden.
-     */
-    @POST
-    @Path("/logout")
-    public Response userLogout(@Auth UserInfo userInfo) {
-        log.debug("Try logout for accessToken {}", userInfo.getAccessToken());
-        try {
-            envStatusListener.unregisterSession(userInfo);
-            return securityService.post(LOGOUT, userInfo.getAccessToken(), Response.class);
-        } catch (Exception e) {
-            log.error("Try logout for accessToken {}", userInfo.getAccessToken(), e);
-            return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getLocalizedMessage()).build();
-        }
-    }
+	/**
+	 * Logout method for the DLab user.
+	 *
+	 * @param userInfo user info.
+	 * @return 200 OK or 403 Forbidden.
+	 */
+	@POST
+	@Path("/logout")
+	@ApiOperation(value = "Logout attempt for user", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
+	@ApiResponses({@ApiResponse(code = 500, message = "Internal server error occured"),
+			@ApiResponse(code = 403, message = "Logout failed"),
+			@ApiResponse(code = 200, message = "User logged out successfully")})
+	public Response userLogout(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		log.debug("Try logout for accessToken {}", userInfo.getAccessToken());
+		try {
+			envStatusListener.unregisterSession(userInfo);
+			return securityService.post(LOGOUT, userInfo.getAccessToken(), Response.class);
+		} catch (Exception e) {
+			log.error("Try logout for accessToken {}", userInfo.getAccessToken(), e);
+			final Status internalServerError = Status.INTERNAL_SERVER_ERROR;
+			return Response.status(internalServerError)
+					.entity(new ErrorDTO(internalServerError.getStatusCode(), e.getMessage()))
+					.type(MediaType.APPLICATION_JSON)
+					.build();
+		}
+	}
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SystemInfoResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SystemInfoResource.java
new file mode 100644
index 0000000..9a5a439
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SystemInfoResource.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.dto.SystemInfoDto;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
+import com.epam.dlab.backendapi.service.SystemInfoService;
+import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Slf4j
+@Path("sysinfo")
+@Produces(MediaType.APPLICATION_JSON)
+@RolesAllowed("sysinfo")
+@Api(value = "System information resource", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
+public class SystemInfoResource {
+
+	private SystemInfoService systemInfoService;
+
+	@Inject
+	public SystemInfoResource(SystemInfoService systemInfoService) {
+		this.systemInfoService = systemInfoService;
+	}
+
+
+	@GET
+	@ApiOperation("Returns information about current system load")
+	@ApiResponses(@ApiResponse(code = 200, message = "System information (CPU, RAM etc. )"))
+	public Response getSystemInfo(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		log.debug("Getting system info for user {}...", userInfo.getName());
+		final SystemInfoDto systemInfoDto = systemInfoService.getSystemInfo();
+		return Response.ok(systemInfoDto).build();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
new file mode 100644
index 0000000..8139cc9
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.dto.GroupDTO;
+import com.epam.dlab.backendapi.resources.dto.UpdateRoleGroupDto;
+import com.epam.dlab.backendapi.resources.dto.UpdateUserGroupDto;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
+import com.epam.dlab.backendapi.service.UserGroupService;
+import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
+import lombok.extern.slf4j.Slf4j;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.annotation.security.RolesAllowed;
+import javax.validation.Valid;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.Set;
+
+@Slf4j
+@Path("group")
+@RolesAllowed("/roleManagement")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+@Api(value = "User's groups resource", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
+public class UserGroupResource {
+
+	private final UserGroupService userGroupService;
+
+	@Inject
+	public UserGroupResource(UserGroupService userGroupService) {
+		this.userGroupService = userGroupService;
+	}
+
+
+	@POST
+	@ApiOperation("Creates group with roles assigned to it")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "Group successfully created"),
+			@ApiResponse(code = 404, message = "User role not found")
+	})
+	public Response createGroup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								@Valid @ApiParam GroupDTO dto) {
+		log.debug("Creating new group {}", dto.getName());
+		userGroupService.createGroup(dto.getName(), dto.getRoleIds(), dto.getUsers());
+		return Response.ok().build();
+	}
+
+	@PUT
+	@ApiOperation("Updates user group")
+	@ApiResponses({
+			@ApiResponse(code = 200, message = "Group successfully updated"),
+			@ApiResponse(code = 404, message = "User role not found")
+	})
+	public Response updateGroup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								@Valid @ApiParam GroupDTO dto) {
+		log.debug("Updating group {}", dto.getName());
+		userGroupService.updateGroup(dto.getName(), dto.getRoleIds(), dto.getUsers());
+		return Response.ok().build();
+	}
+
+	@GET
+	@ApiOperation("List groups with roles assigned to it")
+	@ApiResponses(@ApiResponse(code = 200, message = "Groups present in application"))
+	public Response getGroups(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		log.debug("Getting all groups for admin {}...", userInfo.getName());
+		return Response.ok(userGroupService.getAggregatedRolesByGroup()).build();
+	}
+
+	@PUT
+	@Path("role")
+	@ApiOperation("Overrides roles for group")
+	@ApiResponses({
+			@ApiResponse(code = 404, message = "User role not found"),
+			@ApiResponse(code = 400, message = "Validation exception occurred"),
+			@ApiResponse(code = 200, message = "Group is successfully added to role")}
+	)
+	public Response updateRolesForGroup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										@Valid @ApiParam UpdateRoleGroupDto updateRoleGroupDto) {
+		log.info("Admin {} is trying to add new group {} to roles {}", userInfo.getName(),
+				updateRoleGroupDto.getGroup(), updateRoleGroupDto.getRoleIds());
+		userGroupService.updateRolesForGroup(updateRoleGroupDto.getGroup(), updateRoleGroupDto.getRoleIds());
+		return Response.ok().build();
+	}
+
+	@DELETE
+	@Path("role")
+	@ApiOperation("Removes user groups from existing roles")
+	@ApiResponses({
+			@ApiResponse(code = 404, message = "User role not found"),
+			@ApiResponse(code = 400, message = "Validation exception occurred"),
+			@ApiResponse(code = 200, message = "Group successfully removed from role")}
+	)
+	public Response deleteGroupFromRole(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										@ApiParam(required = true) @QueryParam("group") @NotEmpty Set<String> groups,
+										@ApiParam(required = true) @QueryParam("roleId") @NotEmpty Set<String> roleIds) {
+		log.info("Admin {} is trying to delete groups {} from roles {}", userInfo.getName(), groups, roleIds);
+		userGroupService.removeGroupFromRole(groups, roleIds);
+		return Response.ok().build();
+	}
+
+	@DELETE
+	@Path("{id}")
+	@ApiOperation("Removes user group from roles that are assigned to it")
+	@ApiResponses({
+			@ApiResponse(code = 400, message = "Validation exception occurred"),
+			@ApiResponse(code = 200, message = "Group successfully removed")}
+	)
+	public Response deleteGroup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								@ApiParam @PathParam("id") String group) {
+		log.info("Admin {} is trying to delete group {} from application", userInfo.getName(), group);
+		userGroupService.removeGroup(group);
+		return Response.ok().build();
+	}
+
+	@PUT
+	@Path("user")
+	@ApiOperation("Adds new users to user group")
+	@ApiResponses({
+			@ApiResponse(code = 404, message = "User role not found"),
+			@ApiResponse(code = 400, message = "Validation exception occurred"),
+			@ApiResponse(code = 200, message = "User successfully added to role")}
+	)
+	public Response addUserToGroup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								   @ApiParam(required = true) @Valid UpdateUserGroupDto updateUserGroupDto) {
+		log.info("Admin {} is trying to add new users {} to group {}", userInfo.getName(),
+				updateUserGroupDto.getUsers(), updateUserGroupDto.getGroup());
+		userGroupService.addUsersToGroup(updateUserGroupDto.getGroup(), updateUserGroupDto.getUsers());
+		return Response.ok().build();
+	}
+
+	@DELETE
+	@Path("user")
+	@ApiOperation("Removes users from existing group")
+	@ApiResponses({
+			@ApiResponse(code = 404, message = "Group not found"),
+			@ApiResponse(code = 400, message = "Validation exception occurred"),
+			@ApiResponse(code = 200, message = "User successfully removed from group")}
+	)
+	public Response deleteUserFromGroup(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										@ApiParam(required = true) @QueryParam("user") @NotEmpty String user,
+										@ApiParam(required = true) @QueryParam("group") @NotEmpty String group) {
+		log.info("Admin {} is trying to delete user {} from group {}", userInfo.getName(), user, group);
+		userGroupService.removeUserFromGroup(group, user);
+		return Response.ok().build();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserRoleResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserRoleResource.java
new file mode 100644
index 0000000..2e3680a
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserRoleResource.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
+import com.epam.dlab.backendapi.service.UserRoleService;
+import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Slf4j
+@Path("role")
+@RolesAllowed("/roleManagement")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+@Api(value = "User's roles resource", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
+public class UserRoleResource {
+
+	private final UserRoleService userRoleService;
+
+	@Inject
+	public UserRoleResource(UserRoleService roleService) {
+		this.userRoleService = roleService;
+	}
+
+	@GET
+	@ApiOperation("List user's roles present in application")
+	@ApiResponses(value = @ApiResponse(code = 200, message = "User roles present in application"))
+	public Response getRoles(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		log.debug("Getting all roles for admin {}...", userInfo.getName());
+		return Response.ok(userRoleService.getUserRoles()).build();
+	}
+
+	@POST
+	@ApiOperation(value = "Creates new user role")
+	@ApiResponses(value = {
+			@ApiResponse(code = 400, message = "Validation exception occurred"),
+			@ApiResponse(code = 200, message = "User role is successfully added")}
+	)
+	public Response createRole(@Auth UserInfo userInfo, UserRoleDto dto) {
+		log.info("Creating new role {} on behalf of admin {}...", dto, userInfo.getName());
+		userRoleService.createRole(dto);
+		return Response.ok().build();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserSettingsResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserSettingsResource.java
index b3fa01a..3f611a4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserSettingsResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserSettingsResource.java
@@ -1,66 +1,88 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.UserSettingsDAO;
-import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
+import com.epam.dlab.backendapi.service.UserSettingService;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import org.hibernate.validator.constraints.NotBlank;
+import org.hibernate.validator.constraints.NotEmpty;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.annotation.security.RolesAllowed;
+import javax.validation.Valid;
 import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.List;
 
 
 @Path("/user/settings")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "User's settings service", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH))
 public class UserSettingsResource {
 	private static final Logger LOGGER = LoggerFactory.getLogger(UserSettingsResource.class);
 
-	private UserSettingsDAO userSettingsDAO;
+	private UserSettingService userSettingService;
 
 	@Inject
-	public UserSettingsResource(UserSettingsDAO userSettingsDAO) {
-		this.userSettingsDAO = userSettingsDAO;
+	public UserSettingsResource(UserSettingService userSettingService) {
+		this.userSettingService = userSettingService;
 	}
-    
-    @GET
-    public String getSettings(@Auth UserInfo userInfo) {
-    	String settings = userSettingsDAO.getUISettings(userInfo);
-    	LOGGER.debug("Returns settings for user {}, content is {}", userInfo.getName(), settings);
-        return settings;
-    }
-    
-    @POST
-    public Response saveSettings(@Auth UserInfo userInfo, @NotBlank String settings) {
-        LOGGER.debug("Saves settings for user {}, content is {}", userInfo.getName(), settings);
-        try {
-        	userSettingsDAO.setUISettings(userInfo, settings);
-        } catch (Exception e) {
-        	LOGGER.error("Save settings for user {} fail", userInfo.getName(), e);
-        	throw new DlabException("Save settings for user " + userInfo.getName() + " fail: " + e.getLocalizedMessage(), e);
-        }
-        return Response.ok().build();
-    }
+
+	@GET
+	@ApiOperation("Returns user's settings")
+	public String getSettings(@ApiParam(hidden = true) @Auth UserInfo userInfo) {
+		String settings = userSettingService.getUISettings(userInfo);
+		LOGGER.debug("Returns settings for user {}, content is {}", userInfo.getName(), settings);
+		return settings;
+	}
+
+	@POST
+	@ApiOperation("Saves user's settings to database")
+	@ApiResponses(@ApiResponse(code = 200, message = "User's settings were saved to database successfully"))
+	public Response saveSettings(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+								 @ApiParam(value = "Settings data", required = true)
+								 @NotBlank String settings) {
+		LOGGER.debug("Saves settings for user {}, content is {}", userInfo.getName(), settings);
+		userSettingService.saveUISettings(userInfo, settings);
+		return Response.ok().build();
+	}
+
+	@PUT
+	@Path("budget")
+	@ApiOperation("Updates allowed budget for users")
+	@ApiResponses(@ApiResponse(code = 200, message = "User's settings were updated successfully"))
+	@RolesAllowed("/user/settings")
+	public Response updateUsersBudget(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									  @Valid @ApiParam @NotEmpty List<UserDTO> budgets) {
+		LOGGER.debug("User {} is updating allowed budget for users: {}", userInfo.getName(), budgets);
+		userSettingService.updateUsersBudget(budgets);
+		return Response.ok().build();
+	}
+
+
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/BillingResourceAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/BillingResourceAws.java
index 31e2f91..09b1861 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/BillingResourceAws.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/BillingResourceAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.aws;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
index d7695fd..6346082 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/aws/ComputationalResourceAws.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
@@ -21,15 +24,18 @@
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.resources.dto.SparkStandaloneClusterCreateForm;
 import com.epam.dlab.backendapi.resources.dto.aws.AwsComputationalCreateForm;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.ComputationalService;
 import com.epam.dlab.dto.aws.computational.AwsComputationalResource;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.contracts.ComputationalAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.validation.Valid;
@@ -37,8 +43,10 @@
 import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.List;
 
 import static com.epam.dlab.dto.UserInstanceStatus.CREATING;
+import static com.epam.dlab.dto.base.DataEngineType.SPARK_STANDALONE;
 
 
 /**
@@ -47,6 +55,8 @@
 @Path("/infrastructure_provision/computational_resources")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for computational resources on AWS (NOTE: available only on AWS platform)",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH), hidden = true)
 @Slf4j
 public class ComputationalResourceAws implements ComputationalAPI {
 
@@ -66,7 +76,14 @@
 	 */
 	@PUT
 	@Path("dataengine-service")
-	public Response createDataEngineService(@Auth UserInfo userInfo, @Valid @NotNull AwsComputationalCreateForm form) {
+	@ApiOperation("Creates EMR cluster on AWS")
+	@ApiResponses({
+			@ApiResponse(code = 302, message = "EMR cluster on AWS with current parameters already exists"),
+			@ApiResponse(code = 200, message = "EMR cluster on AWS successfully created")
+	})
+	public Response createDataEngineService(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+											@ApiParam(value = "AWS form DTO for EMR creation", required = true)
+											@Valid @NotNull AwsComputationalCreateForm form) {
 
 		log.debug("Create computational resources for {} | form is {}", userInfo.getName(), form);
 
@@ -84,7 +101,9 @@
 					.slaveSpot(form.getSlaveInstanceSpot())
 					.slaveSpotPctPrice(form.getSlaveInstanceSpotPctPrice())
 					.slaveNumber(form.getInstanceCount())
-					.version(form.getVersion()).build();
+					.config(form.getConfig())
+					.version(form.getVersion())
+					.build();
 			boolean resourceAdded = computationalService.createDataEngineService(userInfo, form,
 					awsComputationalResource);
 			return resourceAdded ? Response.ok().build() : Response.status(Response.Status.FOUND).build();
@@ -103,14 +122,17 @@
 
 	@PUT
 	@Path("dataengine")
-	public Response createDataEngine(@Auth UserInfo userInfo, @Valid @NotNull SparkStandaloneClusterCreateForm form) {
+	@ApiOperation("Creates Spark cluster on AWS")
+	@ApiResponses({
+			@ApiResponse(code = 302, message = "Spark cluster on AWS with current parameters already exists"),
+			@ApiResponse(code = 200, message = "Spark cluster on AWS successfully created")
+	})
+	public Response createDataEngine(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Spark cluster create form DTO", required = true)
+									 @Valid @NotNull SparkStandaloneClusterCreateForm form) {
 		log.debug("Create computational resources for {} | form is {}", userInfo.getName(), form);
 
-		if (!UserRoles.checkAccess(userInfo, RoleType.COMPUTATIONAL, form.getImage())) {
-			log.warn("Unauthorized attempt to create a {} by user {}", form.getImage(), userInfo.getName());
-			throw new DlabException("You do not have the privileges to create a " + form.getTemplateName());
-		}
-
+		validate(form);
 		return computationalService.createSparkCluster(userInfo, form)
 				? Response.ok().build()
 				: Response.status(Response.Status.FOUND).build();
@@ -126,12 +148,16 @@
 	 */
 	@DELETE
 	@Path("/{exploratoryName}/{computationalName}/terminate")
-	public Response terminate(@Auth UserInfo userInfo,
+	@ApiOperation("Terminates computational resource (EMR/Spark cluster) on AWS")
+	@ApiResponses(@ApiResponse(code = 200, message = "EMR/Spark cluster on AWS successfully terminated"))
+	public Response terminate(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							  @ApiParam(value = "Notebook's name", required = true)
 							  @PathParam("exploratoryName") String exploratoryName,
+							  @ApiParam(value = "Computational resource's name for terminating", required = true)
 							  @PathParam("computationalName") String computationalName) {
 		log.debug("Terminating computational resource {} for user {}", computationalName, userInfo.getName());
 
-		computationalService.terminateComputationalEnvironment(userInfo, exploratoryName, computationalName);
+		computationalService.terminateComputational(userInfo, exploratoryName, computationalName);
 
 		return Response.ok().build();
 	}
@@ -146,8 +172,12 @@
 	 */
 	@DELETE
 	@Path("/{exploratoryName}/{computationalName}/stop")
-	public Response stop(@Auth UserInfo userInfo,
+	@ApiOperation("Stops Spark cluster on AWS")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on AWS successfully stopped"))
+	public Response stop(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						 @ApiParam(value = "Notebook's name corresponding to Spark cluster", required = true)
 						 @PathParam("exploratoryName") String exploratoryName,
+						 @ApiParam(value = "Spark cluster's name for stopping", required = true)
 						 @PathParam("computationalName") String computationalName) {
 		log.debug("Stopping computational resource {} for user {}", computationalName, userInfo.getName());
 
@@ -166,8 +196,12 @@
 	 */
 	@PUT
 	@Path("/{exploratoryName}/{computationalName}/start")
-	public Response start(@Auth UserInfo userInfo,
+	@ApiOperation("Starts Spark cluster on AWS")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on AWS successfully started"))
+	public Response start(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						  @ApiParam(value = "Notebook's name corresponding to Spark cluster", required = true)
 						  @PathParam("exploratoryName") String exploratoryName,
+						  @ApiParam(value = "Spark cluster's name for starting", required = true)
 						  @PathParam("computationalName") String computationalName) {
 		log.debug("Starting computational resource {} for user {}", computationalName, userInfo.getName());
 
@@ -176,23 +210,71 @@
 		return Response.ok().build();
 	}
 
-	private void validate(@Auth UserInfo userInfo, AwsComputationalCreateForm formDTO) {
+	@PUT
+	@Path("dataengine/{exploratoryName}/{computationalName}/config")
+	@ApiOperation("Updates Spark cluster configuration on AWS")
+	@ApiResponses(
+			@ApiResponse(code = 200, message = "Spark cluster configuration on AWS successfully updated")
+	)
+	public Response updateDataEngineConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										   @ApiParam(value = "Notebook's name corresponding to Spark cluster",
+												   required = true)
+										   @PathParam("exploratoryName") String exploratoryName,
+										   @ApiParam(value = "Spark cluster's name for reconfiguring", required = true)
+										   @PathParam("computationalName") String computationalName,
+										   @ApiParam(value = "Spark cluster config", required = true)
+										   @Valid @NotNull List<ClusterConfig> config) {
+
+		computationalService.updateSparkClusterConfig(userInfo, exploratoryName, computationalName, config);
+		return Response.ok().build();
+	}
+
+	@GET
+	@Path("{exploratoryName}/{computationalName}/config")
+	@ApiOperation("Returns Spark cluster configuration on AWS")
+	@ApiResponses(
+			@ApiResponse(code = 200, message = "Spark cluster configuration on AWS successfully returned")
+	)
+	public Response getClusterConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Notebook's name corresponding to Spark cluster",
+											 required = true)
+									 @PathParam("exploratoryName") String exploratoryName,
+									 @ApiParam(value = "Spark cluster's name for reconfiguring", required = true)
+									 @PathParam("computationalName") String computationalName) {
+		return Response.ok(computationalService.getClusterConfig(userInfo, exploratoryName, computationalName)).build();
+	}
+
+	private void validate(SparkStandaloneClusterCreateForm form) {
+
+		int instanceCount = Integer.parseInt(form.getDataEngineInstanceCount());
+
+		if (instanceCount < configuration.getMinSparkInstanceCount()
+				|| instanceCount > configuration.getMaxSparkInstanceCount()) {
+			throw new IllegalArgumentException(String.format("Instance count should be in range [%d..%d]",
+					configuration.getMinSparkInstanceCount(), configuration.getMaxSparkInstanceCount()));
+		}
+
+		if (DataEngineType.fromDockerImageName(form.getImage()) != SPARK_STANDALONE) {
+			throw new IllegalArgumentException(String.format("Unknown data engine %s", form.getImage()));
+		}
+	}
+
+	private void validate(UserInfo userInfo, AwsComputationalCreateForm formDTO) {
 		if (!UserRoles.checkAccess(userInfo, RoleType.COMPUTATIONAL, formDTO.getImage())) {
 			log.warn("Unauthorized attempt to create a {} by user {}", formDTO.getImage(), userInfo.getName());
 			throw new DlabException("You do not have the privileges to create a " + formDTO.getTemplateName());
 		}
 
 		int slaveInstanceCount = Integer.parseInt(formDTO.getInstanceCount());
-		if (slaveInstanceCount < configuration.getMinEmrInstanceCount() || slaveInstanceCount > configuration
-				.getMaxEmrInstanceCount()) {
+		if (slaveInstanceCount < configuration.getMinEmrInstanceCount() || slaveInstanceCount >
+				configuration.getMaxEmrInstanceCount()) {
 			log.debug("Creating computational resource {} for user {} fail: Limit exceeded to creation slave " +
-							"instances" +
-							". Minimum is {}, maximum is {}",
-					formDTO.getName(), userInfo.getName(), configuration.getMinEmrInstanceCount(), configuration
-							.getMaxEmrInstanceCount());
-			throw new DlabException("Limit exceeded to creation slave instances. Minimum is " + configuration
-					.getMinEmrInstanceCount() +
-					", maximum is " + configuration.getMaxEmrInstanceCount() + ".");
+							"instances. Minimum is {}, maximum is {}",
+					formDTO.getName(), userInfo.getName(), configuration.getMinEmrInstanceCount(),
+					configuration.getMaxEmrInstanceCount());
+			throw new DlabException("Limit exceeded to creation slave instances. Minimum is " +
+					configuration.getMinEmrInstanceCount() + ", maximum is " + configuration.getMaxEmrInstanceCount() +
+					".");
 		}
 
 		int slaveSpotInstanceBidPct = formDTO.getSlaveInstanceSpotPctPrice();
@@ -200,11 +282,11 @@
 				|| slaveSpotInstanceBidPct > configuration.getMaxEmrSpotInstanceBidPct())) {
 			log.debug("Creating computational resource {} for user {} fail: Spot instances bidding percentage value " +
 							"out of the boundaries. Minimum is {}, maximum is {}",
-					formDTO.getName(), userInfo.getName(), configuration.getMinEmrSpotInstanceBidPct(), configuration
-							.getMaxEmrSpotInstanceBidPct());
+					formDTO.getName(), userInfo.getName(), configuration.getMinEmrSpotInstanceBidPct(),
+					configuration.getMaxEmrSpotInstanceBidPct());
 			throw new DlabException("Spot instances bidding percentage value out of the boundaries. Minimum is " +
-					configuration.getMinEmrSpotInstanceBidPct() +
-					", maximum is " + configuration.getMaxEmrSpotInstanceBidPct() + ".");
+					configuration.getMinEmrSpotInstanceBidPct() + ", maximum is " +
+					configuration.getMaxEmrSpotInstanceBidPct() + ".");
 		}
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/AzureOauthResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/AzureOauthResource.java
index 7a4cb05..8c999a9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/AzureOauthResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/AzureOauthResource.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.resources.azure;
 
 import com.epam.dlab.constants.ServiceConsts;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/BillingResourceAzure.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/BillingResourceAzure.java
index 69b1b64..b0fcc6f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/BillingResourceAzure.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/BillingResourceAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.azure;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java
index 12b48ad..dcac05f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/azure/ComputationalResourceAzure.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.azure;
@@ -22,15 +25,18 @@
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.resources.dto.SparkStandaloneClusterCreateForm;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.ComputationalService;
 import com.epam.dlab.constants.ServiceConsts;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.client.RESTService;
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.annotation.security.RolesAllowed;
@@ -39,6 +45,7 @@
 import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.List;
 
 /**
  * Provides the REST API for the computational resource on Azure.
@@ -46,6 +53,8 @@
 @Path("/infrastructure_provision/computational_resources")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for computational resources on Azure. (NOTE: available only on AZURE platform)",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH), hidden = true)
 @Slf4j
 public class ComputationalResourceAzure {
 
@@ -76,7 +85,14 @@
 	@PUT
 	@Path("dataengine")
 	@RolesAllowed(UserSessionDurationAuthorizer.SHORT_USER_SESSION_DURATION)
-	public Response createDataEngine(@Auth UserInfo userInfo, @Valid @NotNull SparkStandaloneClusterCreateForm form) {
+	@ApiOperation("Creates Spark cluster on Azure")
+	@ApiResponses({
+			@ApiResponse(code = 302, message = "Spark cluster on Azure with current parameters already exists"),
+			@ApiResponse(code = 200, message = "Spark cluster on Azure successfully created")
+	})
+	public Response createDataEngine(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Spark cluster create form DTO", required = true)
+									 @Valid @NotNull SparkStandaloneClusterCreateForm form) {
 		log.debug("Create computational resources for {} | form is {}", userInfo.getName(), form);
 
 		if (!UserRoles.checkAccess(userInfo, RoleType.COMPUTATIONAL, form.getImage())) {
@@ -100,13 +116,18 @@
 	 */
 	@DELETE
 	@Path("/{exploratoryName}/{computationalName}/terminate")
-	public Response terminate(@Auth UserInfo userInfo,
+	@ApiOperation("Terminates computational Spark cluster on Azure")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on Azure successfully terminated"))
+	public Response terminate(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							  @ApiParam(value = "Notebook's name corresponding to computational resource",
+									  required = true)
 							  @PathParam("exploratoryName") String exploratoryName,
+							  @ApiParam(value = "Spark cluster's name for terminating", required = true)
 							  @PathParam("computationalName") String computationalName) {
 
 		log.debug("Terminating computational resource {} for user {}", computationalName, userInfo.getName());
 
-		computationalService.terminateComputationalEnvironment(userInfo, exploratoryName, computationalName);
+		computationalService.terminateComputational(userInfo, exploratoryName, computationalName);
 
 		return Response.ok().build();
 	}
@@ -121,8 +142,12 @@
 	 */
 	@DELETE
 	@Path("/{exploratoryName}/{computationalName}/stop")
-	public Response stop(@Auth UserInfo userInfo,
+	@ApiOperation("Stops Spark cluster on Azure")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on Azure successfully stopped"))
+	public Response stop(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						 @ApiParam(value = "Notebook's name corresponding to Spark cluster", required = true)
 						 @PathParam("exploratoryName") String exploratoryName,
+						 @ApiParam(value = "Spark cluster's name for stopping", required = true)
 						 @PathParam("computationalName") String computationalName) {
 		log.debug("Stopping computational resource {} for user {}", computationalName, userInfo.getName());
 
@@ -141,8 +166,12 @@
 	 */
 	@PUT
 	@Path("/{exploratoryName}/{computationalName}/start")
-	public Response start(@Auth UserInfo userInfo,
+	@ApiOperation("Starts Spark cluster on Azure")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on Azure successfully started"))
+	public Response start(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						  @ApiParam(value = "Notebook's name corresponding to Spark cluster", required = true)
 						  @PathParam("exploratoryName") String exploratoryName,
+						  @ApiParam(value = "Spark cluster's name for starting", required = true)
 						  @PathParam("computationalName") String computationalName) {
 		log.debug("Starting computational resource {} for user {}", computationalName, userInfo.getName());
 
@@ -150,4 +179,38 @@
 
 		return Response.ok().build();
 	}
+
+	@PUT
+	@Path("dataengine/{exploratoryName}/{computationalName}/config")
+	@ApiOperation("Updates Spark cluster configuration on AWS")
+	@ApiResponses(
+			@ApiResponse(code = 200, message = "Spark cluster configuration on AWS successfully updated")
+	)
+	public Response updateDataEngineConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										   @ApiParam(value = "Notebook's name corresponding to Spark cluster",
+												   required = true)
+										   @PathParam("exploratoryName") String exploratoryName,
+										   @ApiParam(value = "Spark cluster's name for reconfiguring", required = true)
+										   @PathParam("computationalName") String computationalName,
+										   @ApiParam(value = "Spark cluster config", required = true)
+										   @Valid @NotNull List<ClusterConfig> config) {
+
+		computationalService.updateSparkClusterConfig(userInfo, exploratoryName, computationalName, config);
+		return Response.ok().build();
+	}
+
+	@GET
+	@Path("{exploratoryName}/{computationalName}/config")
+	@ApiOperation("Returns Spark cluster configuration on AWS")
+	@ApiResponses(
+			@ApiResponse(code = 200, message = "Spark cluster configuration on AWS successfully returned")
+	)
+	public Response getClusterConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Notebook's name corresponding to Spark cluster",
+											 required = true)
+									 @PathParam("exploratoryName") String exploratoryName,
+									 @ApiParam(value = "Spark cluster's name for reconfiguring", required = true)
+									 @PathParam("computationalName") String computationalName) {
+		return Response.ok(computationalService.getClusterConfig(userInfo, exploratoryName, computationalName)).build();
+	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/BackupCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/BackupCallback.java
index b1e868f..c11b6bb 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/BackupCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/BackupCallback.java
@@ -1,25 +1,30 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.BackupService;
 import com.epam.dlab.dto.backup.EnvBackupStatusDTO;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -46,7 +51,7 @@
 
 	@POST
 	@Path("/status")
-	public Response status(EnvBackupStatusDTO dto) {
+	public Response status(@Auth UserInfo ui, EnvBackupStatusDTO dto) {
 		requestId.remove(dto.getRequestId());
 		log.debug("Updating status of backup status to {}", dto);
 		backupService.updateStatus(dto.getEnvBackupDTO(), dto.getUser(),
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/CheckInactivityCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/CheckInactivityCallback.java
new file mode 100644
index 0000000..b5eeb15
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/CheckInactivityCallback.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources.callback;
+
+import com.epam.dlab.backendapi.domain.RequestId;
+import com.epam.dlab.backendapi.service.InactivityService;
+import com.epam.dlab.dto.computational.CheckInactivityStatusDTO;
+import com.epam.dlab.dto.status.EnvResource;
+import com.epam.dlab.model.ResourceType;
+import com.google.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Path("/infrastructure/inactivity/callback")
+@Consumes(MediaType.APPLICATION_JSON)
+@Slf4j
+public class CheckInactivityCallback {
+
+	@Inject
+	private RequestId requestId;
+	@Inject
+	private InactivityService inactivityService;
+
+	@POST
+	public Response checkInactiveClusterResponse(CheckInactivityStatusDTO dto) {
+		requestId.checkAndRemove(dto.getRequestId());
+		stopClustersByInactivity(dto);
+		stopExploratoryByInactivity(dto);
+		return Response.ok().build();
+	}
+
+	private void stopClustersByInactivity(CheckInactivityStatusDTO dto) {
+		final List<EnvResource> clusters = getResources(dto, ResourceType.COMPUTATIONAL);
+		inactivityService.stopClustersByInactivity(clusters.stream().map(EnvResource::getId).collect(Collectors.toList()));
+		inactivityService.updateLastActivityForClusters(clusters);
+	}
+
+	private void stopExploratoryByInactivity(CheckInactivityStatusDTO dto) {
+		final List<EnvResource> exploratories = getResources(dto, ResourceType.EXPLORATORY);
+		inactivityService.stopByInactivity(exploratories);
+		inactivityService.updateLastActivity(exploratories);
+	}
+
+	private List<EnvResource> getResources(CheckInactivityStatusDTO dto, ResourceType resourceType) {
+		return dto.getResources().stream()
+				.filter(r -> r.getResourceType() == resourceType)
+				.collect(Collectors.toList());
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ComputationalCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ComputationalCallback.java
index c93c070..105ec08 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ComputationalCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ComputationalCallback.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
@@ -29,6 +32,7 @@
 import com.epam.dlab.model.ResourceData;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -65,7 +69,7 @@
      */
     @POST
     @Path(ApiCallbacks.STATUS_URI)
-    public Response status(ComputationalStatusDTO dto) {
+    public Response status(@Auth UserInfo ui, ComputationalStatusDTO dto) {
 		log.debug("Updating status for computational resource {} for user {}: {}",
 				dto.getComputationalName(), dto.getUser(), dto);
         String uuid = dto.getRequestId();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/EnvironmentStatusCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/EnvironmentStatusCallback.java
index be200c9..a70e48a 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/EnvironmentStatusCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/EnvironmentStatusCallback.java
@@ -1,28 +1,33 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
 
-import com.epam.dlab.backendapi.dao.EnvStatusDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.status.EnvStatusDTO;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -39,7 +44,7 @@
 public class EnvironmentStatusCallback {
 
     @Inject
-    private EnvStatusDAO envDAO;
+	private EnvDAO envDAO;
 	@Inject
 	private RequestId requestId;
 
@@ -51,7 +56,7 @@
      */
     @POST
     @Path(ApiCallbacks.STATUS_URI)
-    public Response status(EnvStatusDTO dto) {
+    public Response status(@Auth UserInfo userInfo, EnvStatusDTO dto) {
         log.trace("Updating the status of resources for user {}: {}", dto.getUser(), dto);
 		requestId.checkAndRemove(dto.getRequestId());
         try {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ExploratoryCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ExploratoryCallback.java
index 9af8340..0978998 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ExploratoryCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ExploratoryCallback.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
@@ -30,6 +33,7 @@
 import com.epam.dlab.model.ResourceData;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -71,7 +75,7 @@
 	 */
 	@POST
 	@Path(ApiCallbacks.STATUS_URI)
-	public Response status(ExploratoryStatusDTO dto) {
+	public Response status(@Auth UserInfo ui, ExploratoryStatusDTO dto) {
 		log.debug("Updating status for exploratory environment {} for user {} to {}",
 				dto.getExploratoryName(), dto.getUser(), dto.getStatus());
 		requestId.checkAndRemove(dto.getRequestId());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/GitCredsCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/GitCredsCallback.java
index 33ad456..5ad4e6f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/GitCredsCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/GitCredsCallback.java
@@ -1,26 +1,31 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.exploratory.ExploratoryStatusDTO;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -47,7 +52,7 @@
      */
     @POST
     @Path(ApiCallbacks.STATUS_URI)
-    public Response status(ExploratoryStatusDTO dto) {
+    public Response status(@Auth UserInfo userInfo, ExploratoryStatusDTO dto) {
         if (UserInstanceStatus.CREATED != UserInstanceStatus.of(dto.getStatus())) {
             //TODO Handle error status?
             log.error("Git creds has not been updated for exploratory environment {} for user {}, status is {}",
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ImageCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ImageCallback.java
index 57cca63..4339f40 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ImageCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ImageCallback.java
@@ -1,28 +1,33 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.ImageExploratoryService;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.exploratory.ImageCreateStatusDTO;
 import com.epam.dlab.dto.exploratory.ImageStatus;
-import com.epam.dlab.model.exloratory.Image;
+import com.epam.dlab.model.exploratory.Image;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -47,7 +52,7 @@
 
 	@POST
 	@Path("/image_status")
-	public Response imageCreateStatus(ImageCreateStatusDTO dto) {
+	public Response imageCreateStatus(@Auth UserInfo userInfo, ImageCreateStatusDTO dto) {
 		log.debug("Updating status of image {} for user {} to {}", dto.getName(), dto.getUser(), dto);
 		requestId.remove(dto.getRequestId());
 		imageExploratoryService.finishImageCreate(getImage(dto), dto.getExploratoryName(), dto.getImageCreateDTO()
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/LibraryCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/LibraryCallback.java
index 57446e9..506def7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/LibraryCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/LibraryCallback.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ExploratoryLibDAO;
 import com.epam.dlab.backendapi.domain.ExploratoryLibCache;
 import com.epam.dlab.backendapi.domain.RequestId;
@@ -24,6 +28,7 @@
 import com.epam.dlab.dto.exploratory.LibListStatusDTO;
 import com.epam.dlab.exceptions.DlabException;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -52,7 +57,7 @@
      */
     @POST
     @Path("/lib_status")
-    public Response libInstallStatus(LibInstallStatusDTO dto) {
+    public Response libInstallStatus(@Auth UserInfo userInfo, LibInstallStatusDTO dto) {
         log.debug("Updating status of libraries for exploratory environment {} for user {} to {}",
                 dto.getExploratoryName(), dto.getUser(), dto);
 		requestId.checkAndRemove(dto.getRequestId());
@@ -77,7 +82,7 @@
      */
     @POST
     @Path("/update_lib_list")
-    public Response updateLibList(LibListStatusDTO dto) {
+    public Response updateLibList(@Auth UserInfo userInfo, LibListStatusDTO dto) {
         log.debug("Updating the list of libraries for image {}", dto.getImageName());
 		requestId.checkAndRemove(dto.getRequestId());
         try {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ReuploadKeyCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ReuploadKeyCallback.java
index 88f1a5c..e1e5625 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ReuploadKeyCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/ReuploadKeyCallback.java
@@ -1,25 +1,30 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.ReuploadKeyService;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyStatusDTO;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -45,7 +50,7 @@
 
 	@POST
 	@Path("/callback")
-	public Response reuploadKeyResponse(ReuploadKeyStatusDTO dto) {
+	public Response reuploadKeyResponse(@Auth UserInfo userInfo, ReuploadKeyStatusDTO dto) {
 		requestId.remove(dto.getRequestId());
 		reuploadKeyService.updateResourceData(dto);
 		return Response.ok(uriInfo.getRequestUri()).build();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java
index 1dc5101..696e0ed 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java
@@ -1,27 +1,32 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.aws;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.callback.base.EdgeCallback;
 import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
 import com.epam.dlab.dto.base.keyload.UploadFileResult;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -52,7 +57,7 @@
      */
     @POST
     @Path(ApiCallbacks.STATUS_URI)
-    public Response status(UploadFileResult<EdgeInfoAws> dto) {
+    public Response status(@Auth UserInfo ui, UploadFileResult<EdgeInfoAws> dto) {
 		requestId.checkAndRemove(dto.getRequestId());
         handleEdgeCallback(dto.getUser(), dto.getStatus());
         return Response.ok().build();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java
index 806dab0..fb9a33b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java
@@ -1,26 +1,31 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.aws;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.callback.base.KeyUploaderCallback;
 import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
 import com.epam.dlab.dto.base.keyload.UploadFileResult;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -52,7 +57,7 @@
      */
     @POST
     @Path("/callback")
-	public Response loadKeyResponse(UploadFileResult<EdgeInfoAws> dto) {
+	public Response loadKeyResponse(@Auth UserInfo ui, UploadFileResult<EdgeInfoAws> dto) {
         log.debug("Upload the key result and EDGE node info for user {}: {}", dto.getUser(), dto);
 		requestId.checkAndRemove(dto.getRequestId());
         keyUploaderCallback.handleCallback(dto.getStatus(), dto.getUser(), dto.getEdgeInfo());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java
index 7e3a985..278675c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java
@@ -1,27 +1,32 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.azure;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.callback.base.EdgeCallback;
 import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
 import com.epam.dlab.dto.base.keyload.UploadFileResult;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -52,7 +57,7 @@
      */
     @POST
     @Path(ApiCallbacks.STATUS_URI)
-    public Response status(UploadFileResult<EdgeInfoAzure> dto) {
+    public Response status(@Auth UserInfo ui, UploadFileResult<EdgeInfoAzure> dto) {
 		requestId.checkAndRemove(dto.getRequestId());
         handleEdgeCallback(dto.getUser(), dto.getStatus());
         return Response.ok().build();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java
index d5607c1..0a905d4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java
@@ -1,26 +1,31 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.azure;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.callback.base.KeyUploaderCallback;
 import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
 import com.epam.dlab.dto.base.keyload.UploadFileResult;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -54,7 +59,7 @@
      */
     @POST
     @Path("/callback")
-	public Response loadKeyResponse(UploadFileResult<EdgeInfoAzure> dto) {
+	public Response loadKeyResponse(@Auth UserInfo ui, UploadFileResult<EdgeInfoAzure> dto) {
         log.debug("Upload the key result and EDGE node info for user {}: {}", dto.getUser(), dto);
 		requestId.checkAndRemove(dto.getRequestId());
         keyUploaderCallback.handleCallback(dto.getStatus(), dto.getUser(), dto.getEdgeInfo());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java
index 36edafd..5c96be7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.base;
@@ -54,6 +57,7 @@
 			if (UserInstanceStatus.of(status) == UserInstanceStatus.TERMINATED) {
 				log.debug("Removing key for user {}", user);
 				keyDAO.deleteKey(user);
+				keyDAO.removeEdge(user);
 			}
 			log.debug("Updating the status of EDGE node for user {} to {}", user, status);
 			keyDAO.updateEdgeStatus(user, status);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java
index c3f1e7b..fac33c6 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.base;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java
index 2649fff..c7d0fef 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java
@@ -1,27 +1,32 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.gcp;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.callback.base.EdgeCallback;
 import com.epam.dlab.dto.base.keyload.UploadFileResult;
 import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
 import com.epam.dlab.rest.contracts.ApiCallbacks;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -52,7 +57,7 @@
 	 */
 	@POST
 	@Path(ApiCallbacks.STATUS_URI)
-	public Response status(UploadFileResult<EdgeInfoGcp> dto) {
+	public Response status(@Auth UserInfo ui, UploadFileResult<EdgeInfoGcp> dto) {
 		requestId.checkAndRemove(dto.getRequestId());
 		handleEdgeCallback(dto.getUser(), dto.getStatus());
 		return Response.ok().build();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java
index 4f31c8f..64a8fd5 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java
@@ -1,26 +1,31 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.callback.gcp;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.callback.base.KeyUploaderCallback;
 import com.epam.dlab.dto.base.keyload.UploadFileResult;
 import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
 import com.google.inject.Inject;
+import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.ws.rs.Consumes;
@@ -54,7 +59,7 @@
 	 */
 	@POST
 	@Path("/callback")
-	public Response loadKeyResponse(UploadFileResult<EdgeInfoGcp> dto) {
+	public Response loadKeyResponse(@Auth UserInfo ui, UploadFileResult<EdgeInfoGcp> dto) {
 		log.debug("Upload the key result and EDGE node info for user {}: {}", dto.getUser(), dto);
 		requestId.checkAndRemove(dto.getRequestId());
 		keyUploaderCallback.handleCallback(dto.getStatus(), dto.getUser(), dto.getEdgeInfo());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupFormDTO.java
index aa8d943..36f08e9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupFormDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupInfoRecord.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupInfoRecord.java
index 8deb73e..3a3dfa8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupInfoRecord.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BackupInfoRecord.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ComputationalCreateFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ComputationalCreateFormDTO.java
index a27737e..98d51e6 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ComputationalCreateFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ComputationalCreateFormDTO.java
@@ -1,47 +1,58 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources.dto;
 
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import org.hibernate.validator.constraints.NotBlank;
 
+import javax.validation.Valid;
+import java.util.List;
+
 /**
  * Stores info about creation of the computational resource.
  */
 @Data
 public class ComputationalCreateFormDTO {
 
-    @NotBlank
-    @JsonProperty("template_name")
-    private String templateName;
+	@NotBlank
+	@JsonProperty("template_name")
+	private String templateName;
 
-    @NotBlank
-    @JsonProperty
-    private String image;
+	@NotBlank
+	@JsonProperty
+	private String image;
 
-    @NotBlank
-    @JsonProperty
-    private String name;
+	@NotBlank
+	@JsonProperty
+	private String name;
 
-    @NotBlank
-    @JsonProperty("notebook_name")
-    private String notebookName;
+	@NotBlank
+	@JsonProperty("notebook_name")
+	private String notebookName;
+
+	@JsonProperty("check_inactivity_required")
+	private boolean checkInactivityRequired = true;
+
+	@Valid
+	private List<ClusterConfig> config;
 
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryActionFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryActionFormDTO.java
index 31efc28..b953be3 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryActionFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryActionFormDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources.dto;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryCreateFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryCreateFormDTO.java
index 7b43afd..c1dee78 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryCreateFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryCreateFormDTO.java
@@ -1,123 +1,158 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources.dto;
 
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
-
 import org.hibernate.validator.constraints.NotBlank;
 
-/** Stores info about new exploratory.
+import java.util.List;
+
+/**
+ * Stores info about new exploratory.
  */
 public class ExploratoryCreateFormDTO {
-    @NotBlank
-    @JsonProperty
-    private String image;
+	@NotBlank
+	@JsonProperty
+	private String image;
 
-    @NotBlank
-    @JsonProperty("template_name")
-    private String templateName;
+	@NotBlank
+	@JsonProperty("template_name")
+	private String templateName;
 
-    @NotBlank
-    @JsonProperty
-    private String name;
+	@NotBlank
+	@JsonProperty
+	private String name;
 
-    @NotBlank
-    @JsonProperty
-    private String shape;
+	@NotBlank
+	@JsonProperty
+	private String shape;
 
-    @NotBlank
-    @JsonProperty
-    private String version;
+	@NotBlank
+	@JsonProperty
+	private String version;
 
-    @JsonProperty("notebook_image_name")
-    private String imageName;
+	@JsonProperty("notebook_image_name")
+	private String imageName;
 
-    /** Returns the image name of notebook. */
-    public String getImage() {
-    	return image;
-    }
+	@JsonProperty("cluster_config")
+	private List<ClusterConfig> clusterConfig;
 
-    /** Sets the image name of notebook. */
-    public void setImage(String image) {
-    	this.image = image;
-    }
+	/**
+	 * Returns the image name of notebook.
+	 */
+	public String getImage() {
+		return image;
+	}
 
-    /** Returns name of template. */
-    public String getTemplateName() {
-    	return templateName;
-    }
+	/**
+	 * Sets the image name of notebook.
+	 */
+	public void setImage(String image) {
+		this.image = image;
+	}
 
-    /** Sets name of template. */
-    public void setTemplateName(String templateName) {
-    	this.templateName = templateName;
-    }
+	/**
+	 * Returns name of template.
+	 */
+	public String getTemplateName() {
+		return templateName;
+	}
 
-    /** Returns name of notebook. */
-    public String getName() {
-        return name;
-    }
+	/**
+	 * Sets name of template.
+	 */
+	public void setTemplateName(String templateName) {
+		this.templateName = templateName;
+	}
 
-    /** Sets name of notebook. */
-    public void setName(String name) {
-        this.name = name;
-    }
+	/**
+	 * Returns name of notebook.
+	 */
+	public String getName() {
+		return name;
+	}
 
-    /** Returns name of shape. */
-    public String getShape() {
-        return shape;
-    }
+	/**
+	 * Sets name of notebook.
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
 
-    /** Sets name of shape. */
-    public void setShape(String shape) {
-        this.shape = shape;
-    }
+	/**
+	 * Returns name of shape.
+	 */
+	public String getShape() {
+		return shape;
+	}
 
-    /** Returns version. */
-    public String getVersion() {
-        return version;
-    }
+	/**
+	 * Sets name of shape.
+	 */
+	public void setShape(String shape) {
+		this.shape = shape;
+	}
 
-    /** Sets version. */
-    public void setVersion(String version) {
-        this.version = version;
-    }
+	/**
+	 * Returns version.
+	 */
+	public String getVersion() {
+		return version;
+	}
 
-    /** Returns image name from which notebook should be created */
-    public String getImageName() {
-        return imageName;
-    }
+	/**
+	 * Sets version.
+	 */
+	public void setVersion(String version) {
+		this.version = version;
+	}
 
-    /** Sets image name from which notebook should be created */
-    public void setImageName(String imageName) {
-        this.imageName = imageName;
-    }
+	/**
+	 * Returns image name from which notebook should be created
+	 */
+	public String getImageName() {
+		return imageName;
+	}
 
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(this)
-                .add("name", name)
-                .add("templateName", templateName)
-                .add("shape", shape)
-                .add("version", version)
-                .add("image", image)
-                .add("imageName", imageName)
-                .toString();
-    }
+	/**
+	 * Sets image name from which notebook should be created
+	 */
+	public void setImageName(String imageName) {
+		this.imageName = imageName;
+	}
+
+	public List<ClusterConfig> getClusterConfig() {
+		return clusterConfig;
+	}
+
+	@Override
+	public String toString() {
+		return MoreObjects.toStringHelper(this)
+				.add("name", name)
+				.add("templateName", templateName)
+				.add("shape", shape)
+				.add("version", version)
+				.add("image", image)
+				.add("imageName", imageName)
+				.toString();
+	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryImageCreateFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryImageCreateFormDTO.java
index af0c5dd..9c3eb30 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryImageCreateFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ExploratoryImageCreateFormDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/GroupDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/GroupDTO.java
new file mode 100644
index 0000000..577d9f7
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/GroupDTO.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import java.util.Collections;
+import java.util.Set;
+
+@Getter
+@Setter
+public class GroupDTO {
+	@NotEmpty
+	private String name;
+	@NotEmpty
+	private Set<String> roleIds;
+	private Set<String> users = Collections.emptySet();
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusDTO.java
index 1557988..27c6b78 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources.dto;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusEnum.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusEnum.java
index f4d085f..3919532 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusEnum.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusEnum.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.resources.dto;
 
 /** Statuses for the environment resource. */
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
index 0141c01..cdef1bb 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources.dto;
 
@@ -35,6 +36,10 @@
 	private boolean billingEnabled;
 	@JsonProperty
 	private boolean admin;
+	@JsonProperty
+	private int billingQuoteUsed;
+	@JsonProperty
+	private int billingUserQuoteUsed;
 
 	/**
 	 * Return the status of environment.
@@ -123,6 +128,16 @@
 		return this;
 	}
 
+	public HealthStatusPageDTO withBillingQuoteUsed(int billingQuoteUsedPct) {
+		this.billingQuoteUsed = billingQuoteUsedPct;
+		return this;
+	}
+
+	public HealthStatusPageDTO withBillingUserQuoteUsed(int billingUserQuoteUsed) {
+		this.billingUserQuoteUsed = billingUserQuoteUsed;
+		return this;
+	}
+
 	public boolean isBillingEnabled() {
 		return billingEnabled;
 	}
@@ -130,4 +145,12 @@
 	public boolean isAdmin() {
 		return admin;
 	}
+
+	public int getBillingQuoteUsed() {
+		return billingQuoteUsed;
+	}
+
+	public int getBillingUserQuoteUsed() {
+		return billingUserQuoteUsed;
+	}
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusResource.java
index 1c2847c..039a31e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusResource.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.resources.dto;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ImageInfoRecord.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ImageInfoRecord.java
index 08502d9..5ad56b4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ImageInfoRecord.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/ImageInfoRecord.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/InfrastructureInfo.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/InfrastructureInfo.java
index 71b5053..3143473 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/InfrastructureInfo.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/InfrastructureInfo.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInfoRecord.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInfoRecord.java
index b1b08fb..4ddd6ad 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInfoRecord.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInfoRecord.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInstallFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInstallFormDTO.java
index 09a3f20..1a3b8a8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInstallFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibInstallFormDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibKey.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibKey.java
index df312d6..81d1d43 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibKey.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibKey.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryDTO.java
index 5e25f81..9a2535e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryDTO.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
index d1517fc..cec0306 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SearchLibsFormDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SearchLibsFormDTO.java
index 1e4d370..f817c4e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SearchLibsFormDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SearchLibsFormDTO.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneClusterCreateForm.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneClusterCreateForm.java
index c932a05..92b6270 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneClusterCreateForm.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneClusterCreateForm.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -25,6 +29,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ToString(callSuper = true)
+@JsonIgnoreProperties(ignoreUnknown = true)
 public class SparkStandaloneClusterCreateForm extends ComputationalCreateFormDTO {
 
 	@NotBlank
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneConfiguration.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneConfiguration.java
index 0f00370..9cc358d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneConfiguration.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SparkStandaloneConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SystemInfoDto.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SystemInfoDto.java
new file mode 100644
index 0000000..6d0d1fa
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/SystemInfoDto.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources.dto;
+
+import com.epam.dlab.model.systeminfo.DiskInfo;
+import com.epam.dlab.model.systeminfo.MemoryInfo;
+import com.epam.dlab.model.systeminfo.OsInfo;
+import com.epam.dlab.model.systeminfo.ProcessorInfo;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.List;
+
+@AllArgsConstructor
+@Getter
+public class SystemInfoDto {
+
+	@JsonProperty
+	private OsInfo osInfo;
+	@JsonProperty
+	private ProcessorInfo processorInfo;
+	@JsonProperty
+	private MemoryInfo memoryInfo;
+	@JsonProperty
+	private List<DiskInfo> disksInfo;
+
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UpdateRoleGroupDto.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UpdateRoleGroupDto.java
new file mode 100644
index 0000000..2913712
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UpdateRoleGroupDto.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import java.util.Set;
+
+@AllArgsConstructor
+@Getter
+public class UpdateRoleGroupDto {
+
+	@NotEmpty
+	private final Set<String> roleIds;
+	@NotEmpty
+	private final String group;
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UpdateUserGroupDto.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UpdateUserGroupDto.java
new file mode 100644
index 0000000..8e3bb5f
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UpdateUserGroupDto.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import java.util.Set;
+
+@AllArgsConstructor
+@Getter
+public class UpdateUserGroupDto {
+
+	@NotEmpty
+	private final String group;
+	@NotEmpty
+	private final Set<String> users;
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserDTO.java
new file mode 100644
index 0000000..7f46612
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserDTO.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+@Data
+@AllArgsConstructor
+public class UserDTO {
+	@NotNull
+	private final String name;
+	@Min(1)
+	private final Integer budget;
+	private Status status;
+
+	public enum Status {
+		ACTIVE, NOT_ACTIVE
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserGroupDto.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserGroupDto.java
new file mode 100644
index 0000000..8154892
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserGroupDto.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.List;
+import java.util.Set;
+
+@AllArgsConstructor
+@Getter
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class UserGroupDto {
+	private final String group;
+	private final List<UserRoleDto> roles;
+	private final Set<String> users;
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserResourceInfo.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserResourceInfo.java
index 49f5553..ecdb6ff 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserResourceInfo.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserResourceInfo.java
@@ -1,19 +1,20 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Copyright (c) 2018, EPAM SYSTEMS INC
- *  *
- *  * Licensed under the Apache License, Version 2.0 (the "License");
- *  * you may not use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package com.epam.dlab.backendapi.resources.dto;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
new file mode 100644
index 0000000..21ce26d
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.util.Set;
+
+@Getter
+@Setter
+@ToString
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class UserRoleDto {
+
+	@JsonProperty("_id")
+	private String id;
+	private String description;
+	private Set<String> pages;
+	private Set<String> computationals;
+	private Set<String> exploratories;
+	@JsonProperty("exploratory_shapes")
+	private Set<String> exploratoryShapes;
+	private Set<String> groups;
+
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsBillingFilter.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsBillingFilter.java
index 9a698da..5b601d3 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsBillingFilter.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsBillingFilter.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto.aws;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsComputationalCreateForm.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsComputationalCreateForm.java
index a9fc2a9..869b89d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsComputationalCreateForm.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsComputationalCreateForm.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto.aws;
@@ -28,26 +31,27 @@
 @ToString(callSuper = true)
 public class AwsComputationalCreateForm extends ComputationalCreateFormDTO {
 
-    @NotBlank
-    @JsonProperty("emr_instance_count")
-    private String instanceCount;
+	@NotBlank
+	@JsonProperty("emr_instance_count")
+	private String instanceCount;
 
-    @NotBlank
-    @JsonProperty("emr_master_instance_type")
-    private String masterInstanceType;
+	@NotBlank
+	@JsonProperty("emr_master_instance_type")
+	private String masterInstanceType;
 
-    @NotBlank
-    @JsonProperty("emr_slave_instance_type")
-    private String slaveInstanceType;
+	@NotBlank
+	@JsonProperty("emr_slave_instance_type")
+	private String slaveInstanceType;
 
-    @JsonProperty("emr_slave_instance_spot")
-    private Boolean slaveInstanceSpot = false;
+	@JsonProperty("emr_slave_instance_spot")
+	private Boolean slaveInstanceSpot = false;
 
-    @JsonProperty("emr_slave_instance_spot_pct_price")
-    private Integer slaveInstanceSpotPctPrice;
+	@JsonProperty("emr_slave_instance_spot_pct_price")
+	private Integer slaveInstanceSpotPctPrice;
 
-    @NotBlank
-    @JsonProperty("emr_version")
-    private String version;
+	@NotBlank
+	@JsonProperty("emr_version")
+	private String version;
+
 
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsEmrConfiguration.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsEmrConfiguration.java
index eedc7b5..3aadfd8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsEmrConfiguration.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/aws/AwsEmrConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/azure/AzureBillingFilter.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/azure/AzureBillingFilter.java
index a176256..214467f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/azure/AzureBillingFilter.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/azure/AzureBillingFilter.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto.azure;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpComputationalCreateForm.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpComputationalCreateForm.java
index 3dc7879..8b7a041 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpComputationalCreateForm.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpComputationalCreateForm.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto.gcp;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpDataprocConfiguration.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpDataprocConfiguration.java
index 32fe95b..fee6694 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpDataprocConfiguration.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/gcp/GcpDataprocConfiguration.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.dto.gcp;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java
index 49da0ea..87b7b02 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/ComputationalResourceGcp.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.gcp;
@@ -20,15 +23,18 @@
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.resources.dto.SparkStandaloneClusterCreateForm;
 import com.epam.dlab.backendapi.resources.dto.gcp.GcpComputationalCreateForm;
+import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.ComputationalService;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.gcp.computational.GcpComputationalResource;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.contracts.ComputationalAPI;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
+import io.swagger.annotations.*;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.validation.Valid;
@@ -36,6 +42,7 @@
 import javax.ws.rs.*;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.List;
 
 import static com.epam.dlab.dto.UserInstanceStatus.CREATING;
 
@@ -46,6 +53,8 @@
 @Path("/infrastructure_provision/computational_resources")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@Api(value = "Service for computational resources on GCP. (NOTE: available only on GCP platform)",
+		authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH), hidden = true)
 @Slf4j
 public class ComputationalResourceGcp implements ComputationalAPI {
 
@@ -65,8 +74,14 @@
 	 */
 	@PUT
 	@Path("dataengine-service")
-	public Response createDataEngineService(@Auth UserInfo userInfo, @Valid @NotNull GcpComputationalCreateForm
-			formDTO) {
+	@ApiOperation("Creates Dataproc cluster on GCP")
+	@ApiResponses({
+			@ApiResponse(code = 302, message = "Dataproc cluster on GCP with current parameters already exists"),
+			@ApiResponse(code = 200, message = "Dataproc cluster on GCP created successfully")
+	})
+	public Response createDataEngineService(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+											@ApiParam(value = "GCP form DTO for Dataproc creation", required = true)
+											@Valid @NotNull GcpComputationalCreateForm formDTO) {
 
 		log.debug("Create computational resources for {} | form is {}", userInfo.getName(), formDTO);
 
@@ -82,7 +97,8 @@
 					.slaveNumber(formDTO.getSlaveInstanceCount())
 					.masterNumber(formDTO.getMasterInstanceCount())
 					.preemptibleNumber(formDTO.getPreemptibleCount())
-					.version(formDTO.getVersion()).build();
+					.version(formDTO.getVersion())
+					.build();
 			boolean resourceAdded = computationalService.createDataEngineService(userInfo, formDTO,
 					gcpComputationalResource);
 			return resourceAdded ? Response.ok().build() : Response.status(Response.Status.FOUND).build();
@@ -101,7 +117,14 @@
 	 */
 	@PUT
 	@Path("dataengine")
-	public Response createDataEngine(@Auth UserInfo userInfo, @Valid @NotNull SparkStandaloneClusterCreateForm form) {
+	@ApiOperation("Creates Spark cluster on GCP")
+	@ApiResponses({
+			@ApiResponse(code = 302, message = "Spark cluster on GCP with current parameters already exists"),
+			@ApiResponse(code = 200, message = "Spark cluster on GCP successfully created")
+	})
+	public Response createDataEngine(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Spark cluster create form DTO", required = true)
+									 @Valid @NotNull SparkStandaloneClusterCreateForm form) {
 		log.debug("Create computational resources for {} | form is {}", userInfo.getName(), form);
 
 		if (!UserRoles.checkAccess(userInfo, RoleType.COMPUTATIONAL, form.getImage())) {
@@ -125,12 +148,17 @@
 	 */
 	@DELETE
 	@Path("/{exploratoryName}/{computationalName}/terminate")
-	public Response terminate(@Auth UserInfo userInfo,
+	@ApiOperation("Terminates computational resource (Dataproc/Spark cluster) on GCP")
+	@ApiResponses(@ApiResponse(code = 200, message = "Dataproc/Spark cluster on GCP successfully terminated"))
+	public Response terminate(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+							  @ApiParam(value = "Notebook's name corresponding to computational resource",
+									  required = true)
 							  @PathParam("exploratoryName") String exploratoryName,
+							  @ApiParam(value = "Computational resource's name for terminating", required = true)
 							  @PathParam("computationalName") String computationalName) {
 		log.debug("Terminating computational resource {} for user {}", computationalName, userInfo.getName());
 
-		computationalService.terminateComputationalEnvironment(userInfo, exploratoryName, computationalName);
+		computationalService.terminateComputational(userInfo, exploratoryName, computationalName);
 
 		return Response.ok().build();
 	}
@@ -145,8 +173,12 @@
 	 */
 	@DELETE
 	@Path("/{exploratoryName}/{computationalName}/stop")
-	public Response stop(@Auth UserInfo userInfo,
+	@ApiOperation("Stops Spark cluster on GCP")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on GCP successfully stopped"))
+	public Response stop(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						 @ApiParam(value = "Notebook's name corresponding to Spark cluster", required = true)
 						 @PathParam("exploratoryName") String exploratoryName,
+						 @ApiParam(value = "Spark cluster's name for stopping", required = true)
 						 @PathParam("computationalName") String computationalName) {
 		log.debug("Stopping computational resource {} for user {}", computationalName, userInfo.getName());
 
@@ -165,8 +197,12 @@
 	 */
 	@PUT
 	@Path("/{exploratoryName}/{computationalName}/start")
-	public Response start(@Auth UserInfo userInfo,
+	@ApiOperation("Starts Spark cluster on GCP")
+	@ApiResponses(@ApiResponse(code = 200, message = "Spark cluster on GCP successfully started"))
+	public Response start(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+						  @ApiParam(value = "Notebook's name corresponding to Spark cluster", required = true)
 						  @PathParam("exploratoryName") String exploratoryName,
+						  @ApiParam(value = "Spark cluster's name for starting", required = true)
 						  @PathParam("computationalName") String computationalName) {
 		log.debug("Starting computational resource {} for user {}", computationalName, userInfo.getName());
 
@@ -175,6 +211,40 @@
 		return Response.ok().build();
 	}
 
+	@PUT
+	@Path("dataengine/{exploratoryName}/{computationalName}/config")
+	@ApiOperation("Updates Spark cluster configuration on AWS")
+	@ApiResponses(
+			@ApiResponse(code = 200, message = "Spark cluster configuration on AWS successfully updated")
+	)
+	public Response updateDataEngineConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+										   @ApiParam(value = "Notebook's name corresponding to Spark cluster",
+												   required = true)
+										   @PathParam("exploratoryName") String exploratoryName,
+										   @ApiParam(value = "Spark cluster's name for reconfiguring", required = true)
+										   @PathParam("computationalName") String computationalName,
+										   @ApiParam(value = "Spark cluster config", required = true)
+										   @Valid @NotNull List<ClusterConfig> config) {
+
+		computationalService.updateSparkClusterConfig(userInfo, exploratoryName, computationalName, config);
+		return Response.ok().build();
+	}
+
+	@GET
+	@Path("{exploratoryName}/{computationalName}/config")
+	@ApiOperation("Returns Spark cluster configuration on AWS")
+	@ApiResponses(
+			@ApiResponse(code = 200, message = "Spark cluster configuration on AWS successfully returned")
+	)
+	public Response getClusterConfig(@ApiParam(hidden = true) @Auth UserInfo userInfo,
+									 @ApiParam(value = "Notebook's name corresponding to Spark cluster",
+											 required = true)
+									 @PathParam("exploratoryName") String exploratoryName,
+									 @ApiParam(value = "Spark cluster's name for reconfiguring", required = true)
+									 @PathParam("computationalName") String computationalName) {
+		return Response.ok(computationalService.getClusterConfig(userInfo, exploratoryName, computationalName)).build();
+	}
+
 	private void validate(@Auth UserInfo userInfo, GcpComputationalCreateForm formDTO) {
 		if (!UserRoles.checkAccess(userInfo, RoleType.COMPUTATIONAL, formDTO.getImage())) {
 			log.warn("Unauthorized attempt to create a {} by user {}", formDTO.getImage(), userInfo.getName());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/GcpOauthResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/GcpOauthResource.java
index 9c65229..426633d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/GcpOauthResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/GcpOauthResource.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources.gcp;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/swagger/SwaggerSecurityInfo.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/swagger/SwaggerSecurityInfo.java
new file mode 100644
index 0000000..0066df2
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/swagger/SwaggerSecurityInfo.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources.swagger;
+
+import io.swagger.annotations.ApiKeyAuthDefinition;
+import io.swagger.annotations.SecurityDefinition;
+import io.swagger.annotations.SwaggerDefinition;
+
+import javax.ws.rs.core.HttpHeaders;
+
+@SwaggerDefinition(
+		securityDefinition =
+		@SecurityDefinition(apiKeyAuthDefinitions =
+		@ApiKeyAuthDefinition(
+				key = SwaggerSecurityInfo.TOKEN_AUTH,
+				in = ApiKeyAuthDefinition.ApiKeyLocation.HEADER,
+				name = HttpHeaders.AUTHORIZATION))
+)
+public interface SwaggerSecurityInfo {
+	String TOKEN_AUTH = "Token authorization";
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/RoleType.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/RoleType.java
index 66487f5..4ec40d2 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/RoleType.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/RoleType.java
@@ -1,53 +1,55 @@
-/***************************************************************************

-

- Copyright (c) 2016, EPAM SYSTEMS INC

-

- Licensed under the Apache License, Version 2.0 (the "License");

- you may not use this file except in compliance with the License.

- You may obtain a copy of the License at

-

- http://www.apache.org/licenses/LICENSE-2.0

-

- Unless required by applicable law or agreed to in writing, software

- distributed under the License is distributed on an "AS IS" BASIS,

- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- See the License for the specific language governing permissions and

- limitations under the License.

-

- ****************************************************************************/

-

-package com.epam.dlab.backendapi.roles;

-

-/**

- * Types of roles.

- */

-public enum RoleType {

-	COMPUTATIONAL("computationals"),

-	EXPLORATORY("exploratories"),

-	EXPLORATORY_SHAPES("exploratory_shapes"),

-	PAGE("pages");

-

-	private String nodeName;

-

-	RoleType(String nodeName) {

-		this.nodeName = nodeName;

-	}

-

-	public static RoleType of(String name) {

-		if (name != null) {

-			for (RoleType value : RoleType.values()) {

-				if (name.equalsIgnoreCase(value.toString())) {

-					return value;

-				}

-			}

-		}

-		return null;

-	}

-

-	/**

-	 * Return name of node in JSON for type.

-	 */

-	public String getNodeName() {

-		return nodeName;

-	}

-}

+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.roles;
+
+/**
+ * Types of roles.
+ */
+public enum RoleType {
+	COMPUTATIONAL("computationals"),
+	EXPLORATORY("exploratories"),
+	EXPLORATORY_SHAPES("exploratory_shapes"),
+	COMPUTATIONAL_SHAPES("computational_shapes"),
+	PAGE("pages");
+
+	private String nodeName;
+
+	RoleType(String nodeName) {
+		this.nodeName = nodeName;
+	}
+
+	public static RoleType of(String name) {
+		if (name != null) {
+			for (RoleType value : RoleType.values()) {
+				if (name.equalsIgnoreCase(value.toString())) {
+					return value;
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Return name of node in JSON for type.
+	 */
+	public String getNodeName() {
+		return nodeName;
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserGroup.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserGroup.java
new file mode 100644
index 0000000..da080ae
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserGroup.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.roles;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Set;
+
+@AllArgsConstructor
+@Getter
+public class UserGroup {
+	private final String groupName;
+	private final Set<String> users;
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRole.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRole.java
index e860452..206b143 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRole.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRole.java
@@ -1,138 +1,139 @@
-/***************************************************************************

-

- Copyright (c) 2016, EPAM SYSTEMS INC

-

- Licensed under the Apache License, Version 2.0 (the "License");

- you may not use this file except in compliance with the License.

- You may obtain a copy of the License at

-

- http://www.apache.org/licenses/LICENSE-2.0

-

- Unless required by applicable law or agreed to in writing, software

- distributed under the License is distributed on an "AS IS" BASIS,

- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- See the License for the specific language governing permissions and

- limitations under the License.

-

- ****************************************************************************/

-

-package com.epam.dlab.backendapi.roles;

-

-import com.google.common.base.MoreObjects;

-import com.google.common.base.MoreObjects.ToStringHelper;

-

-import javax.annotation.Nonnull;

-import java.util.Objects;

-import java.util.Set;

-

-/**

- * Describe role.

- */

-public class UserRole implements Comparable<UserRole> {

-

-	private final String id;

-	/**

-	 * Type of role.

-	 */

-	private final RoleType type;

-

-	/**

-	 * Name of role.

-	 */

-	private final String name;

-

-	/**

-	 * Names of external groups.

-	 */

-	private final Set<String> groups;

-

-	/**

-	 * Name of DLab's users.

-	 */

-	private final Set<String> users;

-

-	/**

-	 * Instantiate the role.

-	 *

-	 * @param id

-	 * @param type   type of role.

-	 * @param name   the name of role.

-	 * @param groups the names of external groups.

-	 * @param users  the name of DLab's users.

-	 */

-	UserRole(String id, RoleType type, String name, Set<String> groups, Set<String> users) {

-		this.id = id;

-		this.type = type;

-		this.name = name;

-		this.groups = groups;

-		this.users = users;

-	}

-

-	UserRole(RoleType type, String name, Set<String> groups, Set<String> users) {

-		this(null, type, name, groups, users);

-	}

-

-	/**

-	 * Return the type of role.

-	 */

-	public RoleType getType() {

-		return type;

-	}

-

-	/**

-	 * Return the name of role.

-	 */

-	public String getName() {

-		return name;

-	}

-

-	/**

-	 * Return the names of external groups.

-	 */

-	public Set<String> getGroups() {

-		return groups;

-	}

-

-	/**

-	 * Return the name of DLab's users.

-	 */

-	public Set<String> getUsers() {

-		return users;

-	}

-

-	public String getId() {

-		return id;

-	}

-

-	@Override

-	public int compareTo(@Nonnull UserRole o) {

-		int result = type.compareTo(o.type);

-		return (result == 0 ? name.compareTo(o.name) : result);

-	}

-

-	private ToStringHelper toStringHelper(Object self) {

-		return MoreObjects.toStringHelper(self)

-				.add("type", type)

-				.add("name", name)

-				.add("groups", groups)

-				.add("users", users);

-	}

-

-	@Override

-	public boolean equals(Object o) {

-		if (this == o) return true;

-		if (o == null || getClass() != o.getClass()) return false;

-		UserRole userRole = (UserRole) o;

-		return this.type.equals(userRole.getType()) && this.name.equals(userRole.getName());

-	}

-

-	@Override

-	public int hashCode() {

-		return Objects.hash(type, name);

-	}

-

-	@Override

-	public String toString() {

-		return toStringHelper(this).toString();

-	}

-}

+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.roles;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
+
+import javax.annotation.Nonnull;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * Describe role.
+ */
+public class UserRole implements Comparable<UserRole> {
+
+	private final String id;
+	/**
+	 * Type of role.
+	 */
+	private final RoleType type;
+
+	/**
+	 * Name of role.
+	 */
+	private final String name;
+
+	/**
+	 * Names of external groups.
+	 */
+	private final Set<String> groups;
+
+	/**
+	 * Name of DLab's users.
+	 */
+	private final Set<String> users;
+
+	/**
+	 * Instantiate the role.
+	 *
+	 * @param id
+	 * @param type   type of role.
+	 * @param name   the name of role.
+	 * @param groups the names of external groups.
+	 * @param users  the name of DLab's users.
+	 */
+	UserRole(String id, RoleType type, String name, Set<String> groups, Set<String> users) {
+		this.id = id;
+		this.type = type;
+		this.name = name;
+		this.groups = groups;
+		this.users = users;
+	}
+
+	UserRole(RoleType type, String name, Set<String> groups, Set<String> users) {
+		this(null, type, name, groups, users);
+	}
+
+	/**
+	 * Return the type of role.
+	 */
+	public RoleType getType() {
+		return type;
+	}
+
+	/**
+	 * Return the name of role.
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Return the names of external groups.
+	 */
+	public Set<String> getGroups() {
+		return groups;
+	}
+
+	/**
+	 * Return the name of DLab's users.
+	 */
+	public Set<String> getUsers() {
+		return users;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	@Override
+	public int compareTo(@Nonnull UserRole o) {
+		int result = type.compareTo(o.type);
+		return (result == 0 ? name.compareTo(o.name) : result);
+	}
+
+	private ToStringHelper toStringHelper(Object self) {
+		return MoreObjects.toStringHelper(self)
+				.add("type", type)
+				.add("name", name)
+				.add("groups", groups)
+				.add("users", users);
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (o == null || getClass() != o.getClass()) return false;
+		UserRole userRole = (UserRole) o;
+		return this.type.equals(userRole.getType()) && this.name.equals(userRole.getName());
+	}
+
+	@Override
+	public int hashCode() {
+		return Objects.hash(type, name);
+	}
+
+	@Override
+	public String toString() {
+		return toStringHelper(this).toString();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java
index 3fda990..032d232 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java
@@ -1,276 +1,287 @@
-/***************************************************************************

-

- Copyright (c) 2016, EPAM SYSTEMS INC 

-

- Licensed under the Apache License, Version 2.0 (the "License");

- you may not use this file except in compliance with the License.

- You may obtain a copy of the License at

-

- http://www.apache.org/licenses/LICENSE-2.0

-

- Unless required by applicable law or agreed to in writing, software

- distributed under the License is distributed on an "AS IS" BASIS,

- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- See the License for the specific language governing permissions and

- limitations under the License.

-

- ****************************************************************************/

-

-package com.epam.dlab.backendapi.roles;

-

-import com.epam.dlab.auth.UserInfo;

-import com.epam.dlab.backendapi.dao.SecurityDAO;

-import com.epam.dlab.exceptions.DlabException;

-import com.google.common.base.MoreObjects;

-import com.mongodb.client.FindIterable;

-import org.bson.Document;

-import org.slf4j.Logger;

-import org.slf4j.LoggerFactory;

-

-import java.util.*;

-

-/**

- * Provides user roles access to features.

- */

-public class UserRoles {

-	private static final Logger LOGGER = LoggerFactory.getLogger(UserRoles.class);

-

-	private static final String ANY_USER = "$anyuser";

-	/**

-	 * Node name of groups.

-	 */

-	private static final String GROUPS = "groups";

-	/**

-	 * Node name of user.

-	 */

-	private static final String USERS = "users";

-	private static final String ADMIN_ROLE_NAME = "admin";

-	/**

-	 * Single instance of the user roles.

-	 */

-	private static UserRoles userRoles = null;

-	/**

-	 * List of roles.

-	 */

-	private List<UserRole> roles = null;

-

-	/**

-	 * Default access to features if the role is not defined.

-	 */

-	private boolean defaultAccess = false;

-

-	/**

-	 * Initialize user roles for all users.

-	 *

-	 * @param dao security DAO.

-	 */

-	public static void initialize(SecurityDAO dao, boolean defaultAccess) {

-		LOGGER.trace("Loading roles from database...");

-		if (userRoles == null) {

-			userRoles = new UserRoles();

-		}

-		userRoles.load(dao, defaultAccess);

-		LOGGER.trace("New roles are: {}", getRoles());

-	}

-

-	/**

-	 * Return the list of roles for all users.

-	 */

-	public static List<UserRole> getRoles() {

-		return (userRoles == null ? null : userRoles.roles);

-	}

-

-	/**

-	 * Check access for user to the role.

-	 *

-	 * @param userInfo user info.

-	 * @param type     the type of role.

-	 * @param name     the name of role.

-	 * @return boolean value

-	 */

-	public static boolean checkAccess(UserInfo userInfo, RoleType type, String name) {

-		return checkAccess(userInfo, type, name, true);

-	}

-

-	public static boolean isAdmin(UserInfo userInfo) {

-		final List<UserRole> roles = UserRoles.getRoles();

-		return roles == null || roles.stream().anyMatch(r -> ADMIN_ROLE_NAME.equals(r.getId()) &&

-				(userRoles.hasAccessByGroup(userInfo, r) || userRoles.hasAccessByUserName(userInfo, r)));

-	}

-

-	/**

-	 * Check access for user to the role.

-	 *

-	 * @param userInfo user info.

-	 * @param type     the type of role.

-	 * @param name     the name of role.

-	 * @return boolean value

-	 */

-	public static boolean checkAccess(UserInfo userInfo, RoleType type, String name, boolean useDefault) {

-		return (userRoles == null || userRoles.hasAccess(userInfo, type, name, useDefault));

-	}

-

-	/**

-	 * Loading the user roles for all users from Mongo database.

-	 *

-	 * @param dao security DAO.

-	 */

-	private synchronized void load(SecurityDAO dao, boolean defaultAccess) {

-		this.defaultAccess = defaultAccess;

-		try {

-			FindIterable<Document> docs = dao.getRoles();

-			roles = new ArrayList<>();

-			for (Document d : docs) {

-				Set<String> groups = getAndRemoveSet(d, GROUPS);

-				Set<String> users = getAndRemoveSet(d, USERS);

-				String id = d.getString("_id");

-				for (RoleType type : RoleType.values()) {

-					@SuppressWarnings("unchecked")

-					List<String> names = d.get(type.getNodeName(), ArrayList.class);

-					if (names != null) {

-						for (String name : names) {

-							append(type, name, groups, users, id);

-						}

-					}

-				}

-			}

-		} catch (Exception e) {

-			throw new DlabException("Cannot load roles from database. " + e.getLocalizedMessage(), e);

-		}

-	}

-

-	/**

-	 * Append new role to the list if role not exists in list an return it, otherwise return

-	 * existence role.

-	 *

-	 * @param type   type of role.

-	 * @param name   the name of role.

-	 * @param groups the names of external groups.

-	 * @param users  the name of DLab's users.

-	 * @param id

-	 * @return role.

-	 */

-	private UserRole append(RoleType type, String name, Set<String> groups, Set<String> users, String id) {

-		UserRole item = new UserRole(id, type, name, groups, users);

-		synchronized (roles) {

-			int index = Collections.binarySearch(roles, item);

-			if (index < 0) {

-				index = -index;

-				if (index > roles.size()) {

-					roles.add(item);

-				} else {

-					roles.add(index - 1, item);

-				}

-			}

-		}

-		return item;

-	}

-

-	/**

-	 * Find and return role by type and name.

-	 *

-	 * @param type type of role.

-	 * @param name the name of role.

-	 */

-	private UserRole get(RoleType type, String name) {

-		UserRole item = new UserRole(type, name, null, null);

-		synchronized (roles) {

-			int i = Collections.binarySearch(roles, item);

-			return (i < 0 ? null : roles.get(i));

-		}

-	}

-

-	/**

-	 * Find and return a list by key from JSON document, otherwise return <b>null</b>.

-	 *

-	 * @param document the document.

-	 * @param key      the name of node.

-	 */

-	private Set<String> getAndRemoveSet(Document document, String key) {

-		Object o = document.get(key);

-		if (o == null || !(o instanceof ArrayList)) {

-			return Collections.emptySet();

-		}

-

-		@SuppressWarnings("unchecked")

-		List<String> list = (List<String>) o;

-		if (list.isEmpty()) {

-			return Collections.emptySet();

-		}

-

-		Set<String> set = new HashSet<>();

-		for (String value : list) {

-			set.add(value.toLowerCase());

-		}

-		document.remove(key);

-		return set;

-	}

-

-	/**

-	 * Check access for user to the role.

-	 *

-	 * @param userInfo   user info.

-	 * @param type       the type of role.

-	 * @param name       the name of role.

-	 * @param useDefault true/false

-	 * @return boolean value

-	 */

-	private boolean hasAccess(UserInfo userInfo, RoleType type, String name, boolean useDefault) {

-		if (userRoles == null) {

-			return true;

-		}

-		LOGGER.trace("Check access for user {} with groups {} to {}/{}", userInfo.getName(), userInfo.getRoles(),

-				type, name);

-		UserRole role = get(type, name);

-		if (role == null) {

-			return checkDefault(useDefault);

-		}

-		if (hasAccessByUserName(userInfo, role)) return true;

-		if (hasAccessByGroup(userInfo, role)) return true;

-		LOGGER.trace("Access denied for user {} to {}/{}", userInfo.getName(), type, name);

-		return false;

-	}

-

-	private boolean hasAccessByGroup(UserInfo userInfo, UserRole role) {

-		Set<String> groups = role.getGroups();

-		if (groups != null) {

-			if (groups.contains(ANY_USER)) {

-				return true;

-			}

-			for (String group : userInfo.getRoles()) {

-				if (group != null && groups.contains(group.toLowerCase())) {

-					LOGGER.trace("Got access by group {}", group);

-					return true;

-				}

-			}

-		}

-		return false;

-	}

-

-	private boolean hasAccessByUserName(UserInfo userInfo, UserRole role) {

-		if (role.getUsers() != null &&

-				userInfo.getName() != null &&

-				(role.getUsers().contains(ANY_USER) ||

-						role.getUsers().contains(userInfo.getName().toLowerCase()))) {

-			LOGGER.trace("Got access by name");

-			return true;

-		}

-		return false;

-	}

-

-	private boolean checkDefault(boolean useDefault) {

-		if (useDefault) {

-			LOGGER.trace("Got default access {}", defaultAccess);

-			return defaultAccess;

-		} else {

-			return false;

-		}

-	}

-

-	@Override

-	public String toString() {

-		return MoreObjects.toStringHelper(roles)

-				.addValue(roles)

-				.toString();

-	}

-}

+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.roles;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.SecurityDAO;
+import com.epam.dlab.exceptions.DlabException;
+import com.google.common.base.MoreObjects;
+import com.mongodb.client.FindIterable;
+import org.bson.Document;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+/**
+ * Provides user roles access to features.
+ */
+public class UserRoles {
+	private static final Logger LOGGER = LoggerFactory.getLogger(UserRoles.class);
+
+	private static final String ANY_USER = "$anyuser";
+	/**
+	 * Node name of groups.
+	 */
+	private static final String GROUPS = "groups";
+	/**
+	 * Node name of user.
+	 */
+	private static final String USERS = "users";
+	private static final String ADMIN_ROLE_NAME = "admin";
+	/**
+	 * Single instance of the user roles.
+	 */
+	private static UserRoles userRoles = null;
+	/**
+	 * List of roles.
+	 */
+	private List<UserRole> roles = null;
+	private Map<String, Set<String>> userGroups;
+
+	/**
+	 * Default access to features if the role is not defined.
+	 */
+	private boolean defaultAccess = false;
+
+	/**
+	 * Initialize user roles for all users.
+	 *
+	 * @param dao security DAO.
+	 */
+	public static void initialize(SecurityDAO dao, boolean defaultAccess) {
+		LOGGER.trace("Loading roles from database...");
+		if (userRoles == null) {
+			userRoles = new UserRoles();
+		}
+		userRoles.load(dao, defaultAccess);
+		LOGGER.trace("New roles are: {}", getRoles());
+	}
+
+	/**
+	 * Return the list of roles for all users.
+	 */
+	public static List<UserRole> getRoles() {
+		return (userRoles == null ? null : userRoles.roles);
+	}
+
+	/**
+	 * Check access for user to the role.
+	 *
+	 * @param userInfo user info.
+	 * @param type     the type of role.
+	 * @param name     the name of role.
+	 * @return boolean value
+	 */
+	public static boolean checkAccess(UserInfo userInfo, RoleType type, String name) {
+		return checkAccess(userInfo, type, name, true);
+	}
+
+	public static boolean isAdmin(UserInfo userInfo) {
+		final List<UserRole> roles = UserRoles.getRoles();
+		return roles == null || roles.stream().anyMatch(r -> ADMIN_ROLE_NAME.equals(r.getId()) &&
+				(userRoles.hasAccessByGroup(userInfo, r) || userRoles.hasAccessByUserName(userInfo, r)));
+	}
+
+	/**
+	 * Check access for user to the role.
+	 *
+	 * @param userInfo user info.
+	 * @param type     the type of role.
+	 * @param name     the name of role.
+	 * @return boolean value
+	 */
+	public static boolean checkAccess(UserInfo userInfo, RoleType type, String name, boolean useDefault) {
+		return (userRoles == null || userRoles.hasAccess(userInfo, type, name, useDefault));
+	}
+
+	/**
+	 * Loading the user roles for all users from Mongo database.
+	 *
+	 * @param dao security DAO.
+	 */
+	private synchronized void load(SecurityDAO dao, boolean defaultAccess) {
+		this.defaultAccess = defaultAccess;
+		try {
+			FindIterable<Document> docs = dao.getRoles();
+			roles = new ArrayList<>();
+			for (Document d : docs) {
+				Set<String> groups = getAndRemoveSet(d, GROUPS);
+				Set<String> users = getAndRemoveSet(d, USERS);
+				String id = d.getString("_id");
+				for (RoleType type : RoleType.values()) {
+					@SuppressWarnings("unchecked")
+					List<String> names = d.get(type.getNodeName(), ArrayList.class);
+					if (names != null) {
+						for (String name : names) {
+							append(type, name, groups, users, id);
+						}
+					}
+				}
+			}
+			userGroups = dao.getGroups();
+		} catch (Exception e) {
+			throw new DlabException("Cannot load roles from database. " + e.getLocalizedMessage(), e);
+		}
+	}
+
+	/**
+	 * Append new role to the list if role not exists in list an return it, otherwise return
+	 * existence role.
+	 *
+	 * @param type   type of role.
+	 * @param name   the name of role.
+	 * @param groups the names of external groups.
+	 * @param users  the name of DLab's users.
+	 * @param id
+	 * @return role.
+	 */
+	private UserRole append(RoleType type, String name, Set<String> groups, Set<String> users, String id) {
+		UserRole item = new UserRole(id, type, name, groups, users);
+		synchronized (roles) {
+			int index = Collections.binarySearch(roles, item);
+			if (index < 0) {
+				index = -index;
+				if (index > roles.size()) {
+					roles.add(item);
+				} else {
+					roles.add(index - 1, item);
+				}
+			}
+		}
+		return item;
+	}
+
+	/**
+	 * Find and return role by type and name.
+	 *
+	 * @param type type of role.
+	 * @param name the name of role.
+	 */
+	private UserRole get(RoleType type, String name) {
+		UserRole item = new UserRole(type, name, null, null);
+		synchronized (roles) {
+			int i = Collections.binarySearch(roles, item);
+			return (i < 0 ? null : roles.get(i));
+		}
+	}
+
+	/**
+	 * Find and return a list by key from JSON document, otherwise return <b>null</b>.
+	 *
+	 * @param document the document.
+	 * @param key      the name of node.
+	 */
+	private Set<String> getAndRemoveSet(Document document, String key) {
+		Object o = document.get(key);
+		if (!(o instanceof ArrayList)) {
+			return Collections.emptySet();
+		}
+
+		@SuppressWarnings("unchecked")
+		List<String> list = (List<String>) o;
+		if (list.isEmpty()) {
+			return Collections.emptySet();
+		}
+
+		Set<String> set = new HashSet<>();
+		for (String value : list) {
+			set.add(value.toLowerCase());
+		}
+		document.remove(key);
+		return set;
+	}
+
+	/**
+	 * Check access for user to the role.
+	 *
+	 * @param userInfo   user info.
+	 * @param type       the type of role.
+	 * @param name       the name of role.
+	 * @param useDefault true/false
+	 * @return boolean value
+	 */
+	private boolean hasAccess(UserInfo userInfo, RoleType type, String name, boolean useDefault) {
+		if (userRoles == null) {
+			return true;
+		}
+		LOGGER.trace("Check access for user {} with groups {} to {}/{}", userInfo.getName(), userInfo.getRoles(),
+				type, name);
+		UserRole role = get(type, name);
+		if (role == null) {
+			return checkDefault(useDefault);
+		}
+		if (hasAccessByGroup(userInfo, role)) return true;
+		LOGGER.trace("Access denied for user {} to {}/{}", userInfo.getName(), type, name);
+		return false;
+	}
+
+	private boolean hasAccessByGroup(UserInfo userInfo, UserRole role) {
+		Set<String> groups = role.getGroups();
+		if (groups != null) {
+			if (groups.contains(ANY_USER)) {
+				return true;
+			}
+			for (String group : userInfo.getRoles()) {
+				if (group != null && groups.contains(group.toLowerCase())) {
+					LOGGER.trace("Got access by group {}", group);
+					return true;
+				}
+			}
+
+			final Optional<String> group = role.getGroups()
+					.stream()
+					.filter(g -> userGroups.getOrDefault(g, Collections.emptySet()).contains(userInfo.getName()))
+					.findAny();
+			if (group.isPresent()) {
+				LOGGER.trace("Got access by local group {}", group.get());
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private boolean hasAccessByUserName(UserInfo userInfo, UserRole role) {
+		if (role.getUsers() != null &&
+				userInfo.getName() != null &&
+				(role.getUsers().contains(ANY_USER) ||
+						role.getUsers().contains(userInfo.getName().toLowerCase()))) {
+			LOGGER.trace("Got access by name");
+			return true;
+		}
+		return false;
+	}
+
+	private boolean checkDefault(boolean useDefault) {
+		if (useDefault) {
+			LOGGER.trace("Got default access {}", defaultAccess);
+			return defaultAccess;
+		} else {
+			return false;
+		}
+	}
+
+	@Override
+	public String toString() {
+		return MoreObjects.toStringHelper(roles)
+				.addValue(roles)
+				.toString();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckApplicationQuoteScheduler.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckApplicationQuoteScheduler.java
new file mode 100644
index 0000000..bca047c
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckApplicationQuoteScheduler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.schedulers;
+
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
+import com.epam.dlab.backendapi.service.EnvironmentService;
+import com.google.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+
+@Scheduled("checkQuoteScheduler")
+@Slf4j
+public class CheckApplicationQuoteScheduler implements Job {
+	@Inject
+	private BillingDAO billingDAO;
+	@Inject
+	private EnvironmentService environmentService;
+
+	@Override
+	public void execute(JobExecutionContext context) {
+		if (billingDAO.isBillingQuoteReached()) {
+			log.warn("Stopping all environments because of reaching budget quote");
+			environmentService.stopAll();
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckInactivityScheduledJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckInactivityScheduledJob.java
new file mode 100644
index 0000000..05c2b77
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckInactivityScheduledJob.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.schedulers;
+
+import com.epam.dlab.auth.SystemUserInfoService;
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
+import com.epam.dlab.backendapi.service.SchedulerJobService;
+import com.google.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+
+/**
+ * There realized integration with Quartz scheduler framework and defined check cluster inactivity scheduler job which
+ * executes every time specified. If in 'self-service.yml' option 'clusterInactivityCheckerEnabled' equals 'true' then
+ * this job we be executing every time predefined in option 'clusterInactivityCheckingTimeout'. Otherwise, it will
+ * never execute.
+ */
+@Slf4j
+@Scheduled("inactivity")
+public class CheckInactivityScheduledJob implements Job {
+
+	private static final String SCHEDULER_USER = "scheduler_user";
+
+	@Inject
+	private SchedulerJobService schedulerJobService;
+
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
+
+	@Override
+	public void execute(JobExecutionContext context) {
+		UserInfo userInfo = systemUserInfoService.create(SCHEDULER_USER);
+		log.info("Starting check inactivity cluster job on behalf of {}...", SCHEDULER_USER);
+		schedulerJobService.updateRunningResourcesLastActivity(userInfo);
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java
new file mode 100644
index 0000000..ce3b009
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.schedulers;
+
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
+import com.epam.dlab.backendapi.service.EnvironmentService;
+import com.google.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+
+@Scheduled("checkUserQuoteScheduler")
+@Slf4j
+public class CheckUserQuoteScheduler implements Job {
+
+	@Inject
+	private BillingDAO billingDAO;
+	@Inject
+	private EnvironmentService environmentService;
+
+	@Override
+	public void execute(JobExecutionContext context) {
+		environmentService.getUsers()
+				.stream()
+				.map(UserDTO::getName)
+				.filter(billingDAO::isUserQuoteReached)
+				.peek(u -> log.warn("Stopping {} user env because of reaching user billing quote", u))
+				.forEach(environmentService::stopEnvironment);
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StartComputationalJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StartComputationalJob.java
index 53e4577..5a6eb11 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StartComputationalJob.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StartComputationalJob.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.schedulers.computational;
 
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
 import com.epam.dlab.backendapi.service.SchedulerJobService;
-import com.fiestacabin.dropwizard.quartz.Scheduled;
 import com.google.inject.Inject;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.Job;
@@ -28,7 +31,7 @@
  * which executes every time specified.
  */
 @Slf4j
-@Scheduled(interval = 10)
+@Scheduled("startComputationalScheduler")
 public class StartComputationalJob implements Job {
 
 	@Inject
@@ -36,6 +39,6 @@
 
 	@Override
 	public void execute(JobExecutionContext jobExecutionContext) {
-		schedulerJobService.executeStartResourceJob(true);
+		schedulerJobService.startComputationalByScheduler();
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StopComputationalJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StopComputationalJob.java
index 51b1f3c..95a7098 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StopComputationalJob.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/StopComputationalJob.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.schedulers.computational;
 
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
 import com.epam.dlab.backendapi.service.SchedulerJobService;
-import com.fiestacabin.dropwizard.quartz.Scheduled;
 import com.google.inject.Inject;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.Job;
@@ -28,7 +31,7 @@
  * which executes every time specified.
  */
 @Slf4j
-@Scheduled(interval = 10)
+@Scheduled("stopComputationalScheduler")
 public class StopComputationalJob implements Job {
 
 	@Inject
@@ -36,6 +39,6 @@
 
 	@Override
 	public void execute(JobExecutionContext jobExecutionContext) {
-		schedulerJobService.executeStopResourceJob(true);
+		schedulerJobService.stopComputationalByScheduler();
 	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/TerminateComputationalJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/TerminateComputationalJob.java
deleted file mode 100644
index a746e59..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/computational/TerminateComputationalJob.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2018, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.backendapi.schedulers.computational;
-
-import com.epam.dlab.backendapi.service.SchedulerJobService;
-import com.fiestacabin.dropwizard.quartz.Scheduled;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-
-/**
- * There realized integration with Quartz scheduler framework and defined terminate computational resource scheduler
- * job which executes every time specified.
- */
-@Slf4j
-@Scheduled(interval = 10)
-public class TerminateComputationalJob implements Job {
-
-	@Inject
-	private SchedulerJobService schedulerJobService;
-
-	@Override
-	public void execute(JobExecutionContext jobExecutionContext) {
-		schedulerJobService.executeTerminateResourceJob(true);
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StartExploratoryJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StartExploratoryJob.java
index e7c72b2..63fbee3 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StartExploratoryJob.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StartExploratoryJob.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.schedulers.exploratory;
 
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
 import com.epam.dlab.backendapi.service.SchedulerJobService;
-import com.fiestacabin.dropwizard.quartz.Scheduled;
 import com.google.inject.Inject;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.Job;
@@ -28,7 +31,7 @@
  * executes every time specified.
  */
 @Slf4j
-@Scheduled(interval = 10)
+@Scheduled("startExploratoryScheduler")
 public class StartExploratoryJob implements Job {
 
 	@Inject
@@ -36,7 +39,7 @@
 
 	@Override
 	public void execute(JobExecutionContext jobExecutionContext) {
-		schedulerJobService.executeStartResourceJob(false);
+		schedulerJobService.startExploratoryByScheduler();
 	}
 
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StopExploratoryJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StopExploratoryJob.java
index 5048bc9..576a85e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StopExploratoryJob.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/StopExploratoryJob.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.schedulers.exploratory;
 
+import com.epam.dlab.backendapi.schedulers.internal.Scheduled;
 import com.epam.dlab.backendapi.service.SchedulerJobService;
-import com.fiestacabin.dropwizard.quartz.Scheduled;
 import com.google.inject.Inject;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.Job;
@@ -28,7 +31,7 @@
  * executes every time specified.
  */
 @Slf4j
-@Scheduled(interval = 10)
+@Scheduled("stopExploratoryScheduler")
 public class StopExploratoryJob implements Job {
 
 	@Inject
@@ -36,7 +39,7 @@
 
 	@Override
 	public void execute(JobExecutionContext jobExecutionContext) {
-		schedulerJobService.executeStopResourceJob(false);
+		schedulerJobService.stopExploratoryByScheduler();
 	}
 
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/TerminateExploratoryJob.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/TerminateExploratoryJob.java
deleted file mode 100644
index 2ca4c7d..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/exploratory/TerminateExploratoryJob.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.backendapi.schedulers.exploratory;
-
-import com.epam.dlab.backendapi.service.SchedulerJobService;
-import com.fiestacabin.dropwizard.quartz.Scheduled;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-
-/**
- * There realized integration with Quartz scheduler framework and defined terminate exploratory scheduler job which
- * executes every time specified.
- */
-@Slf4j
-@Scheduled(interval = 10)
-public class TerminateExploratoryJob implements Job {
-	@Inject
-	private SchedulerJobService schedulerJobService;
-
-	@Override
-	public void execute(JobExecutionContext jobExecutionContext) {
-		schedulerJobService.executeTerminateResourceJob(false);
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/internal/ManagedScheduler.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/internal/ManagedScheduler.java
new file mode 100644
index 0000000..c164d90
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/internal/ManagedScheduler.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.schedulers.internal;
+
+import com.epam.dlab.backendapi.SelfServiceApplication;
+import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.domain.SchedulerConfigurationData;
+import com.epam.dlab.exceptions.DlabException;
+import com.fiestacabin.dropwizard.quartz.GuiceJobFactory;
+import com.google.inject.Inject;
+import io.dropwizard.lifecycle.Managed;
+import lombok.extern.slf4j.Slf4j;
+import org.quartz.*;
+import org.reflections.Reflections;
+import org.reflections.scanners.SubTypesScanner;
+
+import java.util.Optional;
+
+import static org.quartz.JobBuilder.newJob;
+import static org.quartz.TriggerBuilder.newTrigger;
+
+@Slf4j
+public class ManagedScheduler implements Managed {
+	private final Scheduler scheduler;
+	private final GuiceJobFactory jobFactory;
+	private final SelfServiceApplicationConfiguration config;
+
+	@Inject
+	public ManagedScheduler(Scheduler scheduler, GuiceJobFactory jobFactory,
+							SelfServiceApplicationConfiguration config) {
+		this.scheduler = scheduler;
+		this.jobFactory = jobFactory;
+		this.config = config;
+	}
+
+	@Override
+	public void start() throws Exception {
+		scheduler.setJobFactory(jobFactory);
+		scheduler.start();
+
+		new Reflections(SelfServiceApplication.class.getPackage().getName(), new SubTypesScanner())
+				.getSubTypesOf(Job.class)
+				.forEach(scheduledClass ->
+						Optional.ofNullable(scheduledClass.getAnnotation(Scheduled.class))
+								.filter(this::triggerNotExist)
+								.ifPresent(scheduleAnn -> schedule(scheduledClass, scheduleAnn)));
+
+	}
+
+	@Override
+	public void stop() throws Exception {
+		scheduler.shutdown();
+	}
+
+	private Trigger getTrigger(SchedulerConfigurationData schedulerConfig, String schedulerName) {
+		return newTrigger()
+				.withIdentity(schedulerName)
+				.withSchedule(CronScheduleBuilder.cronSchedule(schedulerConfig.getCron()))
+				.startNow()
+				.build();
+	}
+
+	private void schedule(Class<? extends Job> scheduledClass, Scheduled scheduleAnn) {
+		final String schedulerName = scheduleAnn.value();
+		final SchedulerConfigurationData schedulerConfig =
+				Optional.ofNullable(config.getSchedulers().get(schedulerName)).orElseThrow(() -> new IllegalStateException(
+						"There is no configuration provided for scheduler with name " + schedulerName));
+		if (schedulerConfig.isEnabled()) {
+			scheduleJob(newJob(scheduledClass).build(), schedulerConfig, scheduleAnn.value());
+		}
+	}
+
+	private void scheduleJob(JobDetail job, SchedulerConfigurationData schedulerConfig, String schedulerName) {
+		try {
+			final Trigger trigger = getTrigger(schedulerConfig, schedulerName);
+			scheduler.scheduleJob(job, trigger);
+			log.info("Scheduled job {} with trigger {}", job, trigger);
+		} catch (SchedulerException e) {
+			log.error("Can't schedule job due to: {}", e.getMessage());
+			throw new DlabException("Can't schedule job due to: " + e.getMessage(), e);
+		}
+	}
+
+	private boolean triggerNotExist(Scheduled scheduled) {
+		try {
+			return !scheduler.checkExists(new TriggerKey(scheduled.value()));
+		} catch (SchedulerException e) {
+			log.error("Can not check if trigger exist due to: {}", e.getMessage());
+			throw new DlabException("Can not check if trigger exist due to: {}" + e.getMessage(), e);
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/internal/Scheduled.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/internal/Scheduled.java
new file mode 100644
index 0000000..50fca1c
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/internal/Scheduled.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.schedulers.internal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation is used as alternative to {@link com.fiestacabin.dropwizard.quartz.Scheduled}
+ * and allow to use scheduler configuration from application config
+ * }
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Scheduled {
+	/**
+	 * @return scheduler name
+	 */
+	String value();
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java
index 1f6224e..dfb516e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ApplicationSettingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ApplicationSettingService.java
new file mode 100644
index 0000000..5a434b5
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ApplicationSettingService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service;
+
+import java.util.Map;
+
+public interface ApplicationSettingService {
+
+	void removeMaxBudget();
+
+	void setMaxBudget(Long maxBudget);
+
+	Map<String, Object> getSettings();
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ApplicationSettingServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ApplicationSettingServiceImpl.java
new file mode 100644
index 0000000..fcdd28a
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ApplicationSettingServiceImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service;
+import com.epam.dlab.backendapi.dao.MongoSetting;
+import com.epam.dlab.backendapi.dao.SettingsDAO;
+import com.google.inject.Inject;
+
+import java.util.Map;
+
+public class ApplicationSettingServiceImpl implements ApplicationSettingService {
+	@Inject
+	private SettingsDAO settingsDAO;
+
+	@Override
+	public void removeMaxBudget() {
+		settingsDAO.removeSetting(MongoSetting.CONF_MAX_BUDGET);
+	}
+
+	@Override
+	public void setMaxBudget(Long maxBudget) {
+		settingsDAO.setMaxBudget(maxBudget);
+	}
+
+	@Override
+	public Map<String, Object> getSettings() {
+		return settingsDAO.getSettings();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BackupService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BackupService.java
index 6d48a76..af8f0c1 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BackupService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BackupService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BillingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BillingService.java
index 6c2610a..4ed8c7f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BillingService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/BillingService.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.dao.BaseBillingDAO;
 import com.epam.dlab.backendapi.util.CSVFormatter;
 import com.epam.dlab.exceptions.DlabException;
 import jersey.repackaged.com.google.common.collect.Lists;
@@ -39,11 +42,11 @@
             StringBuilder builder = new StringBuilder(CSVFormatter.formatLine(Lists.newArrayList(getFirstLine(document)),
                     CSVFormatter.SEPARATOR, '\"'));
 
-            Boolean full = (Boolean) document.get(BillingDAO.FULL_REPORT);
+            Boolean full = (Boolean) document.get(BaseBillingDAO.FULL_REPORT);
             builder.append(getHeaders(full));
 
             @SuppressWarnings("unchecked")
-            List<Document> items = (List<Document>) document.get(BillingDAO.ITEMS);
+            List<Document> items = (List<Document>) document.get(BaseBillingDAO.ITEMS);
 
             items.forEach(d -> builder.append(getLine(full, d)));
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ComputationalService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ComputationalService.java
index b351183..1be1be5 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ComputationalService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ComputationalService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
@@ -20,6 +23,7 @@
 import com.epam.dlab.backendapi.resources.dto.ComputationalCreateFormDTO;
 import com.epam.dlab.backendapi.resources.dto.SparkStandaloneClusterCreateForm;
 import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 
@@ -46,7 +50,7 @@
 	 *                          <code>computationalName</code>
 	 * @param computationalName computational name
 	 */
-	void terminateComputationalEnvironment(UserInfo userInfo, String exploratoryName, String computationalName);
+	void terminateComputational(UserInfo userInfo, String exploratoryName, String computationalName);
 
 	boolean createDataEngineService(UserInfo userInfo, ComputationalCreateFormDTO formDTO, UserComputationalResource
 			computationalResource);
@@ -55,6 +59,9 @@
 
 	void startSparkCluster(UserInfo userInfo, String exploratoryName, String computationalName);
 
+	void updateSparkClusterConfig(UserInfo userInfo, String exploratoryName, String computationalName,
+								  List<ClusterConfig> config);
+
 	void updateComputationalsReuploadKeyFlag(String user, List<UserInstanceStatus> exploratoryStatuses,
 											 List<DataEngineType> computationalTypes,
 											 boolean reuploadKeyRequired,
@@ -62,4 +69,6 @@
 
 	Optional<UserComputationalResource> getComputationalResource(String user, String exploratoryName,
 																 String computationalName);
+
+	List<ClusterConfig> getClusterConfig(UserInfo userInfo, String exploratoryName, String computationalName);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java
index 0ea97ad..5fcd194 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java
index 7c8ac06..cb9371d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
 import com.epam.dlab.backendapi.resources.dto.UserResourceInfo;
 
 import java.util.List;
@@ -23,9 +27,9 @@
 
 public interface EnvironmentService {
 
-	Set<String> getAllUsers();
+	Set<String> getUserNames();
 
-	Set<String> getActiveUsers();
+	List<UserDTO> getUsers();
 
 	List<UserResourceInfo> getAllEnv();
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
index aea7603..be83ca7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
@@ -1,26 +1,30 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.UserInstanceDTO;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
+import com.epam.dlab.model.exploratory.Exploratory;
 
 import java.util.List;
 import java.util.Optional;
@@ -43,5 +47,9 @@
 	List<UserInstanceDTO> getInstancesWithStatuses(String user, UserInstanceStatus exploratoryStatus,
 												   UserInstanceStatus computationalStatus);
 
+	void updateClusterConfig(UserInfo userInfo, String exploratoryName, List<ClusterConfig> config);
+
 	Optional<UserInstanceDTO> getUserInstance(String user, String exploratoryName);
+
+	List<ClusterConfig> getClusterConfig(UserInfo user, String exploratoryName);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExternalLibraryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExternalLibraryService.java
index 79666dc..9298c5c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExternalLibraryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExternalLibraryService.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/GitCredentialService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/GitCredentialService.java
index 674ca70..2df8ee4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/GitCredentialService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/GitCredentialService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ImageExploratoryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ImageExploratoryService.java
index 83210d7..a38a992 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ImageExploratoryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ImageExploratoryService.java
@@ -1,24 +1,27 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.resources.dto.ImageInfoRecord;
-import com.epam.dlab.model.exloratory.Image;
+import com.epam.dlab.model.exploratory.Image;
 
 import java.util.List;
 
@@ -28,7 +31,7 @@
 
 	void finishImageCreate(Image image, String exploratoryName, String newNotebookIp);
 
-	List<ImageInfoRecord> getCreatedImages(String user, String dockerImage);
+	List<ImageInfoRecord> getNotFailedImages(String user, String dockerImage);
 
 	ImageInfoRecord getImage(String user, String name);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InactivityService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InactivityService.java
new file mode 100644
index 0000000..73ff193
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InactivityService.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.dto.status.EnvResource;
+
+import java.util.List;
+
+public interface InactivityService {
+
+	void updateRunningResourcesLastActivity(UserInfo userInfo);
+
+	void stopClustersByInactivity(List<String> computationalIds);
+
+	void updateLastActivityForClusters(List<EnvResource> clusters);
+
+
+	void stopByInactivity(List<EnvResource> exploratories);
+
+	void updateLastActivity(List<EnvResource> exploratories);
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
index a0d192a..a3e08d2 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureTemplateService.java
index b0215c1..75d2b2b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureTemplateService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureTemplateService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/LibraryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/LibraryService.java
index 84fadbf..5b98293 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/LibraryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/LibraryService.java
@@ -1,25 +1,27 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.resources.dto.LibInfoRecord;
-import com.epam.dlab.backendapi.resources.dto.LibInstallFormDTO;
-import com.epam.dlab.dto.exploratory.LibraryInstallDTO;
+import com.epam.dlab.dto.exploratory.LibInstallDTO;
 import org.bson.Document;
 
 import java.util.List;
@@ -29,11 +31,8 @@
 
 	List<LibInfoRecord> getLibInfo(String user, String exploratoryName);
 
-	LibraryInstallDTO generateLibraryInstallDTO(UserInfo userInfo, LibInstallFormDTO formDTO);
+	String installComputationalLibs(UserInfo userInfo, String exploratoryName, String computationalName,
+									List<LibInstallDTO> libs);
 
-	LibraryInstallDTO prepareExploratoryLibInstallation(String username, LibInstallFormDTO formDTO,
-														LibraryInstallDTO dto);
-
-	LibraryInstallDTO prepareComputationalLibInstallation(String username, LibInstallFormDTO formDTO,
-														  LibraryInstallDTO dto);
+	String installExploratoryLibs(UserInfo userInfo, String exploratoryName, List<LibInstallDTO> libs);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
index 9f09f5f..88f1e9e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SchedulerJobService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SchedulerJobService.java
index baeba4d..5fdbdd2 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SchedulerJobService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SchedulerJobService.java
@@ -1,22 +1,29 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service;
 
+import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.dto.SchedulerJobDTO;
+import com.epam.dlab.model.scheduler.SchedulerJobData;
+
+import java.util.List;
 
 public interface SchedulerJobService {
 	/**
@@ -61,27 +68,26 @@
 	void updateComputationalSchedulerData(String user, String exploratoryName,
 										  String computationalName, SchedulerJobDTO dto);
 
-	/**
-	 * Executes start scheduler job for corresponding exploratories ('isAppliedForClusters' equals 'false') or
-	 * computational resources ('isAppliedForClusters' equals 'true').
-	 *
-	 * @param isAppliedForClusters true/false
-	 */
-	void executeStartResourceJob(boolean isAppliedForClusters);
+	void stopComputationalByScheduler();
+
+	void stopExploratoryByScheduler();
+
+	void startExploratoryByScheduler();
+
+	void startComputationalByScheduler();
+
+	void terminateExploratoryByScheduler();
+
+	void terminateComputationalByScheduler();
 
 	/**
-	 * Executes stop scheduler job for corresponding exploratories ('isAppliedForClusters' equals 'false') or
-	 * computational resources ('isAppliedForClusters' equals 'true').
-	 *
-	 * @param isAppliedForClusters true/false
+	 * Executes check cluster inactivity job for all running resources.
 	 */
-	void executeStopResourceJob(boolean isAppliedForClusters);
+	void updateRunningResourcesLastActivity(UserInfo userInfo);
 
-	/**
-	 * Executes terminate scheduler job for corresponding exploratories ('isAppliedForClusters' equals 'false') or
-	 * computational resources ('isAppliedForClusters' equals 'true').
-	 *
-	 * @param isAppliedForClusters true/false
-	 */
-	void executeTerminateResourceJob(boolean isAppliedForClusters);
+	void removeScheduler(String user, String exploratoryName);
+
+	void removeScheduler(String user, String exploratoryName, String computationalName);
+
+	List<SchedulerJobData> getActiveSchedulers(String user, long timeOffset);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SystemInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SystemInfoService.java
new file mode 100644
index 0000000..b3802ce
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SystemInfoService.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.resources.dto.SystemInfoDto;
+
+public interface SystemInfoService {
+
+	SystemInfoDto getSystemInfo();
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserGroupService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserGroupService.java
new file mode 100644
index 0000000..e9e3e47
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserGroupService.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
+
+import java.util.List;
+import java.util.Set;
+
+public interface UserGroupService {
+
+	void createGroup(String group, Set<String> roleIds, Set<String> users);
+	void updateGroup(String group, Set<String> roleIds, Set<String> users);
+
+	void addUsersToGroup(String group, Set<String> users);
+
+	void updateRolesForGroup(String group, Set<String> roleIds);
+
+	void removeUserFromGroup(String group, String user);
+
+	void removeGroupFromRole(Set<String> groups, Set<String> roleIds);
+
+	void removeGroup(String groupId);
+
+	List<UserGroupDto> getAggregatedRolesByGroup();
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java
index cf61377..972e78f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserRoleService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserRoleService.java
new file mode 100644
index 0000000..0b22b1d
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserRoleService.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+
+import java.util.List;
+
+public interface UserRoleService {
+
+	List<UserRoleDto> getUserRoles();
+
+	void createRole(UserRoleDto dto);
+
+	void updateRole(UserRoleDto dto);
+
+	void removeRole(String roleId);
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserRoleServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserRoleServiceImpl.java
new file mode 100644
index 0000000..ce9462f
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserRoleServiceImpl.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.dao.UserRoleDao;
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+@Singleton
+public class UserRoleServiceImpl implements UserRoleService {
+	private static final String ROLE_NOT_FOUND_MSG = "Any of role : %s were not found";
+	@Inject
+	private UserRoleDao userRoleDao;
+
+	@Override
+	public List<UserRoleDto> getUserRoles() {
+		return userRoleDao.findAll();
+	}
+
+	@Override
+	public void createRole(UserRoleDto dto) {
+		userRoleDao.insert(dto);
+	}
+
+	@Override
+	public void updateRole(UserRoleDto dto) {
+		checkAnyRoleFound(Collections.singleton(dto.getId()), userRoleDao.update(dto));
+	}
+
+	@Override
+	public void removeRole(String roleId) {
+		userRoleDao.remove(roleId);
+	}
+
+	private void checkAnyRoleFound(Set<String> roleIds, boolean anyRoleFound) {
+		if (!anyRoleFound) {
+			throw new ResourceNotFoundException(String.format(ROLE_NOT_FOUND_MSG, roleIds));
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserSettingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserSettingService.java
new file mode 100644
index 0000000..5aae379
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserSettingService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+
+import java.util.List;
+
+public interface UserSettingService {
+
+	void saveUISettings(UserInfo userInfo, String settings);
+
+	String getUISettings(UserInfo userInfo);
+
+	void updateUsersBudget(List<UserDTO> budgets);
+
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserSettingServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserSettingServiceImpl.java
new file mode 100644
index 0000000..296cd17
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserSettingServiceImpl.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.UserSettingsDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+import java.util.List;
+
+@Singleton
+public class UserSettingServiceImpl implements UserSettingService {
+	@Inject
+	private UserSettingsDAO settingsDAO;
+
+	@Override
+	public void saveUISettings(UserInfo userInfo, String settings) {
+		settingsDAO.setUISettings(userInfo, settings);
+	}
+
+	@Override
+	public String getUISettings(UserInfo userInfo) {
+		return settingsDAO.getUISettings(userInfo);
+	}
+
+	@Override
+	public void updateUsersBudget(List<UserDTO> budgets) {
+		budgets.forEach(settingsDAO::updateBudget);
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java
index bf0a160..0668ecf 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.aws;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.aws.AwsBillingFilter;
 import com.epam.dlab.backendapi.service.BillingService;
@@ -38,7 +42,7 @@
 public class AwsBillingService implements BillingService<AwsBillingFilter> {
 
 	@Inject
-	private AwsBillingDAO billingDAO;
+	private BillingDAO billingDAO;
 
 	@Override
 	public Document getReport(UserInfo userInfo, AwsBillingFilter filter) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java
index 7bcf926..43335cc 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.aws;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java
index f37bc9d..7e03083 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.aws;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureBillingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureBillingService.java
index 9b73c79..69b37c8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureBillingService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureBillingService.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.azure;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.BaseBillingDAO;
 import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.azure.AzureBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.azure.AzureBillingFilter;
@@ -39,7 +43,7 @@
 public class AzureBillingService implements BillingService<AzureBillingFilter> {
 
     @Inject
-    private AzureBillingDAO billingDAO;
+    private BillingDAO billingDAO;
 
     @Override
     public Document getReport(UserInfo userInfo, AzureBillingFilter filter) {
@@ -70,7 +74,7 @@
 
         return String.format("Service base name: %s  " +
                         "Available reporting period from: %s to: %s",
-                document.get(BillingDAO.SERVICE_BASE_NAME),
+                document.get(BaseBillingDAO.SERVICE_BASE_NAME),
                 to.format(from.parse((String) document.get(MongoKeyWords.USAGE_FROM))),
                 to.format(from.parse((String) document.get(MongoKeyWords.USAGE_TO))));
     }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java
index ed4dcde..6338152 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.azure;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java
index 8d6ae41..595ae2e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.azure;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java
index f4b4154..c517486 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.gcp;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java
index e56d97e..30ecb2f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.gcp;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java
index 86f6027..7759013 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java
@@ -1,23 +1,27 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.AccessKeyService;
@@ -75,6 +79,7 @@
 		}
 	}
 
+	@BudgetLimited
 	@Override
 	public String uploadKey(UserInfo user, String keyContent, boolean isPrimaryUploading) {
 		log.debug(isPrimaryUploading ? "The key uploading and EDGE node creating for user {} is starting..." :
@@ -92,6 +97,7 @@
 		}
 	}
 
+	@BudgetLimited
 	@Override
 	public String recoverEdge(UserInfo userInfo) {
 		log.debug("Recreating edge node for user {}", userInfo.getName());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BackupServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BackupServiceImpl.java
index 763cf70..b50b0ae 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BackupServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BackupServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImpl.java
index b680268..70f68f4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImpl.java
@@ -1,24 +1,27 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.domain.RequestId;
@@ -29,13 +32,12 @@
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
-import com.epam.dlab.dto.computational.ComputationalStatusDTO;
-import com.epam.dlab.dto.computational.ComputationalTerminateDTO;
-import com.epam.dlab.dto.computational.SparkStandaloneClusterResource;
-import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.computational.*;
 import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.exceptions.ResourceNotFoundException;
 import com.epam.dlab.rest.client.RESTService;
 import com.epam.dlab.rest.contracts.ComputationalAPI;
 import com.google.inject.Inject;
@@ -43,10 +45,13 @@
 import com.google.inject.name.Named;
 import lombok.extern.slf4j.Slf4j;
 
+import java.util.EnumMap;
 import java.util.List;
 import java.util.Optional;
 
 import static com.epam.dlab.dto.UserInstanceStatus.*;
+import static com.epam.dlab.dto.base.DataEngineType.CLOUD_SERVICE;
+import static com.epam.dlab.dto.base.DataEngineType.SPARK_STANDALONE;
 import static com.epam.dlab.rest.contracts.ComputationalAPI.COMPUTATIONAL_CREATE_CLOUD_SPECIFIC;
 
 @Singleton
@@ -55,7 +60,16 @@
 
 	private static final String COULD_NOT_UPDATE_THE_STATUS_MSG_FORMAT = "Could not update the status of " +
 			"computational resource {} for user {}";
-	private static final String OP_NOT_SUPPORTED_DES = "Operation for data engine service is not supported";
+	private static final EnumMap<DataEngineType, String> DATA_ENGINE_TYPE_TERMINATE_URLS;
+	private static final String DATAENGINE_NOT_PRESENT_FORMAT = "There is no %s dataengine %s for exploratory %s";
+	private static final String RUNNING_COMP_RES_NOT_FOUND = "Running computational resource with " +
+			"name %s for exploratory %s not found";
+
+	static {
+		DATA_ENGINE_TYPE_TERMINATE_URLS = new EnumMap<>(DataEngineType.class);
+		DATA_ENGINE_TYPE_TERMINATE_URLS.put(SPARK_STANDALONE, ComputationalAPI.COMPUTATIONAL_TERMINATE_SPARK);
+		DATA_ENGINE_TYPE_TERMINATE_URLS.put(CLOUD_SERVICE, ComputationalAPI.COMPUTATIONAL_TERMINATE_CLOUD_SPECIFIC);
+	}
 
 	@Inject
 	private ExploratoryDAO exploratoryDAO;
@@ -68,20 +82,16 @@
 	private RESTService provisioningService;
 
 	@Inject
-	private SelfServiceApplicationConfiguration configuration;
-
-	@Inject
 	private RequestBuilder requestBuilder;
 
 	@Inject
 	private RequestId requestId;
 
 
+	@BudgetLimited
 	@Override
 	public boolean createSparkCluster(UserInfo userInfo, SparkStandaloneClusterCreateForm form) {
 
-		validateForm(form);
-
 		if (computationalDAO.addComputational(userInfo.getName(), form.getNotebookName(),
 				createInitialComputationalResource(form))) {
 
@@ -111,22 +121,22 @@
 	}
 
 	@Override
-	public void terminateComputationalEnvironment(UserInfo userInfo, String exploratoryName, String
-			computationalName) {
+	public void terminateComputational(UserInfo userInfo, String exploratoryName, String computationalName) {
 		try {
 
 			updateComputationalStatus(userInfo.getName(), exploratoryName, computationalName, TERMINATING);
 
 			String exploratoryId = exploratoryDAO.fetchExploratoryId(userInfo.getName(), exploratoryName);
-			UserComputationalResource computationalResource = computationalDAO.fetchComputationalFields(userInfo
+			UserComputationalResource compResource = computationalDAO.fetchComputationalFields(userInfo
 					.getName(), exploratoryName, computationalName);
 
+			final DataEngineType dataEngineType = compResource.getDataEngineType();
 			ComputationalTerminateDTO dto = requestBuilder.newComputationalTerminate(userInfo, exploratoryName,
-					exploratoryId, computationalName, computationalResource.getComputationalId(),
-					DataEngineType.fromDockerImageName(computationalResource.getImageName()));
+					exploratoryId, computationalName, compResource.getComputationalId(), dataEngineType);
 
-			String uuid = provisioningService.post(getTerminateUrl(computationalResource), userInfo.getAccessToken(),
-					dto, String.class);
+			final String provisioningUrl = Optional.ofNullable(DATA_ENGINE_TYPE_TERMINATE_URLS.get(dataEngineType))
+					.orElseThrow(UnsupportedOperationException::new);
+			String uuid = provisioningService.post(provisioningUrl, userInfo.getAccessToken(), dto, String.class);
 			requestId.put(userInfo.getName(), uuid);
 		} catch (RuntimeException re) {
 
@@ -140,6 +150,7 @@
 		}
 	}
 
+	@BudgetLimited
 	@Override
 	public boolean createDataEngineService(UserInfo userInfo, ComputationalCreateFormDTO formDTO,
 										   UserComputationalResource computationalResource) {
@@ -172,14 +183,68 @@
 	}
 
 	@Override
-	public void stopSparkCluster(UserInfo userInfo, String exploratoryName, String computationalName) {
-		sparkAction(userInfo, exploratoryName, computationalName, STOPPING, ComputationalAPI.COMPUTATIONAL_STOP_SPARK);
+	public void stopSparkCluster(UserInfo userInfo, String expName, String compName) {
+		final UserInstanceDTO userInstance = exploratoryDAO.fetchExploratoryFields(userInfo.getName(), expName, true);
+		final UserInstanceStatus requiredStatus = UserInstanceStatus.RUNNING;
+		if (computationalWithStatusResourceExist(compName, userInstance, requiredStatus)) {
+			log.debug("{} spark cluster {} for userInstance {}", STOPPING.toString(), compName, expName);
+			updateComputationalStatus(userInfo.getName(), expName, compName, STOPPING);
+			final String uuid = provisioningService.post(ComputationalAPI.COMPUTATIONAL_STOP_SPARK,
+					userInfo.getAccessToken(),
+					requestBuilder.newComputationalStop(userInfo, userInstance, compName), String.class);
+			requestId.put(userInfo.getName(), uuid);
+		} else {
+			throw new IllegalStateException(String.format(DATAENGINE_NOT_PRESENT_FORMAT,
+					requiredStatus.toString(), compName, expName));
+		}
+
+	}
+
+	@BudgetLimited
+	@Override
+	public void startSparkCluster(UserInfo userInfo, String expName, String compName) {
+		final UserInstanceDTO userInstance =
+				exploratoryDAO.fetchExploratoryFields(userInfo.getName(), expName, true);
+		final UserInstanceStatus requiredStatus = UserInstanceStatus.STOPPED;
+		if (computationalWithStatusResourceExist(compName, userInstance, requiredStatus)) {
+			log.debug("{} spark cluster {} for userInstance {}", STARTING.toString(), compName, expName);
+			updateComputationalStatus(userInfo.getName(), expName, compName, STARTING);
+			final String uuid = provisioningService.post(ComputationalAPI.COMPUTATIONAL_START_SPARK,
+					userInfo.getAccessToken(), requestBuilder.newComputationalStart(userInfo, userInstance,
+							compName), String.class);
+			requestId.put(userInfo.getName(), uuid);
+		} else {
+			throw new IllegalStateException(String.format(DATAENGINE_NOT_PRESENT_FORMAT,
+					requiredStatus.toString(), compName, expName));
+		}
 	}
 
 	@Override
-	public void startSparkCluster(UserInfo userInfo, String exploratoryName, String computationalName) {
-		sparkAction(userInfo, exploratoryName, computationalName, STARTING,
-				ComputationalAPI.COMPUTATIONAL_START_SPARK);
+	public void updateSparkClusterConfig(UserInfo userInfo, String exploratoryName, String computationalName,
+										 List<ClusterConfig> config) {
+		final String userName = userInfo.getName();
+		final String token = userInfo.getAccessToken();
+		final UserInstanceDTO userInstanceDTO = exploratoryDAO
+				.fetchExploratoryFields(userName, exploratoryName, true);
+		final UserComputationalResource compResource = userInstanceDTO
+				.getResources()
+				.stream()
+				.filter(cr -> cr.getComputationalName().equals(computationalName) && cr.getStatus().equals(UserInstanceStatus.RUNNING.toString()))
+				.findAny()
+				.orElseThrow(() -> new ResourceNotFoundException(String.format(RUNNING_COMP_RES_NOT_FOUND,
+						computationalName, exploratoryName)));
+		final ComputationalClusterConfigDTO clusterConfigDto = requestBuilder.newClusterConfigUpdate(userInfo,
+				userInstanceDTO, compResource, config);
+		final String uuid = provisioningService.post(ComputationalAPI.COMPUTATIONAL_RECONFIGURE_SPARK, token,
+				clusterConfigDto, String.class);
+		computationalDAO.updateComputationalFields(new ComputationalStatusDTO()
+				.withComputationalName(computationalName)
+				.withExploratoryName(exploratoryName)
+				.withConfig(config)
+				.withStatus(RECONFIGURING.toString())
+				.withUser(userName));
+		requestId.put(userName, uuid);
+
 	}
 
 	/**
@@ -221,76 +286,9 @@
 		return Optional.empty();
 	}
 
-	private void sparkAction(UserInfo userInfo, String exploratoryName, String computationalName, UserInstanceStatus
-			compStatus, String provisioningEndpoint) {
-		final UserComputationalResource computationalResource = computationalDAO.fetchComputationalFields(userInfo
-				.getName(), exploratoryName, computationalName);
-		final DataEngineType dataEngineType = DataEngineType.fromDockerImageName(computationalResource.getImageName());
-		if (DataEngineType.SPARK_STANDALONE == dataEngineType) {
-			log.debug("{} spark cluster {} for exploratory {}", compStatus.toString(), computationalName,
-					exploratoryName);
-			updateComputationalStatus(userInfo.getName(), exploratoryName, computationalName, compStatus);
-			final UserInstanceDTO exploratory = exploratoryDAO.fetchExploratoryFields(userInfo.getName(),
-					exploratoryName);
-			final String uuid = provisioningService.post(provisioningEndpoint,
-					userInfo.getAccessToken(),
-					toProvisioningDto(userInfo, computationalName, compStatus, exploratory),
-					String.class);
-			requestId.put(userInfo.getName(), uuid);
-		} else {
-			log.error(OP_NOT_SUPPORTED_DES);
-			throw new UnsupportedOperationException(OP_NOT_SUPPORTED_DES);
-		}
-	}
-
-	private ComputationalBase<? extends ComputationalBase<?>> toProvisioningDto(UserInfo userInfo, String
-			computationalName, UserInstanceStatus compStatus, UserInstanceDTO exploratory) {
-		if (UserInstanceStatus.STARTING == compStatus) {
-			return requestBuilder
-					.newComputationalStart(userInfo, exploratory, computationalName);
-		} else if (UserInstanceStatus.STOPPING == compStatus) {
-			return requestBuilder
-					.newComputationalStop(userInfo, exploratory, computationalName);
-		} else {
-			throw new UnsupportedOperationException();
-		}
-	}
-
-	private String getTerminateUrl(UserComputationalResource computationalResource) {
-
-		if (DataEngineType.fromDockerImageName(computationalResource.getImageName())
-				== DataEngineType.SPARK_STANDALONE) {
-
-			return ComputationalAPI.COMPUTATIONAL_TERMINATE_SPARK;
-		} else if (DataEngineType.fromDockerImageName(computationalResource.getImageName())
-				== DataEngineType.CLOUD_SERVICE) {
-
-			return ComputationalAPI.COMPUTATIONAL_TERMINATE_CLOUD_SPECIFIC;
-		} else {
-			throw new IllegalArgumentException("Unknown docker image for " + computationalResource);
-		}
-	}
-
-	/**
-	 * Validates if input form is correct
-	 *
-	 * @param form user input form
-	 * @throws IllegalArgumentException if user typed wrong arguments
-	 */
-
-	private void validateForm(SparkStandaloneClusterCreateForm form) {
-
-		int instanceCount = Integer.parseInt(form.getDataEngineInstanceCount());
-
-		if (instanceCount < configuration.getMinSparkInstanceCount()
-				|| instanceCount > configuration.getMaxSparkInstanceCount()) {
-			throw new IllegalArgumentException(String.format("Instance count should be in range [%d..%d]",
-					configuration.getMinSparkInstanceCount(), configuration.getMaxSparkInstanceCount()));
-		}
-
-		if (DataEngineType.fromDockerImageName(form.getImage()) != DataEngineType.SPARK_STANDALONE) {
-			throw new IllegalArgumentException(String.format("Unknown data engine %s", form.getImage()));
-		}
+	@Override
+	public List<ClusterConfig> getClusterConfig(UserInfo userInfo, String exploratoryName, String computationalName) {
+		return computationalDAO.getClusterConfig(userInfo.getName(), exploratoryName, computationalName);
 	}
 
 	/**
@@ -321,7 +319,22 @@
 				.status(CREATING.toString())
 				.dataEngineInstanceCount(form.getDataEngineInstanceCount())
 				.dataEngineInstanceShape(form.getDataEngineInstanceShape())
+				.config(form.getConfig())
 				.build();
 	}
 
+	private boolean computationalWithStatusResourceExist(String compName,
+														 UserInstanceDTO ui, UserInstanceStatus status) {
+		return ui.getResources()
+				.stream()
+				.anyMatch(c -> computationalWithNameAndStatus(compName, c, status));
+	}
+
+	private boolean computationalWithNameAndStatus(String computationalName, UserComputationalResource compResource,
+												   UserInstanceStatus status) {
+		return compResource.getStatus().equals(status.toString()) &&
+				compResource.getDataEngineType() == SPARK_STANDALONE &&
+				compResource.getComputationalName().equals(computationalName);
+	}
+
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java
index eb962bb..d0de247 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.EdgeService;
@@ -32,9 +36,7 @@
 import lombok.extern.slf4j.Slf4j;
 
 import static com.epam.dlab.dto.UserInstanceStatus.*;
-import static com.epam.dlab.rest.contracts.EdgeAPI.EDGE_START;
-import static com.epam.dlab.rest.contracts.EdgeAPI.EDGE_STOP;
-import static com.epam.dlab.rest.contracts.EdgeAPI.EDGE_TERMINATE;
+import static com.epam.dlab.rest.contracts.EdgeAPI.*;
 
 @Singleton
 @Slf4j
@@ -54,6 +56,7 @@
 	private RequestId requestId;
 
 
+	@BudgetLimited
 	@Override
 	public String start(UserInfo userInfo) {
 		log.debug("Starting EDGE node for user {}", userInfo.getName());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java
index 2f9deb0..7d28d47 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java
@@ -1,26 +1,31 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.EnvStatusDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
+import com.epam.dlab.backendapi.dao.UserSettingsDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
 import com.epam.dlab.backendapi.resources.dto.UserResourceInfo;
 import com.epam.dlab.backendapi.service.ComputationalService;
 import com.epam.dlab.backendapi.service.EdgeService;
@@ -39,9 +44,12 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Set;
-import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import static com.epam.dlab.backendapi.resources.dto.UserDTO.Status.ACTIVE;
+import static com.epam.dlab.backendapi.resources.dto.UserDTO.Status.NOT_ACTIVE;
+import static java.util.stream.Collectors.toList;
+
 @Singleton
 @Slf4j
 public class EnvironmentServiceImpl implements EnvironmentService {
@@ -49,7 +57,7 @@
 	private static final String ERROR_MSG_FORMAT = "Can not %s environment because on of user resource is in status " +
 			"CREATING or STARTING";
 	@Inject
-	private EnvStatusDAO envStatusDAO;
+	private EnvDAO envDAO;
 	@Inject
 	private ExploratoryDAO exploratoryDAO;
 	@Inject
@@ -62,31 +70,43 @@
 	private KeyDAO keyDAO;
 	@Inject
 	private EdgeService edgeService;
+	@Inject
+	private UserSettingsDAO settingsDAO;
 
 	@Override
-	public Set<String> getActiveUsers() {
-		log.debug("Getting users that have at least 1 running instance");
-		return envStatusDAO.fetchActiveEnvUsers();
+	public List<UserDTO> getUsers() {
+		final Set<String> activeUsers = envDAO.fetchActiveEnvUsers();
+		log.trace("Active users: {}", activeUsers);
+		final Set<String> notActiveUsers = envDAO.fetchUsersNotIn(activeUsers);
+		log.trace("Not active users: {}", notActiveUsers);
+		final Stream<UserDTO> activeUsersStream = activeUsers
+				.stream()
+				.map(u -> toUserDTO(u, ACTIVE));
+		final Stream<UserDTO> notActiveUsersStream = notActiveUsers
+				.stream()
+				.map(u -> toUserDTO(u, NOT_ACTIVE));
+		return Stream.concat(activeUsersStream, notActiveUsersStream)
+				.collect(toList());
 	}
 
 	@Override
-	public Set<String> getAllUsers() {
+	public Set<String> getUserNames() {
 		log.debug("Getting all users...");
-		return envStatusDAO.fetchAllUsers();
+		return envDAO.fetchAllUsers();
 	}
 
 	@Override
 	public List<UserResourceInfo> getAllEnv() {
 		log.debug("Getting all user's environment...");
 		List<UserInstanceDTO> expList = exploratoryDAO.getInstances();
-		return getAllUsers().stream().map(user -> getUserEnv(user, expList)).flatMap(Collection::stream)
-				.collect(Collectors.toList());
+		return getUserNames().stream().map(user -> getUserEnv(user, expList)).flatMap(Collection::stream)
+				.collect(toList());
 	}
 
 	@Override
 	public void stopAll() {
 		log.debug("Stopping environment for all users...");
-		getAllUsers().forEach(this::stopEnvironment);
+		getUserNames().forEach(this::stopEnvironment);
 	}
 
 	@Override
@@ -118,7 +138,7 @@
 	@Override
 	public void terminateAll() {
 		log.debug("Terminating environment for all users...");
-		getAllUsers().forEach(this::terminateEnvironment);
+		getUserNames().forEach(this::terminateEnvironment);
 	}
 
 	@Override
@@ -142,6 +162,10 @@
 		terminateCluster(user, exploratoryName, computationalName);
 	}
 
+	private UserDTO toUserDTO(String u, UserDTO.Status status) {
+		return new UserDTO(u, settingsDAO.getAllowedBudget(u).orElse(null), status);
+	}
+
 	private void checkState(String user, String action) {
 		final List<UserInstanceDTO> userInstances = exploratoryDAO
 				.fetchUserExploratoriesWhereStatusIn(user,
@@ -181,7 +205,7 @@
 
 	private void terminateCluster(String user, String exploratoryName, String computationalName) {
 		final UserInfo userInfo = systemUserInfoService.create(user);
-		computationalService.terminateComputationalEnvironment(userInfo, exploratoryName, computationalName);
+		computationalService.terminateComputational(userInfo, exploratoryName, computationalName);
 	}
 
 	private List<UserResourceInfo> getUserEnv(String user, List<UserInstanceDTO> allInstances) {
@@ -191,7 +215,7 @@
 				.withUser(user);
 		return Stream.concat(Stream.of(edgeResource), allInstances.stream()
 				.filter(instance -> instance.getUser().equals(user)).map(this::toUserResourceInfo))
-				.collect(Collectors.toList());
+				.collect(toList());
 	}
 
 	private UserResourceInfo toUserResourceInfo(UserInstanceDTO userInstance) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
index 80b8d38..58f4aa5 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
@@ -1,22 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.GitCredsDAO;
@@ -28,11 +32,12 @@
 import com.epam.dlab.dto.StatusEnvBaseDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import com.epam.dlab.dto.exploratory.*;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.model.ResourceType;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.model.exploratory.Exploratory;
 import com.epam.dlab.model.library.Library;
 import com.epam.dlab.rest.client.RESTService;
 import com.google.inject.Inject;
@@ -68,7 +73,7 @@
 	@Inject
 	private RequestId requestId;
 
-
+	@BudgetLimited
 	@Override
 	public String start(UserInfo userInfo, String exploratoryName) {
 		return action(userInfo, exploratoryName, EXPLORATORY_START, STARTING);
@@ -84,6 +89,7 @@
 		return action(userInfo, exploratoryName, EXPLORATORY_TERMINATE, TERMINATING);
 	}
 
+	@BudgetLimited
 	@Override
 	public String create(UserInfo userInfo, Exploratory exploratory) {
 		boolean isAdded = false;
@@ -139,8 +145,26 @@
 	public List<UserInstanceDTO> getInstancesWithStatuses(String user, UserInstanceStatus exploratoryStatus,
 														  UserInstanceStatus computationalStatus) {
 		return getExploratoriesWithStatus(user, exploratoryStatus).stream()
-						.map(e -> e.withResources(computationalResourcesWithStatus(e, computationalStatus)))
-						.collect(Collectors.toList());
+				.map(e -> e.withResources(computationalResourcesWithStatus(e, computationalStatus)))
+				.collect(Collectors.toList());
+	}
+
+	@Override
+	public void updateClusterConfig(UserInfo userInfo, String exploratoryName, List<ClusterConfig> config) {
+		final String userName = userInfo.getName();
+		final String token = userInfo.getAccessToken();
+		final UserInstanceDTO userInstanceDTO = exploratoryDAO.fetchRunningExploratoryFields(userName,
+				exploratoryName);
+		final ExploratoryReconfigureSparkClusterActionDTO updateClusterConfigDTO =
+				requestBuilder.newClusterConfigUpdate(userInfo, userInstanceDTO, config);
+		final String uuid = provisioningService.post(EXPLORATORY_RECONFIGURE_SPARK, token, updateClusterConfigDTO,
+				String.class);
+		requestId.put(userName, uuid);
+		exploratoryDAO.updateExploratoryFields(new ExploratoryStatusDTO()
+				.withUser(userName)
+				.withExploratoryName(exploratoryName)
+				.withConfig(config)
+				.withStatus(UserInstanceStatus.RECONFIGURING.toString()));
 	}
 
 	/**
@@ -160,6 +184,12 @@
 		return Optional.empty();
 	}
 
+	@Override
+	public List<ClusterConfig> getClusterConfig(UserInfo user, String exploratoryName) {
+		return exploratoryDAO.getClusterConfig(user.getName(), exploratoryName);
+	}
+
+
 	private List<UserComputationalResource> computationalResourcesWithStatus(UserInstanceDTO userInstance,
 																			 UserInstanceStatus computationalStatus) {
 		return userInstance.getResources().stream()
@@ -287,6 +317,7 @@
 				.withImageName(exploratory.getDockerImage())
 				.withImageVersion(exploratory.getVersion())
 				.withTemplateName(exploratory.getTemplateName())
+				.withClusterConfig(exploratory.getClusterConfig())
 				.withShape(exploratory.getShape());
 		if (StringUtils.isNotBlank(exploratory.getImageName())) {
 			final List<LibInstallDTO> libInstallDtoList = getImageRelatedLibraries(userInfo, exploratory
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImpl.java
index 0083d3e..f6f4cce 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImpl.java
index 8d63ba7..996ddf9 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -31,7 +34,7 @@
 import com.epam.dlab.exceptions.ResourceAlreadyExistException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
 import com.epam.dlab.model.ResourceType;
-import com.epam.dlab.model.exloratory.Image;
+import com.epam.dlab.model.exploratory.Image;
 import com.epam.dlab.model.library.Library;
 import com.epam.dlab.rest.client.RESTService;
 import com.epam.dlab.rest.contracts.ExploratoryAPI;
@@ -116,8 +119,8 @@
 	}
 
 	@Override
-	public List<ImageInfoRecord> getCreatedImages(String user, String dockerImage) {
-		return imageExploratoryDao.getImages(user, ImageStatus.CREATED, dockerImage);
+	public List<ImageInfoRecord> getNotFailedImages(String user, String dockerImage) {
+		return imageExploratoryDao.getImages(user, dockerImage, ImageStatus.CREATED, ImageStatus.CREATING);
 	}
 
 	@Override
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InactivityServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InactivityServiceImpl.java
new file mode 100644
index 0000000..d9e1bf7
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InactivityServiceImpl.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.auth.SystemUserInfoService;
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.ComputationalDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
+import com.epam.dlab.backendapi.dao.ExploratoryDAO;
+import com.epam.dlab.backendapi.domain.RequestId;
+import com.epam.dlab.backendapi.service.ComputationalService;
+import com.epam.dlab.backendapi.service.ExploratoryService;
+import com.epam.dlab.backendapi.service.InactivityService;
+import com.epam.dlab.constants.ServiceConsts;
+import com.epam.dlab.dto.SchedulerJobDTO;
+import com.epam.dlab.dto.UserInstanceDTO;
+import com.epam.dlab.dto.base.DataEngineType;
+import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.status.EnvResource;
+import com.epam.dlab.rest.client.RESTService;
+import com.epam.dlab.rest.contracts.InfrasctructureAPI;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import lombok.extern.slf4j.Slf4j;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import static com.epam.dlab.dto.UserInstanceStatus.RUNNING;
+import static com.epam.dlab.dto.base.DataEngineType.CLOUD_SERVICE;
+import static com.epam.dlab.dto.base.DataEngineType.SPARK_STANDALONE;
+
+@Slf4j
+public class InactivityServiceImpl implements InactivityService {
+	@Inject
+	private ExploratoryDAO exploratoryDAO;
+	@Inject
+	private ComputationalDAO computationalDAO;
+	@Inject
+	private EnvDAO envDAO;
+	@Inject
+	@Named(ServiceConsts.PROVISIONING_SERVICE_NAME)
+	private RESTService provisioningService;
+	@Inject
+	private RequestId requestId;
+	@Inject
+	private ComputationalService computationalService;
+	@Inject
+	private ExploratoryService exploratoryService;
+	@Inject
+	private SystemUserInfoService systemUserInfoService;
+
+	@Override
+	public void updateRunningResourcesLastActivity(UserInfo userInfo) {
+		List<EnvResource> resources = envDAO.findRunningResourcesForCheckInactivity();
+		if (!resources.isEmpty()) {
+			String uuid = provisioningService.post(InfrasctructureAPI.INFRASTRUCTURE_CHECK_INACTIVITY,
+					userInfo.getAccessToken(), resources, String.class);
+			requestId.put(userInfo.getName(), uuid);
+		}
+	}
+
+	@Override
+	public void stopClustersByInactivity(List<String> computationalIds) {
+		exploratoryDAO.getInstancesByComputationalIdsAndStatus(computationalIds, RUNNING)
+				.forEach(this::stopClusters);
+	}
+
+	@Override
+	public void updateLastActivityForClusters(List<EnvResource> clusters) {
+		log.debug("Updating last activity date for clusters...");
+		clusters.forEach(r -> computationalDAO.updateLastActivityDateForInstanceId(r.getId(), r.getLastActivity()));
+	}
+
+	@Override
+	public void stopByInactivity(List<EnvResource> exploratories) {
+		final List<String> expIds = exploratories.stream().map(EnvResource::getId).collect(Collectors.toList());
+		exploratoryDAO.getInstancesByIdsAndStatus(expIds, RUNNING)
+				.stream()
+				.filter(this::shouldExploratoryBeInactivated)
+				.forEach(this::stopNotebook);
+
+	}
+
+	@Override
+	public void updateLastActivity(List<EnvResource> exploratories) {
+		exploratories.forEach(r -> exploratoryDAO.updateLastActivityDateForInstanceId(r.getId(), r.getLastActivity()));
+	}
+
+	private void stopNotebook(UserInstanceDTO ui) {
+		exploratoryService.stop(systemUserInfoService.create(ui.getUser()), ui.getExploratoryName());
+	}
+
+	private boolean shouldExploratoryBeInactivated(UserInstanceDTO ui) {
+		final SchedulerJobDTO schedulerData = ui.getSchedulerData();
+
+		return Objects.nonNull(schedulerData) && schedulerData.isCheckInactivityRequired() && Objects.nonNull(ui.getLastActivity()) &&
+				ui.getLastActivity().plusMinutes(schedulerData.getMaxInactivity()).isBefore(LocalDateTime.now());
+	}
+
+	private void stopClusters(UserInstanceDTO ui) {
+		ui.getResources().stream()
+				.filter(this::shouldClusterBeInactivated)
+				.forEach(c -> stopCluster(c, ui.getUser(), ui.getExploratoryName()));
+	}
+
+	private boolean shouldClusterBeInactivated(UserComputationalResource c) {
+		final SchedulerJobDTO schedulerData = c.getSchedulerData();
+		return Objects.nonNull(schedulerData) && schedulerData.isCheckInactivityRequired() &&
+				c.getLastActivity().plusMinutes(schedulerData.getMaxInactivity()).isBefore(LocalDateTime.now());
+	}
+
+	private void stopCluster(UserComputationalResource c, String user, String exploratoryName) {
+		final DataEngineType dataEngineType = c.getDataEngineType();
+		final String compName = c.getComputationalName();
+		if (dataEngineType == SPARK_STANDALONE) {
+			computationalService.stopSparkCluster(systemUserInfoService.create(user), exploratoryName, compName);
+		} else if (dataEngineType == CLOUD_SERVICE) {
+			computationalService.terminateComputational(systemUserInfoService.create(user), exploratoryName, compName);
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java
index d43277b..0f0584c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java
@@ -1,23 +1,27 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.dao.EnvStatusDAO;
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
@@ -39,9 +43,11 @@
 	@Inject
 	private KeyDAO keyDAO;
 	@Inject
-	private EnvStatusDAO envDAO;
+	private EnvDAO envDAO;
 	@Inject
 	private SelfServiceApplicationConfiguration configuration;
+	@Inject
+	private BillingDAO billingDAO;
 
 
 	@SuppressWarnings("unchecked")
@@ -68,7 +74,9 @@
 		try {
 			return envDAO.getHealthStatusPageDTO(user, fullReport)
 					.withBillingEnabled(configuration.isBillingSchedulerEnabled())
-					.withAdmin(isAdmin);
+					.withAdmin(isAdmin)
+					.withBillingQuoteUsed(billingDAO.getBillingQuoteUsed())
+					.withBillingUserQuoteUsed(billingDAO.getBillingUserQuoteUsed(user));
 		} catch (Exception e) {
 			log.warn("Could not return status of resources for user {}: {}", user, e.getLocalizedMessage(), e);
 			throw new DlabException(e.getMessage(), e);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java
index fae0daa..4193fc6 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -38,8 +41,8 @@
 import lombok.extern.slf4j.Slf4j;
 
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 import static com.epam.dlab.rest.contracts.DockerAPI.DOCKER_COMPUTATIONAL;
@@ -71,7 +74,7 @@
 					.peek(e -> e.setImage(getSimpleImageName(e.getImage())))
 					.filter(e -> exploratoryGpuIssuesAzureFilter(e) &&
 							UserRoles.checkAccess(user, RoleType.EXPLORATORY, e.getImage()))
-					.peek(e -> filterShapes(user, e.getExploratoryEnvironmentShapes()))
+					.peek(e -> filterShapes(user, e.getExploratoryEnvironmentShapes(), RoleType.EXPLORATORY_SHAPES))
 					.collect(Collectors.toList());
 
 		} catch (DlabException e) {
@@ -85,10 +88,12 @@
 	 *
 	 * @param user              user
 	 * @param environmentShapes shape types
+	 * @param roleType
 	 */
-	private void filterShapes(UserInfo user, HashMap<String, List<ComputationalResourceShapeDto>> environmentShapes) {
+	private void filterShapes(UserInfo user, Map<String, List<ComputationalResourceShapeDto>> environmentShapes,
+							  RoleType roleType) {
 		environmentShapes.forEach((k, v) -> v.removeIf(compResShapeDto ->
-				!UserRoles.checkAccess(user, RoleType.EXPLORATORY_SHAPES, compResShapeDto.getType())));
+				!UserRoles.checkAccess(user, roleType, compResShapeDto.getType())));
 	}
 
 	@Override
@@ -102,6 +107,7 @@
 
 			return Arrays.stream(array)
 					.peek(e -> e.setImage(getSimpleImageName(e.getImage())))
+					.peek(e -> filterShapes(user, e.getComputationResourceShapes(), RoleType.COMPUTATIONAL_SHAPES))
 					.filter(e -> UserRoles.checkAccess(user, RoleType.COMPUTATIONAL, e.getImage()))
 					.map(this::fullComputationalTemplate)
 					.collect(Collectors.toList());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
index 7bea472..4258172 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -20,12 +23,13 @@
 import com.epam.dlab.backendapi.dao.BaseDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryLibDAO;
+import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.dto.LibInfoRecord;
-import com.epam.dlab.backendapi.resources.dto.LibInstallFormDTO;
 import com.epam.dlab.backendapi.resources.dto.LibKey;
 import com.epam.dlab.backendapi.resources.dto.LibraryStatus;
 import com.epam.dlab.backendapi.service.LibraryService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.computational.UserComputationalResource;
@@ -33,8 +37,13 @@
 import com.epam.dlab.dto.exploratory.LibStatus;
 import com.epam.dlab.dto.exploratory.LibraryInstallDTO;
 import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.model.library.Library;
+import com.epam.dlab.rest.client.RESTService;
+import com.epam.dlab.rest.contracts.ComputationalAPI;
+import com.epam.dlab.rest.contracts.ExploratoryAPI;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
+import com.google.inject.name.Named;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.bson.Document;
@@ -46,6 +55,8 @@
 @Singleton
 public class LibraryServiceImpl implements LibraryService {
 
+	private static final String COMPUTATIONAL_NOT_FOUND_MSG = "Computational with name %s was not found";
+	private static final String LIB_ALREADY_INSTALLED = "Library %s is already installing";
 	@Inject
 	private ExploratoryDAO exploratoryDAO;
 
@@ -55,6 +66,14 @@
 	@Inject
 	private RequestBuilder requestBuilder;
 
+	@Named(ServiceConsts.PROVISIONING_SERVICE_NAME)
+	@Inject
+	private RESTService provisioningService;
+
+	@Inject
+	private RequestId requestId;
+
+
 	@Override
 	@SuppressWarnings("unchecked")
 	public List<Document> getLibs(String user, String exploratoryName, String computationalName) {
@@ -101,66 +120,72 @@
 	}
 
 	@Override
-	public LibraryInstallDTO generateLibraryInstallDTO(UserInfo userInfo, LibInstallFormDTO formDTO) {
-		UserInstanceDTO userInstance;
-		LibraryInstallDTO dto;
-		if (StringUtils.isEmpty(formDTO.getComputationalName())) {
-			userInstance = exploratoryDAO.fetchExploratoryFields(userInfo.getName(), formDTO.getNotebookName());
-			if (UserInstanceStatus.RUNNING != UserInstanceStatus.of(userInstance.getStatus())) {
-				throw new DlabException("Exploratory " + formDTO.getNotebookName() + " is not running");
-			}
+	public String installComputationalLibs(UserInfo ui, String expName, String compName,
+										   List<LibInstallDTO> libs) {
 
-			dto = requestBuilder.newLibInstall(userInfo, userInstance);
+		final UserInstanceDTO userInstance = exploratoryDAO.fetchExploratoryFields(ui.getName(), expName, compName);
+		final String uuid = provisioningService.post(ComputationalAPI.COMPUTATIONAL_LIB_INSTALL,
+				ui.getAccessToken(), toComputationalLibraryInstallDto(ui, expName, compName, libs, userInstance),
+				String.class);
+		requestId.put(ui.getName(), uuid);
+		return uuid;
+	}
+
+	@Override
+	public String installExploratoryLibs(UserInfo ui, String expName, List<LibInstallDTO> libs) {
+		final UserInstanceDTO userInstance = exploratoryDAO.fetchRunningExploratoryFields(ui.getName(), expName);
+		final String uuid = provisioningService.post(ExploratoryAPI.EXPLORATORY_LIB_INSTALL, ui.getAccessToken(),
+				toExploratoryLibraryInstallDto(ui, expName, libs, userInstance), String.class);
+		requestId.put(ui.getName(), uuid);
+		return uuid;
+	}
+
+	private LibraryInstallDTO toExploratoryLibraryInstallDto(UserInfo userInfo, String exploratoryName,
+															 List<LibInstallDTO> libs, UserInstanceDTO userInstance) {
+		final List<LibInstallDTO> libsToInstall = libs.stream()
+				.map(lib -> toLibInstallDto(lib, libraryDAO.getLibrary(userInfo.getName(), exploratoryName,
+						lib.getGroup(), lib.getName())))
+				.peek(l -> libraryDAO.addLibrary(userInfo.getName(), exploratoryName, l, l.isOverride()))
+				.collect(Collectors.toList());
+		return requestBuilder.newLibInstall(userInfo, userInstance, libsToInstall);
+	}
+
+	private LibraryInstallDTO toComputationalLibraryInstallDto(UserInfo userInfo, String expName, String compName,
+															   List<LibInstallDTO> libs,
+															   UserInstanceDTO userInstance) {
+
+		final UserComputationalResource computationalResource = getComputationalResource(compName, userInstance);
+		final List<LibInstallDTO> libsToInstall = libs.stream()
+				.map(lib -> toLibInstallDto(lib, libraryDAO.getLibrary(userInfo.getName(), expName,
+						compName, lib.getGroup(), lib.getName())))
+				.peek(l -> libraryDAO.addLibrary(userInfo.getName(), expName, compName, l,
+						l.isOverride()))
+				.collect(Collectors.toList());
+		return requestBuilder.newLibInstall(userInfo, userInstance, computationalResource, libsToInstall);
+	}
+
+	private UserComputationalResource getComputationalResource(String computationalName,
+															   UserInstanceDTO userInstance) {
+		return userInstance.getResources()
+				.stream()
+				.filter(computational -> computational.getComputationalName().equals(computationalName))
+				.findAny()
+				.orElseThrow(() -> new DlabException(String.format(COMPUTATIONAL_NOT_FOUND_MSG, computationalName)));
+	}
+
+	private LibInstallDTO toLibInstallDto(LibInstallDTO lib, Library existingLibrary) {
+		final LibInstallDTO l = new LibInstallDTO(lib.getGroup(), lib.getName(), lib.getVersion());
+		l.setStatus(LibStatus.INSTALLING.toString());
+		l.setOverride(shouldOverride(existingLibrary));
+		return l;
+	}
+
+	private boolean shouldOverride(Library library) {
+		if (Objects.nonNull(library) && library.getStatus() == LibStatus.INSTALLING) {
+			throw new DlabException(String.format(LIB_ALREADY_INSTALLED, library.getName()));
 		} else {
-			userInstance = exploratoryDAO.fetchExploratoryFields(userInfo.getName(), formDTO.getNotebookName(),
-					formDTO.getComputationalName());
-
-			List<UserComputationalResource> resourceList = userInstance.getResources().stream()
-					.filter(e -> e.getComputationalName().equals(formDTO.getComputationalName()))
-					.collect(Collectors.toList());
-
-			if (resourceList.size() == 1) {
-				dto = requestBuilder.newLibInstall(userInfo, userInstance, resourceList.get(0));
-			} else {
-				throw new DlabException(String.format("Computational with name %s is not unique or absent",
-						formDTO.getComputationalName()));
-			}
+			return Objects.nonNull(library);
 		}
-
-		return dto;
-	}
-
-	@Override
-	public LibraryInstallDTO prepareExploratoryLibInstallation(String username, LibInstallFormDTO formDTO,
-															   LibraryInstallDTO dto) {
-		for (LibInstallDTO lib : formDTO.getLibs()) {
-			LibStatus status = libraryDAO.fetchLibraryStatus(username, formDTO.getNotebookName(),
-					lib.getGroup(), lib.getName(), lib.getVersion());
-
-			prepare(status, lib, dto);
-
-			libraryDAO.addLibrary(username, formDTO.getNotebookName(), lib, LibStatus.FAILED == status);
-		}
-
-		return dto;
-
-	}
-
-	@Override
-	public LibraryInstallDTO prepareComputationalLibInstallation(String username, LibInstallFormDTO formDTO,
-																 LibraryInstallDTO dto) {
-
-		for (LibInstallDTO lib : formDTO.getLibs()) {
-			LibStatus status = libraryDAO.fetchLibraryStatus(username, formDTO.getNotebookName(),
-					formDTO.getComputationalName(),
-					lib.getGroup(), lib.getName(), lib.getVersion());
-
-			prepare(status, lib, dto);
-
-			libraryDAO.addLibrary(username, formDTO.getNotebookName(), formDTO.getComputationalName(), lib, LibStatus
-					.FAILED == status);
-		}
-		return dto;
 	}
 
 	@SuppressWarnings("unchecked")
@@ -211,17 +236,4 @@
 			}
 		}
 	}
-
-	private void prepare(LibStatus status, LibInstallDTO lib, LibraryInstallDTO dto) {
-		if (status == LibStatus.INSTALLING) {
-			throw new DlabException("Library " + lib.getName() + " is already installing");
-		}
-
-		LibInstallDTO newLib = new LibInstallDTO(lib.getGroup(), lib.getName(), lib.getVersion());
-		if (dto.getLibs().contains(newLib)) {
-			return;
-		}
-		dto.getLibs().add(newLib);
-		lib.setStatus(LibStatus.INSTALLING.toString());
-	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
index db026d6..6f8947f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryService.java
@@ -1,50 +1,51 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.backendapi.domain.MavenSearchArtifactResponse;
-import com.epam.dlab.backendapi.service.ExternalLibraryService;
 import com.epam.dlab.backendapi.resources.dto.LibraryDTO;
-import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.backendapi.service.ExternalLibraryService;
+import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.epam.dlab.rest.client.RESTService;
 import com.google.inject.Singleton;
+import com.google.inject.name.Named;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.inject.Inject;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.core.Response;
 import java.net.URI;
 
+import static java.lang.String.format;
+import static java.lang.String.join;
+
 @Singleton
 @Slf4j
 public class MavenCentralLibraryService implements ExternalLibraryService {
 
-	private static final String MAVEN_SEARCH_API = "http://search.maven.org/solrsearch/select";
 	private static final String QUOTE_ENCODED = "%22";
-	private static final String MAVEN_SEARCH_API_QUERY_FORMAT = "%s?q=%s&rows=20&wt=json&core=gav&p=jar";
+	private static final String SEARCH_API_QUERY_FORMAT = "/solrsearch/select?q=%s&rows=20&wt=json&core=gav&p=jar";
 	private static final String LIB_NOT_FOUND_MSG = "Artifact with id=%s, groupId=%s and version %s not found";
-	private final Client restClient;
+	private final RESTService restClient;
 
 	@Inject
-	public MavenCentralLibraryService(Client restClient) {
+	public MavenCentralLibraryService(@Named(ServiceConsts.MAVEN_SEARCH_API) RESTService restClient) {
 		this.restClient = restClient;
 	}
 
@@ -56,21 +57,13 @@
 
 	private LibraryDTO getMavenLibrary(String groupId, String artifactId, String version) {
 		final String query = and(artifactQuery(artifactId), groupQuery(groupId), versionQuery(version), jarPackage());
-		final String mavenApiSearchUri = String.format(MAVEN_SEARCH_API_QUERY_FORMAT, MAVEN_SEARCH_API, query);
-		log.trace("Calling maven api using the following uri: {}", mavenApiSearchUri);
-		final Response apiResponse = restClient.target(URI.create(mavenApiSearchUri))
-				.request()
-				.get();
-		if (apiResponse.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
-			log.error("Can not get artifact info from maven central due to: " + apiResponse.getStatusInfo().getReasonPhrase());
-			throw new DlabException("Can not get artifact info from maven central due to: " + apiResponse.getStatusInfo().getReasonPhrase());
-		}
-		final MavenSearchArtifactResponse response = apiResponse.readEntity(MavenSearchArtifactResponse.class);
-		return response.getArtifacts()
+		return restClient.get(URI.create(String.format(SEARCH_API_QUERY_FORMAT, query)),
+				MavenSearchArtifactResponse.class)
+				.getArtifacts()
 				.stream()
 				.findFirst()
-				.map(artifact -> new LibraryDTO(String.join(":", groupId, artifactId), version))
-				.orElseThrow(() -> new ResourceNotFoundException(String.format(LIB_NOT_FOUND_MSG, artifactId, groupId,
+				.map(artifact -> new LibraryDTO(join(":", groupId, artifactId), version))
+				.orElseThrow(() -> new ResourceNotFoundException(format(LIB_NOT_FOUND_MSG, artifactId, groupId,
 						version)));
 	}
 
@@ -91,7 +84,7 @@
 	}
 
 	private String and(String... strings) {
-		return String.join("+AND+", strings);
+		return join("+AND+", strings);
 	}
 
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java
index ac27831..e783d9c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java
index e9beb39..c22ff5a 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -19,8 +22,10 @@
 import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.SchedulerJobDAO;
+import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.ComputationalService;
 import com.epam.dlab.backendapi.service.ExploratoryService;
 import com.epam.dlab.backendapi.service.SchedulerJobService;
@@ -29,20 +34,30 @@
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.status.EnvResource;
 import com.epam.dlab.exceptions.ResourceInappropriateStateException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
 import com.epam.dlab.model.scheduler.SchedulerJobData;
+import com.epam.dlab.rest.client.RESTService;
+import com.epam.dlab.rest.contracts.InfrasctructureAPI;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
+import com.google.inject.name.Named;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 
 import java.time.*;
-import java.util.*;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Predicate;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import static com.epam.dlab.backendapi.dao.SchedulerJobDAO.TIMEZONE_PREFIX;
+import static com.epam.dlab.constants.ServiceConsts.PROVISIONING_SERVICE_NAME;
 import static com.epam.dlab.dto.UserInstanceStatus.*;
+import static com.epam.dlab.dto.base.DataEngineType.getDockerImageName;
+import static java.util.Collections.singletonList;
 
 @Slf4j
 @Singleton
@@ -50,8 +65,6 @@
 
 	private static final String SCHEDULER_NOT_FOUND_MSG =
 			"Scheduler job data not found for user %s with exploratory %s";
-	private static final String CURRENT_DATETIME_INFO =
-			"Current time rounded: {} , current date: {}, current day of week: {}";
 
 	@Inject
 	private SchedulerJobDAO schedulerJobDAO;
@@ -71,12 +84,18 @@
 	@Inject
 	private SystemUserInfoService systemUserService;
 
+	@Inject
+	private EnvDAO envDAO;
+
+	@Inject
+	private RequestId requestId;
+
+	@Inject
+	@Named(PROVISIONING_SERVICE_NAME)
+	private RESTService provisioningService;
+
 	@Override
 	public SchedulerJobDTO fetchSchedulerJobForUserAndExploratory(String user, String exploratoryName) {
-		if (!exploratoryDAO.isExploratoryExist(user, exploratoryName)) {
-			throw new ResourceNotFoundException(String.format(ExploratoryDAO.EXPLORATORY_NOT_FOUND_MSG, user,
-					exploratoryName));
-		}
 		return schedulerJobDAO.fetchSingleSchedulerJobByUserAndExploratory(user, exploratoryName)
 				.orElseThrow(() -> new ResourceNotFoundException(String.format(SCHEDULER_NOT_FOUND_MSG, user,
 						exploratoryName)));
@@ -85,10 +104,6 @@
 	@Override
 	public SchedulerJobDTO fetchSchedulerJobForComputationalResource(String user, String exploratoryName,
 																	 String computationalName) {
-		if (!computationalDAO.isComputationalExist(user, exploratoryName, computationalName)) {
-			throw new ResourceNotFoundException(String.format(ComputationalDAO.COMPUTATIONAL_NOT_FOUND_MSG,
-					computationalName, exploratoryName, user));
-		}
 		return schedulerJobDAO.fetchSingleSchedulerJobForCluster(user, exploratoryName, computationalName)
 				.orElseThrow(() -> new ResourceNotFoundException(String.format(SCHEDULER_NOT_FOUND_MSG, user,
 						exploratoryName) + " with computational resource " + computationalName));
@@ -96,11 +111,11 @@
 
 	@Override
 	public void updateExploratorySchedulerData(String user, String exploratoryName, SchedulerJobDTO dto) {
-		checkExploratoryStatusOrElseThrowException(user, exploratoryName);
-		enrichSchedulerJobIfNecessary(dto);
-		log.debug("Updating exploratory {} for user {} with new scheduler job data: {}...",
-				exploratoryName, user, nullableJobDto(dto));
-		exploratoryDAO.updateSchedulerDataForUserAndExploratory(user, exploratoryName, nullableJobDto(dto));
+		validateExploratoryStatus(user, exploratoryName);
+		populateDefaultSchedulerValues(dto);
+		log.debug("Updating exploratory {} for user {} with new scheduler job data: {}...", exploratoryName, user,
+				dto);
+		exploratoryDAO.updateSchedulerDataForUserAndExploratory(user, exploratoryName, dto);
 		if (dto.isSyncStartRequired()) {
 			shareSchedulerJobDataToSparkClusters(user, exploratoryName, dto);
 		} else {
@@ -111,72 +126,166 @@
 	@Override
 	public void updateComputationalSchedulerData(String user, String exploratoryName, String computationalName,
 												 SchedulerJobDTO dto) {
-		checkExploratoryStatusOrElseThrowException(user, exploratoryName);
-		checkComputationalStatusOrElseThrowException(user, exploratoryName, computationalName);
-		enrichSchedulerJobIfNecessary(dto);
+		validateExploratoryStatus(user, exploratoryName);
+		validateComputationalStatus(user, exploratoryName, computationalName);
+		populateDefaultSchedulerValues(dto);
 		log.debug("Updating computational resource {} affiliated with exploratory {} for user {} with new scheduler " +
-				"job data {}...", computationalName, exploratoryName, user, nullableJobDto(dto));
-		computationalDAO.updateSchedulerDataForComputationalResource(user, exploratoryName, computationalName,
-				nullableJobDto(dto));
+				"job data {}...", computationalName, exploratoryName, user, dto);
+		computationalDAO.updateSchedulerDataForComputationalResource(user, exploratoryName, computationalName, dto);
 	}
 
 	@Override
-	public void executeStartResourceJob(boolean isAppliedForClusters) {
-		OffsetDateTime currentDateTime = OffsetDateTime.now();
-		List<SchedulerJobData> jobsToStart =
-				getSchedulerJobsForAction(UserInstanceStatus.RUNNING, currentDateTime, isAppliedForClusters);
-		if (!jobsToStart.isEmpty()) {
-			log.debug(isAppliedForClusters ? "Scheduler computational resource start job is executing..." :
-					"Scheduler exploratory start job is executing...");
-			log.info(CURRENT_DATETIME_INFO, LocalTime.of(currentDateTime.toLocalTime().getHour(),
-					currentDateTime.toLocalTime().getMinute()), currentDateTime.toLocalDate(),
-					currentDateTime.getDayOfWeek());
-			log.info(isAppliedForClusters ? "Quantity of clusters for starting: {}" :
-					"Quantity of exploratories for starting: {}", jobsToStart.size());
-			jobsToStart.forEach(job -> changeResourceStatusTo(UserInstanceStatus.RUNNING, job, isAppliedForClusters));
-		}
+	public void stopComputationalByScheduler() {
+		getComputationalSchedulersForStopping(OffsetDateTime.now())
+				.forEach(this::stopComputational);
+	}
+
+	@Override
+	public void stopExploratoryByScheduler() {
+		getExploratorySchedulersForStopping(OffsetDateTime.now())
+				.forEach(this::stopExploratory);
+	}
+
+	@Override
+	public void startExploratoryByScheduler() {
+		getExploratorySchedulersForStarting(OffsetDateTime.now())
+				.forEach(this::startExploratory);
+	}
+
+	@Override
+	public void startComputationalByScheduler() {
+		getComputationalSchedulersForStarting(OffsetDateTime.now())
+				.forEach(job -> startSpark(job.getUser(), job.getExploratoryName(), job.getComputationalName()));
+	}
+
+	@Override
+	public void terminateExploratoryByScheduler() {
+		getExploratorySchedulersForTerminating(OffsetDateTime.now())
+				.forEach(this::terminateExploratory);
 
 	}
 
 	@Override
-	public void executeStopResourceJob(boolean isAppliedForClusters) {
-		OffsetDateTime currentDateTime = OffsetDateTime.now();
-		List<SchedulerJobData> jobsToStop =
-				getSchedulerJobsForAction(STOPPED, currentDateTime, isAppliedForClusters);
-		if (!jobsToStop.isEmpty()) {
-			log.debug(isAppliedForClusters ? "Scheduler computational resource stop job is executing..." :
-					"Scheduler exploratory stop job is executing...");
-			log.info(CURRENT_DATETIME_INFO, LocalTime.of(currentDateTime.toLocalTime().getHour(),
-					currentDateTime.toLocalTime().getMinute()), currentDateTime.toLocalDate(),
-					currentDateTime.getDayOfWeek());
-			log.info(isAppliedForClusters ? "Quantity of clusters for stopping: {}" :
-					"Quantity of exploratories for stopping: {}", jobsToStop.size());
-			jobsToStop.forEach(job -> changeResourceStatusTo(STOPPED, job, isAppliedForClusters));
+	public void terminateComputationalByScheduler() {
+		getComputationalSchedulersForTerminating(OffsetDateTime.now()).forEach(this::terminateComputational);
+
+	}
+
+	@Override
+	public void updateRunningResourcesLastActivity(UserInfo userInfo) {
+		List<EnvResource> resources = envDAO.findRunningResourcesForCheckInactivity();
+		if (!resources.isEmpty()) {
+			String uuid = provisioningService.post(InfrasctructureAPI.INFRASTRUCTURE_CHECK_INACTIVITY,
+					userInfo.getAccessToken(), resources, String.class);
+			requestId.put(userInfo.getName(), uuid);
 		}
 	}
 
 	@Override
-	public void executeTerminateResourceJob(boolean isAppliedForClusters) {
-		OffsetDateTime currentDateTime = OffsetDateTime.now();
-		List<SchedulerJobData> jobsToTerminate =
-				getSchedulerJobsForAction(UserInstanceStatus.TERMINATED, currentDateTime, isAppliedForClusters);
-		if (!jobsToTerminate.isEmpty()) {
-			log.debug(isAppliedForClusters ? "Scheduler computational resource terminate job is executing..." :
-					"Scheduler exploratory terminate job is executing...");
-			log.info(CURRENT_DATETIME_INFO, LocalTime.of(currentDateTime.toLocalTime().getHour(),
-					currentDateTime.toLocalTime().getMinute()), currentDateTime.toLocalDate(),
-					currentDateTime.getDayOfWeek());
-			log.info(isAppliedForClusters ? "Quantity of clusters for terminating: {}" :
-					"Quantity of exploratories for terminating: {}", jobsToTerminate.size());
-			jobsToTerminate.forEach(job ->
-					changeResourceStatusTo(UserInstanceStatus.TERMINATED, job, isAppliedForClusters));
+	public void removeScheduler(String user, String exploratoryName) {
+		schedulerJobDAO.removeScheduler(user, exploratoryName);
+	}
+
+	@Override
+	public void removeScheduler(String user, String exploratoryName, String computationalName) {
+		schedulerJobDAO.removeScheduler(user, exploratoryName, computationalName);
+	}
+
+	@Override
+	public List<SchedulerJobData> getActiveSchedulers(String user, long minutesOffset) {
+		final OffsetDateTime desiredDateTime = OffsetDateTime.now().plusMinutes(minutesOffset);
+		final Predicate<SchedulerJobData> userPredicate = s -> user.equals(s.getUser());
+		final Stream<SchedulerJobData> computationalSchedulersStream =
+				getComputationalSchedulersForStopping(desiredDateTime)
+						.stream()
+						.filter(userPredicate);
+		final Stream<SchedulerJobData> exploratorySchedulersStream =
+				getExploratorySchedulersForStopping(desiredDateTime)
+						.stream()
+						.filter(userPredicate);
+		return Stream.concat(computationalSchedulersStream, exploratorySchedulersStream)
+				.collect(Collectors.toList());
+	}
+
+	private void stopComputational(SchedulerJobData job) {
+		final String expName = job.getExploratoryName();
+		final String compName = job.getComputationalName();
+		final String user = job.getUser();
+		log.debug("Stopping exploratory {} computational {} for user {} by scheduler", expName, compName, user);
+		computationalService.stopSparkCluster(systemUserService.create(user), expName, compName);
+	}
+
+	private void terminateComputational(SchedulerJobData job) {
+		final String user = job.getUser();
+		final String expName = job.getExploratoryName();
+		final String compName = job.getComputationalName();
+		final UserInfo userInfo = systemUserService.create(user);
+		log.debug("Terminating exploratory {} computational {} for user {} by scheduler", expName, compName, user);
+		computationalService.terminateComputational(userInfo, expName, compName);
+	}
+
+	private void stopExploratory(SchedulerJobData job) {
+		final String expName = job.getExploratoryName();
+		final String user = job.getUser();
+		log.debug("Stopping exploratory {} for user {} by scheduler", expName, user);
+		exploratoryService.stop(systemUserService.create(job.getUser()),
+				job.getExploratoryName());
+	}
+
+	private List<SchedulerJobData> getExploratorySchedulersForTerminating(OffsetDateTime now) {
+		return schedulerJobDAO.getExploratorySchedulerDataWithOneOfStatus(RUNNING, STOPPED)
+				.stream()
+				.filter(canSchedulerForTerminatingBeApplied(now))
+				.collect(Collectors.toList());
+	}
+
+	private List<SchedulerJobData> getComputationalSchedulersForTerminating(OffsetDateTime now) {
+		return schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(RUNNING,
+				DataEngineType.SPARK_STANDALONE, STOPPED, RUNNING)
+				.stream()
+				.filter(canSchedulerForTerminatingBeApplied(now))
+				.collect(Collectors.toList());
+	}
+
+	private void startExploratory(SchedulerJobData schedulerJobData) {
+		final String user = schedulerJobData.getUser();
+		final String exploratoryName = schedulerJobData.getExploratoryName();
+		log.debug("Starting exploratory {} for user {} by scheduler", exploratoryName, user);
+		exploratoryService.start(systemUserService.create(user), exploratoryName);
+		if (schedulerJobData.getJobDTO().isSyncStartRequired()) {
+			log.trace("Starting computational for exploratory {} for user {} by scheduler", exploratoryName, user);
+			final DataEngineType sparkCluster = DataEngineType.SPARK_STANDALONE;
+			final List<UserComputationalResource> compToBeStarted =
+					computationalDAO.findComputationalResourcesWithStatus(user, exploratoryName, STOPPED);
+
+			compToBeStarted
+					.stream()
+					.filter(compResource -> shouldClusterBeStarted(sparkCluster, compResource))
+					.forEach(comp -> startSpark(user, exploratoryName, comp.getComputationalName()));
 		}
 	}
 
+	private void terminateExploratory(SchedulerJobData job) {
+		final String user = job.getUser();
+		final String expName = job.getExploratoryName();
+		log.debug("Terminating exploratory {} for user {} by scheduler", expName, user);
+		exploratoryService.terminate(systemUserService.create(user), expName);
+	}
+
+	private void startSpark(String user, String expName, String compName) {
+		log.debug("Starting exploratory {} computational {} for user {} by scheduler", expName, compName, user);
+		computationalService.startSparkCluster(systemUserService.create(user), expName, compName);
+	}
+
+	private boolean shouldClusterBeStarted(DataEngineType sparkCluster, UserComputationalResource compResource) {
+		return Objects.nonNull(compResource.getSchedulerData()) && compResource.getSchedulerData().isSyncStartRequired()
+				&& compResource.getImageName().equals(getDockerImageName(sparkCluster));
+	}
+
 	/**
 	 * Performs bulk updating operation with scheduler data for corresponding to exploratory Spark clusters.
-	 * All these clusters will obtain data which is equal to exploratory's except 'stopping' operation (it will be
-	 * performed automatically with notebook stopping since Spark clusters have such feature).
+	 * All these resources will obtain data which is equal to exploratory's except 'stopping' operation (it will be
+	 * performed automatically with notebook stopping since Spark resources have such feature).
 	 *
 	 * @param user            user's name
 	 * @param exploratoryName name of exploratory resource
@@ -184,158 +293,71 @@
 	 */
 	private void shareSchedulerJobDataToSparkClusters(String user, String exploratoryName, SchedulerJobDTO dto) {
 		List<String> correspondingSparkClusters = computationalDAO.getComputationalResourcesWhereStatusIn(user,
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE), exploratoryName,
+				singletonList(DataEngineType.SPARK_STANDALONE), exploratoryName,
 				STARTING, RUNNING, STOPPING, STOPPED);
 		SchedulerJobDTO dtoWithoutStopData = getSchedulerJobWithoutStopData(dto);
 		for (String sparkName : correspondingSparkClusters) {
 			log.debug("Updating computational resource {} affiliated with exploratory {} for user {} with new " +
-					"scheduler job data {}...", sparkName, exploratoryName, user, nullableJobDto(dtoWithoutStopData));
+					"scheduler job data {}...", sparkName, exploratoryName, user, dtoWithoutStopData);
 			computationalDAO.updateSchedulerDataForComputationalResource(user, exploratoryName, sparkName,
-					nullableJobDto(dtoWithoutStopData));
+					dtoWithoutStopData);
 		}
 	}
 
-
-	/**
-	 * Pulls out scheduler jobs data to achieve target exploratory ('isAppliedForClusters' equals 'false') or
-	 * computational ('isAppliedForClusters' equals 'true') status running/stopped/terminated.
-	 *
-	 * @param desiredStatus        target exploratory/cluster status (running/stopped/terminated)
-	 * @param dateTime             actual date with time
-	 * @param isAppliedForClusters true/false
-	 * @return list of scheduler jobs data
-	 */
-	private List<SchedulerJobData> getSchedulerJobsToAchieveStatus(UserInstanceStatus desiredStatus,
-																   OffsetDateTime dateTime,
-																   boolean isAppliedForClusters) {
-		return schedulerJobDAO.getSchedulerJobsToAchieveStatus(desiredStatus, isAppliedForClusters).stream()
-				.filter(jobData -> isSchedulerJobDtoSatisfyCondition(jobData.getJobDTO(), dateTime, desiredStatus))
+	private List<SchedulerJobData> getExploratorySchedulersForStopping(OffsetDateTime currentDateTime) {
+		return schedulerJobDAO.getExploratorySchedulerDataWithStatus(RUNNING)
+				.stream()
+				.filter(canSchedulerForStoppingBeApplied(currentDateTime))
 				.collect(Collectors.toList());
 	}
 
-
-	/**
-	 * Pulls out scheduler jobs data for the following starting/terminating/stopping corresponding exploratories
-	 * ('isAppliedForClusters' equals 'false') or computational resources ('isAppliedForClusters' equals 'true').
-	 *
-	 * @param desiredStatus        target exploratory/cluster status (running/stopped/terminated)
-	 * @param currentDateTime      actual date with time
-	 * @param isAppliedForClusters true/false
-	 * @return list of scheduler jobs data
-	 */
-	private List<SchedulerJobData> getSchedulerJobsForAction(UserInstanceStatus desiredStatus,
-															 OffsetDateTime currentDateTime,
-															 boolean isAppliedForClusters) {
-		return desiredStatus.in(STOPPED, RUNNING, TERMINATED) ?
-				getSchedulerJobsToAchieveStatus(desiredStatus, currentDateTime, isAppliedForClusters) :
-				Collections.emptyList();
+	private List<SchedulerJobData> getExploratorySchedulersForStarting(OffsetDateTime currentDateTime) {
+		return schedulerJobDAO.getExploratorySchedulerDataWithStatus(STOPPED)
+				.stream()
+				.filter(canSchedulerForStartingBeApplied(currentDateTime))
+				.collect(Collectors.toList());
 	}
 
-
-	/**
-	 * Starts/stops/terminates exploratory ('isAppliedForClusters' equals 'false') or computational resource
-	 * ('isAppliedForClusters' equals 'true') corresponding to target status and scheduler job data.
-	 *
-	 * @param desiredStatus target exploratory/computational status (running/stopped/terminated)
-	 * @param jobData       scheduler job data which includes exploratory details
-	 */
-	private void changeResourceStatusTo(UserInstanceStatus desiredStatus, SchedulerJobData jobData,
-										boolean isAppliedForClusters) {
-		log.debug(String.format(isAppliedForClusters ? "Computational resource " + jobData.getComputationalName() +
-						" affiliated with exploratory %s and user %s is %s..." :
-						"Exploratory with name %s for user %s is %s...",
-				jobData.getExploratoryName(), jobData.getUser(), getActionBasedOnDesiredStatus(desiredStatus)));
-		UserInfo userInfo = systemUserService.create(jobData.getUser());
-		if (isAppliedForClusters) {
-			executeComputationalAction(userInfo, jobData.getExploratoryName(), jobData.getComputationalName(),
-					desiredStatus);
-		} else {
-			executeExploratoryAction(userInfo, jobData.getExploratoryName(), desiredStatus);
-		}
+	private List<SchedulerJobData> getComputationalSchedulersForStarting(OffsetDateTime currentDateTime) {
+		return schedulerJobDAO
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED)
+				.stream()
+				.filter(canSchedulerForStartingBeApplied(currentDateTime))
+				.collect(Collectors.toList());
 	}
 
-	private UserInstanceStatus getActionBasedOnDesiredStatus(UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			return UserInstanceStatus.STARTING;
-		} else if (desiredStatus == STOPPED) {
-			return UserInstanceStatus.STOPPING;
-		} else if (desiredStatus == TERMINATED) {
-			return UserInstanceStatus.TERMINATING;
-		} else return null;
+	private Predicate<SchedulerJobData> canSchedulerForStoppingBeApplied(OffsetDateTime currentDateTime) {
+		return schedulerJobData -> shouldSchedulerBeExecuted(schedulerJobData.getJobDTO(),
+				currentDateTime, schedulerJobData.getJobDTO().getStopDaysRepeat(),
+				schedulerJobData.getJobDTO().getEndTime());
 	}
 
-	private void executeExploratoryAction(UserInfo userInfo, String exploratoryName,
-										  UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			exploratoryService.start(userInfo, exploratoryName);
-			List<String> computationalResourcesForStartingWithExploratory =
-					getComputationalResourcesForStartingWithExploratory(userInfo.getName(), exploratoryName);
-			computationalResourcesForStartingWithExploratory.forEach(compName -> {
-				UserInfo user = systemUserService.create(userInfo.getName());
-				computationalService.startSparkCluster(user, exploratoryName, compName);
-			});
-		} else if (desiredStatus == STOPPED) {
-			exploratoryService.stop(userInfo, exploratoryName);
-		} else if (desiredStatus == TERMINATED) {
-			exploratoryService.terminate(userInfo, exploratoryName);
-		}
+	private Predicate<SchedulerJobData> canSchedulerForStartingBeApplied(OffsetDateTime currentDateTime) {
+		return schedulerJobData -> shouldSchedulerBeExecuted(schedulerJobData.getJobDTO(),
+				currentDateTime, schedulerJobData.getJobDTO().getStartDaysRepeat(),
+				schedulerJobData.getJobDTO().getStartTime());
 	}
 
-	private void executeComputationalAction(UserInfo userInfo, String exploratoryName, String computationalName,
-											UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			computationalService.startSparkCluster(userInfo, exploratoryName, computationalName);
-		} else if (desiredStatus == STOPPED) {
-			computationalService.stopSparkCluster(userInfo, exploratoryName, computationalName);
-		} else if (desiredStatus == TERMINATED) {
-			computationalService.terminateComputationalEnvironment(userInfo, exploratoryName, computationalName);
-		}
+	private Predicate<SchedulerJobData> canSchedulerForTerminatingBeApplied(OffsetDateTime currentDateTime) {
+		return schedulerJobData -> shouldBeTerminated(currentDateTime, schedulerJobData);
 	}
 
-	private List<String> getComputationalResourcesForStartingWithExploratory(String user, String exploratoryName) {
-		Optional<SchedulerJobDTO> schedulerJobForExploratory = schedulerJobDAO
-				.fetchSingleSchedulerJobByUserAndExploratory(user, exploratoryName);
-		if (!schedulerJobForExploratory.isPresent() || !schedulerJobForExploratory.get().isSyncStartRequired()) {
-			return Collections.emptyList();
-		}
-		return computationalDAO.getComputationalResourcesWhereStatusIn(user,
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE), exploratoryName, STOPPED).stream()
-				.filter(clusterName -> isClusterSchedulerPresentAndEqualToAnotherForSyncStarting(user, exploratoryName,
-						clusterName, schedulerJobForExploratory.get())).collect(Collectors.toList());
+	private boolean shouldBeTerminated(OffsetDateTime currentDateTime, SchedulerJobData schedulerJobData) {
+		final SchedulerJobDTO jobDTO = schedulerJobData.getJobDTO();
+		final LocalDateTime convertedCurrentTime = schedulerExecutionDate(jobDTO, currentDateTime);
+		return isSchedulerActive(schedulerJobData.getJobDTO(), convertedCurrentTime) && Objects.nonNull(jobDTO.getTerminateDateTime()) &&
+				convertedCurrentTime.equals(jobDTO.getTerminateDateTime());
 	}
 
-	private boolean isClusterSchedulerPresentAndEqualToAnotherForSyncStarting(String user, String exploratoryName,
-																			  String clusterName,
-																			  SchedulerJobDTO dto) {
-		Optional<SchedulerJobDTO> schedulerJobForCluster =
-				schedulerJobDAO.fetchSingleSchedulerJobForCluster(user, exploratoryName, clusterName);
-		return schedulerJobForCluster.isPresent() &&
-				areSchedulersEqualForSyncStarting(dto, schedulerJobForCluster.get());
+	private List<SchedulerJobData> getComputationalSchedulersForStopping(OffsetDateTime currentDateTime) {
+		return schedulerJobDAO
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, RUNNING)
+				.stream()
+				.filter(canSchedulerForStoppingBeApplied(currentDateTime))
+				.collect(Collectors.toList());
 	}
 
-	@SuppressWarnings("unchecked")
-	private boolean areCollectionsEqual(Collection col1, Collection col2) {
-		return col1.containsAll(col2) && col2.containsAll(col1);
-	}
-
-	private boolean areSchedulersEqualForSyncStarting(SchedulerJobDTO notebookScheduler,
-													  SchedulerJobDTO clusterScheduler) {
-		return !Objects.isNull(notebookScheduler) && !Objects.isNull(clusterScheduler) &&
-				notebookScheduler.getBeginDate().equals(clusterScheduler.getBeginDate()) &&
-				notebookScheduler.getStartTime().equals(clusterScheduler.getStartTime()) &&
-				areCollectionsEqual(notebookScheduler.getStartDaysRepeat(), clusterScheduler.getStartDaysRepeat())
-				&& notebookScheduler.getTimeZoneOffset().equals(clusterScheduler.getTimeZoneOffset()) &&
-				notebookScheduler.isSyncStartRequired() && clusterScheduler.isSyncStartRequired();
-	}
-
-	/**
-	 * Enriches existing scheduler job with the following data:
-	 * - sets current date as 'beginDate' if this parameter wasn't defined;
-	 * - sets current system time zone offset as 'timeZoneOffset' if this parameter wasn't defined.
-	 *
-	 * @param dto current scheduler job
-	 */
-	private void enrichSchedulerJobIfNecessary(SchedulerJobDTO dto) {
+	private void populateDefaultSchedulerValues(SchedulerJobDTO dto) {
 		if (Objects.isNull(dto.getBeginDate()) || StringUtils.isBlank(dto.getBeginDate().toString())) {
 			dto.setBeginDate(LocalDate.now());
 		}
@@ -344,20 +366,19 @@
 		}
 	}
 
-	private void checkExploratoryStatusOrElseThrowException(String user, String exploratoryName) {
+	private void validateExploratoryStatus(String user, String exploratoryName) {
 		final UserInstanceDTO userInstance = exploratoryDAO.fetchExploratoryFields(user, exploratoryName);
-		checkResourceStatusOrElseThrowException(userInstance.getStatus());
+		validateResourceStatus(userInstance.getStatus());
 	}
 
-	private void checkComputationalStatusOrElseThrowException(String user, String exploratoryName,
-															  String computationalName) {
+	private void validateComputationalStatus(String user, String exploratoryName, String computationalName) {
 		final UserComputationalResource computationalResource =
 				computationalDAO.fetchComputationalFields(user, exploratoryName, computationalName);
 		final String computationalStatus = computationalResource.getStatus();
-		checkResourceStatusOrElseThrowException(computationalStatus);
+		validateResourceStatus(computationalStatus);
 	}
 
-	private void checkResourceStatusOrElseThrowException(String resourceStatus) {
+	private void validateResourceStatus(String resourceStatus) {
 		final UserInstanceStatus status = UserInstanceStatus.of(resourceStatus);
 		if (Objects.isNull(status) || status.in(UserInstanceStatus.TERMINATED, UserInstanceStatus.TERMINATING,
 				UserInstanceStatus.FAILED)) {
@@ -366,57 +387,33 @@
 		}
 	}
 
-	/**
-	 * Checks if scheduler's time data satisfies existing time parameters.
-	 *
-	 * @param dto           scheduler job data.
-	 * @param dateTime      existing time data.
-	 * @param desiredStatus target exploratory status which has influence for time/date checking ('running' status
-	 *                      requires for checking start time, 'stopped' - for end time, 'terminated' - for
-	 *                      'terminatedDateTime').
-	 * @return true/false.
-	 */
-	private boolean isSchedulerJobDtoSatisfyCondition(SchedulerJobDTO dto, OffsetDateTime dateTime,
-													  UserInstanceStatus desiredStatus) {
+	private boolean shouldSchedulerBeExecuted(SchedulerJobDTO dto, OffsetDateTime dateTime, List<DayOfWeek> daysRepeat,
+											  LocalTime time) {
+		LocalDateTime convertedDateTime = schedulerExecutionDate(dto, dateTime);
+
+		return isSchedulerActive(dto, convertedDateTime)
+				&& daysRepeat.contains(convertedDateTime.toLocalDate().getDayOfWeek())
+				&& convertedDateTime.toLocalTime().equals(time);
+	}
+
+	private boolean isSchedulerActive(SchedulerJobDTO dto, LocalDateTime convertedDateTime) {
+		return !convertedDateTime.toLocalDate().isBefore(dto.getBeginDate())
+				&& finishDateAfterCurrentDate(dto, convertedDateTime);
+	}
+
+	private LocalDateTime schedulerExecutionDate(SchedulerJobDTO dto, OffsetDateTime dateTime) {
 		ZoneOffset zOffset = dto.getTimeZoneOffset();
 		OffsetDateTime roundedDateTime = OffsetDateTime.of(
 				dateTime.toLocalDate(),
 				LocalTime.of(dateTime.toLocalTime().getHour(), dateTime.toLocalTime().getMinute()),
 				dateTime.getOffset());
 
-		LocalDateTime convertedDateTime = ZonedDateTime.ofInstant(roundedDateTime.toInstant(),
+		return ZonedDateTime.ofInstant(roundedDateTime.toInstant(),
 				ZoneId.ofOffset(TIMEZONE_PREFIX, zOffset)).toLocalDateTime();
-
-		return desiredStatus == TERMINATED ?
-				Objects.nonNull(dto.getTerminateDateTime()) &&
-						convertedDateTime.toLocalDate().equals(dto.getTerminateDateTime().toLocalDate())
-						&& convertedDateTime.toLocalTime().equals(getDesiredTime(dto, desiredStatus)) :
-				!convertedDateTime.toLocalDate().isBefore(dto.getBeginDate())
-						&& isFinishDateMatchesCondition(dto, convertedDateTime)
-						&& getDaysRepeat(dto, desiredStatus).contains(convertedDateTime.toLocalDate().getDayOfWeek())
-						&& convertedDateTime.toLocalTime().equals(getDesiredTime(dto, desiredStatus));
 	}
 
-	private List<DayOfWeek> getDaysRepeat(SchedulerJobDTO dto, UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			return dto.getStartDaysRepeat();
-		} else if (desiredStatus == STOPPED) {
-			return dto.getStopDaysRepeat();
-		} else return Collections.emptyList();
-	}
-
-	private boolean isFinishDateMatchesCondition(SchedulerJobDTO dto, LocalDateTime currentDateTime) {
-		return dto.getFinishDate() == null || !currentDateTime.toLocalDate().isAfter(dto.getFinishDate());
-	}
-
-	private LocalTime getDesiredTime(SchedulerJobDTO dto, UserInstanceStatus desiredStatus) {
-		if (desiredStatus == RUNNING) {
-			return dto.getStartTime();
-		} else if (desiredStatus == STOPPED) {
-			return dto.getEndTime();
-		} else if (desiredStatus == TERMINATED) {
-			return dto.getTerminateDateTime().toLocalTime();
-		} else return null;
+	private boolean finishDateAfterCurrentDate(SchedulerJobDTO dto, LocalDateTime currentDateTime) {
+		return Objects.isNull(dto.getFinishDate()) || !currentDateTime.toLocalDate().isAfter(dto.getFinishDate());
 	}
 
 	private SchedulerJobDTO getSchedulerJobWithoutStopData(SchedulerJobDTO dto) {
@@ -431,10 +428,5 @@
 		return convertedDto;
 	}
 
-	private SchedulerJobDTO nullableJobDto(SchedulerJobDTO dto) {
-		return (Objects.isNull(dto.getStartDaysRepeat()) || dto.getStartDaysRepeat().isEmpty()) &&
-				(Objects.isNull(dto.getStopDaysRepeat()) || dto.getStopDaysRepeat().isEmpty()) ? null : dto;
-	}
-
 }
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SystemInfoServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SystemInfoServiceImpl.java
new file mode 100644
index 0000000..14ba483
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/SystemInfoServiceImpl.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.resources.dto.SystemInfoDto;
+import com.epam.dlab.backendapi.service.SystemInfoService;
+import com.epam.dlab.model.systeminfo.DiskInfo;
+import com.epam.dlab.model.systeminfo.MemoryInfo;
+import com.epam.dlab.model.systeminfo.OsInfo;
+import com.epam.dlab.model.systeminfo.ProcessorInfo;
+import com.google.inject.Inject;
+import oshi.SystemInfo;
+import oshi.hardware.CentralProcessor;
+import oshi.hardware.GlobalMemory;
+import oshi.hardware.HardwareAbstractionLayer;
+import oshi.software.os.OperatingSystem;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class SystemInfoServiceImpl implements SystemInfoService {
+
+	@Inject
+	private SystemInfo si;
+
+	@Override
+	public SystemInfoDto getSystemInfo() {
+		HardwareAbstractionLayer hal = si.getHardware();
+		final OperatingSystem operatingSystem = si.getOperatingSystem();
+		return new SystemInfoDto(getOsInfo(operatingSystem), getProcessorInfo(hal), getMemoryInfo(hal),
+				getDiskInfoList(File.listRoots()));
+	}
+
+	private OsInfo getOsInfo(OperatingSystem os) {
+		return OsInfo.builder()
+				.manufacturer(os.getManufacturer())
+				.family(os.getFamily())
+				.version(os.getVersion().getVersion())
+				.buildNumber(os.getVersion().getBuildNumber())
+				.build();
+	}
+
+	private ProcessorInfo getProcessorInfo(HardwareAbstractionLayer hal) {
+		CentralProcessor cp = hal.getProcessor();
+		return ProcessorInfo.builder()
+				.model(cp.getModel())
+				.family(cp.getFamily())
+				.name(cp.getName())
+				.id(cp.getProcessorID())
+				.vendor(cp.getVendor())
+				.logicalCoreCount(cp.getLogicalProcessorCount())
+				.physicalCoreCount(cp.getPhysicalProcessorCount())
+				.isCpu64Bit(cp.isCpu64bit())
+				.currentSystemLoad(cp.getSystemCpuLoad())
+				.systemLoadAverage(cp.getSystemLoadAverage())
+				.build();
+	}
+
+	private MemoryInfo getMemoryInfo(HardwareAbstractionLayer hal) {
+		GlobalMemory memory = hal.getMemory();
+		return MemoryInfo.builder()
+				.availableMemory(memory.getAvailable())
+				.totalMemory(memory.getTotal())
+				.swapTotal(memory.getSwapTotal())
+				.swapUsed(memory.getSwapUsed())
+				.pagesPageIn(memory.getSwapPagesIn())
+				.pagesPageOut(memory.getSwapPagesOut())
+				.build();
+	}
+
+	private List<DiskInfo> getDiskInfoList(File[] roots) {
+		return Arrays.stream(roots).map(this::getDiskInfo).collect(Collectors.toList());
+	}
+
+	private DiskInfo getDiskInfo(File fileStore) {
+		return DiskInfo.builder()
+				.serialNumber(fileStore.getName())
+				.usedByteSpace(fileStore.getTotalSpace() - fileStore.getFreeSpace())
+				.totalByteSpace(fileStore.getTotalSpace())
+				.build();
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserGroupServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserGroupServiceImpl.java
new file mode 100644
index 0000000..56146e5
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserGroupServiceImpl.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.dao.UserGroupDao;
+import com.epam.dlab.backendapi.dao.UserRoleDao;
+import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
+import com.epam.dlab.backendapi.service.UserGroupService;
+import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+@Singleton
+@Slf4j
+public class UserGroupServiceImpl implements UserGroupService {
+
+	private static final String ROLE_NOT_FOUND_MSG = "Any of role : %s were not found";
+	@Inject
+	private UserGroupDao userGroupDao;
+	@Inject
+	private UserRoleDao userRoleDao;
+
+	@Override
+	public void createGroup(String group, Set<String> roleIds, Set<String> users) {
+		checkAnyRoleFound(roleIds, userRoleDao.addGroupToRole(Collections.singleton(group), roleIds));
+		if (!users.isEmpty()) {
+			log.debug("Adding users {} to group {}", users, group);
+			userGroupDao.addUsers(group, users);
+		}
+	}
+
+	@Override
+	public void updateGroup(String group, Set<String> roleIds, Set<String> users) {
+		log.debug("Updating users for group {}: {}", group, users);
+		userGroupDao.updateUsers(group, users);
+		log.debug("Removing group {} from existing roles", group);
+		userRoleDao.removeGroupWhenRoleNotIn(group, roleIds);
+		log.debug("Adding group {} to roles {}", group, roleIds);
+		userRoleDao.addGroupToRole(Collections.singleton(group), roleIds);
+	}
+
+	@Override
+	public void addUsersToGroup(String group, Set<String> users) {
+		userGroupDao.addUsers(group, users);
+	}
+
+	@Override
+	public void updateRolesForGroup(String group, Set<String> roleIds) {
+		userRoleDao.removeGroupWhenRoleNotIn(group, roleIds);
+		checkAnyRoleFound(roleIds, userRoleDao.addGroupToRole(Collections.singleton(group), roleIds));
+	}
+
+	@Override
+	public void removeUserFromGroup(String group, String user) {
+		userGroupDao.removeUser(group, user);
+	}
+
+	@Override
+	public void removeGroupFromRole(Set<String> groups, Set<String> roleIds) {
+		checkAnyRoleFound(roleIds, userRoleDao.removeGroupFromRole(groups, roleIds));
+	}
+
+	@Override
+	public void removeGroup(String groupId) {
+		if (userRoleDao.removeGroup(groupId)) {
+			userGroupDao.removeGroup(groupId);
+		}
+	}
+
+	@Override
+	public List<UserGroupDto> getAggregatedRolesByGroup() {
+		return userRoleDao.aggregateRolesByGroup();
+	}
+
+	private void checkAnyRoleFound(Set<String> roleIds, boolean anyRoleFound) {
+		if (!anyRoleFound) {
+			throw new ResourceNotFoundException(String.format(ROLE_NOT_FOUND_MSG, roleIds));
+		}
+	}
+
+
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java
index 39355fb..7a1c27c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/CSVFormatter.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/CSVFormatter.java
index 71c3c94..7f0bbf7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/CSVFormatter.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/CSVFormatter.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.util;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/DateRemoverUtil.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/DateRemoverUtil.java
index c5c95b7..12bf3e6 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/DateRemoverUtil.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/DateRemoverUtil.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package com.epam.dlab.backendapi.util;
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java
index 283d319..aaad7d1 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.util;
@@ -29,6 +32,7 @@
 import com.epam.dlab.dto.*;
 import com.epam.dlab.dto.aws.AwsCloudSettings;
 import com.epam.dlab.dto.aws.computational.AwsComputationalTerminateDTO;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.aws.computational.ComputationalCreateAws;
 import com.epam.dlab.dto.aws.computational.SparkComputationalCreateAws;
 import com.epam.dlab.dto.aws.edge.EdgeCreateAws;
@@ -46,10 +50,7 @@
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
 import com.epam.dlab.dto.base.keyload.UploadFile;
-import com.epam.dlab.dto.computational.ComputationalStartDTO;
-import com.epam.dlab.dto.computational.ComputationalStopDTO;
-import com.epam.dlab.dto.computational.ComputationalTerminateDTO;
-import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.computational.*;
 import com.epam.dlab.dto.exploratory.*;
 import com.epam.dlab.dto.gcp.GcpCloudSettings;
 import com.epam.dlab.dto.gcp.computational.ComputationalCreateGcp;
@@ -61,12 +62,11 @@
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyDTO;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.model.ResourceData;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.model.exploratory.Exploratory;
 import com.epam.dlab.util.UsernameUtils;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
@@ -74,488 +74,535 @@
 
 @Singleton
 public class RequestBuilder {
-	private static final String UNSUPPORTED_CLOUD_PROVIDER_MESSAGE = "Unsupported cloud provider ";
-	private static final String AZURE_REFRESH_TOKEN_KEY = "refresh_token";
+    private static final String UNSUPPORTED_CLOUD_PROVIDER_MESSAGE = "Unsupported cloud provider ";
+    private static final String AZURE_REFRESH_TOKEN_KEY = "refresh_token";
 
-	@Inject
-	private SelfServiceApplicationConfiguration configuration;
-	@Inject
-	private SettingsDAO settingsDAO;
+    @Inject
+    private SelfServiceApplicationConfiguration configuration;
+    @Inject
+    private SettingsDAO settingsDAO;
 
-	private CloudSettings cloudSettings(UserInfo userInfo) {
-		switch (cloudProvider()) {
-			case AWS:
-				return AwsCloudSettings.builder()
-						.awsRegion(settingsDAO.getAwsRegion())
-						.awsSecurityGroupIds(settingsDAO.getAwsSecurityGroups())
-						.awsSubnetId(settingsDAO.getAwsSubnetId())
-						.awsVpcId(settingsDAO.getAwsVpcId())
-						.confTagResourceId(settingsDAO.getConfTagResourceId())
-						.awsIamUser(userInfo.getName()).build();
-			case AZURE:
-				return AzureCloudSettings.builder()
-						.azureRegion(settingsDAO.getAzureRegion())
-						.azureResourceGroupName(settingsDAO.getAzureResourceGroupName())
-						.azureSecurityGroupName(settingsDAO.getAzureSecurityGroupName())
-						.azureSubnetName(settingsDAO.getAzureSubnetName())
-						.azureVpcName(settingsDAO.getAzureVpcName())
-						.azureIamUser(userInfo.getName()).build();
-			case GCP:
-				return GcpCloudSettings.builder().gcpIamUser(userInfo.getName()).build();
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
-	}
+    private CloudSettings cloudSettings(UserInfo userInfo) {
+        switch (cloudProvider()) {
+            case AWS:
+                return AwsCloudSettings.builder()
+                        .awsRegion(settingsDAO.getAwsRegion())
+                        .awsSecurityGroupIds(settingsDAO.getAwsSecurityGroups())
+                        .awsSubnetId(settingsDAO.getAwsSubnetId())
+                        .awsVpcId(settingsDAO.getAwsVpcId())
+                        .confTagResourceId(settingsDAO.getConfTagResourceId())
+                        .awsNotebookSubnetId(settingsDAO.getAwsNotebookSubnetId())
+                        .awsNotebookVpcId(settingsDAO.getAwsNotebookVpcId())
+                        .awsIamUser(userInfo.getName()).build();
+            case AZURE:
+                return AzureCloudSettings.builder()
+                        .azureRegion(settingsDAO.getAzureRegion())
+                        .azureResourceGroupName(settingsDAO.getAzureResourceGroupName())
+                        .azureSecurityGroupName(settingsDAO.getAzureSecurityGroupName())
+                        .azureSubnetName(settingsDAO.getAzureSubnetName())
+                        .azureVpcName(settingsDAO.getAzureVpcName())
+                        .azureIamUser(userInfo.getName()).build();
+            case GCP:
+                return GcpCloudSettings.builder().gcpIamUser(userInfo.getName()).build();
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
+    }
 
-	@SuppressWarnings("unchecked")
-	private <T extends ResourceBaseDTO<?>> T newResourceBaseDTO(UserInfo userInfo, Class<T> resourceClass) {
-		try {
-			return (T) resourceClass.newInstance()
-					.withEdgeUserName(getEdgeUserName(userInfo))
-					.withCloudSettings(cloudSettings(userInfo));
-		} catch (Exception e) {
-			throw new DlabException("Cannot create instance of resource class " + resourceClass.getName() + ". " +
-					e.getLocalizedMessage(), e);
-		}
-	}
+    @SuppressWarnings("unchecked")
+    private <T extends ResourceBaseDTO<?>> T newResourceBaseDTO(UserInfo userInfo, Class<T> resourceClass) {
+        try {
+            return (T) resourceClass.newInstance()
+                    .withEdgeUserName(getEdgeUserName(userInfo))
+                    .withCloudSettings(cloudSettings(userInfo));
+        } catch (Exception e) {
+            throw new DlabException("Cannot create instance of resource class " + resourceClass.getName() + ". " +
+                    e.getLocalizedMessage(), e);
+        }
+    }
 
-	private String getEdgeUserName(UserInfo userInfo) {
-		String edgeUser = UsernameUtils.replaceWhitespaces(userInfo.getSimpleName());
-		switch (cloudProvider()) {
-			case GCP:
-				return adjustUserName(configuration.getMaxUserNameLength(), edgeUser);
-			case AWS:
-			case AZURE:
-				return edgeUser;
-			default:
-				throw new DlabException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
-	}
+    private String getEdgeUserName(UserInfo userInfo) {
+        String edgeUser = UsernameUtils.replaceWhitespaces(userInfo.getSimpleName());
+        switch (cloudProvider()) {
+            case GCP:
+                return adjustUserName(configuration.getMaxUserNameLength(), edgeUser);
+            case AWS:
+            case AZURE:
+                return edgeUser;
+            default:
+                throw new DlabException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
+    }
 
-	private String adjustUserName(int maxLength, String userName) {
-		return userName.length() > maxLength ?
-				UUID.nameUUIDFromBytes(userName.getBytes()).toString().substring(0, maxLength) : userName;
-	}
+    private String adjustUserName(int maxLength, String userName) {
+        return userName.length() > maxLength ?
+                UUID.nameUUIDFromBytes(userName.getBytes()).toString().substring(0, maxLength) : userName;
+    }
 
-	@SuppressWarnings("unchecked")
-	private <T extends ResourceSysBaseDTO<?>> T newResourceSysBaseDTO(UserInfo userInfo, Class<T> resourceClass) {
-		T resource = newResourceBaseDTO(userInfo, resourceClass);
-		return (T) resource
-				.withServiceBaseName(settingsDAO.getServiceBaseName())
-				.withConfOsFamily(settingsDAO.getConfOsFamily());
-	}
+    @SuppressWarnings("unchecked")
+    private <T extends ResourceSysBaseDTO<?>> T newResourceSysBaseDTO(UserInfo userInfo, Class<T> resourceClass) {
+        T resource = newResourceBaseDTO(userInfo, resourceClass);
+        return (T) resource
+                .withServiceBaseName(settingsDAO.getServiceBaseName())
+                .withConfOsFamily(settingsDAO.getConfOsFamily());
+    }
 
-	@SuppressWarnings("unchecked")
-	public UploadFile newEdgeKeyUpload(UserInfo userInfo, String content) {
+    @SuppressWarnings("unchecked")
+    public UploadFile newEdgeKeyUpload(UserInfo userInfo, String content) {
 
-		switch (cloudProvider()) {
-			case AWS:
-				EdgeCreateAws edgeCreateAws = newResourceSysBaseDTO(userInfo, EdgeCreateAws.class);
-				UploadFileAws uploadFileAws = new UploadFileAws();
-				uploadFileAws.setEdge(edgeCreateAws);
-				uploadFileAws.setContent(content);
+        switch (cloudProvider()) {
+            case AWS:
+                EdgeCreateAws edgeCreateAws = newResourceSysBaseDTO(userInfo, EdgeCreateAws.class);
+                UploadFileAws uploadFileAws = new UploadFileAws();
+                uploadFileAws.setEdge(edgeCreateAws);
+                uploadFileAws.setContent(content);
 
-				return uploadFileAws;
+                return uploadFileAws;
 
-			case AZURE:
-				EdgeCreateAzure edgeCreateAzure = newResourceSysBaseDTO(userInfo, EdgeCreateAzure.class)
-						.withAzureDataLakeEnable(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
+            case AZURE:
+                EdgeCreateAzure edgeCreateAzure = newResourceSysBaseDTO(userInfo, EdgeCreateAzure.class)
+                        .withAzureDataLakeEnable(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
 
-				UploadFileAzure uploadFileAzure = new UploadFileAzure();
-				uploadFileAzure.setEdge(edgeCreateAzure);
-				uploadFileAzure.setContent(content);
+                UploadFileAzure uploadFileAzure = new UploadFileAzure();
+                uploadFileAzure.setEdge(edgeCreateAzure);
+                uploadFileAzure.setContent(content);
 
-				return uploadFileAzure;
+                return uploadFileAzure;
 
-			case GCP:
-				return new UploadFileGcp(newResourceSysBaseDTO(userInfo, EdgeCreateGcp.class), content);
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
-	}
+            case GCP:
+                return new UploadFileGcp(newResourceSysBaseDTO(userInfo, EdgeCreateGcp.class), content);
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
+    }
 
-	public ReuploadKeyDTO newKeyReupload(UserInfo userInfo, String id, String content, List<ResourceData> resources) {
-		return newResourceSysBaseDTO(userInfo, ReuploadKeyDTO.class)
-				.withId(id)
-				.withContent(content)
-				.withResources(resources);
-	}
+    public ReuploadKeyDTO newKeyReupload(UserInfo userInfo, String id, String content, List<ResourceData> resources) {
+        return newResourceSysBaseDTO(userInfo, ReuploadKeyDTO.class)
+                .withId(id)
+                .withContent(content)
+                .withResources(resources);
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ResourceSysBaseDTO<?>> T newEdgeAction(UserInfo userInfo) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return (T) newResourceSysBaseDTO(userInfo, ResourceSysBaseDTO.class);
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends ResourceSysBaseDTO<?>> T newEdgeAction(UserInfo userInfo) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return (T) newResourceSysBaseDTO(userInfo, ResourceSysBaseDTO.class);
+    }
 
-	public UserEnvironmentResources newUserEnvironmentStatus(UserInfo userInfo) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return newResourceSysBaseDTO(userInfo, UserEnvironmentResources.class);
-	}
+    public UserEnvironmentResources newUserEnvironmentStatus(UserInfo userInfo) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return newResourceSysBaseDTO(userInfo, UserEnvironmentResources.class);
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ExploratoryCreateDTO<T>> T newExploratoryCreate(Exploratory exploratory, UserInfo userInfo,
-																	  ExploratoryGitCredsDTO exploratoryGitCredsDTO) {
+    @SuppressWarnings("unchecked")
+    public <T extends ExploratoryCreateDTO<T>> T newExploratoryCreate(Exploratory exploratory, UserInfo userInfo,
+                                                                      ExploratoryGitCredsDTO exploratoryGitCredsDTO) {
 
-		T exploratoryCreate;
+        T exploratoryCreate;
 
-		switch (cloudProvider()) {
-			case AWS:
-				exploratoryCreate = (T) newResourceSysBaseDTO(userInfo, ExploratoryCreateAws.class)
-						.withNotebookInstanceType(exploratory.getShape());
-				break;
-			case AZURE:
-				exploratoryCreate = (T) newResourceSysBaseDTO(userInfo, ExploratoryCreateAzure.class)
-						.withNotebookInstanceSize(exploratory.getShape());
-				if (settingsDAO.isAzureDataLakeEnabled()) {
-					((ExploratoryCreateAzure) exploratoryCreate)
-							.withAzureClientId(settingsDAO.getAzureDataLakeClientId())
-							.withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
-				}
+        switch (cloudProvider()) {
+            case AWS:
+                exploratoryCreate = (T) newResourceSysBaseDTO(userInfo, ExploratoryCreateAws.class)
+                        .withNotebookInstanceType(exploratory.getShape());
+                break;
+            case AZURE:
+                exploratoryCreate = (T) newResourceSysBaseDTO(userInfo, ExploratoryCreateAzure.class)
+                        .withNotebookInstanceSize(exploratory.getShape());
+                if (settingsDAO.isAzureDataLakeEnabled()) {
+                    ((ExploratoryCreateAzure) exploratoryCreate)
+                            .withAzureClientId(settingsDAO.getAzureDataLakeClientId())
+                            .withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
+                }
 
-				((ExploratoryCreateAzure) exploratoryCreate)
-						.withAzureDataLakeEnabled(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
-				break;
-			case GCP:
-				exploratoryCreate = (T) newResourceSysBaseDTO(userInfo, ExploratoryCreateGcp.class)
-						.withNotebookInstanceType(exploratory.getShape());
-				break;
+                ((ExploratoryCreateAzure) exploratoryCreate)
+                        .withAzureDataLakeEnabled(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
+                break;
+            case GCP:
+                exploratoryCreate = (T) newResourceSysBaseDTO(userInfo, ExploratoryCreateGcp.class)
+                        .withNotebookInstanceType(exploratory.getShape());
+                break;
 
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
 
-		return exploratoryCreate.withExploratoryName(exploratory.getName())
-				.withNotebookImage(exploratory.getDockerImage())
-				.withApplicationName(getApplicationNameFromImage(exploratory.getDockerImage()))
-				.withGitCreds(exploratoryGitCredsDTO.getGitCreds())
-				.withImageName(exploratory.getImageName());
-	}
+        return exploratoryCreate.withExploratoryName(exploratory.getName())
+                .withNotebookImage(exploratory.getDockerImage())
+                .withApplicationName(getApplicationNameFromImage(exploratory.getDockerImage()))
+                .withGitCreds(exploratoryGitCredsDTO.getGitCreds())
+                .withImageName(exploratory.getImageName())
+                .withClusterConfig(exploratory.getClusterConfig());
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ExploratoryGitCredsUpdateDTO> T newExploratoryStart(UserInfo userInfo,
-																		  UserInstanceDTO userInstance,
-																		  ExploratoryGitCredsDTO
-																				  exploratoryGitCredsDTO) {
+    @SuppressWarnings("unchecked")
+    public <T extends ExploratoryGitCredsUpdateDTO> T newExploratoryStart(UserInfo userInfo,
+                                                                          UserInstanceDTO userInstance,
+                                                                          ExploratoryGitCredsDTO
+                                                                                  exploratoryGitCredsDTO) {
 
-		switch (cloudProvider()) {
-			case AWS:
-			case GCP:
-				return (T) newResourceSysBaseDTO(userInfo, ExploratoryGitCredsUpdateDTO.class)
-						.withNotebookInstanceName(userInstance.getExploratoryId())
-						.withGitCreds(exploratoryGitCredsDTO.getGitCreds())
-						.withNotebookImage(userInstance.getImageName())
-						.withExploratoryName(userInstance.getExploratoryName())
-						.withReuploadKeyRequired(userInstance.isReuploadKeyRequired());
-			case AZURE:
-				T exploratoryStart = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStartAzure.class)
-						.withNotebookInstanceName(userInstance.getExploratoryId())
-						.withGitCreds(exploratoryGitCredsDTO.getGitCreds())
-						.withNotebookImage(userInstance.getImageName())
-						.withExploratoryName(userInstance.getExploratoryName())
-						.withReuploadKeyRequired(userInstance.isReuploadKeyRequired());
+        switch (cloudProvider()) {
+            case AWS:
+            case GCP:
+                return (T) newResourceSysBaseDTO(userInfo, ExploratoryGitCredsUpdateDTO.class)
+                        .withNotebookInstanceName(userInstance.getExploratoryId())
+                        .withGitCreds(exploratoryGitCredsDTO.getGitCreds())
+                        .withNotebookImage(userInstance.getImageName())
+                        .withExploratoryName(userInstance.getExploratoryName())
+                        .withReuploadKeyRequired(userInstance.isReuploadKeyRequired());
+            case AZURE:
+                T exploratoryStart = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStartAzure.class)
+                        .withNotebookInstanceName(userInstance.getExploratoryId())
+                        .withGitCreds(exploratoryGitCredsDTO.getGitCreds())
+                        .withNotebookImage(userInstance.getImageName())
+                        .withExploratoryName(userInstance.getExploratoryName())
+                        .withReuploadKeyRequired(userInstance.isReuploadKeyRequired());
 
-				if (settingsDAO.isAzureDataLakeEnabled()) {
-					((ExploratoryActionStartAzure) exploratoryStart)
-							.withAzureClientId(settingsDAO.getAzureDataLakeClientId())
-							.withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
-				}
+                if (settingsDAO.isAzureDataLakeEnabled()) {
+                    ((ExploratoryActionStartAzure) exploratoryStart)
+                            .withAzureClientId(settingsDAO.getAzureDataLakeClientId())
+                            .withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
+                }
 
-				((ExploratoryActionStartAzure) exploratoryStart)
-						.withAzureDataLakeEnabled(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
+                ((ExploratoryActionStartAzure) exploratoryStart)
+                        .withAzureDataLakeEnabled(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
 
-				return exploratoryStart;
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
-	}
+                return exploratoryStart;
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ExploratoryActionDTO<T>> T newExploratoryStop(UserInfo userInfo, UserInstanceDTO userInstance) {
+    @SuppressWarnings("unchecked")
+    public <T extends ExploratoryActionDTO<T>> T newExploratoryStop(UserInfo userInfo, UserInstanceDTO userInstance) {
 
-		T exploratoryStop;
+        T exploratoryStop;
 
-		switch (cloudProvider()) {
-			case AWS:
-			case GCP:
-				exploratoryStop = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionDTO.class);
-				break;
-			case AZURE:
-				exploratoryStop = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStopAzure.class);
-				break;
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
+        switch (cloudProvider()) {
+            case AWS:
+            case GCP:
+                exploratoryStop = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionDTO.class);
+                break;
+            case AZURE:
+                exploratoryStop = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStopAzure.class);
+                break;
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
 
-		return exploratoryStop
-				.withNotebookInstanceName(userInstance.getExploratoryId())
-				.withNotebookImage(userInstance.getImageName())
-				.withExploratoryName(userInstance.getExploratoryName())
-				.withNotebookImage(userInstance.getImageName())
-				.withReuploadKeyRequired(userInstance.isReuploadKeyRequired());
-	}
+        return exploratoryStop
+                .withNotebookInstanceName(userInstance.getExploratoryId())
+                .withNotebookImage(userInstance.getImageName())
+                .withExploratoryName(userInstance.getExploratoryName())
+                .withNotebookImage(userInstance.getImageName())
+                .withReuploadKeyRequired(userInstance.isReuploadKeyRequired());
+    }
 
-	public ExploratoryGitCredsUpdateDTO newGitCredentialsUpdate(UserInfo userInfo, UserInstanceDTO instanceDTO,
-																ExploratoryGitCredsDTO exploratoryGitCredsDTO) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return newResourceSysBaseDTO(userInfo, ExploratoryGitCredsUpdateDTO.class)
-				.withNotebookImage(instanceDTO.getImageName())
-				.withApplicationName(getApplicationNameFromImage(instanceDTO.getImageName()))
-				.withNotebookInstanceName(instanceDTO.getExploratoryId())
-				.withExploratoryName(instanceDTO.getExploratoryName())
-				.withGitCreds(exploratoryGitCredsDTO.getGitCreds());
-	}
+    public ExploratoryGitCredsUpdateDTO newGitCredentialsUpdate(UserInfo userInfo, UserInstanceDTO instanceDTO,
+                                                                ExploratoryGitCredsDTO exploratoryGitCredsDTO) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return newResourceSysBaseDTO(userInfo, ExploratoryGitCredsUpdateDTO.class)
+                .withNotebookImage(instanceDTO.getImageName())
+                .withApplicationName(getApplicationNameFromImage(instanceDTO.getImageName()))
+                .withNotebookInstanceName(instanceDTO.getExploratoryId())
+                .withExploratoryName(instanceDTO.getExploratoryName())
+                .withGitCreds(exploratoryGitCredsDTO.getGitCreds());
+    }
 
-	public LibraryInstallDTO newLibInstall(UserInfo userInfo, UserInstanceDTO userInstance) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return newResourceSysBaseDTO(userInfo, LibraryInstallDTO.class)
-				.withNotebookImage(userInstance.getImageName())
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
-				.withNotebookInstanceName(userInstance.getExploratoryId())
-				.withExploratoryName(userInstance.getExploratoryName())
-				.withLibs(new ArrayList<>());
-	}
+    public LibraryInstallDTO newLibInstall(UserInfo userInfo, UserInstanceDTO userInstance,
+                                           List<LibInstallDTO> libs) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return newResourceSysBaseDTO(userInfo, LibraryInstallDTO.class)
+                .withNotebookImage(userInstance.getImageName())
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                .withNotebookInstanceName(userInstance.getExploratoryId())
+                .withExploratoryName(userInstance.getExploratoryName())
+                .withLibs(libs);
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ExploratoryActionDTO<T>> T newLibExploratoryList(UserInfo userInfo,
-																	   UserInstanceDTO userInstance) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return (T) newResourceSysBaseDTO(userInfo, ExploratoryActionDTO.class)
-				.withNotebookInstanceName(userInstance.getExploratoryId())
-				.withNotebookImage(userInstance.getImageName())
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
-				.withExploratoryName(userInstance.getExploratoryName());
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends ExploratoryActionDTO<T>> T newLibExploratoryList(UserInfo userInfo,
+                                                                       UserInstanceDTO userInstance) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return (T) newResourceSysBaseDTO(userInfo, ExploratoryActionDTO.class)
+                .withNotebookInstanceName(userInstance.getExploratoryId())
+                .withNotebookImage(userInstance.getImageName())
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                .withExploratoryName(userInstance.getExploratoryName());
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends LibraryInstallDTO> T newLibInstall(UserInfo userInfo, UserInstanceDTO userInstance,
-														 UserComputationalResource computationalResource) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return (T) newResourceSysBaseDTO(userInfo, LibraryInstallDTO.class)
-				.withComputationalId(computationalResource.getComputationalId())
-				.withComputationalName(computationalResource.getComputationalName())
-				.withExploratoryName(userInstance.getExploratoryName())
-				.withComputationalImage(computationalResource.getImageName())
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
-				.withLibs(new ArrayList<>());
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends LibraryInstallDTO> T newLibInstall(UserInfo userInfo, UserInstanceDTO userInstance,
+                                                         UserComputationalResource computationalResource,
+                                                         List<LibInstallDTO> libs) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return (T) newResourceSysBaseDTO(userInfo, LibraryInstallDTO.class)
+                .withComputationalId(computationalResource.getComputationalId())
+                .withComputationalName(computationalResource.getComputationalName())
+                .withExploratoryName(userInstance.getExploratoryName())
+                .withComputationalImage(computationalResource.getImageName())
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                .withLibs(libs);
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends LibListComputationalDTO> T newLibComputationalList(UserInfo userInfo,
-																		 UserInstanceDTO userInstance,
-																		 UserComputationalResource
-																				 computationalResource) {
+    @SuppressWarnings("unchecked")
+    public <T extends LibListComputationalDTO> T newLibComputationalList(UserInfo userInfo,
+                                                                         UserInstanceDTO userInstance,
+                                                                         UserComputationalResource
+                                                                                 computationalResource) {
 
-		checkInappropriateCloudProviderOrElseThrowException();
-		return (T) newResourceSysBaseDTO(userInfo, LibListComputationalDTO.class)
-				.withComputationalId(computationalResource.getComputationalId())
-				.withComputationalImage(computationalResource.getImageName())
-				.withLibCacheKey(ExploratoryLibCache.libraryCacheKey(userInstance))
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()));
-	}
+        checkInappropriateCloudProviderOrElseThrowException();
+        return (T) newResourceSysBaseDTO(userInfo, LibListComputationalDTO.class)
+                .withComputationalId(computationalResource.getComputationalId())
+                .withComputationalImage(computationalResource.getImageName())
+                .withLibCacheKey(ExploratoryLibCache.libraryCacheKey(userInstance))
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()));
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ComputationalBase<T>> T newComputationalCreate(UserInfo userInfo,
-																	 UserInstanceDTO userInstance,
-																	 ComputationalCreateFormDTO form) {
-		T computationalCreate;
+    @SuppressWarnings("unchecked")
+    public <T extends ComputationalBase<T>> T newComputationalCreate(UserInfo userInfo,
+                                                                     UserInstanceDTO userInstance,
+                                                                     ComputationalCreateFormDTO form) {
+        T computationalCreate;
 
-		switch (cloudProvider()) {
-			case AWS:
-			case AZURE:
-				AwsComputationalCreateForm awsForm = (AwsComputationalCreateForm) form;
-				computationalCreate = (T) newResourceSysBaseDTO(userInfo, ComputationalCreateAws.class)
-						.withInstanceCount(awsForm.getInstanceCount())
-						.withMasterInstanceType(awsForm.getMasterInstanceType())
-						.withSlaveInstanceType(awsForm.getSlaveInstanceType())
-						.withSlaveInstanceSpot(awsForm.getSlaveInstanceSpot())
-						.withSlaveInstanceSpotPctPrice(awsForm.getSlaveInstanceSpotPctPrice())
-						.withVersion(awsForm.getVersion());
-				break;
-			case GCP:
-				GcpComputationalCreateForm gcpForm = (GcpComputationalCreateForm) form;
-				computationalCreate = (T) newResourceSysBaseDTO(userInfo, ComputationalCreateGcp.class)
-						.withMasterInstanceCount(gcpForm.getMasterInstanceCount())
-						.withSlaveInstanceCount(gcpForm.getSlaveInstanceCount())
-						.withPreemptibleCount(gcpForm.getPreemptibleCount())
-						.withMasterInstanceType(gcpForm.getMasterInstanceType())
-						.withSlaveInstanceType(gcpForm.getSlaveInstanceType())
-						.withVersion(gcpForm.getVersion());
-				break;
+        switch (cloudProvider()) {
+            case AZURE:
+                throw new UnsupportedOperationException("Creating dataengine service is not supported yet");
+            case AWS:
+                AwsComputationalCreateForm awsForm = (AwsComputationalCreateForm) form;
+                computationalCreate = (T) newResourceSysBaseDTO(userInfo, ComputationalCreateAws.class)
+                        .withInstanceCount(awsForm.getInstanceCount())
+                        .withMasterInstanceType(awsForm.getMasterInstanceType())
+                        .withSlaveInstanceType(awsForm.getSlaveInstanceType())
+                        .withSlaveInstanceSpot(awsForm.getSlaveInstanceSpot())
+                        .withSlaveInstanceSpotPctPrice(awsForm.getSlaveInstanceSpotPctPrice())
+                        .withVersion(awsForm.getVersion())
+                        .withConfig((awsForm.getConfig()));
+                break;
+            case GCP:
+                GcpComputationalCreateForm gcpForm = (GcpComputationalCreateForm) form;
+                computationalCreate = (T) newResourceSysBaseDTO(userInfo, ComputationalCreateGcp.class)
+                        .withMasterInstanceCount(gcpForm.getMasterInstanceCount())
+                        .withSlaveInstanceCount(gcpForm.getSlaveInstanceCount())
+                        .withPreemptibleCount(gcpForm.getPreemptibleCount())
+                        .withMasterInstanceType(gcpForm.getMasterInstanceType())
+                        .withSlaveInstanceType(gcpForm.getSlaveInstanceType())
+                        .withVersion(gcpForm.getVersion());
+                break;
 
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
 
-		return computationalCreate
-				.withExploratoryName(form.getNotebookName())
-				.withComputationalName(form.getName())
-				.withNotebookTemplateName(userInstance.getTemplateName())
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
-				.withNotebookInstanceName(userInstance.getExploratoryId());
-	}
+        return computationalCreate
+                .withExploratoryName(form.getNotebookName())
+                .withComputationalName(form.getName())
+                .withNotebookTemplateName(userInstance.getTemplateName())
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                .withNotebookInstanceName(userInstance.getExploratoryId());
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ComputationalBase<T>> T newComputationalCreate(UserInfo userInfo,
-																	 UserInstanceDTO userInstance,
-																	 SparkStandaloneClusterCreateForm form) {
+    @SuppressWarnings("unchecked")
+    public <T extends ComputationalBase<T>> T newComputationalCreate(UserInfo userInfo,
+                                                                     UserInstanceDTO userInstance,
+                                                                     SparkStandaloneClusterCreateForm form) {
 
-		T computationalCreate;
+        T computationalCreate;
 
-		switch (cloudProvider()) {
-			case AWS:
-				computationalCreate = (T) newResourceSysBaseDTO(userInfo, SparkComputationalCreateAws.class)
-						.withDataEngineInstanceCount(form.getDataEngineInstanceCount())
-						.withDataEngineMasterShape(form.getDataEngineInstanceShape())
-						.withDataEngineSlaveShape(form.getDataEngineInstanceShape());
-				break;
-			case AZURE:
-				computationalCreate = (T) newResourceSysBaseDTO(userInfo, SparkComputationalCreateAzure.class)
-						.withDataEngineInstanceCount(form.getDataEngineInstanceCount())
-						.withDataEngineMasterSize(form.getDataEngineInstanceShape())
-						.withDataEngineSlaveSize(form.getDataEngineInstanceShape());
+        switch (cloudProvider()) {
+            case AWS:
+                computationalCreate = (T) newResourceSysBaseDTO(userInfo, SparkComputationalCreateAws.class)
+                        .withDataEngineInstanceCount(form.getDataEngineInstanceCount())
+                        .withDataEngineMasterShape(form.getDataEngineInstanceShape())
+                        .withDataEngineSlaveShape(form.getDataEngineInstanceShape())
+                        .withConfig(form.getConfig());
+                break;
+            case AZURE:
+                computationalCreate = (T) newResourceSysBaseDTO(userInfo, SparkComputationalCreateAzure.class)
+                        .withDataEngineInstanceCount(form.getDataEngineInstanceCount())
+                        .withDataEngineMasterSize(form.getDataEngineInstanceShape())
+                        .withDataEngineSlaveSize(form.getDataEngineInstanceShape())
+                        .withConfig(form.getConfig());
+                if (settingsDAO.isAzureDataLakeEnabled()) {
+                    ((SparkComputationalCreateAzure) computationalCreate)
+                            .withAzureClientId(settingsDAO.getAzureDataLakeClientId())
+                            .withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
+                }
 
-				if (settingsDAO.isAzureDataLakeEnabled()) {
-					((SparkComputationalCreateAzure) computationalCreate)
-							.withAzureClientId(settingsDAO.getAzureDataLakeClientId())
-							.withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
-				}
+                ((SparkComputationalCreateAzure) computationalCreate)
+                        .withAzureDataLakeEnabled(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
 
-				((SparkComputationalCreateAzure) computationalCreate)
-						.withAzureDataLakeEnabled(Boolean.toString(settingsDAO.isAzureDataLakeEnabled()));
+                break;
+            case GCP:
+                computationalCreate = (T) newResourceSysBaseDTO(userInfo, SparkComputationalCreateGcp.class)
+                        .withDataEngineInstanceCount(form.getDataEngineInstanceCount())
+                        .withDataEngineMasterSize(form.getDataEngineInstanceShape())
+                        .withDataEngineSlaveSize(form.getDataEngineInstanceShape())
+                        .withConfig(form.getConfig());
+                break;
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
 
-				break;
-			case GCP:
-				computationalCreate = (T) newResourceSysBaseDTO(userInfo, SparkComputationalCreateGcp.class)
-						.withDataEngineInstanceCount(form.getDataEngineInstanceCount())
-						.withDataEngineMasterSize(form.getDataEngineInstanceShape())
-						.withDataEngineSlaveSize(form.getDataEngineInstanceShape());
-				break;
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
+        return computationalCreate
+                .withExploratoryName(form.getNotebookName())
+                .withComputationalName(form.getName())
+                .withNotebookTemplateName(userInstance.getTemplateName())
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                .withNotebookInstanceName(userInstance.getExploratoryId());
+    }
 
-		return computationalCreate
-				.withExploratoryName(form.getNotebookName())
-				.withComputationalName(form.getName())
-				.withNotebookTemplateName(userInstance.getTemplateName())
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
-				.withNotebookInstanceName(userInstance.getExploratoryId());
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends ComputationalBase<T>> T newComputationalTerminate(UserInfo userInfo,
+                                                                        String exploratoryName,
+                                                                        String exploratoryId,
+                                                                        String computationalName,
+                                                                        String computationalId,
+                                                                        DataEngineType dataEngineType) {
+        T computationalTerminate;
 
-	@SuppressWarnings("unchecked")
-	public <T extends ComputationalBase<T>> T newComputationalTerminate(UserInfo userInfo,
-																		String exploratoryName,
-																		String exploratoryId,
-																		String computationalName,
-																		String computationalId,
-																		DataEngineType dataEngineType) {
-		T computationalTerminate;
+        switch (cloudProvider()) {
+            case AWS:
+                AwsComputationalTerminateDTO terminateDTO = newResourceSysBaseDTO(userInfo,
+                        AwsComputationalTerminateDTO.class);
+                if (dataEngineType == DataEngineType.CLOUD_SERVICE) {
+                    terminateDTO.setClusterName(computationalId);
+                }
+                computationalTerminate = (T) terminateDTO;
+                break;
+            case AZURE:
+                computationalTerminate = (T) newResourceSysBaseDTO(userInfo, ComputationalTerminateDTO.class);
+                break;
+            case GCP:
+                GcpComputationalTerminateDTO gcpTerminateDTO = newResourceSysBaseDTO(userInfo,
+                        GcpComputationalTerminateDTO.class);
+                if (dataEngineType == DataEngineType.CLOUD_SERVICE) {
+                    gcpTerminateDTO.setClusterName(computationalId);
+                }
+                computationalTerminate = (T) gcpTerminateDTO;
+                break;
 
-		switch (cloudProvider()) {
-			case AWS:
-				AwsComputationalTerminateDTO terminateDTO = newResourceSysBaseDTO(userInfo,
-						AwsComputationalTerminateDTO.class);
-				if (dataEngineType == DataEngineType.CLOUD_SERVICE) {
-					terminateDTO.setClusterName(computationalId);
-				}
-				computationalTerminate = (T) terminateDTO;
-				break;
-			case AZURE:
-				computationalTerminate = (T) newResourceSysBaseDTO(userInfo, ComputationalTerminateDTO.class);
-				break;
-			case GCP:
-				GcpComputationalTerminateDTO gcpTerminateDTO = newResourceSysBaseDTO(userInfo,
-						GcpComputationalTerminateDTO.class);
-				if (dataEngineType == DataEngineType.CLOUD_SERVICE) {
-					gcpTerminateDTO.setClusterName(computationalId);
-				}
-				computationalTerminate = (T) gcpTerminateDTO;
-				break;
+            default:
+                throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
+        }
 
-			default:
-				throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + cloudProvider());
-		}
+        return computationalTerminate
+                .withExploratoryName(exploratoryName)
+                .withComputationalName(computationalName)
+                .withNotebookInstanceName(exploratoryId);
+    }
 
-		return computationalTerminate
-				.withExploratoryName(exploratoryName)
-				.withComputationalName(computationalName)
-				.withNotebookInstanceName(exploratoryId);
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends ComputationalBase<T>> T newComputationalStop(UserInfo userInfo,
+                                                                   UserInstanceDTO exploratory,
+                                                                   String computationalName) {
+        return (T) newResourceSysBaseDTO(userInfo, ComputationalStopDTO.class)
+                .withExploratoryName(exploratory.getExploratoryName())
+                .withComputationalName(computationalName)
+                .withNotebookInstanceName(exploratory.getExploratoryId())
+                .withApplicationName(getApplicationNameFromImage(exploratory.getImageName()));
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ComputationalBase<T>> T newComputationalStop(UserInfo userInfo,
-																   UserInstanceDTO exploratory,
-																   String computationalName) {
-		return (T) newResourceSysBaseDTO(userInfo, ComputationalStopDTO.class)
-				.withExploratoryName(exploratory.getExploratoryName())
-				.withComputationalName(computationalName)
-				.withNotebookInstanceName(exploratory.getExploratoryId())
-				.withApplicationName(getApplicationNameFromImage(exploratory.getImageName()));
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends ComputationalBase<T>> T newComputationalStart(UserInfo userInfo, UserInstanceDTO exploratory,
+                                                                    String computationalName) {
+        return (T) newResourceSysBaseDTO(userInfo, ComputationalStartDTO.class)
+                .withExploratoryName(exploratory.getExploratoryName())
+                .withComputationalName(computationalName)
+                .withNotebookInstanceName(exploratory.getExploratoryId())
+                .withApplicationName(getApplicationNameFromImage(exploratory.getImageName()));
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T extends ComputationalBase<T>> T newComputationalStart(UserInfo userInfo, UserInstanceDTO exploratory,
-																	String computationalName) {
-		return (T) newResourceSysBaseDTO(userInfo, ComputationalStartDTO.class)
-				.withExploratoryName(exploratory.getExploratoryName())
-				.withComputationalName(computationalName)
-				.withNotebookInstanceName(exploratory.getExploratoryId())
-				.withApplicationName(getApplicationNameFromImage(exploratory.getImageName()));
-	}
-
-	@SuppressWarnings("unchecked")
-	public <T extends ExploratoryImageDTO> T newExploratoryImageCreate(UserInfo userInfo, UserInstanceDTO userInstance,
-																	   String imageName) {
-		checkInappropriateCloudProviderOrElseThrowException();
-		return (T) newResourceSysBaseDTO(userInfo, ExploratoryImageDTO.class)
-				.withNotebookInstanceName(userInstance.getExploratoryId())
-				.withExploratoryName(userInstance.getExploratoryName())
-				.withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
-				.withNotebookImage(userInstance.getImageName())
-				.withImageName(imageName);
-	}
+    @SuppressWarnings("unchecked")
+    public <T extends ExploratoryImageDTO> T newExploratoryImageCreate(UserInfo userInfo, UserInstanceDTO userInstance,
+                                                                       String imageName) {
+        checkInappropriateCloudProviderOrElseThrowException();
+        return (T) newResourceSysBaseDTO(userInfo, ExploratoryImageDTO.class)
+                .withNotebookInstanceName(userInstance.getExploratoryId())
+                .withExploratoryName(userInstance.getExploratoryName())
+                .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                .withNotebookImage(userInstance.getImageName())
+                .withImageName(imageName);
+    }
 
 
-	@SuppressWarnings("unchecked")
-	public <T extends EnvBackupDTO> T newBackupCreate(BackupFormDTO backupFormDTO, String id) {
+    @SuppressWarnings("unchecked")
+    public <T extends EnvBackupDTO> T newBackupCreate(BackupFormDTO backupFormDTO, String id) {
 
-		return (T) EnvBackupDTO.builder()
-				.configFiles(backupFormDTO.getConfigFiles())
-				.certificates(backupFormDTO.getCertificates())
-				.keys(backupFormDTO.getKeys())
-				.jars(backupFormDTO.getJars())
-				.databaseBackup(backupFormDTO.isDatabaseBackup())
-				.logsBackup(backupFormDTO.isLogsBackup())
-				.id(id)
-				.build();
-	}
+        return (T) EnvBackupDTO.builder()
+                .configFiles(backupFormDTO.getConfigFiles())
+                .certificates(backupFormDTO.getCertificates())
+                .keys(backupFormDTO.getKeys())
+                .jars(backupFormDTO.getJars())
+                .databaseBackup(backupFormDTO.isDatabaseBackup())
+                .logsBackup(backupFormDTO.isLogsBackup())
+                .id(id)
+                .build();
+    }
 
-	private CloudProvider cloudProvider() {
-		return configuration.getCloudProvider();
-	}
+    public ComputationalClusterConfigDTO newClusterConfigUpdate(UserInfo userInfo, UserInstanceDTO userInstanceDTO,
+                                                                UserComputationalResource compRes,
+                                                                List<ClusterConfig> config) {
+        final ComputationalClusterConfigDTO clusterConfigDTO = newResourceSysBaseDTO(userInfo,
+                ComputationalClusterConfigDTO.class)
+                .withExploratoryName(userInstanceDTO.getExploratoryName())
+                .withNotebookInstanceName(userInstanceDTO.getExploratoryId())
+                .withComputationalName(compRes.getComputationalName())
+                .withApplicationName(compRes.getImageName());
+        clusterConfigDTO.setCopmutationalId(compRes.getComputationalId());
+        clusterConfigDTO.setConfig(config);
+        if (cloudProvider() == AZURE && settingsDAO.isAzureDataLakeEnabled()) {
+            clusterConfigDTO.setAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
+        }
 
-	/**
-	 * Returns application name basing on docker image
-	 *
-	 * @param imageName docker image name
-	 * @return application name
-	 */
-	private String getApplicationNameFromImage(String imageName) {
-		if (imageName != null) {
-			int pos = imageName.indexOf('-');
-			if (pos > 0) {
-				return imageName.substring(pos + 1);
-			}
-		}
-		return "";
-	}
+        return clusterConfigDTO;
+    }
 
-	private void checkInappropriateCloudProviderOrElseThrowException() {
-		CloudProvider provider = cloudProvider();
-		if (provider != AWS && provider != AZURE && provider != GCP) {
-			throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + provider);
-		}
-	}
+    public ExploratoryReconfigureSparkClusterActionDTO newClusterConfigUpdate(UserInfo userInfo,
+                                                                              UserInstanceDTO userInstance,
+                                                                              List<ClusterConfig> config) {
+
+        final ExploratoryReconfigureSparkClusterActionDTO dto =
+                newResourceSysBaseDTO(userInfo, ExploratoryReconfigureSparkClusterActionDTO.class)
+                        .withNotebookInstanceName(userInstance.getExploratoryId())
+                        .withExploratoryName(userInstance.getExploratoryName())
+                        .withApplicationName(getApplicationNameFromImage(userInstance.getImageName()))
+                        .withNotebookImage(userInstance.getImageName())
+                        .withConfig(config);
+        if (cloudProvider() == AZURE && settingsDAO.isAzureDataLakeEnabled()) {
+            dto.withAzureUserRefreshToken(userInfo.getKeys().get(AZURE_REFRESH_TOKEN_KEY));
+        }
+
+        return dto;
+
+
+    }
+
+    private CloudProvider cloudProvider() {
+        return configuration.getCloudProvider();
+    }
+
+    /**
+     * Returns application name basing on docker image
+     *
+     * @param imageName docker image name
+     * @return application name
+     */
+    private String getApplicationNameFromImage(String imageName) {
+        if (imageName != null) {
+            int pos = imageName.indexOf('-');
+            if (pos > 0) {
+                return imageName.substring(pos + 1);
+            }
+        }
+        return "";
+    }
+
+    private void checkInappropriateCloudProviderOrElseThrowException() {
+        CloudProvider provider = cloudProvider();
+        if (provider != AWS && provider != AZURE && provider != GCP) {
+            throw new IllegalArgumentException(UNSUPPORTED_CLOUD_PROVIDER_MESSAGE + provider);
+        }
+    }
 }
 
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/MavenLibraryNameValidator.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/MavenLibraryNameValidator.java
index 09581f0..7a40005 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/MavenLibraryNameValidator.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/MavenLibraryNameValidator.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.validation;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SchedulerJobDTOValidator.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SchedulerJobDTOValidator.java
new file mode 100644
index 0000000..bfd78af
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SchedulerJobDTOValidator.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.validation;
+
+import com.epam.dlab.backendapi.validation.annotation.SchedulerJobDTOValid;
+import com.epam.dlab.dto.SchedulerJobDTO;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import java.util.Objects;
+
+public class SchedulerJobDTOValidator implements ConstraintValidator<SchedulerJobDTOValid, SchedulerJobDTO> {
+	@Override
+	public void initialize(SchedulerJobDTOValid schedulerJobDTOValid) {
+		//do nothing
+	}
+
+	@Override
+	public boolean isValid(SchedulerJobDTO schedulerJobDTO, ConstraintValidatorContext constraintValidatorContext) {
+		if (!schedulerJobDTO.isCheckInactivityRequired()) {
+			return !schedulerJobDTO.getStartDaysRepeat().isEmpty() || !schedulerJobDTO.getStopDaysRepeat().isEmpty();
+		} else if (schedulerJobDTO.isCheckInactivityRequired() && Objects.isNull(schedulerJobDTO.getMaxInactivity())) {
+			constraintValidatorContext.disableDefaultConstraintViolation();
+			constraintValidatorContext.buildConstraintViolationWithTemplate("Max inactivity time should be set").addConstraintViolation();
+			return false;
+		} else {
+			return true;
+		}
+	}
+}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SelfServiceCloudConfigurationSequenceProvider.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SelfServiceCloudConfigurationSequenceProvider.java
index 9950e39..8dc16c8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SelfServiceCloudConfigurationSequenceProvider.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/SelfServiceCloudConfigurationSequenceProvider.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2017, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.validation;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java
index 257599e..1e8be9b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/LibNameValid.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.validation.annotation;
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/SchedulerJobDTOValid.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/SchedulerJobDTOValid.java
new file mode 100644
index 0000000..578303f
--- /dev/null
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/validation/annotation/SchedulerJobDTOValid.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.validation.annotation;
+
+import com.epam.dlab.backendapi.validation.SchedulerJobDTOValidator;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Constraint(validatedBy = {SchedulerJobDTOValidator.class})
+@Target({ElementType.FIELD, ElementType.PARAMETER})
+@Retention(value = RetentionPolicy.RUNTIME)
+public @interface SchedulerJobDTOValid {
+
+
+	String message() default "Start days or stop days should be filled for scheduler";
+
+	Class<?>[] groups() default {};
+
+	Class<? extends Payload>[] payload() default {};
+}
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/quartz.properties b/services/self-service/src/main/resources/quartz.properties
new file mode 100644
index 0000000..ff0fc59
--- /dev/null
+++ b/services/self-service/src/main/resources/quartz.properties
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.quartz.jobStore.class=com.novemberain.quartz.mongodb.MongoDBJobStore
+org.quartz.jobStore.collectionPrefix=scheduler
+org.quartz.jobStore.isClustered=true
+org.quartz.scheduler.instanceId=AUTO
+org.quartz.scheduler.instanceName=dlab
+org.quartz.threadPool.threadCount=1
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/.angular-cli.json b/services/self-service/src/main/resources/webapp/.angular-cli.json
index 453876a..a2c479e 100644
--- a/services/self-service/src/main/resources/webapp/.angular-cli.json
+++ b/services/self-service/src/main/resources/webapp/.angular-cli.json
@@ -19,7 +19,8 @@
       "testTsconfig": "tsconfig.spec.json",
       "prefix": "dlab",
       "styles": [
-        "styles.scss"
+        "styles.scss",
+        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
       ],
       "scripts": [
         "../node_modules/hammerjs/hammer.min.js"
diff --git a/services/self-service/src/main/resources/webapp/.editorconfig b/services/self-service/src/main/resources/webapp/.editorconfig
index 6e87a00..b38006f 100644
--- a/services/self-service/src/main/resources/webapp/.editorconfig
+++ b/services/self-service/src/main/resources/webapp/.editorconfig
@@ -1,4 +1,24 @@
-# Editor configuration, see http://editorconfig.org
+# *****************************************************************************
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+# ******************************************************************************
+
 root = true
 
 [*]
diff --git a/services/self-service/src/main/resources/webapp/package.json b/services/self-service/src/main/resources/webapp/package.json
index 8e751e5..8e821e9 100644
--- a/services/self-service/src/main/resources/webapp/package.json
+++ b/services/self-service/src/main/resources/webapp/package.json
@@ -31,6 +31,7 @@
     "moment": "^2.20.1",
     "moment-timezone": "^0.5.16",
     "ng-daterangepicker": "^0.2.0",
+    "ng2-toastr": "^4.1.2",
     "rxjs": "5.5.6",
     "web-animations-js": "^2.3.1",
     "zone.js": "0.7.6"
diff --git a/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.html b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.html
new file mode 100644
index 0000000..dfd8599
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.html
@@ -0,0 +1,33 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<div class="no-access-page">
+  <div class="content">
+    <a class="logo" href="#/resources_list">
+      <img src="assets/img/security-screen.png" alt="">
+    </a>
+
+    <div class="message-block">
+      <h3>Access Denied!</h3>
+      <p>The page you were trying to reach has restricted access.
+        <a href="#/resources_list">Go to the Homepage?</a>
+      </p>
+    </div>
+  </div>
+</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.scss b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.scss
new file mode 100644
index 0000000..df52859
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.scss
@@ -0,0 +1,57 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+.no-access-page {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: #f5f5f5;
+  color: #8c8888;
+  z-index: -1;
+  .content {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    max-width: 560px;
+    max-height: 360px;
+    margin: auto;
+  }
+  .logo {
+    display: block;
+    img {
+      width: 100%;
+    }
+  }
+  .message-block {
+    width: 300px;
+    margin: 0 auto;
+    text-align: center;
+    a {
+      text-decoration: none;
+      color: #36afd5;
+      transition: all .35s ease-in-out;
+      &:hover, &:active {
+        color: #3392b0;
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.ts b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.ts
new file mode 100644
index 0000000..e14c894
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.component.ts
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'dlab-access-denied',
+  templateUrl: './access-denied.component.html',
+  styleUrls: ['./access-denied.component.scss']
+})
+export class AccessDeniedComponent implements OnInit {
+  constructor() { }
+  ngOnInit() { }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.module.ts b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.module.ts
new file mode 100644
index 0000000..d6d4438
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/access-denied/access-denied.module.ts
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { AccessDeniedComponent } from './access-denied.component';
+
+@NgModule({
+  imports: [CommonModule],
+  declarations: [AccessDeniedComponent],
+  exports: [AccessDeniedComponent]
+})
+export class AccessDeniedModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/app.component.html b/services/self-service/src/main/resources/webapp/src/app/app.component.html
index 8afda4d..de9deb4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/app.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/app.component.html
@@ -1,19 +1,21 @@
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<router-outlet></router-outlet>
\ No newline at end of file
+<dlab-navbar></dlab-navbar>
+<router-outlet></router-outlet>
diff --git a/services/self-service/src/main/resources/webapp/src/app/app.component.ts b/services/self-service/src/main/resources/webapp/src/app/app.component.ts
index 12dfb48..e96670e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/app.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/app.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component } from '@angular/core';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/app.module.ts b/services/self-service/src/main/resources/webapp/src/app/app.module.ts
index 25a21fa..5182934 100644
--- a/services/self-service/src/main/resources/webapp/src/app/app.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/app.module.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -28,8 +29,10 @@
 import { AppRoutingModule } from './app.routing.module';
 
 import { LoginModule } from './login/login.module';
+import { NavbarModule } from './shared/navbar';
 import { GuidesModule } from './help';
 import { NotFoundModule } from './not-found/not-found.module';
+import { AccessDeniedModule } from './access-denied/access-denied.module';
 import { ResourcesModule } from './resources/resources.module';
 import { HealthStatusModule } from './health-status/health-status.module';
 import { LogInterceptorFactory } from './core/interceptors/logInterceptor.factory';
@@ -38,7 +41,6 @@
 
 import { CoreModule } from './core/core.module';
 
-
 @NgModule({
   declarations: [AppComponent],
   imports: [
@@ -47,9 +49,11 @@
     ReactiveFormsModule,
     HttpModule,
     LoginModule,
+    NavbarModule,
     ResourcesModule,
     GuidesModule,
     NotFoundModule,
+    AccessDeniedModule,
     HealthStatusModule,
     ReportingModule,
     ManagenementModule,
diff --git a/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts b/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
index a5e56df..090fb49 100644
--- a/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { ModuleWithProviders } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
@@ -24,6 +25,7 @@
 import { HealthStatusComponent } from './health-status/health-status.component';
 import { AccessNotebookGuideComponent, PublicKeyGuideComponent } from './help';
 import { NotFoundComponent } from './not-found/not-found.component';
+import { AccessDeniedComponent } from './access-denied/access-denied.component';
 import { ReportingComponent } from './reporting/reporting.component';
 import { ManagementComponent } from './management/management.component';
 import { AuthorizationGuard, CheckParamsGuard, CloudProviderGuard } from './core/services';
@@ -56,6 +58,10 @@
     component: AccessNotebookGuideComponent,
     canActivate: [AuthorizationGuard]
   }, {
+    path: '403',
+    component: AccessDeniedComponent,
+    canActivate: [AuthorizationGuard]
+  }, {
     path: '',
     redirectTo: 'resources_list',
     pathMatch: 'full'
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
index af518bc..6576fb5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule, Optional, SkipSelf, ModuleWithProviders } from '@angular/core';
 import { CommonModule } from '@angular/common';
@@ -33,6 +34,8 @@
 import { BackupService } from './services/backup.service';
 import { SchedulerService } from './services/scheduler.service';
 import { ManageEnvironmentsService } from './services/managementEnvironments.service';
+import { RolesGroupsService } from './services/rolesManagement.service';
+import { DataengineConfigurationService } from './services/dataengineConfiguration.service';
 
 @NgModule({
   imports: [CommonModule],
@@ -61,7 +64,9 @@
         BackupService,
         SchedulerService,
         ManageEnvironmentsService,
-        ApplicationServiceFacade
+        RolesGroupsService,
+        ApplicationServiceFacade,
+        DataengineConfigurationService
       ]
     };
   }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside/click-outside.directive.ts b/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside.directive.ts
similarity index 65%
rename from services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside/click-outside.directive.ts
rename to services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside.directive.ts
index b2f42e2..f330162 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside/click-outside.directive.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside.directive.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Directive, OnInit, OnDestroy, Output, EventEmitter, ElementRef } from '@angular/core';
 import { Observable } from 'rxjs/Observable';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside/index.ts
deleted file mode 100644
index 6acf928..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/core/directives/click-outside/index.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ClickOutsideDirective } from './click-outside.directive';
-
-export * from './click-outside.directive';
-
-@NgModule({
-  imports: [CommonModule],
-  declarations: [ClickOutsideDirective],
-  exports: [ClickOutsideDirective]
-})
-
-export class ClickOutsideModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/directives/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/directives/index.ts
new file mode 100644
index 0000000..83a0eae
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/core/directives/index.ts
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { ClickOutsideDirective } from './click-outside.directive';
+import { ScrollDirective } from './scrollTo.directive';
+
+export * from './scrollTo.directive';
+export * from './click-outside.directive';
+
+@NgModule({
+  imports: [CommonModule],
+  declarations: [ClickOutsideDirective, ScrollDirective],
+  exports: [ClickOutsideDirective, ScrollDirective]
+})
+
+export class DirectivesModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/directives/scrollTo.directive.ts b/services/self-service/src/main/resources/webapp/src/app/core/directives/scrollTo.directive.ts
new file mode 100644
index 0000000..08560b2
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/core/directives/scrollTo.directive.ts
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ElementRef, HostBinding, Input } from '@angular/core';
+import { Directive } from '@angular/core';
+
+@Directive({
+  selector: '[scrollTo]'
+})
+export class ScrollDirective {
+  constructor(private elRef: ElementRef) {}
+
+  @Input()
+  set scrollTo(condition) {
+    if (condition) {
+      const scrollable = this.elRef.nativeElement;
+      scrollable.scrollIntoView(false);
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/httpInterceptor.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/httpInterceptor.service.ts
index 4730287..fff2e38 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/httpInterceptor.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/httpInterceptor.service.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import {
   ConnectionBackend,
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/logInterceptor.factory.ts b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/logInterceptor.factory.ts
index b9981e6..10cbca7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/logInterceptor.factory.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/logInterceptor.factory.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { HttpModule, Http, XHRBackend, RequestOptions } from '@angular/http';
 import { RouterModule, Router } from '@angular/router';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplication.model.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplication.model.ts
index 914cbf9..cedb945 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplication.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplication.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class ComputationalResourceApplication {
   name: string;
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplicationTemplate.model.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplicationTemplate.model.ts
index 1e90fa7..4bdfa72 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplicationTemplate.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceApplicationTemplate.model.ts
@@ -1,22 +1,23 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { ComputationalResourceApplication, ResourceShapeTypesModel } from './';
+import { ComputationalResourceApplication, ResourceShapeTypesModel } from '.';
 
 export class ComputationalResourceApplicationTemplate {
   image: string;
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
index b8e0bc9..4c03b0e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
@@ -1,22 +1,23 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { ComputationalResourceApplicationTemplate, ResourceShapeTypesModel, ImageType } from './';
+import { ComputationalResourceApplicationTemplate, ResourceShapeTypesModel, ImageType } from '.';
 import { SortUtil } from '../util';
 
 export class ComputationalResourceImage {
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
index a4bac05..dae54bc 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
@@ -1,22 +1,23 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { ImageType, ResourceShapeTypesModel } from './';
+import { ImageType, ResourceShapeTypesModel } from '.';
 
 export class ExploratoryEnvironmentVersionModel {
   image: string;
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
index 3c96d91..8fe0401 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export enum ImageType {
   СOMPUTATIONAL = 0,
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts
index 2e67832..9ab3bc6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export * from './resourceShapeTypes.model';
 export * from './resourceShape.model';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShape.model.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShape.model.ts
index 19961cd..5b56023 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShape.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShape.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class ResourceShapeModel {
   size: string;
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShapeTypes.model.ts b/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShapeTypes.model.ts
index e524849..deccb92 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShapeTypes.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/models/resourceShapeTypes.model.ts
@@ -1,21 +1,22 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-import { ResourceShapeModel } from './';
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { ResourceShapeModel } from '.';
 
 export class ResourceShapeTypesModel {
   resourcesShapeTypes: any;
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/highlight.pipe.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/highlight.pipe.ts
index c1d7b8c..2255d40 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/highlight.pipe.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/highlight.pipe.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
 import { NgModule } from '@angular/core';
@@ -34,4 +35,4 @@
   exports: [HighLightPipe]
 })
 
-export class HighLightPipeModule { }
\ No newline at end of file
+export class HighLightPipeModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
index d0aeabd..0a78f17 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export * from './keys-pipe';
 export * from './underscoreless-pipe';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/index.ts
index 543b27b..c4dabca 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/keys.pipe.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/keys.pipe.ts
index ffb7a17..5fe18ad 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/keys.pipe.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/keys-pipe/keys.pipe.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Pipe, PipeTransform } from '@angular/core';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/index.ts
index ffe1f69..29fc29b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/lib-sort.pipe.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/lib-sort.pipe.ts
index a456fae..20c4b91 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/lib-sort.pipe.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/lib-sort-pipe/lib-sort.pipe.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Pipe, PipeTransform } from '@angular/core';
 
@@ -31,4 +32,4 @@
     });
     return array;
   }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/index.ts
index 5f30f07..3608014 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/replace-breaks.pipe.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/replace-breaks.pipe.ts
index e7d646a..0759b2d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/replace-breaks.pipe.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/replace-breaks-pipe/replace-breaks.pipe.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Pipe, PipeTransform } from '@angular/core';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/index.ts
index d29c61e..f004817 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/underscoreless.pipe.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/underscoreless.pipe.ts
index 470f87d..a21da90 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/underscoreless.pipe.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/underscoreless-pipe/underscoreless.pipe.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Pipe, PipeTransform } from '@angular/core';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/appRouting.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/appRouting.service.ts
index 17c02be..1035cf8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/appRouting.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/appRouting.service.ts
@@ -1,38 +1,38 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
 import { Router } from '@angular/router';
-import { Http } from '@angular/http';
 
 @Injectable()
 export class AppRoutingService {
-
-  constructor(
-    private http: Http,
-    private router: Router
-  ) { }
+  constructor(private router: Router) { }
 
   redirectToLoginPage(): void {
     if (this.router.url !== '/login')
       this.router.navigate(['/login']);
   }
 
+  redirectToNoAccessPage(): void {
+    this.router.navigate(['/403']);
+  }
+
   redirectToHomePage(): void {
     this.router.navigate(['/resources_list']);
   }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts
index 8b71b16..606a5b6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationSecurity.service.ts
@@ -1,23 +1,23 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Injectable, EventEmitter } from '@angular/core';
-import { Response } from '@angular/http';
+import { Injectable } from '@angular/core';
 import { Observable } from 'rxjs/Observable';
 import { BehaviorSubject } from 'rxjs/BehaviorSubject';
 
@@ -27,14 +27,17 @@
 import 'rxjs/add/observable/throw';
 
 import { LoginModel } from '../../login/login.model';
-import { ApplicationServiceFacade, AppRoutingService } from './';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from '../util';
+import { ApplicationServiceFacade, AppRoutingService } from '.';
+import { ErrorUtils, HTTP_STATUS_CODES } from '../util';
 import { DICTIONARY } from '../../../dictionary/global.dictionary';
 
 @Injectable()
 export class ApplicationSecurityService {
   private accessTokenKey: string = 'access_token';
   private userNameKey: string = 'user_name';
+  private quoteUsedKey: string = 'billing_quote';
+  private _loggedInStatus = new BehaviorSubject<boolean>(null);
+
   readonly DICTIONARY = DICTIONARY;
 
   emitter: BehaviorSubject<any> = new BehaviorSubject<any>('');
@@ -43,12 +46,16 @@
   constructor(
     private serviceFacade: ApplicationServiceFacade,
     private appRoutingService: AppRoutingService
-  ) { }
+  ) {}
 
-  public login(loginModel: LoginModel): Observable<boolean> {
+  get loggedInStatus() {
+    return this._loggedInStatus.asObservable();
+  }
+
+  public login(loginModel: LoginModel): Observable<boolean | {}> {
     return this.serviceFacade
       .buildLoginRequest(loginModel.toJsonString())
-      .map((response: Response) => {
+      .map(response => {
         if (response.status === HTTP_STATUS_CODES.OK) {
           if (!DICTIONARY.use_ldap) {
             this.setAuthToken(response.json().access_token);
@@ -57,8 +64,10 @@
             this.setAuthToken(response.text());
             this.setUserName(loginModel.username);
           }
+          this._loggedInStatus.next(true);
           return true;
         }
+        this._loggedInStatus.next(false);
         return false;
       }, this);
   }
@@ -69,8 +78,10 @@
     if (!!authToken) {
       return this.serviceFacade
         .buildLogoutRequest()
-        .map((response: Response) => {
+        .map(response => {
           this.clearAuthToken();
+          this.setBillingQuoteUsed('');
+          this._loggedInStatus.next(false);
 
           return response.status === HTTP_STATUS_CODES.OK;
         }, this);
@@ -87,6 +98,14 @@
     return localStorage.getItem(this.accessTokenKey);
   }
 
+  public getBillingQuoteUsed(): string {
+    return localStorage.getItem(this.quoteUsedKey);
+  }
+
+  public setBillingQuoteUsed(quoteUsedKey): void {
+    localStorage.setItem(this.quoteUsedKey, quoteUsedKey);
+  }
+
   public isLoggedIn(): Observable<boolean> {
     const authToken = this.getAuthToken();
     const currentUser = this.getCurrentUserName();
@@ -94,16 +113,20 @@
     if (authToken && currentUser) {
       return this.serviceFacade
         .buildAuthorizeRequest(currentUser)
-        .map((response: Response) => {
-          if (response.status === HTTP_STATUS_CODES.OK)
+        .map(response => {
+          if (response.status === HTTP_STATUS_CODES.OK) {
+            this._loggedInStatus.next(true);
             return true;
+          }
 
           this.clearAuthToken();
           this.appRoutingService.redirectToLoginPage();
           return false;
         })
-        .catch((error: any) => {
-          this.handleError(error);
+        .catch(error => {
+          // this.handleError(error);
+          let errObj = error.json();
+          this.emmitMessage(errObj.message);
           this.clearAuthToken();
 
           return Observable.of(false);
@@ -111,6 +134,7 @@
     }
 
     this.appRoutingService.redirectToLoginPage();
+    this._loggedInStatus.next(false);
     return Observable.of(false);
   }
 
@@ -129,7 +153,9 @@
         }
 
         if (response.status !== 200) {
-          this.handleError(response);
+          // this.handleError(response);
+          const errObj = response.json();
+          this.emmitMessage(errObj.message);
         }
         return false;
 
@@ -137,16 +163,18 @@
         if (DICTIONARY.cloud_provider === 'azure' && error && error.status === HTTP_STATUS_CODES.FORBIDDEN) {
           window.location.href = error.headers.get('Location');
         } else {
-          this.handleError(error);
+          // this.handleError(error);
+          const errObj = error.json();
+          this.emmitMessage(errObj.message);
           return Observable.of(false);
         }
       });
   }
 
-  private handleError(error: any) {
-
-    this.emmitMessage(ErrorMapUtils.handleError(error));
-  }
+  // private handleError(error: any) {
+  //   // this.emmitMessage(ErrorUtils.handleError(error));
+  //   this.emmitMessage(error.message);
+  // }
 
   private emmitMessage(message): void {
     this.appRoutingService.redirectToLoginPage();
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
index 0058a5e..82cef94 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
 import { Http, Response, RequestOptions, RequestMethod, Headers } from '@angular/http';
@@ -44,11 +45,17 @@
   private static readonly COMPUTATIONAL_RESOURCES_DATAENGINE = 'computational_resources_dataengine';
   private static readonly COMPUTATIONAL_RESOURCES_DATAENGINESERVICE = 'computational_resources_dataengineservice';
   private static readonly USER_PREFERENCES = 'user_preferences';
+  private static readonly BUDGET = 'budget';
   private static readonly ENVIRONMENT_HEALTH_STATUS = 'environment_health_status';
+  private static readonly ROLES = 'roles';
+  private static readonly GROUPS = 'groups';
+  private static readonly GROUP_ROLE = 'group_role';
+  private static readonly GROUP_USER = 'group_user';
   private static readonly BACKUP = 'backup';
   private static readonly EDGE_NODE_START = 'edge_node_start';
   private static readonly EDGE_NODE_STOP = 'edge_node_stop';
   private static readonly EDGE_NODE_RECREATE = 'edge_node_recreate';
+  private static readonly SNN_MONITOR = 'ssn_monitor';
   private static readonly LIB_GROUPS = 'lib_groups';
   private static readonly LIB_LIST = 'lib_list';
   private static readonly LIB_INSTALL = 'lib_install';
@@ -57,6 +64,7 @@
   private static readonly GIT_CREDS = 'git_creds';
   private static readonly BILLING = 'billing';
   private static readonly DOWNLOAD_REPORT = 'download_report';
+  private static readonly SETTINGS = 'settings';
   private accessTokenKey: string = 'access_token';
   private requestRegistry: Dictionary<string>;
 
@@ -82,7 +90,7 @@
     return this.buildRequest(RequestMethod.Post,
       this.requestRegistry.Item(ApplicationServiceFacade.AUTHORIZE),
       body,
-      this.getRequestOptions(true, true));
+      this.getRequestOptions(false, true));
   }
 
   public buildGetAuthToken(body: any): Observable<Response> {
@@ -371,6 +379,20 @@
       this.getRequestOptions(true, true));
   }
 
+  public buildResetScheduleSettings(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Delete,
+      this.requestRegistry.Item(ApplicationServiceFacade.SCHEDULER),
+      data,
+      this.getRequestOptions(true, true));
+  }
+
+  public BuildGetActiveSchcedulersData(param): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.SCHEDULER) + param,
+      null,
+      this.getRequestOptions(true, true));
+  }
+
   public buildGetActiveUsers(): Observable<Response> {
     return this.buildRequest(RequestMethod.Get,
       this.requestRegistry.Item(ApplicationServiceFacade.ACTIVE_LIST),
@@ -399,6 +421,118 @@
       this.getRequestOptions(false, true));
   }
 
+  public buildUpdateUsersBudget(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Put,
+      this.requestRegistry.Item(ApplicationServiceFacade.BUDGET),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildGetSsnMonitorData(): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.SNN_MONITOR),
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildGetTotalBudgetData(): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.SETTINGS),
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildUpdateTotalBudgetData(param, method: number): Observable<Response> {
+    return this.buildRequest(method,
+      this.requestRegistry.Item(ApplicationServiceFacade.SETTINGS) + param,
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildGetGroupsData(): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUPS),
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildGetRolesData(): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.ROLES),
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildSetupNewGroup(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Post,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUPS),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildUpdateGroupData(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Put,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUPS),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildSetupRolesForGroup(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Put,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUP_ROLE),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildSetupUsersForGroup(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Put,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUP_USER),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildRemoveUsersForGroup(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Delete,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUP_USER),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildRemoveGroupById(data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Delete,
+      this.requestRegistry.Item(ApplicationServiceFacade.GROUPS),
+      data,
+      this.getRequestOptions(false, true));
+  }
+
+  public buildGetClusterConfiguration(param): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.COMPUTATIONAL_RESOURCES) + param,
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildEditClusterConfiguration(param, data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Put,
+      this.requestRegistry.Item(ApplicationServiceFacade.COMPUTATIONAL_RESOURCES) + param,
+      data,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildGetExploratorySparkConfiguration(param): Observable<Response> {
+    return this.buildRequest(RequestMethod.Get,
+      this.requestRegistry.Item(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT) + param,
+      null,
+      this.getRequestOptions(true, true));
+  }
+
+  public buildEditExploratorySparkConfiguration(param, data): Observable<Response> {
+    return this.buildRequest(RequestMethod.Put,
+      this.requestRegistry.Item(ApplicationServiceFacade.EXPLORATORY_ENVIRONMENT) + param,
+      data,
+      this.getRequestOptions(true, true));
+  }
+
   private setupRegistry(): void {
     this.requestRegistry = new Dictionary<string>();
 
@@ -406,7 +540,7 @@
     this.requestRegistry.Add(ApplicationServiceFacade.LOGIN, '/api/user/login');
     this.requestRegistry.Add(ApplicationServiceFacade.LOGOUT, '/api/user/logout');
     this.requestRegistry.Add(ApplicationServiceFacade.AUTHORIZE, '/api/user/authorize');
-    this.requestRegistry.Add(ApplicationServiceFacade.ACTIVE_LIST, '/api/environment/user/active');
+    this.requestRegistry.Add(ApplicationServiceFacade.ACTIVE_LIST, '/api/environment/user');
     this.requestRegistry.Add(ApplicationServiceFacade.FULL_ACTIVE_LIST, '/api/environment/all');
     this.requestRegistry.Add(ApplicationServiceFacade.ENV, '/api/environment');
 
@@ -440,6 +574,7 @@
 
     // Filtering Configuration
     this.requestRegistry.Add(ApplicationServiceFacade.USER_PREFERENCES, '/api/user/settings');
+    this.requestRegistry.Add(ApplicationServiceFacade.BUDGET, '/api/user/settings/budget');
 
     // Environment Health Status
     this.requestRegistry.Add(ApplicationServiceFacade.ENVIRONMENT_HEALTH_STATUS, '/api/infrastructure/status');
@@ -447,6 +582,12 @@
     this.requestRegistry.Add(ApplicationServiceFacade.EDGE_NODE_STOP, '/api/infrastructure/edge/stop');
     this.requestRegistry.Add(ApplicationServiceFacade.EDGE_NODE_RECREATE, '/api/user/access_key/recover');
     this.requestRegistry.Add(ApplicationServiceFacade.BACKUP, '/api/infrastructure/backup');
+    this.requestRegistry.Add(ApplicationServiceFacade.SNN_MONITOR, '/api/sysinfo');
+    this.requestRegistry.Add(ApplicationServiceFacade.ROLES, '/api/role');
+    this.requestRegistry.Add(ApplicationServiceFacade.GROUPS, '/api/group');
+    this.requestRegistry.Add(ApplicationServiceFacade.GROUP_ROLE, 'api/group/role');
+    this.requestRegistry.Add(ApplicationServiceFacade.GROUP_USER, '/api/group/user');
+    this.requestRegistry.Add(ApplicationServiceFacade.SETTINGS, '/api/settings');
 
     // Libraries Installation
     this.requestRegistry.Add(ApplicationServiceFacade.LIB_GROUPS, '/api/infrastructure_provision/exploratory_environment/lib_groups');
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts
index fffbdc9..8a5b0dd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/authorization.guard.ts
@@ -1,31 +1,29 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
-import { ApplicationSecurityService } from './';
+import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
+import { ApplicationSecurityService } from '.';
 
 @Injectable()
 export class AuthorizationGuard implements CanActivate {
-  constructor(
-    private applicationSecurityService: ApplicationSecurityService,
-    private router: Router
-  ) { }
+  constructor(private applicationSecurityService: ApplicationSecurityService) { }
 
   canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
     return this.applicationSecurityService.isLoggedIn();
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/backup.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/backup.service.ts
index 3dd8f88..d87219e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/backup.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/backup.service.ts
@@ -1,26 +1,27 @@
-/***************************************************************************
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
-import { ApplicationServiceFacade } from './';
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util';
 
 @Injectable()
 export class BackupService {
@@ -29,22 +30,22 @@
   constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
 
   set creatingBackup(data) {
-    this.inProgress = data.status !== 'CREATED';
+    this.inProgress = data.status !== 'CREATED' && data.status !== 'FAILED';
   }
 
   public createBackup(data): Observable<any> {
     return this.applicationServiceFacade
       .buildCreateBackupRequest(data)
-      .map((response: Response) => response)
-      .catch((error: any) => error);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public getBackupStatus(uuid): Observable<Response> {
+  public getBackupStatus(uuid): Observable<{}> {
     const body = `/${uuid}`;
     return this.applicationServiceFacade
       .buildGetBackupStatusRequest(body)
-      .map((response: Response) => response.json())
+      .map(response => response.json())
       .map(data => (this.creatingBackup = data))
-      .catch((error: any) => error);
+      .catch(ErrorUtils.handleServiceError);
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/billingReport.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/billingReport.service.ts
index 501f42b..e4ecc9c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/billingReport.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/billingReport.service.ts
@@ -1,44 +1,43 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
-import { ApplicationServiceFacade, AppRoutingService } from './';
-import { HTTP_STATUS_CODES } from '../util';
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util';
 
 @Injectable()
 export class BillingReportService {
+  constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
 
-    constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
+  public getGeneralBillingData(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetGeneralBillingData(data)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-    public getGeneralBillingData(data): Observable<Response> {
-        return this.applicationServiceFacade
-        .buildGetGeneralBillingData(data)
-        .map((response: Response) => response.json())
-        .catch((error: any) => error);
-    }
-
-    public downloadReport(data): Observable<{} | Response> {
-        return this.applicationServiceFacade
-        .buildDownloadReportData(data)
-        .map((response: Response) => response)
-        .catch((error: any) => error);
-    }
+  public downloadReport(data): Observable<string | {}> {
+    return this.applicationServiceFacade
+      .buildDownloadReportData(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts
index 4c4b615..7c81ded 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/checkParams.guard.ts
@@ -1,24 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
-import { ApplicationSecurityService, AuthorizationGuard } from './';
+import {  CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
+import { ApplicationSecurityService, AuthorizationGuard } from '.';
 
 import 'rxjs/add/operator/toPromise';
 
@@ -28,29 +29,35 @@
 
   constructor(
     private applicationSecurityService: ApplicationSecurityService,
-    private _authGuard: AuthorizationGuard,
-    private router: Router
-  ) { }
+    private _authGuard: AuthorizationGuard
+  ) {}
 
   canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
-    return this._authGuard.canActivate(next, state).toPromise().then((auth: boolean) => {
+    return this._authGuard
+      .canActivate(next, state)
+      .toPromise()
+      .then((auth: boolean) => {
         const search = document.URL.split('?')[1];
 
-          if (search && this.checkParamsCoincidence(search)) {
-            this.result = search.split('&').reduce(function(prev, curr) {
-                const params = curr.split('=');
-                prev[decodeURIComponent(params[0])] = decodeURIComponent(params[1]);
-                return prev;
-            }, {});
+        if (search && this.checkParamsCoincidence(search)) {
+          this.result = search.split('&').reduce(function(prev, curr) {
+            const params = curr.split('=');
+            prev[decodeURIComponent(params[0])] = decodeURIComponent(params[1]);
+            return prev;
+          }, {});
 
-            return this.applicationSecurityService.redirectParams(this.result).toPromise();
-          }
+          return this.applicationSecurityService
+            .redirectParams(this.result)
+            .toPromise();
+        }
 
-          return Promise.resolve(!!auth);
-    });
+        return Promise.resolve(!!auth);
+      });
   }
 
   private checkParamsCoincidence(search): boolean {
-    return ['code', 'state', 'error', 'error_description'].some(el => search.indexOf(el));
+    return ['code', 'state', 'error', 'error_description'].some(el =>
+      search.indexOf(el)
+    );
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/cloudProvider.guard.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/cloudProvider.guard.ts
index 3ed5601..93120ab 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/cloudProvider.guard.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/cloudProvider.guard.ts
@@ -1,40 +1,33 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
-import { AuthorizationGuard, AppRoutingService, HealthStatusService } from './';
+import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
+import { HealthStatusService } from '.';
 
-import { DICTIONARY } from '../../../dictionary/global.dictionary';
-
-import { Observable } from 'rxjs/Observable';
 import 'rxjs/add/operator/toPromise';
-import { Observer } from 'rxjs/Observer';
 
 @Injectable()
 export class CloudProviderGuard implements CanActivate {
-    constructor(
-      private _authGuard: AuthorizationGuard,
-      private _routing: AppRoutingService,
-      private _healthStatus: HealthStatusService
-    ) { }
+  constructor(private _healthStatus: HealthStatusService) {}
 
-    canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
-      return this._healthStatus.isBillingEnabled();
-    }
+  canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
+    return this._healthStatus.isBillingEnabled();
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/dataengineConfiguration.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/dataengineConfiguration.service.ts
new file mode 100644
index 0000000..0409a23
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/dataengineConfiguration.service.ts
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs/Observable';
+
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util';
+
+@Injectable()
+export class DataengineConfigurationService {
+  constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
+
+  public getClusterConfiguration(exploratory, cluster): Observable<{}> {
+    const url = `/${exploratory}/${cluster}/config`;
+    return this.applicationServiceFacade
+      .buildGetClusterConfiguration(url)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public editClusterConfiguration(data, exploratory, cluster): Observable<{}> {
+    const url = `/dataengine/${exploratory}/${cluster}/config`;
+    return this.applicationServiceFacade
+      .buildEditClusterConfiguration(url, data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public getExploratorySparkConfiguration(exploratory): Observable<{}> {
+    const url = `/${exploratory}/cluster/config`;
+    return this.applicationServiceFacade
+      .buildGetExploratorySparkConfiguration(url)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public editExploratorySparkConfiguration(data, exploratory): Observable<{}> {
+    const url = `/${exploratory}/reconfigure`;
+    return this.applicationServiceFacade
+      .buildEditExploratorySparkConfiguration(url, data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts
index 1b7b6be..1a9a757 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts
@@ -1,39 +1,56 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
+import { BehaviorSubject } from 'rxjs/BehaviorSubject';
 
-import { ApplicationServiceFacade, AppRoutingService } from './';
-import { HTTP_STATUS_CODES } from '../util';
+import { GeneralEnvironmentStatus } from '../../health-status/environment-status.model';
+import { ApplicationServiceFacade, AppRoutingService } from '.';
+import { HTTP_STATUS_CODES, ErrorUtils } from '../util';
 
 @Injectable()
 export class HealthStatusService {
+  private _statusData = new BehaviorSubject(<GeneralEnvironmentStatus>{});
+
   constructor(
     private applicationServiceFacade: ApplicationServiceFacade,
     private appRoutingService: AppRoutingService
-    ) { }
+  ) {}
 
-   public isHealthStatusOk(): Observable<boolean> {
+  get statusData() {
+    return this._statusData.asObservable();
+  }
+
+  public reloadInitialStatusData() {
+    this.getEnvironmentHealthStatus().subscribe(
+      (res: GeneralEnvironmentStatus) => {
+        this._statusData.next(res);
+        console.log('reload Initial Status Data');
+      },
+      err => console.error('Error retrieving status'));
+  }
+
+  public isHealthStatusOk(): Observable<boolean> {
       return this.applicationServiceFacade
         .buildGetEnvironmentHealthStatus()
-        .map((response: Response) => {
+        .map(response => {
           if (response.status === HTTP_STATUS_CODES.OK)
             if (response.json().status === 'ok')
               return true;
@@ -42,43 +59,52 @@
         }, this);
   }
 
-  public getEnvironmentHealthStatus(): Observable<Response> {
+  public getEnvironmentHealthStatus(): Observable<GeneralEnvironmentStatus> {
     return this.applicationServiceFacade
     .buildGetEnvironmentHealthStatus()
-    .map((response: Response) => response.json())
-    .catch((error: any) => error);
+    .map(response => {
+      this._statusData.next(response.json());
+      return response.json();
+    })
+    .catch(ErrorUtils.handleServiceError);
   }
 
-  public getEnvironmentStatuses(): Observable<Response> {
+  public getEnvironmentStatuses(): Observable<GeneralEnvironmentStatus> {
     const body = '?full=1';
     return this.applicationServiceFacade
     .buildGetEnvironmentStatuses(body)
-    .map((response: Response) => response.json())
-    .catch((error: any) => error);
+    .map(response => {
+      this._statusData.next(response.json());
+      return response.json();
+    })
+    .catch(ErrorUtils.handleServiceError);
   }
 
-  public runEdgeNode(): Observable<Response> {
+  public runEdgeNode(): Observable<{}> {
     return this.applicationServiceFacade
       .buildRunEdgeNodeRequest()
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public suspendEdgeNode(): Observable<Response> {
+  public suspendEdgeNode(): Observable<{}> {
     return this.applicationServiceFacade
       .buildSuspendEdgeNodeRequest()
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public recreateEdgeNode(): Observable<Response> {
+  public recreateEdgeNode(): Observable<{}> {
     return this.applicationServiceFacade
       .buildRecreateEdgeNodeRequest()
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
-  
+
   public isBillingEnabled(): Observable<boolean> {
     return this.applicationServiceFacade
     .buildGetEnvironmentHealthStatus()
-    .map((response: Response) => {
+    .map(response => {
       if (response.status === HTTP_STATUS_CODES.OK) {
         const data = response.json();
         if (!data.billingEnabled) {
@@ -90,22 +116,53 @@
     });
   }
 
-  public getActiveUsers(): Observable<Response> {
+  public getActiveUsers(): Observable<Array<string>> {
     return this.applicationServiceFacade
       .buildGetActiveUsers()
-      .map((response: Response) => response.json())
-      .catch((error: any) => error);
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
   public manageEnvironment(act, data): Observable<Response | {}> {
     const action = `/${act}`;
     return this.applicationServiceFacade
       .buildManageEnvironment(action, data)
-      .map((response: Response) => response)
-      .catch((error: any) => {
-        return Observable.throw(
-            new Error(`{"status": "${ error.status }", "statusText": "${ error.statusText }", "message": "${ error._body }"}`)
-        );
-    });
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public updateUsersBudget(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildUpdateUsersBudget(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public getSsnMonitorData(): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetSsnMonitorData()
+      .map(response => response.json())
+      .catch(error => error);
+  }
+
+  public getTotalBudgetData(): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetTotalBudgetData()
+      .map(response => response.json())
+      .catch(error => error);
+  }
+
+  public updateTotalBudgetData(data): Observable<{}> {
+    const url = (data && data > 0) ? `/budget/${data}` : '/budget';
+    const method = (data && data > 0) ? 2 : 3;
+
+    return this.applicationServiceFacade
+      .buildUpdateTotalBudgetData(url, method)
+      .map(response => response)
+      .catch(error => error);
+  }
+
+  public resetStatusValue() {
+    this._statusData.next(<GeneralEnvironmentStatus>{});
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts
index 3031472..8d74d46 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts
@@ -1,38 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { ApplicationServiceFacade } from './applicationServiceFacade.service';
-import { AppRoutingService } from './appRouting.service';
-
-import { ApplicationSecurityService } from './applicationSecurity.service';
-import { HealthStatusService } from './healthStatus.service';
-
-import { UserAccessKeyService } from './userAccessKey.service';
-import { UserResourceService } from './userResource.service';
-import { AuthorizationGuard } from './authorization.guard';
-import { CloudProviderGuard } from './cloudProvider.guard';
-import { CheckParamsGuard } from './checkParams.guard';
-import { LibrariesInstallationService } from './librariesInstallation.service';
-import { ManageUngitService } from './manageUngit.service';
-import { BillingReportService } from './billingReport.service';
-import { BackupService } from './backup.service';
-import { SchedulerService } from './scheduler.service';
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export * from './applicationServiceFacade.service';
 export * from './appRouting.service';
@@ -49,3 +32,5 @@
 export * from './backup.service';
 export * from './scheduler.service';
 export * from './managementEnvironments.service';
+export * from './rolesManagement.service';
+export * from './dataengineConfiguration.service';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/librariesInstallation.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/librariesInstallation.service.ts
index f2a9c0d..db41ca4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/librariesInstallation.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/librariesInstallation.service.ts
@@ -1,102 +1,84 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
+import { ErrorUtils } from '../util';
 
-import { ApplicationServiceFacade } from './';
+import { ApplicationServiceFacade } from '.';
 
 import 'rxjs/add/operator/map';
 import 'rxjs/add/operator/catch';
 
 @Injectable()
 export class LibrariesInstallationService {
+  constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
 
-    constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
+  public getGroupsList(exploratory, computational?): Observable<Response> {
+    let body = `?exploratory_name=${exploratory}`;
+    if (computational) body += `&computational_name=${computational}`;
 
-    public getGroupsList(exploratory, computational?): Observable<Response> {
+    return this.applicationServiceFacade
+      .buildGetGroupsList(body)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-        let body = `?exploratory_name=${ exploratory }`;
-        if (computational) body += `&computational_name=${ computational }`;
+  public getAvailableLibrariesList(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetAvailableLibrariesList(data)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-        return this.applicationServiceFacade
-            .buildGetGroupsList(body)
-            .map(response => response.json())
-            .catch((error: any) => {
-                return Observable.throw(
-                    new Error(`{"status": "${ error.status }", "statusText": "${ error.statusText }", "message": "${ error._body }"}`)
-                );
-            });
-    }
+  public getAvailableDependencies(data): Observable<{}> {
+    const body = `/maven?artifact=${data}`;
 
-    public getAvailableLibrariesList(data): Observable<Response> {
-        return this.applicationServiceFacade
-            .buildGetAvailableLibrariesList(data)
-            .map((response: Response) => response.json())
-            .catch((error: any) => {
-                return Observable.throw(new Error(`${ error.status } ${ error.statusText } ${ error._body }`));
-            });
-    }
+    return this.applicationServiceFacade
+      .buildGetAvailableDependenciest(body)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-    public getAvailableDependencies(data): Observable<Response> {
-        let body = `/maven?artifact=${ data }`;
+  public installLibraries(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildInstallLibraries(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-        return this.applicationServiceFacade
-            .buildGetAvailableDependenciest(body)
-            .map((response: Response) => response.json())
-            .catch((error: any) => {
-                return Observable.throw({
-                    status: error.status,
-                    message: error._body
-                });
-            });
-    }
+  public getInstalledLibrariesList(exploratory): Observable<{}> {
+    const body = `?exploratory_name=${exploratory}`;
 
-    public installLibraries(data): Observable<Response> {
-        return this.applicationServiceFacade
-            .buildInstallLibraries(data)
-            .map((response: Response) => response)
-            .catch((error: any) => {
-                return Observable.throw(new Error(`${ error.status } ${ error.statusText }. ${ error._body }`));
-            });
-    }
+    return this.applicationServiceFacade
+      .buildGetInstalledLibrariesList(body)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-    public getInstalledLibrariesList(exploratory): Observable<Response> {
-        const body = `?exploratory_name=${ exploratory }`;
+  public getInstalledLibsByResource(exploratory, computational?): Observable<{}> {
+    let body = `?exploratory_name=${exploratory}`;
+    if (computational) body += `&computational_name=${computational}`;
 
-        return this.applicationServiceFacade
-            .buildGetInstalledLibrariesList(body)
-            .map((response: Response) => response.json())
-            .catch((error: any) => {
-                return Observable.throw(new Error(`${ error.status } ${ error.statusText }. ${ error._body }`));
-            });
-    }
-
-    public getInstalledLibsByResource(exploratory, computational?): Observable<Response> {
-        let body = `?exploratory_name=${ exploratory }`;
-        if (computational) body += `&computational_name=${ computational }`;
-
-        return this.applicationServiceFacade
-            .buildGetInstalledLibsByResource(body)
-            .map((response: Response) => response.json())
-            .catch((error: any) => {
-                return Observable.throw(new Error(`${ error.status } ${ error.statusText }. ${ error._body }`));
-            });
-    }
+    return this.applicationServiceFacade
+      .buildGetInstalledLibsByResource(body)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/manageUngit.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/manageUngit.service.ts
index f6b0f09..a028e0a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/manageUngit.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/manageUngit.service.ts
@@ -1,52 +1,46 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
-import { ApplicationServiceFacade } from './';
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util';
 
 import 'rxjs/add/operator/map';
 import 'rxjs/add/operator/catch';
 
 @Injectable()
 export class ManageUngitService {
+  constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
 
-    constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
+  public getGitCreds(): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetGitCreds()
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
 
-    public getGitCreds(): Observable<Response> {
-        return this.applicationServiceFacade
-        .buildGetGitCreds()
-        .map(response => response.json())
-        .catch((error: any) => {
-            return Observable.throw(
-                new Error(`{"status": "${ error.status }", "statusText": "${ error.statusText }", "message": "${ error._body }"}`)
-            );
-        });
-    }
-
-    public updateGitCredentials(data): Observable<Response> {
-        return this.applicationServiceFacade
-        .buildUpdateGitCredentials(data)
-        .map((response: Response) => response)
-        .catch((error: any) => {
-            return Observable.throw(new Error(`${ error.status } (${ error.statusText }).  ${ error._body }`));
-        });
-    }
+  public updateGitCredentials(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildUpdateGitCredentials(data)
+      .map(response => response)
+     .catch(ErrorUtils.handleServiceError);
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/managementEnvironments.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/managementEnvironments.service.ts
index 4ba648b..3128bac 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/managementEnvironments.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/managementEnvironments.service.ts
@@ -1,59 +1,44 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
-import { ApplicationServiceFacade } from './';
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util';
 
 @Injectable()
 export class ManageEnvironmentsService {
   constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
 
-  getAllEnvironmentData(): Observable<Response> {
+  getAllEnvironmentData(): Observable<{}> {
     return this.applicationServiceFacade
       .buildGetAllEnvironmentData()
       .map(response => response.json())
-      .catch((error: any) => {
-        return Observable.throw(
-          new Error(
-            `{"status": "${error.status}", "statusText": "${error.statusText}", "message": "${
-              error._body
-            }"}`
-          )
-        );
-      });
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  environmentManagement(data, action: string, resource: string, computational?: string): Observable<{} | Response> {
+  environmentManagement(data, action: string, resource: string, computational?: string): Observable<{}> {
     const params = computational ? `/${action}/${resource}/${computational}` : `/${action}/${resource}`;
     return this.applicationServiceFacade
       .buildEnvironmentManagement(params, data)
-      .map((response: Response) => response)
-      .catch((error: any) => {
-        return Observable.throw(
-          new Error(
-            `{"status": "${error.status}", "statusText": "${error.statusText}", "message": "${
-              error._body
-            }"}`
-          )
-        );
-      });
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/rolesManagement.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/rolesManagement.service.ts
new file mode 100644
index 0000000..193166d
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/rolesManagement.service.ts
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs/Observable';
+
+import { ApplicationServiceFacade } from './';
+import { ErrorUtils } from '../util';
+
+@Injectable()
+export class RolesGroupsService {
+  constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
+
+  public getGroupsData(): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetGroupsData()
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public getRolesData(): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildGetRolesData()
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public setupNewGroup(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildSetupNewGroup(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public updateGroup(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildUpdateGroupData(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public setupRolesForGroup(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildSetupRolesForGroup(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public setupUsersForGroup(data): Observable<{}> {
+    return this.applicationServiceFacade
+      .buildSetupUsersForGroup(data)
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public removeUsersForGroup(data): Observable<{}> {
+    const url = `?user=${data.user}&group=${data.group}`;
+
+    return this.applicationServiceFacade
+      .buildRemoveUsersForGroup(JSON.stringify(url))
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public removeGroupById(data): Observable<{}> {
+    const url = `/${data}`;
+
+    return this.applicationServiceFacade
+      .buildRemoveGroupById(JSON.stringify(url))
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/scheduler.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/scheduler.service.ts
index 86edbcc..1604f88 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/scheduler.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/scheduler.service.ts
@@ -1,52 +1,61 @@
-/***************************************************************************
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
-import { ApplicationServiceFacade } from './';
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util/';
 
 @Injectable()
 export class SchedulerService {
   constructor(private applicationServiceFacade: ApplicationServiceFacade) {}
 
-  public getExploratorySchedule(notebook, resource?): Observable<Response> {
+  public getExploratorySchedule(notebook, resource?): Observable<{}> {
     const param = resource ? `/${notebook}/${resource}` : `/${notebook}`;
     return this.applicationServiceFacade
       .buildGetExploratorySchedule(param)
-      .map((response: Response) => response.json())
-      .catch((error: Response | any) => {
-        return Observable.throw(
-            new Error(`{"status": "${ error.status }", "statusText": "${ error.statusText }", "message": "${ error._body }"}`)
-        );
-    });
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public setExploratorySchedule(notebook, data, resource?): Observable<Response> {
+  public setExploratorySchedule(notebook, data, resource?): Observable<{}> {
     const param = resource ? `/${notebook}/${resource}` : `/${notebook}`;
     return this.applicationServiceFacade
       .buildSetExploratorySchedule(param, data)
-      .map((response: Response) => response)
-      .catch((error: Response | any) => {
-        return Observable.throw(
-            new Error(`{"status": "${ error.status }", "statusText": "${ error.statusText }", "message": "${ error._body }"}`)
-        );
-    });
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public resetScheduleSettings(notebook, resource?): Observable<{}> {
+    const url = resource ? `/${notebook}/${resource}` : `/${notebook}`;
+    return this.applicationServiceFacade
+      .buildResetScheduleSettings(JSON.stringify(url))
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public getActiveSchcedulersData(offset: number): Observable<{}> {
+    const param = `/active?minuteOffset=${offset}`;
+    return this.applicationServiceFacade
+      .BuildGetActiveSchcedulersData(param)
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/userAccessKey.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/userAccessKey.service.ts
index ed22ee8..feca52a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/userAccessKey.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/userAccessKey.service.ts
@@ -1,60 +1,93 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
+import { BehaviorSubject } from 'rxjs/BehaviorSubject';
 
-import { ApplicationServiceFacade } from './';
+import { ApplicationServiceFacade } from '.';
+import { ErrorUtils } from '../util';
 
 @Injectable()
 export class UserAccessKeyService {
+  _accessKeyEmitter: BehaviorSubject<any> = new BehaviorSubject<boolean>(null);
+
   constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
 
-  public checkUserAccessKey(): Observable<Response> {
+  get accessKeyEmitter() {
+    return this._accessKeyEmitter.asObservable();
+  }
+
+  public initialUserAccessKeyCheck() {
+    this.checkUserAccessKey().subscribe(
+      response => {
+      this._accessKeyEmitter.next(response);
+    }, error => {
+      this._accessKeyEmitter.next(error);
+    });
+  }
+
+  public checkUserAccessKey(): Observable<{}> {
+    console.log('checkUserAccessKey');
     return this.applicationServiceFacade
       .buildCheckUserAccessKeyRequest()
-      .map(response => response);
+      .map(response => {
+        return response;
+      })
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public generateAccessKey(): Observable<Response> {
+  public emitActionOnKeyUploadComplete() {
+    console.log('key uploaded!!!!!!!!!!!!!');
+  }
+
+  public generateAccessKey(): Observable<{}> {
     return this.applicationServiceFacade
       .buildGenerateAccessKey()
-      .map(response => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public regenerateAccessKey(): Observable<Response> {
+  public regenerateAccessKey(): Observable<{}> {
     const param = '?is_primary_uploading=false';
     return this.applicationServiceFacade
       .buildRegenerateAccessKey(param)
-      .map(response => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public uploadUserAccessKey(data): Observable<Response> {
+  public uploadUserAccessKey(data): Observable<{}> {
     return this.applicationServiceFacade
       .buildUploadUserAccessKeyRequest(data)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public reuploadUserAccessKey(data): Observable<Response> {
+  public reuploadUserAccessKey(data): Observable<{}> {
     const param = '?is_primary_uploading=false';
     return this.applicationServiceFacade
       .buildReuploadUserAccessKeyRequest(data, param)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
+  }
+
+  public resetUserAccessKey() {
+    this._accessKeyEmitter.next(<any>{});
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
index 2b3626b..baec744 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
@@ -1,26 +1,27 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable } from '@angular/core';
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
-import { ApplicationServiceFacade } from './';
+import { ErrorUtils } from '../util/';
+import { ApplicationServiceFacade } from '.';
 
 @Injectable()
 export class UserResourceService {
@@ -29,110 +30,123 @@
   public getExploratoryEnvironmentTemplates(): Observable<any> {
     return this.applicationServiceFacade
       .buildGetExploratoryEnvironmentTemplatesRequest()
-      .map((res: Response) => res.json())
-      .catch((error: any) => error);
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
   public getComputationalResourcesTemplates(): Observable<any> {
     return this.applicationServiceFacade
       .buildGetComputationalResourcesTemplatesRequest()
-      .map((res: Response) => res.json())
-      .catch((error: any) => error);
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
   public getUserProvisionedResources(): Observable<any> {
     return this.applicationServiceFacade
       .buildGetUserProvisionedResourcesRequest()
-      .map((response: Response) => response.json())
-      .catch((error: any) => error);
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public createExploratoryEnvironment(data): Observable<Response> {
+  public createExploratoryEnvironment(data): Observable<{}> {
     const body = JSON.stringify(data);
     return this.applicationServiceFacade
       .buildCreateExploratoryEnvironmentRequest(body)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public runExploratoryEnvironment(data): Observable<Response> {
+  public runExploratoryEnvironment(data): Observable<{}> {
     const body = JSON.stringify(data);
     return this.applicationServiceFacade
       .buildRunExploratoryEnvironmentRequest(body)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public suspendExploratoryEnvironment(notebook: any, action): Observable<Response> {
+  public suspendExploratoryEnvironment(notebook: any, action): Observable<{}> {
     const url = '/' + notebook.name + '/' + action;
 
     return this.applicationServiceFacade
       .buildSuspendExploratoryEnvironmentRequest(JSON.stringify(url))
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public createComputationalResource_DataengineService(data): Observable<Response> {
+  public createComputationalResource_DataengineService(data): Observable<{}> {
     const body = JSON.stringify(data);
     return this.applicationServiceFacade
       .buildCreateComputationalResources_DataengineServiceRequest(body)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public createComputationalResource_Dataengine(data): Observable<Response> {
+  public createComputationalResource_Dataengine(data): Observable<{}> {
     const body = JSON.stringify(data);
     return this.applicationServiceFacade
       .buildCreateComputationalResources_DataengineRequest(body)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public suspendComputationalResource(notebookName: string, computationalResourceName: string): Observable<Response> {
+  public suspendComputationalResource(notebookName: string, computationalResourceName: string): Observable<{}> {
     const body = JSON.stringify('/' + notebookName + '/' + computationalResourceName + '/terminate');
     return this.applicationServiceFacade
       .buildDeleteComputationalResourcesRequest(body)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public toggleStopStartAction(notebook: string, resource: string, action): Observable<Response> {
+  public toggleStopStartAction(notebook: string, resource: string, action): Observable<{}> {
     const url = `/${notebook}/${resource}/${action}`;
     if (action === 'stop') {
       return this.applicationServiceFacade
         .buildStopSparkClusterAction(JSON.stringify(url))
-        .map((response: Response) => response);
+        .map(response => response)
+        .catch(ErrorUtils.handleServiceError);
     } else if (action === 'start') {
       return this.applicationServiceFacade
         .buildStartSparkClusterAction(url)
-        .map((response: Response) => response);
+        .map(response => response)
+        .catch(ErrorUtils.handleServiceError);
     }
   }
 
-  public getUserPreferences(): Observable<Response> {
+  public getUserPreferences(): Observable<{}> {
     return this.applicationServiceFacade
       .buildGetUserPreferences()
-      .map((response: Response) => response.json());
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public updateUserPreferences(data): Observable<Response> {
+  public updateUserPreferences(data): Observable<{}> {
     const body = JSON.stringify(data);
     return this.applicationServiceFacade
       .buildUpdateUserPreferences(body)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public getUserImages(image): Observable<Response> {
+  public getUserImages(image): Observable<{}> {
     const body = `?docker_image=${image}`;
     return this.applicationServiceFacade
       .buildGetUserImages(body)
-      .map((response: Response) => response.json());
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public getImagesList(): Observable<Response> {
+  public getImagesList(): Observable<{}> {
     return this.applicationServiceFacade
       .buildGetImagesList()
-      .map((response: Response) => response.json());
+      .map(response => response.json())
+      .catch(ErrorUtils.handleServiceError);
   }
 
-  public createAMI(data): Observable<Response> {
+  public createAMI(data): Observable<any> {
     const body = JSON.stringify(data);
     return this.applicationServiceFacade
       .buildCreateAMI(data)
-      .map((response: Response) => response);
+      .map(response => response)
+      .catch(ErrorUtils.handleServiceError);
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/checkUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/checkUtils.ts
new file mode 100644
index 0000000..ae3d5b6
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/checkUtils.ts
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export class CheckUtils {
+  public static isJSON(str) {
+    try {
+      JSON.parse(str);
+    } catch (e) {
+      return false;
+    }
+    return true;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/dictionary.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/dictionary.ts
index 2b60c9d..b90f9fc 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/dictionary.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { IDictionary } from './idictionary';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/idictionary.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/idictionary.ts
index 5f8c2e8..4eca989 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/idictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/collections/dictionary/idictionary.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export interface IDictionary <T> {
   Add(key: string, value: T);
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/dateUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/dateUtils.ts
index 3740063..718ddf4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/dateUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/dateUtils.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class DateUtils {
   public static diffBetweenDatesInHours(dateString: number): number {
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/errorMapUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/errorMapUtils.ts
deleted file mode 100644
index 5ca2b94..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/errorMapUtils.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-export class ErrorMapUtils {
-  public static setErrorMessage(errorCode): string {
-    if (errorCode) {
-      const defaultStatus = 'Error status [' + errorCode.status + ']. ';
-
-      return defaultStatus.concat(errorCode.statusText);
-    }
-  }
-
-  public static handleError(error: any) {
-    const isJson = function(str) {
-      try {
-        JSON.parse(str);
-      } catch (e) {
-        return false;
-      }
-      return true;
-    };
-
-    let errMsg: string;
-    if (typeof error === 'object' && error._body && isJson(error._body)) {
-      if (error.json().error_message)
-        errMsg = error.json().error_message;
-    } else if (isJson(error._body)) {
-      const body = error.json() || '';
-      const err = body.error || JSON.stringify(body);
-      errMsg = `${error.status} - ${error.statusText || ''} ${err}`;
-    } else {
-      errMsg = error._body ? error._body : error.toString();
-    }
-
-    return errMsg;
-  }
-}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
new file mode 100644
index 0000000..cc36a66
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Observable } from 'rxjs/Observable';
+import { CheckUtils } from '.';
+
+export class ErrorUtils {
+
+  // public static handleError(error: any) {
+  //   let errMsg: string;
+  //   if (typeof error === 'object' && error._body && CheckUtils.isJSON(error._body)) {
+  //     if (error.json().error_message)
+  //       errMsg = error.json().error_message;
+  //   } else if (CheckUtils.isJSON(error._body)) {
+  //     const body = error.json() || '';
+  //     const err = body.error || JSON.stringify(body);
+  //     errMsg = `${error.status} - ${error.statusText || ''} ${err}`;
+  //   } else {
+  //     errMsg = error._body ? error._body : error.toString();
+  //   }
+
+  //   return errMsg;
+  // }
+
+  public static handleServiceError(errorMessage) {
+    let error = errorMessage.json();
+
+    return Observable.throw({
+      status: error.code,
+      statusText: errorMessage.statusText,
+      message: error.message
+    });
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/fileUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/fileUtils.ts
index fa6cdad..e90aa8c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/fileUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/fileUtils.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class FileUtils {
 
@@ -37,4 +38,4 @@
     }
     window.URL.revokeObjectURL(url);
   }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/http-status-codes.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/http-status-codes.ts
index 89f8a97..b59afa3 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/http-status-codes.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/http-status-codes.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class HTTP_STATUS_CODES {
     public static readonly ACCEPTED                           = 202;
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/index.ts
index 97d50dc..1186d74 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/index.ts
@@ -1,25 +1,27 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export * from './collections/dictionary/dictionary';
 
 export * from './http-status-codes';
 export * from './sortUtil';
-export * from './errorMapUtils';
+export * from './errorUtils';
 export * from './dateUtils';
 export * from './fileUtils';
+export * from './checkUtils';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtil.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtil.ts
index 3473c51..6d0abfb 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtil.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtil.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class SortUtil {
   public static statusSort(arg1: string, arg2: string): number {
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.html b/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.html
index 862b8d0..9c797ad 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="backup-dialog modal-sm">
   <modal-header>
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.scss b/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.scss
index 6d36f82..e27a7a4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .hold-block {
   padding: 5px 10px;
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.ts
index e359210..f69967b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/backup-dilog/backup-dilog.component.ts
@@ -1,23 +1,24 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, OnInit, ViewChild, Output, EventEmitter } from '@angular/core';
-import { DICTIONARY } from './../../../dictionary/global.dictionary';
+import { DICTIONARY } from '../../../dictionary/global.dictionary';
 
 import { BackupOptionsModel } from '../environment-status.model';
 
@@ -40,10 +41,11 @@
   }
 
   public open(param): void {
+    this.valid = true;
     this.bindDialog.open(param);
   }
 
-  public onHoldChanged($event, key) {
+  public onHoldChanged($event, key): void {
     this.backupOptions[key] instanceof Array
       ? (this.backupOptions[key][0] = $event.checked ? 'all' : 'skip')
       : (this.backupOptions[key] = !this.backupOptions[key]);
@@ -51,14 +53,14 @@
     this.checkValidity();
   }
 
-  public applyOptions() {
+  public applyOptions(): void {
     this.backupOpts.emit(this.backupOptions);
     this.backupOptions.setDegault();
     this.bindDialog.close();
   }
 
-  private checkValidity() {
-    let items = [];
+  private checkValidity(): void {
+    const items = [];
 
     Object.keys(this.backupOptions).forEach(el => {
       if (this.backupOptions[el] instanceof Array) {
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/environment-status.model.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/environment-status.model.ts
index e12cb65..1cf1537 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/environment-status.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/environment-status.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class EnvironmentStatusModel {
   constructor(
@@ -36,10 +37,18 @@
 
   setDegault(): void {
     this.configFiles = ['all'];
-    this.keys =['all'];
+    this.keys = ['all'];
     this.certificates = ['skip'];
     this.jars = ['skip'];
     this.databaseBackup = true;
     this.logsBackup = false;
   }
 }
+
+export interface GeneralEnvironmentStatus {
+  admin: boolean;
+  billingEnabled: boolean;
+  billingQuoteUsed: number;
+  list_resources: Array<EnvironmentStatusModel>;
+  status: string;
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.css b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.css
deleted file mode 100644
index 991b927..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.html
index 6c4be83..e4632a6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <table class="dashboard_table">
   <tr>
@@ -23,7 +24,7 @@
     <th class="th_status">Status</th>
     <th class="th_actions">Action</th>
   </tr>
-  <tr *ngFor="let env of environmentsHealthStatuses">
+  <tr *ngFor="let env of environmentsHealthStatuses" class="dashboard_table_body">
     <td>{{env.type}}</td>
     <td>{{env.resource_id}}</td>
     <td class="status" ngClass="{{env.status || ''}}">{{env.status}}</td>
@@ -64,4 +65,5 @@
 
 <key-upload-dialog #keyReuploadDialog [primaryUploading]="false"
       (checkInfrastructureCreationProgress)="buildGrid($event)"
-      (generateUserKey)="generateUserKey($event)"></key-upload-dialog>
+      (generateUserKey)="generateUserKey($event)">
+</key-upload-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.scss b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.scss
new file mode 100644
index 0000000..1af6dde
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.scss
@@ -0,0 +1,24 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.dashboard_table_body {
+  td:first-child {
+    cursor: default !important;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.ts
index 969ad60..5902aee 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.component.ts
@@ -1,22 +1,24 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Input, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, ViewChild, Input, Output, EventEmitter, ViewContainerRef } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
 
 import { EnvironmentStatusModel } from '../environment-status.model';
 import { HealthStatusService, UserAccessKeyService } from '../../core/services';
@@ -24,10 +26,9 @@
 import { FileUtils } from '../../core/util';
 
 @Component({
-  moduleId: module.id,
   selector: 'health-status-grid',
   templateUrl: 'health-status-grid.component.html',
-  styleUrls: ['./health-status-grid.component.css',
+  styleUrls: ['./health-status-grid.component.scss',
               '../../resources/resources-grid/resources-grid.component.css']
 })
 export class HealthStatusGridComponent implements OnInit {
@@ -40,15 +41,18 @@
 
    @ViewChild('confirmationDialog') confirmationDialog;
    @ViewChild('keyReuploadDialog') keyReuploadDialog;
-   
 
     constructor(
       private healthStatusService: HealthStatusService,
       private userAccessKeyService: UserAccessKeyService,
-    ) { }
+      public toastr: ToastsManager,
+      public vcr: ViewContainerRef
+    ) {
+      this.toastr.setRootViewContainerRef(vcr);
+    }
 
     ngOnInit(): void { }
-    
+
     buildGrid(): void {
       this.refreshGrid.emit();
     }
@@ -57,13 +61,19 @@
       if (action === 'run') {
         this.healthStatusService
           .runEdgeNode()
-          .subscribe(() => this.buildGrid());
+          .subscribe(() => {
+            this.buildGrid();
+            // this.toastr.success('Edge node is starting!', 'Processing!', { toastLife: 5000 });
+          }, error => this.toastr.error('Edge Node running failed!', 'Oops!', { toastLife: 5000 }));
       } else if (action === 'stop') {
         this.confirmationDialog.open({ isFooter: false }, data, ConfirmationDialogType.StopEdgeNode);
       } else if (action === 'recreate') {
         this.healthStatusService
           .recreateEdgeNode()
-          .subscribe(() => this.buildGrid());
+          .subscribe(() => {
+            this.buildGrid();
+            // this.toastr.success('Edge Node recreation is processing!', 'Processing!', { toastLife: 5000 });
+          }, error => this.toastr.error('Edge Node recreation failed!', 'Oops!', { toastLife: 5000 }));
       }
     }
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.module.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.module.ts
deleted file mode 100644
index df99756..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status-grid/health-status-grid.module.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { HealthStatusGridComponent } from './health-status-grid.component';
-import { ConfirmationDialogModule, BubbleModule, UploadKeyDialogModule } from '../../shared';
-
-@NgModule({
-    imports: [
-        CommonModule,
-        ConfirmationDialogModule,
-        BubbleModule,
-        UploadKeyDialogModule
-    ],
-    declarations: [HealthStatusGridComponent],
-    exports: [HealthStatusGridComponent]
-})
-export class HealthStatusGridModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.html b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.html
index 93697fd..1e4452d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.html
@@ -1,30 +1,37 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<dlab-navbar [healthStatus]="healthStatus" [billingEnabled]="billingEnabled" [admin]="isAdmin"></dlab-navbar>
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="sub-nav base-retreat">
-  <button mat-raised-button class="butt env" (click)="openManageEnvironmentDialog()" *ngIf="isAdmin">
-    <i class="material-icons"></i>Manage environment
-  </button>
-  <button mat-raised-button class="butt" (click)="showBackupDialog()" [disabled]="creatingBackup" *ngIf="isAdmin">
-    <i class="material-icons">backup</i>Backup
-  </button>
+  <div *ngIf="healthStatus?.admin" class="admin-group">
+    <button mat-raised-button class="butt ssn" (click)="openManageRolesDialog()">
+      <i class="material-icons"></i>Manage roles
+    </button>
+    <button mat-raised-button class="butt ssn" (click)="openSsnMonitorDialog()">
+      <i class="material-icons"></i>SSN Monitor
+    </button>
+    <button mat-raised-button class="butt env" (click)="openManageEnvironmentDialog()">
+      <i class="material-icons"></i>Manage environment
+    </button>
+    <button mat-raised-button class="butt" (click)="showBackupDialog()" [disabled]="creatingBackup">
+      <i class="material-icons">backup</i>Backup
+    </button>
+  </div>
   <button mat-raised-button class="butt" (click)="buildGrid()">
     <i class="material-icons">autorenew</i>Refresh
   </button>
@@ -36,6 +43,8 @@
                     [environmentsHealthStatuses]="environmentsHealthStatuses"
                     (refreshGrid)="buildGrid($event)"></health-status-grid>
 <dlab-backup-dilog #backupDialog (backupOpts)="createBackup($event)"></dlab-backup-dilog>
-<dlab-manage-env-dilog #manageEnvDialog (manageEnv)="manageEnvironment($event)"></dlab-manage-env-dilog>
+<dlab-manage-env-dilog #manageEnvDialog (manageEnv)="manageEnvironment($event)" (setBudget)="setBudgetLimits($event)"></dlab-manage-env-dilog>
 <key-upload-dialog #keyUploadModal (generateUserKey)="generateUserKey($event)" [primaryUploading]="true"></key-upload-dialog>
-<progress-dialog #preloaderModal></progress-dialog>
\ No newline at end of file
+<progress-dialog #preloaderModal></progress-dialog>
+<dlab-ssn-monitor #ssnMonitor></dlab-ssn-monitor>
+<dlab-manage-roles-groups #rolesGroupsModal (manageRolesGroupAction)="manageRolesGroups($event)"></dlab-manage-roles-groups>
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.scss b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.scss
index 0b5e6ea..78497c6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.scss
@@ -1,23 +1,27 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .sub-nav {
   justify-content: flex-end;
+  .admin-group {
+    margin-right: 10px;
+  }
   button {
     margin-right: 10px;
     &:last-child {
@@ -26,5 +30,8 @@
     &.env {
       width: 210px;
     }
+    &.ssn {
+      width: inherit;
+    }
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.ts
index 9641234..e13423d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.component.ts
@@ -1,58 +1,74 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+import { Component, OnInit, ViewChild, ViewContainerRef, OnDestroy } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
+import { ISubscription } from 'rxjs/Subscription';
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild } from '@angular/core';
 import { EnvironmentStatusModel } from './environment-status.model';
-import { HealthStatusService, BackupService, UserResourceService, UserAccessKeyService } from '../core/services';
-import { FileUtils, HTTP_STATUS_CODES } from '../core/util';
+import { HealthStatusService, BackupService, UserResourceService, UserAccessKeyService, RolesGroupsService } from '../core/services';
+import { HTTP_STATUS_CODES } from '../core/util';
 
 @Component({
-  moduleId: module.id,
   selector: 'health-status',
   templateUrl: 'health-status.component.html',
   styleUrls: ['./health-status.component.scss']
 })
-export class HealthStatusComponent implements OnInit {
+export class HealthStatusComponent implements OnInit, OnDestroy {
+  private clear = undefined;
+  private subscription: ISubscription;
+
   environmentsHealthStatuses: Array<EnvironmentStatusModel>;
   healthStatus: string;
-  billingEnabled: boolean;
-  isAdmin: boolean;
   anyEnvInProgress: boolean = false;
   notebookInProgress: boolean = false;
   usersList: Array<string> = [];
   uploadKey: boolean = true;
 
-  private readonly CHECK_ACCESS_KEY_TIMEOUT: number = 20000;
-  private clear = undefined;
   @ViewChild('backupDialog') backupDialog;
   @ViewChild('manageEnvDialog') manageEnvironmentDialog;
   @ViewChild('keyUploadModal') keyUploadDialog;
   @ViewChild('preloaderModal') preloaderDialog;
+  @ViewChild('ssnMonitor') ssnMonitorDialog;
+  @ViewChild('rolesGroupsModal') rolesGroupsDialog;
 
   constructor(
     private healthStatusService: HealthStatusService,
     private backupService: BackupService,
     private userResourceService: UserResourceService,
-    private userAccessKeyService: UserAccessKeyService
-  ) {}
+    private userAccessKeyService: UserAccessKeyService,
+    private rolesService: RolesGroupsService,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
 
   ngOnInit(): void {
     this.buildGrid();
+    this.subscription = this.userAccessKeyService.accessKeyEmitter.subscribe(result => {
+      this.uploadKey = result ? result.status === 200 : false;
+    });
+  }
+
+  ngOnDestroy(): void {
+    this.subscription.unsubscribe();
   }
 
   buildGrid(): void {
@@ -62,11 +78,8 @@
   }
 
   loadHealthStatusList(healthStatusList): Array<EnvironmentStatusModel> {
-    this.healthStatus = healthStatusList.status;
-    this.billingEnabled = healthStatusList.billingEnabled;
-    this.isAdmin = healthStatusList.admin;
-
-    this.checkUserAccessKey();
+    this.healthStatus = healthStatusList;
+    this.userAccessKeyService.initialUserAccessKeyCheck();
     this.getExploratoryList();
 
     if (healthStatusList.list_resources)
@@ -83,60 +96,98 @@
   getActiveUsersList() {
     return this.healthStatusService.getActiveUsers();
   }
- 
+
+  getTotalBudgetData() {
+    return this.healthStatusService.getTotalBudgetData();
+  }
+
   openManageEnvironmentDialog() {
     this.getActiveUsersList().subscribe(usersList => {
-      this.manageEnvironmentDialog.open({ isFooter: false }, usersList);
-    });
+      this.getTotalBudgetData().subscribe(total => this.manageEnvironmentDialog.open({ isFooter: false }, usersList, total));
+    },
+    () => this.toastr.error('Failed users list loading!', 'Oops!', { toastLife: 5000 }));
   }
 
-  manageEnvironment($event) {
+  openSsnMonitorDialog() {
+    this.healthStatusService.getSsnMonitorData()
+      .subscribe(data => this.ssnMonitorDialog.open({ isFooter: false }, data));
+  }
+
+  openManageRolesDialog() {
+    this.rolesService.getGroupsData().subscribe(group => {
+        this.rolesService.getRolesData().subscribe(
+          roles => this.rolesGroupsDialog.open({ isFooter: false }, group, roles),
+          error => this.toastr.error(error.message, 'Oops!', { toastLife: 5000 }));
+      },
+      error => this.toastr.error(error.message, 'Oops!', { toastLife: 5000 }));
+  }
+
+  getGroupsData() {
+    this.rolesService.getGroupsData().subscribe(
+      list => this.rolesGroupsDialog.updateGroupData(list),
+      error => this.toastr.error(error.message, 'Oops!', { toastLife: 5000 }));
+  }
+
+  manageEnvironment(event: {action: string, user: string}) {
     this.healthStatusService
-      .manageEnvironment($event.action, $event.user)
+      .manageEnvironment(event.action, event.user)
       .subscribe(res => {
           this.getActiveUsersList().subscribe(usersList => {
-              this.manageEnvironmentDialog.usersList = usersList;
-              this.buildGrid();
-            });
+            this.manageEnvironmentDialog.usersList = usersList;
+            this.toastr.success(`Action ${ event.action } is processing!`, 'Processing!', { toastLife: 5000 });
+            this.buildGrid();
+          });
         },
-      (error) => {
-        this.manageEnvironmentDialog.errorMessage = JSON.parse(error.message).message;
-      });
+      error => this.toastr.error(error.message, 'Oops!', { toastLife: 5000 }));
   }
 
-  public generateUserKey($event) {
-    this.userAccessKeyService.generateAccessKey().subscribe(
-      data => {
-        FileUtils.downloadFile(data);
+  setBudgetLimits($event) {
+    this.healthStatusService.updateUsersBudget($event.users).subscribe((result: any) => {
+      this.healthStatusService.updateTotalBudgetData($event.total).subscribe((res: any) => {
+        result.status === HTTP_STATUS_CODES.OK
+        && res.status === HTTP_STATUS_CODES.NO_CONTENT
+        && this.toastr.success('Budget limits updated!', 'Success!', { toastLife: 5000 });
         this.buildGrid();
       });
+    }, error => this.toastr.error(error.message, 'Oops!', { toastLife: 5000 }));
   }
 
-  public checkUserAccessKey() {
-    this.userAccessKeyService.checkUserAccessKey()
-      .subscribe(
-        response => this.processAccessKeyStatus(response.status),
-        error => this.processAccessKeyStatus(error.status));
-  }
-
-  private processAccessKeyStatus(status: number) {
-    if (status === HTTP_STATUS_CODES.NOT_FOUND) {
-      this.healthStatus === 'error' && this.keyUploadDialog.open({ isFooter: false });
-      this.uploadKey = false;
-    } else if (status === HTTP_STATUS_CODES.ACCEPTED) {
-      this.preloaderDialog.open({ isHeader: false, isFooter: false });
-
-      setTimeout(() => this.buildGrid(), this.CHECK_ACCESS_KEY_TIMEOUT);
-    } else if (status === HTTP_STATUS_CODES.OK) {
-      this.preloaderDialog.close();
-      this.keyUploadDialog.close();
-      this.uploadKey = true;
+  manageRolesGroups($event) {
+    switch ($event.action) {
+      case 'create':
+        this.rolesService.setupNewGroup($event.value).subscribe(res => {
+          this.toastr.success('Group creation success!', 'Created!', { toastLife: 5000 });
+          this.getGroupsData();
+        }, () => this.toastr.error('Group creation failed!', 'Oops!', { toastLife: 5000 }));
+        break;
+      case 'update':
+        this.rolesService.updateGroup($event.value).subscribe(res => {
+          this.toastr.success('Group data successfully updated!', 'Success!', { toastLife: 5000 });
+          this.getGroupsData();
+        }, () => this.toastr.error('Failed group data updating!', 'Oops!', { toastLife: 5000 }));
+        break;
+      case 'delete':
+        if ($event.type === 'users') {
+          this.rolesService.removeUsersForGroup($event.value).subscribe(res => {
+            this.toastr.success('Users was successfully deleted!', 'Success!', { toastLife: 5000 });
+            this.getGroupsData();
+          }, () => this.toastr.error('Failed users deleting!', 'Oops!', { toastLife: 5000 }));
+        } else if ($event.type === 'group') {
+          console.log('delete group');
+          this.rolesService.removeGroupById($event.value).subscribe(res => {
+            this.toastr.success('Group was successfully deleted!', 'Success!', { toastLife: 5000 });
+            this.getGroupsData();
+          }, () => this.toastr.error('Failed group deleting!', 'Oops!', { toastLife: 5000 }));
+        }
+        break;
+      default:
     }
   }
 
   createBackup($event) {
     this.backupService.createBackup($event).subscribe(result => {
       this.getBackupStatus(result);
+      this.toastr.success('Backup configuration is processing!', 'Processing!', { toastLife: 5000 });
       this.clear = window.setInterval(() => this.getBackupStatus(result), 3000);
     });
   }
@@ -151,8 +202,8 @@
 
   isEnvironmentsInProgress(data): boolean {
     return data.exploratory.some(el => {
-      return el.status === 'creating' || el.status === 'starting' || 
-        el.computational_resources.some(elem => elem.status === 'creating' || elem.status === 'starting' || elem.status === 'configuring')
+      return el.status === 'creating' || el.status === 'starting' ||
+        el.computational_resources.some(elem => elem.status === 'creating' || elem.status === 'starting' || elem.status === 'configuring');
     });
   }
 
@@ -162,9 +213,18 @@
 
   private getBackupStatus(result) {
     const uuid = result.text();
-    this.backupService.getBackupStatus(uuid).subscribe(status => {
-      if (!this.creatingBackup) clearInterval(this.clear);
-    }, error => clearInterval(this.clear));
+    this.backupService.getBackupStatus(uuid)
+        .subscribe((backupStatus: any) => {
+        if (!this.creatingBackup) {
+          backupStatus.status === 'FAILED'
+          ? this.toastr.error('Backup configuration failed!', 'Oops!', { toastLife: 5000 })
+          : this.toastr.success('Backup configuration completed!', 'Success!', { toastLife: 5000 });
+          clearInterval(this.clear);
+        }
+    }, error => {
+      clearInterval(this.clear);
+      this.toastr.error('Backup configuration failed!', 'Oops!', { toastLife: 5000 });
+    });
   }
 
   get creatingBackup(): boolean {
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.module.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.module.ts
index db68322..8d9f1bd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/health-status.module.ts
@@ -1,51 +1,73 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
-import { MaterialModule } from './../shared/material.module';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { ToastModule } from 'ng2-toastr';
 
-import { NavbarModule, ModalModule, UploadKeyDialogModule, ProgressDialogModule } from './../shared';
+import { MaterialModule } from '../shared/material.module';
+import { ModalModule, UploadKeyDialogModule, ProgressDialogModule, BubbleModule, ConfirmationDialogModule } from '../shared';
+import { FormControlsModule } from '../shared/form-controls';
 import { HealthStatusComponent } from './health-status.component';
-import { HealthStatusGridModule } from './health-status-grid/health-status-grid.module';
 import { BackupDilogComponent } from './backup-dilog/backup-dilog.component';
 import {
   ManageEnvironmentComponent,
-  ConfirmActionDialog
+  ConfirmActionDialogComponent
 } from './manage-environment/manage-environment-dilog.component';
 
+import { GroupNameValidationDirective } from './manage-roles-groups/group-name-validarion.directive';
+import { DirectivesModule } from '../core/directives';
+
+import { HealthStatusGridComponent } from './health-status-grid/health-status-grid.component';
+import { SsnMonitorComponent } from './ssn-monitor/ssn-monitor.component';
+import { ManageRolesGroupsComponent, ConfirmDeleteUserAccountDialogComponent } from './manage-roles-groups/manage-roles-groups.component';
+
+export * from './environment-status.model';
+
 @NgModule({
   imports: [
     CommonModule,
-    NavbarModule,
+    FormsModule,
+    ReactiveFormsModule,
     ModalModule,
-    HealthStatusGridModule,
     UploadKeyDialogModule,
     ProgressDialogModule,
-    MaterialModule
+    BubbleModule,
+    ConfirmationDialogModule,
+    FormControlsModule,
+    MaterialModule,
+    DirectivesModule,
+    ToastModule.forRoot()
   ],
   declarations: [
+    GroupNameValidationDirective,
     HealthStatusComponent,
     BackupDilogComponent,
     ManageEnvironmentComponent,
-    ConfirmActionDialog
+    ConfirmActionDialogComponent,
+    ConfirmDeleteUserAccountDialogComponent,
+    SsnMonitorComponent,
+    ManageRolesGroupsComponent,
+    HealthStatusGridComponent
   ],
-  entryComponents: [ConfirmActionDialog],
-  exports: [HealthStatusComponent]
+  entryComponents: [ConfirmActionDialogComponent, ConfirmDeleteUserAccountDialogComponent],
+  exports: [HealthStatusComponent, HealthStatusGridComponent, GroupNameValidationDirective]
 })
 export class HealthStatusModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.html b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.html
index 143ea7b..094ec9b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.html
@@ -1,48 +1,73 @@
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<modal-dialog #bindDialog modalClass="manage-env-dialog modal-lg">
+<modal-dialog #bindDialog modalClass="manage-env-dialog modal-xl-s">
   <modal-header>
     <h4 class="modal-title">Manage environment</h4>
   </modal-header>
   <modal-content>
     <div class="content-box">
       <div *ngIf="usersList.length">
-        <mat-list>
-          <mat-list-item class="list-header">
-            <div class="username">User</div>
-            <div class="action">Actions</div>
-          </mat-list-item>
-          <div class="scrolling-content" id="scrolling">
-            <mat-list-item *ngFor="let item of usersList">
-              <div class="username ellipsis">{{ item }}</div>
-              <div class="action">
-                <span matTooltip="Stop" matTooltipPosition="above" (click)="applyAction('stop', item)"><i class="material-icons">pause_circle_outline</i></span>
-                <span matTooltip="Terminate" matTooltipPosition="above" (click)="applyAction('terminate', item)"><i class="material-icons">phonelink_off</i></span>
-              </div>
+        <form [formGroup]="manageUsersForm" (submit)="setBudgetLimits(manageUsersForm.value)" novalidate>
+          <mat-list>
+            <mat-list-item class="list-header">
+              <div class="username">User</div>
+              <div class="quotes" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">Limit</div>
+              <div class="action">Actions</div>
             </mat-list-item>
-          </div>
-        </mat-list>
+            <div class="scrolling-content" id="scrolling" formArrayName="users">
+              <mat-list-item  *ngFor="let item of usersEnvironments.controls; let i=index" [formGroupName]="i" class="list-item"> 
+                <div class="username ellipsis">{{ manageUsersForm.controls['users'].controls[i].value['name'] }}</div>
+                <div class="quotes" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">
+                    <input type="number" min="0" placeholder="Enter limit, in USD" formControlName="budget">
+                    <span class="danger_color" *ngIf="!manageUsersForm?.controls['users'].controls[i].controls['budget'].valid && !manageUsersForm?.controls['users'].controls[i].controls['budget'].hasError('overrun')">Only positive integers are allowed</span>
+                    <span class="danger_color" *ngIf="manageUsersForm?.controls['users'].controls[i].controls['budget'].hasError('overrun')">Per-user quotes cannot be greater than total budget</span>
+                </div>
+                <div class="action">
+                  <span *ngIf=" manageUsersForm.controls['users'].controls[i].value['status'] === 'ACTIVE'; else not_active" matTooltip="Stop" matTooltipPosition="above" (click)="applyAction('stop', item)"><i class="material-icons">pause_circle_outline</i></span>
+
+                  <ng-template #not_active>
+                    <span class="disabled" matTooltip="User's environment is not active" matTooltipPosition="above">
+                      <i class="material-icons">pause_circle_outline</i>
+                    </span>
+                  </ng-template>
+
+                  <span matTooltip="Terminate" matTooltipPosition="above" (click)="applyAction('terminate', item)"><i class="material-icons">phonelink_off</i></span>
+                </div>
+              </mat-list-item>
+            </div>
+            <div class="control-group total-budget" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">
+              <label class="label">Total budget</label>
+              <div class="control">
+                <input type="number" formControlName="total" placeholder="Enter total budget, in USD">
+                <span class="danger_color" *ngIf="manageUsersForm?.controls['total'].hasError('overrun')">Total budget cannot be lower than a sum of users quotes</span>
+              </div>
+            </div>
+            <div class="text-center m-top-30" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">
+              <button mat-raised-button type="button" (click)="bindDialog.close()" class="butt action">Cancel</button>
+              <button mat-raised-button type="submit" [disabled]="!manageUsersForm.valid"
+                      class="butt butt-success" [ngClass]="{'not-allowed': !manageUsersForm.valid}">Apply</button>
+            </div>
+          </mat-list>
+        </form>
       </div>
-      <div class="info message" *ngIf="!usersList.length">
-        No active users environments
-      </div>
-      <div class="danger_color message m-top-20" *ngIf="errorMessage">{{ errorMessage }}</div>
+      <div class="info message" *ngIf="!usersList.length">No active users environments</div>
     </div>
   </modal-content>
 </modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.scss b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.scss
index 5bcc59c..b268e6f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.scss
@@ -1,52 +1,87 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .manage-env-dialog {
-  .mat-list-item-content {
-    padding: 0 !important;
-    justify-content: space-between;
-    color: #577289;
-  }
-  .list-header {
-    border-top: 1px solid #edf1f5;
-    border-bottom: 1px solid #edf1f5;
-    color: #577289;
-    width: 100%;
-    font-weight: 600;
+  .mat-list {
+    .mat-list-item {
+      height: 60px;
+      position: relative;
+      .mat-list-item-content {
+        padding: 0 !important;
+        justify-content: space-between;
+        color: #577289;
+      }
+    }
   }
   .scrolling-content {
-    max-height: 275px;
+    max-height: 300px;
+    min-height: 85px;
     overflow-y: auto;
   }
   .username {
-    width: 80%;
+    width: 45%;
+  }
+  .quotes {
+    width: 40%;
+    margin-right: 10px;
+    position: relative;
+    .danger_color {
+      position: absolute;
+      left: 0;
+      top: 36px;
+    }
   }
   .action {
-    width: 20%;
+    width: 15%;
     span {
       padding: 3px;
       cursor: pointer;
       &:hover {
-        color: #718ba6;
+        color: #35afd5;
       }
       i {
         font-size: 20px;
       }
     }
+    .disabled {
+      cursor: not-allowed !important;
+      pointer-events: all;
+      opacity: .6;
+      &:hover {
+        color: #6b8299;
+      }
+    }
   }
-}
\ No newline at end of file
+  .total-budget {
+    border-top: 1px solid #edf1f5;
+    padding-top: 15px;
+    .control {
+      position: relative;
+      width: 56%;
+      .danger_color {
+        position: absolute;
+        left: 0;
+        bottom: -20px;
+      }
+    }
+    .label {
+      width: 44%;
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.ts
index b10457a..f932f8b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-environment/manage-environment-dilog.component.ts
@@ -1,24 +1,26 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Output, EventEmitter, ViewEncapsulation, Inject } from '@angular/core';
+import { Component, ViewChild, Output, EventEmitter, ViewEncapsulation, Inject } from '@angular/core';
+import { Validators, FormBuilder, FormGroup, FormArray } from '@angular/forms';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
-import { DICTIONARY } from './../../../dictionary/global.dictionary';
+import { DICTIONARY } from '../../../dictionary/global.dictionary';
 
 @Component({
   selector: 'dlab-manage-env-dilog',
@@ -26,36 +28,77 @@
   styleUrls: ['./manage-environment-dilog.component.scss'],
   encapsulation: ViewEncapsulation.None
 })
-export class ManageEnvironmentComponent implements OnInit {
+export class ManageEnvironmentComponent {
   readonly DICTIONARY = DICTIONARY;
-
-  public errorMessage: string = '';
   public usersList: Array<string> = [];
+  public manageUsersForm: FormGroup;
+  public manageTotalsForm: FormGroup;
 
   @ViewChild('bindDialog') bindDialog;
   @Output() manageEnv: EventEmitter<{}> = new EventEmitter();
+  @Output() setBudget: EventEmitter<{}> = new EventEmitter();
 
-  constructor(public dialog: MatDialog) { }
+  constructor(
+    private _fb: FormBuilder,
+    public dialog: MatDialog
+  ) { }
 
-  ngOnInit() {
-    this.bindDialog.onClosing = () => {
-      this.errorMessage = '';
-    };
+  get usersEnvironments(): FormArray{
+    return <FormArray>this.manageUsersForm.get('users');
   }
 
-  public open(param, data): void {
+  public open(param, data, settings): void {
     this.usersList = data;
+    !this.manageUsersForm && this.initForm();
+
+    this.manageUsersForm.setControl('users',
+    this._fb.array((this.usersList || []).map((x: any) => this._fb.group({
+      name: x.name, budget: [x.budget, [Validators.min(0), this.userValidityCheck.bind(this)]], status: x.status
+    }))));
+    this.manageUsersForm.controls['total'].setValue(settings.conf_max_budget || null);
     this.bindDialog.open(param);
   }
 
+  public setBudgetLimits(value) {
+    this.setBudget.emit(value);
+    this.bindDialog.close();
+  }
+
   public applyAction(action, user) {
-    const dialogRef: MatDialogRef<ConfirmActionDialog> = this.dialog.open(ConfirmActionDialog, { data: {action, user}, width: '550px' });
+    const dialogRef: MatDialogRef<ConfirmActionDialogComponent> = this.dialog.open(
+      ConfirmActionDialogComponent, { data: {action, user: user.value.name}, width: '550px' });
     dialogRef.afterClosed().subscribe(result => {
-      if (result) this.manageEnv.emit({action, user});
+      if (result) this.manageEnv.emit({action, user: user.value.name});
     });
   }
-}
 
+  private initForm(): void {
+    this.manageUsersForm = this._fb.group({
+      total: [null, [Validators.min(0), this.totalValidityCheck.bind(this)]],
+      users: this._fb.array([this._fb.group({ name: '', budget: null, status: ''})])
+    });
+  }
+
+  private getCurrentUsersTotal(): number {
+    return this.manageUsersForm.value.users.reduce((memo, el) => memo += el.budget, 0);
+  }
+
+  private getCurrentTotalValue(): number {
+    return this.manageUsersForm.value.total;
+  }
+
+  private totalValidityCheck(control) {
+    return (control && control.value)
+      ? (control.value >= this.getCurrentUsersTotal() ? null : { overrun: true })
+      : null;
+  }
+
+  private userValidityCheck(control) {
+    if (control && control.value) {
+      return (this.getCurrentTotalValue() && this.getCurrentTotalValue() < this.getCurrentUsersTotal()) ? { overrun: true } : null;
+    }
+  }
+}
 
 @Component({
   selector: 'dialog-result-example-dialog',
@@ -76,9 +119,9 @@
     .content { color: #718ba6; padding: 20px 50px; font-size: 14px; font-weight: 400 }
   `]
 })
-export class ConfirmActionDialog {
+export class ConfirmActionDialogComponent {
   constructor(
-    public dialogRef: MatDialogRef<ConfirmActionDialog>,
+    public dialogRef: MatDialogRef<ConfirmActionDialogComponent>,
     @Inject(MAT_DIALOG_DATA) public data: any
   ) { }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/group-name-validarion.directive.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/group-name-validarion.directive.ts
new file mode 100644
index 0000000..879e3e2
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/group-name-validarion.directive.ts
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Directive, forwardRef, Input } from '@angular/core';
+import { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';
+
+
+@Directive({
+  selector: '[validator][ngModel],[group-dir][ngFormControl]',
+  providers: [{
+    multi: true,
+    provide: NG_VALIDATORS,
+    useExisting: forwardRef(() => GroupNameValidationDirective)
+  }]
+})
+export class GroupNameValidationDirective implements Validator {
+  @Input() validator: Function;
+
+  validate(control: AbstractControl): { [key: string]: any; } {
+    return this.validator(control);
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.html b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.html
new file mode 100644
index 0000000..d977662
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.html
@@ -0,0 +1,153 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<modal-dialog #bindDialog modalClass="manage-roles-dialog modal-xxl">
+  <modal-header>
+    <h4 class="modal-title">Manage roles</h4>
+  </modal-header>
+  <modal-content>
+    <div class="content-box">
+      <button mat-raised-button class="butt add-group" (click)="stepperView = !stepperView">
+        <i class="material-icons">people_outline</i>Add group
+      </button>
+      <mat-horizontal-stepper #stepper *ngIf="stepperView" class="stepper ani">
+        <mat-step>
+          <ng-template matStepLabel>Groups</ng-template>
+          <div class="inner-step mat-reset">
+            <input [validator]="groupValidarion()" type="text" placeholder="Enter group name" [(ngModel)]="setupGroup" #setupGroupName="ngModel">
+            <div class="danger_color" *ngIf="setupGroupName.errors?.patterns && setupGroupName.dirty">Group name can only contain letters, numbers, hyphens and '_'</div>
+            <div class="danger_color" *ngIf="setupGroupName.errors?.duplicate && setupGroupName.dirty">Group name already exists</div>
+          </div>
+          <div class="text-center m-bott-10">
+            <button mat-raised-button (click)="resetDialog()" class="butt">Cancel</button>
+            <button mat-raised-button matStepperNext class="butt">Next<i class="material-icons">keyboard_arrow_right</i></button>
+          </div>
+        </mat-step>
+        <mat-step>
+          <ng-template matStepLabel>Roles</ng-template>
+          <div class="inner-step mat-reset">
+            <div class="selector-wrapper">
+              <!-- <multi-select-dropdown (selectionChange)="onUpdate($event)" [type]="'role'" [items]="rolesList" [model]="setupRoles"></multi-select-dropdown> -->
+              <mat-form-field>
+                  <mat-select multiple [compareWith]="compareObjects" name="roles" [(value)]="setupRoles" placeholder="Select roles">
+                    <mat-option class="multiple-select" disabled>
+                      <a class="select ani" (click)="selectAllOptions(setupRoles, rolesList)">
+                        <i class="material-icons">playlist_add_check</i>&nbsp;All
+                      </a>
+                      <a class="deselect ani" (click)="selectAllOptions(setupRoles)">
+                        <i class="material-icons">clear</i>&nbsp;None
+                      </a>
+                    </mat-option>
+                    <mat-option *ngFor="let role of rolesList" [value]="role">
+                      {{ role }}
+                    </mat-option>
+                  </mat-select>
+                  <button class="caret">
+                    <i class="material-icons">keyboard_arrow_down</i>
+                  </button>
+                </mat-form-field>
+            </div>
+          </div>
+          <div class="text-center m-bott-10">
+            <button mat-raised-button matStepperPrevious class="butt"><i class="material-icons">keyboard_arrow_left</i>Back</button>
+            <button mat-raised-button (click)="resetDialog()" class="butt">Cancel</button>
+            <button mat-raised-button matStepperNext class="butt">Next<i class="material-icons">keyboard_arrow_right</i></button>
+          </div>
+        </mat-step>
+        <mat-step>
+          <ng-template matStepLabel>Users</ng-template>
+          <div class="inner-step mat-reset">
+            <input type="text" placeholder="Enter user login" [(ngModel)]="setupUser">
+          </div>
+          <div class="text-center m-bott-10">
+            <button mat-raised-button matStepperPrevious class="butt"><i class="material-icons">keyboard_arrow_left</i>Back</button>
+            <button mat-raised-button (click)="resetDialog()" class="butt">Cancel</button>
+            <button mat-raised-button (click)="manageAction('create', 'group')" class="butt butt-success"
+                    [disabled]="!setupGroup || setupGroupName.errors?.pattern || !setupRoles.length > 0">Create</button>
+          </div>
+        </mat-step>
+      </mat-horizontal-stepper>
+      <mat-divider></mat-divider>
+      <div *ngIf="groupsData.length" class="ani">
+        <table class="dashboard_table">
+          <tr>
+            <th class="th_name groups">Name</th>
+            <th class="roles">Roles</th>
+            <th class="users">Users</th>
+            <th class="th_actions">Action</th>
+          </tr>
+          <tr *ngFor="let item of groupsData" class="dashboard_table_body filter-row">
+            <td>{{ item.group }}</td>
+            <td class="roles mat-reset">
+              <div class="selector-wrapper-edit">
+                <mat-form-field>
+                  <mat-select multiple [compareWith]="compareObjects" name="selected_roles" [(value)]="item.selected_roles" placeholder="Select roles">
+                    <mat-option class="multiple-select" disabled>
+                      <a class="select ani" (click)="selectAllOptions(item, rolesList, 'selected_roles')">
+                        <i class="material-icons">playlist_add_check</i>&nbsp;All
+                      </a>
+                      <a class="deselect ani" (click)="selectAllOptions(item, null, 'selected_roles')">
+                        <i class="material-icons">clear</i>&nbsp;None
+                      </a>
+                    </mat-option>
+                    <mat-option *ngFor="let role of rolesList" [value]="role">
+                      {{ role }}
+                    </mat-option>
+                  </mat-select>
+                  <button class="caret ani">
+                    <i class="material-icons">keyboard_arrow_down</i>
+                  </button>
+                </mat-form-field>
+              </div>
+            </td>
+            <td class="users-list ani">
+              <mat-form-field class="chip-list">
+                <input #user matInput placeholder="Enter user login" pattern="[@.-_0-9a-zA-Z]" (keydown.enter)="addUser(user.value, item); user.value = ''">
+                <button mat-icon-button matSuffix (click)="addUser(user.value, item); user.value = ''">
+                  <mat-icon>person_add</mat-icon>
+                </button>
+              </mat-form-field>
+              <div class="list-selected list-container ani">
+                <mat-chip-list>
+                  <mat-chip *ngFor="let user of item.users">
+                    {{ user }}
+                    <a class="material-icons" (click)="removeUser(item.users, user)">clear</a>
+                  </mat-chip>
+                </mat-chip-list>
+              </div>
+            </td>
+            <td class="actions">
+              <button mat-icon-button class="reset ani" (click)="manageAction('delete', 'group', item)">
+                <i class="material-icons">close</i>
+              </button>
+
+              <button mat-icon-button class="apply ani" matTooltip="Group cannot be updated without any selected role"
+                      matTooltipPosition="above"
+                      [matTooltipDisabled]="item.selected_roles.length > 0"
+                      [ngClass]="{ 'not-allowed' : !item.selected_roles.length }"
+                      (click)="manageAction('update', 'group', item)">
+                <i class="material-icons">done</i>
+              </button>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </div>
+  </modal-content>
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.scss b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.scss
new file mode 100644
index 0000000..eb9bed0
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.scss
@@ -0,0 +1,290 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+::ng-deep .mat-option:first-child .mat-pseudo-checkbox { display: none; }
+
+.caret {
+  width: 40px;
+  color: #4ab8dc;
+  border: none;
+  border-left: 1px solid #ececec;
+  background-color: #fff;
+  position: absolute;
+  right: 0;
+  top: 0px;
+  height: 36px;
+  cursor: pointer;
+  &.not-allowed {
+    background-color: #dcdcdc;
+  }
+}
+
+
+.content-box {
+  padding: 20px 30px 35px;
+  height: 85vh;
+  overflow-y: auto;
+}
+.no-details {
+  color: #d8d8d8;
+}
+.mat-divider {
+  margin: 10px 0;
+}
+.stepper {
+  height: 190px;
+  margin-top: 10px;
+  .inner-step {
+    height: 70px;
+    padding: 5px;
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    text-align: center;
+    input {
+      width: 490px;
+      align-self: center;
+    }
+    .caret {
+      i {
+        margin-top: 3px;
+      }
+    }
+  }
+  .text-center {
+    button {
+      &:not(:last-child) {
+        margin-right: 5px;
+      }
+    }
+  }
+}
+.selector-wrapper {
+  display: flex;
+  align-self: center;
+  width: 490px;
+  height: 36px;
+  padding-left: 10px;
+  font-family: 'Open Sans', sans-serif;
+  font-size: 15px;
+  font-weight: 300;
+  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
+  mat-form-field {
+    width: 100%;
+    .mat-form-field-wrapper {
+      padding-bottom: 0;
+    }
+    .mat-icon {
+      font-size: 20px;
+    }
+  }
+  .dropdown-multiselect {
+    width: 100% !important;
+    > button {
+      padding: 6px 22px;
+    }
+  }
+}
+.list-header {
+  padding: 0 15px;
+}
+.scrolling-content {
+  max-height: 450px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  display: block;
+  padding: 15px 5px;
+  &.stepper-opened {
+    height: 250px;
+  }
+}
+.roles {
+  width: 30%;
+  padding: 0 10px;
+  .selector-wrapper-edit {
+    position: relative;
+    display: flex;
+    justify-content: space-between;
+    height: 36px;
+    padding-left: 10px;
+    background: #fff;
+    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
+    multi-select-dropdown {
+      width: 100%;
+      .dropdown-multiselect {
+        > button {
+          padding: 8px 22px 5px;
+        }
+      }
+    }
+    .caret {
+      &:hover {
+        box-shadow: 0 3px 1px -10px rgba(0, 0, 0, 0.2), 0 2px 1px 0 rgba(0, 0, 0, 0.17), 0 1px 5px 0 rgba(0, 0, 0, 0.12)
+      }
+    }
+  }
+}
+.groups {
+  width: 20%;
+}
+.users {
+  width: 30%;
+  padding: 0 10px;
+}
+.users-list {
+  padding: 5px 10px;
+  font-family: 'Open Sans', sans-serif;
+  font-size: 15px;
+  font-weight: 300;
+  color: #577289;
+  position: relative;
+  i {
+    color: #FF5722;
+    font-size: 18px;
+    cursor: pointer;
+  }
+  .list-selected {
+    width: 100%;
+    margin-top: 50px;
+    height: inherit;
+  }
+}
+.expanded-panel {
+  display: flex;
+  align-items: flex-end;
+  .add-input-block {
+    display: flex;
+    height: 36px;
+    padding-right: 0;
+    outline: none;
+    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
+    input {
+      height: 36px;
+      padding: 0;
+      padding-left: 10px;
+      width: 170px;
+    }
+    .caret {
+      width: 50px;
+    }
+  }
+}
+
+
+mat-expansion-panel-header {
+  &.mat-expansion-panel-header {
+    font-family: 'Open Sans', sans-serif;
+    font-size: 15px;
+    font-weight: 300;
+    color: #577289;
+  }
+}
+
+.mat-step-header {
+  .mat-step-icon {
+    background-color: #36afd5 !important;
+  }
+  .mat-step-label {
+    font-family: 'Open Sans', sans-serif;
+    font-size: 16px;
+    font-weight: 300;
+  }
+}
+
+.dashboard_table {
+  .dashboard_table_body {
+    .actions {
+      padding: 10px 0;
+    }
+    &.filter-row {
+      .actions {
+        button {
+          background: none;
+          .mid {
+            vertical-align: sub;
+          }
+        }
+      }
+    }
+  }
+  .th_actions {
+    width: 10%;
+  }
+}
+
+.mat-chip:not(.mat-basic-chip) {
+  transition: box-shadow 280ms cubic-bezier(.4,0,.2,1);
+  padding: 7px 0 7px 10px;
+  border-radius: 24px;
+  cursor: default;
+  display: inline-block;
+  position: relative;
+  padding-right: 25px;
+  white-space: nowrap;
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  margin: 2px !important;
+}
+mat-chip.mat-chip a {
+  position: absolute;
+  right: 15px;
+}
+mat-form-field.chip-list {
+  &.mat-input-container {
+    position: absolute;
+    top: 2px;
+    width: 94%;
+    font-size: 16px;
+    font-weight: 300;
+  }
+}
+
+.mat-raised-button {
+  &.butt {
+    &.butt-success {
+      margin-left: 0;
+    }
+  }
+}
+.multiple-select {
+  border-bottom: 1px solid #dedbdb;
+  padding: 0;
+  a {
+    display: inline-block;
+    width: 50%;
+    padding: 0 15px;
+    vertical-align: middle;
+    color: #575757;
+    cursor: pointer;
+    i {
+      vertical-align: sub;
+      font-size: 20px;
+    }
+    &:hover {
+      color: #4eaf3e;
+      background: #f9fafb;
+    }
+    &.deselect {
+      &:hover {
+        color: #f1696e;
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.ts
new file mode 100644
index 0000000..4c1567b
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/manage-roles-groups/manage-roles-groups.component.ts
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Component, OnInit, ViewChild, Output, EventEmitter, Inject } from '@angular/core';
+import { ValidatorFn, FormControl, NgModel } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { DICTIONARY } from '../../../dictionary/global.dictionary';
+
+@Component({
+  selector: 'dlab-manage-roles-groups',
+  templateUrl: './manage-roles-groups.component.html',
+  styleUrls: ['../../resources/resources-grid/resources-grid.component.css', './manage-roles-groups.component.scss']
+})
+export class ManageRolesGroupsComponent implements OnInit {
+  readonly DICTIONARY = DICTIONARY;
+
+  public groupsData: Array<any> = [];
+  public roles: Array<any> = [];
+  public rolesList: Array<string> = [];
+  public setupGroup: string = '';
+  public setupUser: string = '';
+  public manageUser: string = '';
+  public setupRoles: Array<string> = [];
+  public updatedRoles: Array<string> = [];
+  public delimitersRegex = /[-_]?/g;
+  public groupnamePattern = new RegExp(/^[a-zA-Z0-9_\-]+$/);
+
+  @ViewChild('bindDialog') bindDialog;
+  @Output() manageRolesGroupAction: EventEmitter<{}> = new EventEmitter();
+  stepperView: boolean = false;
+
+  constructor(public dialog: MatDialog) { }
+
+  ngOnInit() {
+    this.bindDialog.onClosing = () => this.resetDialog();
+  }
+
+  public open(param, groups, roles): void {
+    this.roles = roles;
+    this.rolesList = roles.map(role => role.description);
+    this.updateGroupData(groups);
+
+    this.stepperView = false;
+    this.bindDialog.open(param);
+  }
+
+  public onUpdate($event) {
+    if ($event.type === 'role') {
+      this.setupRoles = $event.model;
+    } else {
+      this.updatedRoles = $event.model;
+    }
+    $event.$event.preventDefault();
+  }
+
+  public selectAllOptions(item, values, byKey?) {
+    byKey ? (item[byKey] = values ? values : []) : this.setupRoles = values ? values : [];
+  }
+
+  public manageAction(action: string, type: string, item?: any, value?) {
+    if (action === 'create') {
+      this.manageRolesGroupAction.emit(
+        { action, type, value: {
+          name: this.setupGroup,
+          users: this.setupUser ? this.setupUser.split(',').map(elem => elem.trim()) : [],
+          roleIds: this.extractIds(this.roles, this.setupRoles)
+        }
+      });
+      this.stepperView = false;
+    } else if (action === 'delete') {
+      const data = (type === 'users') ? {group: item.group, user: value} : {group: item.group, id: item};
+      const dialogRef: MatDialogRef<ConfirmDeleteUserAccountDialogComponent> = this.dialog.open(
+        ConfirmDeleteUserAccountDialogComponent,
+        { data: data, width: '550px' }
+      );
+
+      dialogRef.afterClosed().subscribe(result => {
+        if (result) {
+          const emitValue = (type === 'users')
+            ? {action, type, id: item.name, value: { user: value, group: item.group }}
+            : {action, type, id: item.name, value: item.group} ;
+          this.manageRolesGroupAction.emit(emitValue);
+        }
+      });
+    } else if (action === 'update') {
+      this.manageRolesGroupAction.emit({action, type, value: {
+        name: item.group,
+        roleIds: this.extractIds(this.roles, item.selected_roles),
+        users: item.users || [] }});
+    }
+    this.resetDialog();
+  }
+
+  public extractIds(sourceList, target) {
+    return sourceList.reduce((acc, item) => {
+      target.includes(item.description) && acc.push(item._id);
+      return acc;
+    }, []);
+  }
+
+  public updateGroupData(groups) {
+    this.groupsData = groups;
+
+    this.groupsData.forEach(item => {
+      item.selected_roles = item.roles.map(role => role.description);
+    });
+  }
+
+  public groupValidarion(): ValidatorFn {
+
+    const duplicateList = this.groupsData.map(item => item.group);
+    return <ValidatorFn>((control: FormControl) => {
+      if (control.value && duplicateList.includes(this.delimitersFiltering(control.value)))
+        return { duplicate: true };
+
+      if (control.value && !this.groupnamePattern.test(control.value))
+        return { patterns: true };
+
+      return null;
+    });
+  }
+
+  public compareObjects(o1: any, o2: any): boolean {
+    return o1.toLowerCase() === o2.toLowerCase();
+  }
+
+  public delimitersFiltering(resource): string {
+    return resource.replace(this.delimitersRegex, '').toString().toLowerCase();
+  }
+
+  public resetDialog() {
+    this.stepperView = false;
+    this.setupGroup = '';
+    this.setupUser = '';
+    this.manageUser = '';
+    this.setupRoles = [];
+    this.updatedRoles = [];
+  }
+
+  public removeUser(list, item): void {
+    list.splice(list.indexOf(item), 1);
+  }
+
+  public addUser(value: string, item): void {
+    if (value && value.trim()) {
+      item.users instanceof Array ? item.users.push(value.trim()) : item.users = [value.trim()];
+    }
+  }
+}
+
+
+@Component({
+  selector: 'dialog-result-example-dialog',
+  template: `
+  <div mat-dialog-content class="content">
+    <p *ngIf="data.user">User <strong>{{ data.user }}</strong> will be deleted from <strong>{{ data.group }}</strong> group.</p>
+    <p *ngIf="data.id">Group <strong>{{ data.group }}</strong> will be decommissioned.</p>
+    <p class="m-top-20"><strong>Do you want to proceed?</strong></p>
+  </div>
+  <div class="text-center">
+    <button type="button" class="butt" mat-raised-button (click)="dialogRef.close()">No</button>
+    <button type="button" class="butt butt-success" mat-raised-button (click)="dialogRef.close(true)">Yes</button>
+  </div>
+  `,
+  styles: [`
+    .content { color: #718ba6; padding: 20px 50px; font-size: 14px; font-weight: 400 }
+  `]
+})
+export class ConfirmDeleteUserAccountDialogComponent {
+  constructor(
+    public dialogRef: MatDialogRef<ConfirmDeleteUserAccountDialogComponent>,
+    @Inject(MAT_DIALOG_DATA) public data: any
+  ) { }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.html b/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.html
new file mode 100644
index 0000000..3d13266
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.html
@@ -0,0 +1,117 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<modal-dialog #bindDialog modalClass="ssn-monitor-dialog modal-lg">
+  <modal-header>
+    <h4 class="modal-title">SSN Monitor</h4>
+  </modal-header>
+  <modal-content>
+    <div class="content-box" *ngIf="monitorData">
+      <div class="ssn-info">
+        <mat-tab-group *ngIf="monitorData?.processorInfo" [dynamicHeight]="true">
+          <mat-tab label="CPU">
+            <div class="scrolling-content" id="scrolling">
+              <mat-list-item class="list-header">
+                <div class="col">Name</div>
+                <div class="col">{{ monitorData.processorInfo.name }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Vendor</div>
+                <div class="col">{{ monitorData.processorInfo.vendor }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Logical Core Count</div>
+                <div class="col">{{ monitorData.processorInfo.logicalCoreCount }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Physical Core Count</div>
+                <div class="col">{{ monitorData.processorInfo.physicalCoreCount }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Current System Load</div>
+                <div class="col">{{ monitorData.processorInfo.currentSystemLoad /100 | percent:'1.0-2' }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">System Load Average</div>
+                <div class="col">{{ monitorData.processorInfo.systemLoadAverage /100 | percent:'1.0-2' }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">CPU 64 Bit</div>
+                <div class="col">{{ monitorData.processorInfo.cpu64Bit }}</div>
+              </mat-list-item>
+            </div>
+          </mat-tab>
+
+          <mat-tab label="Memory">
+            <div class="scrolling-content" id="scrolling">
+              <mat-list-item class="list-header">
+                <div class="col">Available Memory</div>
+                <div class="col">{{ convertSize(monitorData.memoryInfo.availableMemory) }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Total Memory</div>
+                <div class="col">{{ convertSize(monitorData.memoryInfo.totalMemory) }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Swap Total</div>
+                <div class="col">{{ convertSize(monitorData.memoryInfo.swapTotal) }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Swap Used</div>
+                <div class="col">{{ convertSize(monitorData.memoryInfo.swapUsed) }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Pages Page In</div>
+                <div class="col">{{ convertSize(monitorData.memoryInfo.pagesPageIn) }}</div>
+              </mat-list-item>
+              <mat-list-item class="list-header">
+                <div class="col">Pages Page Out</div>
+                <div class="col">{{ convertSize(monitorData.memoryInfo.pagesPageOut) }}</div>
+              </mat-list-item>
+            </div>
+
+          </mat-tab>
+          <mat-tab label="HDD">
+            <div class="scrolling-content" id="scrolling">
+              <div *ngFor="let disk of monitorData.disksInfo; let i = index">
+                <mat-list-item>
+                  <div class="col"><strong>Disk {{i +1}}</strong></div>
+                </mat-list-item>
+                <mat-list-item>
+                  <div class="col">Used Space</div>
+                  <div class="col">{{ convertSize(disk.usedByteSpace) }}</div>
+                </mat-list-item>
+                <mat-list-item>
+                  <div class="col">Total Space</div>
+                  <div class="col">{{ convertSize(disk.totalByteSpace) }}</div>
+                </mat-list-item>
+              </div>
+            </div>
+          </mat-tab>
+        </mat-tab-group>
+        <div class="text-center">
+          <button type="button" class="butt" mat-raised-button (click)="close()">Close</button>
+        </div>
+      </div>
+      <div class="info message" *ngIf="isEmpty(monitorData)">
+        No ssn monitor data available
+      </div>
+    </div>
+  </modal-content>
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.scss b/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.scss
new file mode 100644
index 0000000..769fefe
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.scss
@@ -0,0 +1,50 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.ssn-monitor-dialog {
+  .content-box {
+    padding-top: 10px !important;
+  }
+  .ssn-info {
+    min-height: 400px;
+    max-height: 500px;
+    .scrolling-content {
+      max-height: 310px;
+      overflow-y: auto;
+    }
+    .text-center {
+      position: absolute;
+      bottom: 20px;
+      left: 0;
+      right: 0;
+    }
+  }
+  .mat-list-item-content {
+    display: flex;
+    justify-content: initial;
+    color: #577289;
+    padding: 15px 5px;
+    border-bottom: 1px solid #f3f2f2;
+    font-size: 15px;
+    .col {
+      width: 50%;
+      font-weight: 300;
+     }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.ts b/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.ts
new file mode 100644
index 0000000..25b2fa3
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/health-status/ssn-monitor/ssn-monitor.component.ts
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Component, OnInit, ViewChild, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
+import { DICTIONARY } from './../../../dictionary/global.dictionary';
+
+@Component({
+  selector: 'dlab-ssn-monitor',
+  templateUrl: './ssn-monitor.component.html',
+  styleUrls: ['./ssn-monitor.component.scss'],
+  encapsulation: ViewEncapsulation.None
+})
+export class SsnMonitorComponent implements OnInit {
+  readonly DICTIONARY = DICTIONARY;
+
+  public errorMessage: string = '';
+  public monitorData = {};
+
+  @ViewChild('bindDialog') bindDialog;
+  @Output() manageEnv: EventEmitter<{}> = new EventEmitter();
+
+  ngOnInit() {}
+
+  public open(param, data): void {
+    this.monitorData = data || {};
+    this.bindDialog.open(param);
+  }
+  public close(param, data): void {
+    this.bindDialog.close();
+  }
+
+  public isEmpty(obj) {
+    if (obj) return Object.keys(obj).length === 0;
+  }
+
+  public convertSize(bytes) {
+    if (Number(bytes) === 0) return '0 Byte';
+
+    const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];
+    const i = Math.floor(Math.log(bytes) / Math.log(1024));
+    return parseFloat((bytes / Math.pow(1024, i)).toFixed(3)) + ' ' + sizes[i];
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.html b/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.html
index 4ff1baa..e4a3519 100644
--- a/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.html
@@ -1,22 +1,21 @@
-<!------------------------------------------------------------------------------------------------------------
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
------------------------------------------------------------------------------------------------------------ -->
-
-<dlab-navbar></dlab-navbar>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <section class="guide-wrapper">
   <h2>How to access DLAB user environment on different operation systems</h2>
diff --git a/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.ts b/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.ts
index 1b5077a..a3e1a08 100644
--- a/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/help/accessnotebookguide/accessnotebookguide.component.ts
@@ -1,25 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component } from '@angular/core';
 
 @Component({
-  moduleId: module.id,
   selector: 'access-notebook-guide',
   templateUrl: 'accessnotebookguide.component.html',
   styleUrls: ['../guides.component.css']
diff --git a/services/self-service/src/main/resources/webapp/src/app/help/guides.component.css b/services/self-service/src/main/resources/webapp/src/app/help/guides.component.css
index 1828fae..3c78216 100644
--- a/services/self-service/src/main/resources/webapp/src/app/help/guides.component.css
+++ b/services/self-service/src/main/resources/webapp/src/app/help/guides.component.css
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .guide-wrapper {
   font-family: Trebuchet MS, sans-serif;
diff --git a/services/self-service/src/main/resources/webapp/src/app/help/index.ts b/services/self-service/src/main/resources/webapp/src/app/help/index.ts
index c3ce1c8..5b2b31e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/help/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/help/index.ts
@@ -1,43 +1,34 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 
 import { AccessNotebookGuideComponent } from './accessnotebookguide/accessnotebookguide.component';
 import { PublicKeyGuideComponent } from './publickeyguide/publickeyguide.component';
-import { NavbarModule } from './../shared';
 
 export * from './accessnotebookguide/accessnotebookguide.component';
 export * from './publickeyguide/publickeyguide.component';
 
 @NgModule({
-  imports: [
-    CommonModule,
-    NavbarModule
-  ],
-  declarations: [
-    AccessNotebookGuideComponent,
-    PublicKeyGuideComponent
-  ],
-  exports: [
-    AccessNotebookGuideComponent,
-    PublicKeyGuideComponent
-  ]
+  imports: [CommonModule],
+  declarations: [AccessNotebookGuideComponent, PublicKeyGuideComponent],
+  exports: [AccessNotebookGuideComponent, PublicKeyGuideComponent]
 })
-export class GuidesModule { }
+export class GuidesModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.html b/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.html
index 87f0998..b5936b8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.html
@@ -1,22 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<dlab-navbar></dlab-navbar>
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <section class="guide-wrapper">
   <h2>Generating SSH key pair on different operation systems</h2>
diff --git a/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.ts b/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.ts
index dea08f8..0753979 100644
--- a/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/help/publickeyguide/publickeyguide.component.ts
@@ -1,25 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component } from '@angular/core';
 
 @Component({
-  moduleId: module.id,
   selector: 'public-key-guide',
   templateUrl: 'publickeyguide.component.html',
   styleUrls: ['../guides.component.css']
diff --git a/services/self-service/src/main/resources/webapp/src/app/login/login.component.css b/services/self-service/src/main/resources/webapp/src/app/login/login.component.css
index 8c69012..a76fe1e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/login/login.component.css
+++ b/services/self-service/src/main/resources/webapp/src/app/login/login.component.css
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .login_page .form-group {
   display: flex;
diff --git a/services/self-service/src/main/resources/webapp/src/app/login/login.component.html b/services/self-service/src/main/resources/webapp/src/app/login/login.component.html
index 247f250..c518b3f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/login/login.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/login/login.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="login_page">
   <div class="content">
diff --git a/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts b/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts
index 02cbe27..7b650ac 100644
--- a/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/login/login.component.ts
@@ -1,61 +1,66 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ChangeDetectorRef } from '@angular/core';
+import { Component, OnInit, OnDestroy } from '@angular/core';
 import { Subscription } from 'rxjs/Subscription';
 
 import { LoginModel } from './login.model';
 import { AppRoutingService, HealthStatusService, ApplicationSecurityService } from '../core/services';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from '../core/util';
+import { HTTP_STATUS_CODES } from '../core/util';
 import { DICTIONARY } from '../../dictionary/global.dictionary';
 
 @Component({
-  moduleId: module.id,
   selector: 'dlab-login',
   templateUrl: 'login.component.html',
   styleUrls: ['./login.component.css']
 })
 
-export class LoginComponent implements OnInit {
+export class LoginComponent implements OnInit, OnDestroy {
   readonly DICTIONARY = DICTIONARY;
   model = new LoginModel('', '');
   error: string;
   loading = false;
   userPattern = '\\w+.*\\w+';
 
-  subscription: Subscription;
+  subscriptions: Subscription;
 
   constructor(
     private applicationSecurityService: ApplicationSecurityService,
     private appRoutingService: AppRoutingService,
-    private healthStatusService: HealthStatusService,
-    private ref: ChangeDetectorRef
+    private healthStatusService: HealthStatusService
   ) {
-    this.subscription = this.applicationSecurityService.emitter$
+    this.subscriptions = this.applicationSecurityService.emitter$
       .subscribe(message => this.error = message);
   }
 
   ngOnInit() {
     this.applicationSecurityService.isLoggedIn().subscribe(result => {
-      this.checkHealthStatusAndRedirect(result);
+      console.log('LOGGED IN  /login component');
+
+      result && this.checkHealthStatusAndRedirect(result);
     });
   }
 
+  ngOnDestroy() {
+    this.subscriptions.unsubscribe();
+  }
+
   login_btnClick() {
     this.error = '';
     this.loading = true;
@@ -69,11 +74,12 @@
         }
 
         return false;
-      }, (error) => {
+      }, error => {
         if (DICTIONARY.cloud_provider === 'azure' && error && error.status === HTTP_STATUS_CODES.FORBIDDEN) {
           window.location.href = error.headers.get('Location');
         } else {
-          this.error = ErrorMapUtils.handleError(error);
+          const errObj = error.json();
+          this.error = errObj.message;
           this.loading = false;
         }
       });
@@ -85,15 +91,13 @@
   }
 
   checkHealthStatusAndRedirect(isLoggedIn) {
-    if (isLoggedIn)
-      this.healthStatusService.isHealthStatusOk()
-        .subscribe(isHealthStatusOk => {
-          if (isLoggedIn && !isHealthStatusOk) {
-            this.appRoutingService.redirectToHealthStatusPage();
-          } else {
-            this.appRoutingService.redirectToHomePage();
-          }
-        });
+    this.healthStatusService.isHealthStatusOk()
+      .subscribe(isHealthStatusOk => {
+        if (isLoggedIn && !isHealthStatusOk) {
+          this.appRoutingService.redirectToHealthStatusPage();
+        } else {
+          this.appRoutingService.redirectToHomePage();
+        }
+      });
   }
 }
-
diff --git a/services/self-service/src/main/resources/webapp/src/app/login/login.model.ts b/services/self-service/src/main/resources/webapp/src/app/login/login.model.ts
index 9e29c29..52e7b18 100644
--- a/services/self-service/src/main/resources/webapp/src/app/login/login.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/login/login.model.ts
@@ -1,28 +1,30 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class LoginModel {
-  constructor(
-    public username: string,
-    public password: string
-  ) { }
+  constructor(public username: string, public password: string) {}
 
   toJsonString(): string {
-    return JSON.stringify({'username': this.username, 'password': this.password, 'access_token': ''});
+    return JSON.stringify({
+      username: this.username,
+      password: this.password,
+      access_token: ''
+    });
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/login/login.module.ts b/services/self-service/src/main/resources/webapp/src/app/login/login.module.ts
index d4c15d7..f630522 100644
--- a/services/self-service/src/main/resources/webapp/src/app/login/login.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/login/login.module.ts
@@ -1,40 +1,34 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { FormsModule } from '@angular/forms';
 import { CommonModule } from '@angular/common';
-import { MaterialModule } from './../shared/material.module';
-
+import { MaterialModule } from '../shared/material.module';
 import { LoginComponent } from './login.component';
-
 import { CoreModule } from '../core/core.module';
 
 export * from './login.component';
 
 @NgModule({
-  imports: [
-    FormsModule,
-    CommonModule,
-    CoreModule,
-    MaterialModule
-  ],
+  imports: [FormsModule, CommonModule, CoreModule, MaterialModule],
   declarations: [LoginComponent],
   exports: [LoginComponent]
 })
-export class LoginModule { }
+export class LoginModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/index.ts b/services/self-service/src/main/resources/webapp/src/app/management/index.ts
index 990f23c..009d463 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/management/index.ts
@@ -1,26 +1,27 @@
 
-/***************************************************************************
- 
- Copyright (c) 2016, EPAM SYSTEMS INC
- 
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- 
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
-import { NavbarModule, ConfirmationDialogModule, BubbleModule, UploadKeyDialogModule, ProgressDialogModule } from './../shared';
-import { MaterialModule } from './../shared/material.module';
+import { ConfirmationDialogModule, BubbleModule, UploadKeyDialogModule, ProgressDialogModule } from '../shared';
+import { MaterialModule } from '../shared/material.module';
 
 import { ManagementComponent } from './management.component';
 import { ManagementGridComponent, ConfirmationDialog } from './management-grid/management-grid.component';
@@ -31,7 +32,6 @@
 @NgModule({
   imports: [
     CommonModule,
-    NavbarModule,
     ConfirmationDialogModule,
     ComputationalResourcesModule,
     BubbleModule,
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html
index 4957e82..ecf5922 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <table class="dashboard_table">
   <tr>
@@ -26,7 +27,7 @@
     <th class="th_actions">Action</th>
   </tr>
 
-  <tr *ngFor="let env of allEnvironmentData">
+  <tr *ngFor="let env of allEnvironmentData" class="dashboard_table_body">
     <td>{{ env.user }}</td>
     <td [ngClass]="{'capitalize': env.name === 'edge node'}">{{ env.name }}</td>
     <td class="status" ngClass="{{env.status || ''}}">{{env.status}}</td>
@@ -64,10 +65,11 @@
             [ngClass]="{ 'disabled' : !uploadKey || env.status !== 'running' && env.status !== 'stopped' && env.status !== 'stopping' }"></span>
       <bubble-up #actions class="list-menu" position="bottom-left" alternative="top-left">
         <ul class="list-unstyled">
-          <li matTooltip="Unable to stop notebook because at least one computational resource is in progress"
+          <li matTooltip="{{ env.name !== 'edge node' ? 'Unable to stop notebook because at least one computational resource is in progress' : 'Unable to stop edge node because at least one resource of this user is in progress' }}"
               matTooltipPosition="above"
               [matTooltipDisabled]="!isResourcesInProgress(env)">
-              <div (click)="toggleResourceAction(env, 'stop')" [ngClass]="{'not-allowed' : env.status === 'stopped' || env.status === 'stopping' || env.status === 'starting' || env.status === 'creating image' || isResourcesInProgress(env)}">
+              <div (click)="toggleResourceAction(env, 'stop')"
+                   [ngClass]="{'not-allowed' : env.status === 'stopped' || env.status === 'stopping' || env.status === 'starting' || env.status === 'creating image' || isResourcesInProgress(env)}">
                 <i class="material-icons">pause_circle_outline</i>
                 <span>Stop</span>
               </div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.scss b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.scss
index 8fdb72f..14d324d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .dashboard_table {
   .th_user,
@@ -25,6 +26,11 @@
   .th_status {
     width: 12% !important;
   }
+  .dashboard_table_body {
+    td:first-child {
+      cursor: default;
+    }
+  }
 }
 .source .resource-wrap .resource-name .detailed-link {
   cursor: default !important;
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
index 779f8f4..7396c35 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management-grid/management-grid.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, OnInit, ViewChild, Input, Output, EventEmitter, Inject } from '@angular/core';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
@@ -71,17 +72,28 @@
   }
 
   isResourcesInProgress(notebook) {
-    if(notebook && notebook.resources.length) {
-      return notebook.resources.filter(resource => (
-        resource.status !== 'failed'
-        && resource.status !== 'terminated'
-        && resource.status !== 'running'
-        && resource.status !== 'stopped')).length > 0;
+    if (notebook) {
+      if (notebook.name === 'edge node') {
+        return this.allEnvironmentData
+          .filter(env => env.user === notebook.user)
+          .some(el => this.inProgress([el]) || this.inProgress(el.resources));
+      } else if (notebook.resources.length) {
+        return this.inProgress(notebook.resources);
+      }
     }
     return false;
   }
+
+  inProgress(resources) {
+    return resources.filter(resource => (
+      resource.status !== 'failed'
+      && resource.status !== 'terminated'
+      && resource.status !== 'running'
+      && resource.status !== 'stopped')).length > 0;
+  }
 }
 
+
 @Component({
   selector: 'confirm-dialog',
   template: `
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management.component.html b/services/self-service/src/main/resources/webapp/src/app/management/management.component.html
index dd37268..e7c8577 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management.component.html
@@ -1,28 +1,28 @@
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<dlab-navbar [healthStatus]="healthStatus" [billingEnabled]="billingEnabled" [admin]="admin"></dlab-navbar>
 <div class="sub-nav base-retreat">
-    <button mat-raised-button class="butt" (click)="buildGrid()">
-        <i class="material-icons">autorenew</i>Refresh
-    </button>
+  <button mat-raised-button class="butt" (click)="buildGrid()">
+    <i class="material-icons">autorenew</i>Refresh
+  </button>
 </div>
 
-<management-grid [allEnvironmentData]="allEnvironmentData" [uploadKey]="uploadKey" (refreshGrid)="buildGrid($event)" (actionToggle)="manageEnvironmentAction($event)"></management-grid>
-<key-upload-dialog #keyUploadModal (generateUserKey)="generateUserKey($event)" [primaryUploading]="true"></key-upload-dialog>
-<progress-dialog #preloaderModal></progress-dialog>
\ No newline at end of file
+<div *ngIf="admin">
+  <management-grid [allEnvironmentData]="allEnvironmentData" [uploadKey]="uploadKey" (refreshGrid)="buildGrid($event)" (actionToggle)="manageEnvironmentAction($event)"></management-grid>
+</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management.component.scss b/services/self-service/src/main/resources/webapp/src/app/management/management.component.scss
index 3b39b9a..e86362f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management.component.scss
@@ -1,30 +1,31 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .sub-nav {
-    justify-content: flex-end;
-    button {
-      margin-right: 10px;
-      &:last-child {
-        margin-right: 0;
-      }
-      &.env {
-        width: 210px;
-      }
+  justify-content: flex-end;
+  button {
+    margin-right: 10px;
+    &:last-child {
+      margin-right: 0;
     }
-  }
\ No newline at end of file
+    &.env {
+      width: 210px;
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management.component.ts b/services/self-service/src/main/resources/webapp/src/app/management/management.component.ts
index 368a13b..86f8582 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management.component.ts
@@ -1,23 +1,26 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+import { Component, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { HealthStatusService, ManageEnvironmentsService, UserAccessKeyService } from './../core/services';
+import { HealthStatusService, ManageEnvironmentsService, UserAccessKeyService, AppRoutingService } from '../core/services';
 import { EnvironmentModel } from './management.model';
 import { FileUtils, HTTP_STATUS_CODES } from '../core/util';
 
@@ -34,16 +37,16 @@
   public allEnvironmentData: Array<EnvironmentModel>;
   public uploadKey: boolean = true;
 
-  private readonly CHECK_ACCESS_KEY_TIMEOUT: number = 20000;
-
-  @ViewChild('keyUploadModal') keyUploadDialog;
-  @ViewChild('preloaderModal') preloaderDialog;
-
   constructor(
     private healthStatusService: HealthStatusService,
     private manageEnvironmentsService: ManageEnvironmentsService,
-    private userAccessKeyService: UserAccessKeyService
-  ) {}
+    private userAccessKeyService: UserAccessKeyService,
+    private appRoutingService: AppRoutingService,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
 
   ngOnInit() {
     this.buildGrid();
@@ -51,7 +54,6 @@
 
   public buildGrid() {
     this.getEnvironmentHealthStatus();
-    this.getAllEnvironmentData();
   }
 
   public manageEnvironmentAction($event) {
@@ -62,45 +64,14 @@
         $event.environment.name === 'edge node' ? 'edge' : $event.environment.name,
         $event.resource ? $event.resource.computational_name : null
       )
-      .subscribe(() => this.buildGrid(), error => console.log(error));
-  }
-
-  public checkUserAccessKey() {
-    this.userAccessKeyService.checkUserAccessKey()
       .subscribe(
-        response => this.processAccessKeyStatus(response.status),
-        error => this.processAccessKeyStatus(error.status));
-  }
-
-  private processAccessKeyStatus(status: number) {
-    if (status === HTTP_STATUS_CODES.NOT_FOUND) {
-      this.healthStatus === 'error' && this.keyUploadDialog.open({ isFooter: false });
-      this.uploadKey = false;
-    } else if (status === HTTP_STATUS_CODES.ACCEPTED) {
-      this.preloaderDialog.open({ isHeader: false, isFooter: false });
-
-      setTimeout(() => this.buildGrid(), this.CHECK_ACCESS_KEY_TIMEOUT);
-    } else if (status === HTTP_STATUS_CODES.OK) {
-      this.preloaderDialog.close();
-      this.keyUploadDialog.close();
-      this.uploadKey = true;
-    }
-  }
-
-  public generateUserKey($event) {
-    this.userAccessKeyService.generateAccessKey().subscribe(
-      data => {
-        FileUtils.downloadFile(data);
-        this.buildGrid();
-      });
+        () => this.buildGrid(),
+        error =>  this.toastr.error('Environment management failed!', 'Oops!', { toastLife: 5000 }));
   }
 
   private getAllEnvironmentData() {
-    this.manageEnvironmentsService.getAllEnvironmentData().subscribe((result: any) => {
-      this.allEnvironmentData = this.loadEnvironmentList(result);
-
-      console.log(this.allEnvironmentData);
-    });
+    this.manageEnvironmentsService.getAllEnvironmentData()
+        .subscribe((result: any) => this.allEnvironmentData = this.loadEnvironmentList(result));
   }
 
   private loadEnvironmentList(data): Array<EnvironmentModel> {
@@ -117,12 +88,20 @@
   }
 
   private getEnvironmentHealthStatus() {
-    this.healthStatusService.getEnvironmentHealthStatus().subscribe((result: any) => {
-      this.healthStatus = result.status;
-      this.billingEnabled = result.billingEnabled;
-      this.admin = result.admin;
+    this.healthStatusService
+        .getEnvironmentHealthStatus()
+        .subscribe(result => {
+          this.healthStatus = result.status;
+          this.billingEnabled = result.billingEnabled;
+          this.admin = result.admin;
 
-      this.checkUserAccessKey();
-    });
+          if (!this.admin) {
+            this.appRoutingService.redirectToNoAccessPage();
+            return false;
+          }
+
+          this.getAllEnvironmentData();
+          this.userAccessKeyService.initialUserAccessKeyCheck();
+        });
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/management/management.model.ts b/services/self-service/src/main/resources/webapp/src/app/management/management.model.ts
index 76d54b6..c541ba5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/management/management.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/management/management.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class EnvironmentModel {
   constructor(
@@ -24,4 +25,4 @@
     public resources: Array<any>,
     public user: string
   ) { }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.html b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.html
index 11bcb3d..2eb5e74 100644
--- a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.html
@@ -1,22 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<dlab-navbar></dlab-navbar>
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="not-found-page">
   <div class="content">
diff --git a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.scss b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.scss
index 44f5129..40c98e1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .not-found-page {
   position: absolute;
diff --git a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.ts b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.ts
index 4d62d73..34f860f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.component.ts
@@ -1,25 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component } from '@angular/core';
 
 @Component({
-    moduleId: module.id,
     selector: 'not-found',
     templateUrl: 'not-found.component.html',
     styleUrls: ['not-found.component.scss']
diff --git a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.module.ts b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.module.ts
index a961661..c1d063a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/not-found/not-found.module.ts
@@ -1,32 +1,29 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { NotFoundComponent } from './not-found.component';
-import { NavbarModule } from './../shared';
 
 @NgModule({
-    imports: [
-        CommonModule,
-        NavbarModule
-    ],
-    declarations: [NotFoundComponent],
-    exports: [NotFoundComponent]
+  imports: [CommonModule],
+  declarations: [NotFoundComponent],
+  exports: [NotFoundComponent]
 })
-export class NotFoundModule { }
+export class NotFoundModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/operators.ts b/services/self-service/src/main/resources/webapp/src/app/operators.ts
index 5c7d969..ef4e984 100644
--- a/services/self-service/src/main/resources/webapp/src/app/operators.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/operators.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import 'rxjs/add/observable/throw';
 import 'rxjs/add/operator/map';
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
index f74f7c0..b468f1e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <table class="dashboard_table reporting">
   <tr>
@@ -63,7 +64,7 @@
   </tr>
 
   <ng-template [ngIf]="reportData">
-    <tr *ngFor="let line of reportData">
+    <tr *ngFor="let line of reportData" class="dashboard_table_body">
       <td class="user-field" *ngIf="full_report">{{ line.user }}</td>
       <td class="env_name">{{ line[DICTIONARY.billing.dlabId] }}</td>
       <td>{{ line[DICTIONARY.billing.resourceType] }}</td>
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
index fa68c3e..ed7a79f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
@@ -1,48 +1,35 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-@-moz-document url-prefix() {
-  .dashboard_table.reporting {
-    transform: scale(0.85);
-    transform-origin: top left;
-    width: 118% !important;
-  }
-}
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .dashboard_table.reporting {
-  margin-bottom: 50px;
-  zoom: 0.85;
   tr {
     th {
-      font-size: 12px;
+      font-size: 11px;
     }
     td {
-      font-size: 16px; 
+      font-size: 13px; 
     }
     &.filter-row {
       .filter-field {
-        font-size: 14px;
+        font-size: 13px;
       }
-    }
-  }
-  .dropdown-multiselect {
-    button {
-      @extend .filter-field;
+
     }
   }
   .th_shape {
@@ -65,6 +52,18 @@
     width: 8%;
   }
 }
+.dashboard_table_body {
+  td:first-child {
+    cursor: default;
+  }
+ .dropdown-multiselect {
+  button {
+    font-size: 14px;
+    height: 34px;
+    padding: 7px 20px;
+  }
+ }
+}
 
 @media screen and (max-width: 1280px) {
   .dashboard_table.reporting {
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.ts
index 2833e11..f4294a6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.ts
@@ -1,22 +1,23 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Output, EventEmitter } from '@angular/core';
 
 import { DICTIONARY, ReportingConfigModel } from '../../../dictionary/global.dictionary';
 
@@ -70,7 +71,7 @@
 
   resetFiltering(): void {
     this.filteredReportData.defaultConfigurations();
-    
+
     this.filterReport.emit(this.filteredReportData);
     this.resetRangePicker.emit(true);
   }
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
index 6330d81..5f05c0c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
@@ -1,25 +1,27 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 
-import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { Component, OnInit, OnDestroy, ViewChild, ViewContainerRef } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
 
-import { BillingReportService, HealthStatusService, UserAccessKeyService }  from './../core/services';
+import { BillingReportService, HealthStatusService, UserAccessKeyService } from '../core/services';
 import { ReportingGridComponent } from './reporting-grid/reporting-grid.component';
 import { ToolbarComponent } from './toolbar/toolbar.component';
 
@@ -29,15 +31,15 @@
 @Component({
   selector: 'dlab-reporting',
   template: `
-  <dlab-navbar [healthStatus]="healthStatus" [billingEnabled]="billingEnabled" [admin]="admin"></dlab-navbar>
-  <dlab-toolbar (rebuildReport)="rebuildBillingReport($event)" (exportReport)="exportBillingReport()" (setRangeOption)="setRangeOption($event)"></dlab-toolbar>
+  <dlab-toolbar (rebuildReport)="rebuildBillingReport($event)"
+                (exportReport)="exportBillingReport()"
+                (setRangeOption)="setRangeOption($event)">
+  </dlab-toolbar>
   <dlab-reporting-grid (filterReport)="filterReport($event)" (resetRangePicker)="resetRangePicker($event)"></dlab-reporting-grid>
   <footer *ngIf="data">
     Total {{ data[DICTIONARY.billing.costTotal] }} {{ data[DICTIONARY.billing.currencyCode] }}
   </footer>
 
-  <key-upload-dialog #keyUploadModal (generateUserKey)="generateUserKey($event)" [primaryUploading]="true"></key-upload-dialog>
-  <progress-dialog #preloaderModal></progress-dialog>
   `,
   styles: [`
     footer {
@@ -56,14 +58,10 @@
 })
 export class ReportingComponent implements OnInit, OnDestroy {
   readonly DICTIONARY = DICTIONARY;
-  private readonly CHECK_ACCESS_KEY_TIMEOUT: number = 20000;
 
   @ViewChild(ReportingGridComponent) reportingGrid: ReportingGridComponent;
   @ViewChild(ToolbarComponent) reportingToolbar: ToolbarComponent;
 
-  @ViewChild('keyUploadModal') keyUploadDialog;
-  @ViewChild('preloaderModal') preloaderDialog;
-
   reportData: ReportingConfigModel = ReportingConfigModel.getDefault();
   filterConfiguration: ReportingConfigModel = ReportingConfigModel.getDefault();
   data: any;
@@ -74,11 +72,14 @@
   constructor(
     private billingReportService: BillingReportService,
     private healthStatusService: HealthStatusService,
-    private userAccessKeyService: UserAccessKeyService) { }
+    private userAccessKeyService: UserAccessKeyService,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef) {
+      this.toastr.setRootViewContainerRef(vcr);
+    }
 
   ngOnInit() {
     this.rebuildBillingReport();
-    this.getEnvironmentHealthStatus();
   }
 
   ngOnDestroy() {
@@ -95,7 +96,9 @@
 
         this.reportingToolbar.reportData = this.data;
         if (!localStorage.getItem('report_period')) {
-          localStorage.setItem('report_period' , JSON.stringify({start_date: this.data[DICTIONARY.billing.dateFrom], end_date: this.data[DICTIONARY.billing.dateTo]}));
+          localStorage.setItem('report_period' , JSON.stringify({
+            start_date: this.data[DICTIONARY.billing.dateFrom],
+            end_date: this.data[DICTIONARY.billing.dateTo]}));
           this.reportingToolbar.setDateRange();
         }
 
@@ -119,9 +122,9 @@
 
   exportBillingReport($event): void {
     this.billingReportService.downloadReport(this.reportData)
-      .subscribe(data => {
-        FileUtils.downloadFile(data);
-      });
+      .subscribe(
+        data => FileUtils.downloadFile(data),
+        error => this.toastr.error('Billing report export failed!', 'Oops!', { toastLife: 5000 }));
   }
 
   getDefaultFilterConfiguration(data): void {
@@ -147,7 +150,7 @@
               shapes.indexOf(shape) === -1 && shapes.push(shape);
           }
         } else if (item[DICTIONARY.billing.instance_size].match(/\d x \S+/)) {
-          let parsedShape = item[DICTIONARY.billing.instance_size].match(/\d x \S+/)[0].split(' x ')[1];
+          const parsedShape = item[DICTIONARY.billing.instance_size].match(/\d x \S+/)[0].split(' x ')[1];
           if (shapes.indexOf(parsedShape) === -1) {
             shapes.push(parsedShape);
           }
@@ -187,34 +190,6 @@
     this.getGeneralBillingData();
   }
 
-  public checkUserAccessKey() {
-    this.userAccessKeyService.checkUserAccessKey()
-      .subscribe(
-        response => this.processAccessKeyStatus(response.status),
-        error => this.processAccessKeyStatus(error.status));
-  }
-
-  public generateUserKey($event) {
-    this.userAccessKeyService.generateAccessKey().subscribe(
-      data => {
-        FileUtils.downloadFile(data);
-        this.rebuildBillingReport();
-      });
-  }
-
-  private processAccessKeyStatus(status: number) {
-    if (status === HTTP_STATUS_CODES.NOT_FOUND) {
-      this.healthStatus === 'error' && this.keyUploadDialog.open({ isFooter: false });
-    } else if (status === HTTP_STATUS_CODES.ACCEPTED) {
-      this.preloaderDialog.open({ isHeader: false, isFooter: false });
-
-      setTimeout(() => this.rebuildBillingReport(), this.CHECK_ACCESS_KEY_TIMEOUT);
-    } else if (status === HTTP_STATUS_CODES.OK) {
-      this.preloaderDialog.close();
-      this.keyUploadDialog.close();
-    }
-  }
-
   private getEnvironmentHealthStatus() {
     this.healthStatusService.getEnvironmentHealthStatus()
       .subscribe((result: any) => {
@@ -222,7 +197,7 @@
         this.billingEnabled = result.billingEnabled;
         this.admin = result.admin;
 
-        this.checkUserAccessKey();
+        this.userAccessKeyService.initialUserAccessKeyCheck();
       });
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.module.ts b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.module.ts
index 731d284..7faa4a7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.module.ts
@@ -1,30 +1,32 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { NgDateRangePickerModule } from 'ng-daterangepicker';
+import { ToastModule } from 'ng2-toastr';
 
-import { MaterialModule } from './../shared/material.module';
-import { FormControlsModule } from './../shared/form-controls';
+import { MaterialModule } from '../shared/material.module';
+import { FormControlsModule } from '../shared/form-controls';
 import { ReportingComponent } from './reporting.component';
-import { NavbarModule, ModalModule, UploadKeyDialogModule, ProgressDialogModule } from './../shared';
-import { KeysPipeModule, LineBreaksPipeModule } from './../core/pipes';
+import { ModalModule, UploadKeyDialogModule, ProgressDialogModule } from '../shared';
+import { KeysPipeModule, LineBreaksPipeModule } from '../core/pipes';
 import { ReportingGridComponent } from './reporting-grid/reporting-grid.component';
 import { ToolbarComponent } from './toolbar/toolbar.component';
 
@@ -32,13 +34,13 @@
   imports: [
     CommonModule,
     ModalModule,
-    NavbarModule,
     FormControlsModule,
     KeysPipeModule,
     LineBreaksPipeModule,
     NgDateRangePickerModule,
     UploadKeyDialogModule,
     ProgressDialogModule,
+    ToastModule.forRoot(),
     MaterialModule
   ],
   declarations: [
@@ -48,4 +50,4 @@
   ],
   exports: [ReportingComponent]
 })
-export class ReportingModule { }
\ No newline at end of file
+export class ReportingModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.css b/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.css
index 8e09052..d520b8a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.css
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.css
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 section {
     display: flex;
@@ -121,4 +122,4 @@
     top: 22px;
     left: 34px;
     color: #718ba6;
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.html b/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.html
index 8940b74..c7f16d5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 <section>
   <div class="info_color" *ngIf="reportData">
     <div class="general">
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.ts b/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.ts
index 58805bf..28c44db 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/toolbar/toolbar.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, OnInit, AfterViewInit, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
 import { NgDateRangePickerOptions } from 'ng-daterangepicker';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.css b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.css
deleted file mode 100644
index 3c3f27c..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-.billing-detail table {
-  width: 100%;
-}
-
-.billing-detail th,
-.billing-detail td {
-  border: 1px solid #edf1f5;
-  padding: 18px 15px;
-  text-align: left;
-}
-
-.billing-detail .total {
-  padding: 18px 20px 0;
-  text-align: right;
-  font-size: 20px;
-  font-weight: 600;
-}
-
-.list-header {
-  border-top: 1px solid #edf1f5;
-  border-bottom: 1px solid #edf1f5;
-  color: #577289;
-  width: 100%;
-}
-.list-header div {
-  font-weight: 500;
-}
-.scrolling-content {
-  max-height: 275px;
-  overflow-y: auto;
-}
-.billing-detail .service {
-  width: 30%;
-}
-.billing-detail .resource-type,
-.billing-detail .cost-currency {
-  width: 12%;
-}
-.billing-detail .resource-name,
-.billing-detail .usage-date-start,
-.billing-detail .usage-date-end {
-  width: 12%;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  padding-right: 10px;
-}
-.billing-detail .wide-name-field {
-  width: 25%;
-}
-.billing-detail .resource-name {
-  cursor: pointer;
-  width: 20%;
-}
-.mat-list-item-content {
-    font-size: 15px !important;
-}
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.html
index c40ffed..8a370d8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.html
@@ -1,25 +1,24 @@
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<modal-dialog #bindDialog modalClass="billing-detail-dialog modal-xl">
-  <modal-header>
-    <h4 class="modal-title">Billing details</h4>
-  </modal-header>
+<modal-dialog #bindDialog modalClass="billing-detail-dialog header-white modal-xl">
+  <modal-header></modal-header>
   <modal-content>
     <div *ngIf="notebook">
       <table class="detail-header">
@@ -55,7 +54,8 @@
               </mat-list-item>
             </div>
         </mat-list>
-        <div class="total"><strong>Total: </strong>{{ notebook.cost }} {{ notebook.currency_code }}</div>
+        <div class="total">
+          <strong>Total: </strong>{{ notebook.cost }} {{ notebook.currency_code }}</div>
       </div>
     </div>
   </modal-content>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.scss
new file mode 100644
index 0000000..8bce082
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.scss
@@ -0,0 +1,70 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.billing-detail-dialog {
+  table {
+    width: 100%;
+    th, td {
+      border: 1px solid #edf1f5;
+      padding: 18px 15px;
+      text-align: left;
+    }
+  }
+}
+
+.billing-detail {
+  .service {
+    width: 30%;
+  }
+  .resource-type,
+  .cost-currency {
+    width: 10%;
+  }
+  .resource-name,
+  .usage-date-start,
+  .usage-date-end {
+    width: 15%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    padding-right: 10px;
+  }
+  .wide-name-field {
+    width: 25%;
+  }
+  .resource-name {
+    cursor: pointer;
+    width: 20%;
+  }
+  .total {
+    padding: 18px 20px 0;
+    text-align: right;
+    font-size: 20px;
+    font-weight: 600;
+  }
+}
+
+
+.scrolling-content {
+  max-height: 285px;
+  overflow-y: auto;
+}
+.mat-list-item-content {
+  font-size: 15px !important;
+  justify-content: space-between;
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.ts
index 52a42ae..30733ba 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/cost-details-dialog.component.ts
@@ -1,42 +1,37 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
-
+import { Component, ViewChild } from '@angular/core';
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
 
 @Component({
-    moduleId: module.id,
     selector: 'cost-details-dialog',
     templateUrl: 'cost-details-dialog.component.html',
-    styleUrls: ['cost-details-dialog.component.css'],
-    encapsulation: ViewEncapsulation.None
+    styleUrls: ['cost-details-dialog.component.scss']
 })
 export class CostDetailsDialogComponent {
   readonly DICTIONARY = DICTIONARY;
-
-  notebook: any;
-  tooltip: boolean = false;
+  public notebook: any;
 
   @ViewChild('bindDialog') bindDialog;
 
   public open(params, notebook): void {
-    this.tooltip = false;
     this.notebook = notebook;
     this.bindDialog.open(params);
   }
@@ -45,9 +40,4 @@
     if (this.bindDialog.isOpened)
       this.bindDialog.close();
   }
-
-  public isEllipsisActive($event): void {
-    if ($event.target.offsetWidth < $event.target.scrollWidth)
-      this.tooltip = true;
-  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/index.ts
index 8d53f7d..859295e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/billing/cost-details-dialog/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.html
new file mode 100644
index 0000000..cc8ffc9
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.html
@@ -0,0 +1,111 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<modal-dialog #bindDialog  modalClass="detail-dialog modal-sm header-white">
+  <modal-header></modal-header>
+  <modal-content>
+    <div *ngIf="resource">
+      <table class="detail-header">
+        <tr>
+          <td class="tooltip-wrap" (mouseover)="isEllipsisActive($event)">
+            <div class="hint-title ellipsis">{{resource.computational_name}}</div>
+            <div class="tooltip" [style.visibility]="tooltip ? 'visible': 'hidden'">{{resource.computational_name}}</div>
+          </td>
+            <td>
+              <span class="status" [ngClass]="resource.status || ''">
+                {{resource.status}}
+              </span>
+            </td>
+          <td>{{ resource[DICTIONARY[resource.image].master_node_shape] }}</td>
+        </tr>
+      </table>
+      <div class="detail-info content-box" *ngIf="!resource.error_message">
+        <div class="row-wrap">
+          <div class="col"><p>Cluster type:</p></div>
+          <div class="col"><span>{{ resource.template_name }}</span></div>
+        </div>
+        <div class="row-wrap">
+         <div class="col"><p>Cluster alias:</p></div>
+         <div class="col tooltip-wrap" (mouseover)="isEllipsisActive($event)">
+           <span>{{resource.computational_name}}</span>
+           <div class="tooltip" [style.visibility]="tooltip ? 'visible': 'hidden'">{{resource.computational_name}}</div>
+         </div>
+        </div>
+        <div class="row-wrap">
+          <div class="col" *ngIf="DICTIONARY.cloud_provider === 'gcp' && resource.image === 'docker.dlab-dataengine-service'; else inst"><p>{{ DICTIONARY[resource.image].master_instance_number }}:</p></div>
+          <ng-template #inst><div class="col"><p>{{ DICTIONARY[resource.image].instance_number }}:</p></div></ng-template>
+          <div class="col"><span>{{ resource[DICTIONARY[resource.image].total_instance_number] }}</span></div>
+        </div>
+        <div class="row-wrap" *ngIf="DICTIONARY.cloud_provider === 'gcp' && resource.image === 'docker.dlab-dataengine-service'">
+          <div class="col"><p>{{ DICTIONARY[resource.image].slave_instance_number }}:</p></div>
+          <div class="col"><span>{{ resource[DICTIONARY[resource.image].total_slave_instance_number] }}</span></div>
+        </div>
+        <div class="row-wrap">
+         <div class="col"><p>{{ DICTIONARY[resource.image].data_engine_master_instance_size }}:</p></div>
+         <div class="col"><span>{{ resource[DICTIONARY[resource.image].master_node_shape] }}</span></div>
+        </div>
+        <div class="row-wrap" *ngIf="resource.image === 'docker.dlab-dataengine-service'">
+         <div class="col"><p>{{ DICTIONARY[resource.image].data_engine_slave_instance_size }}:</p></div>
+         <div class="col"><span>{{ resource[DICTIONARY[resource.image].slave_node_shape] }}</span></div>
+        </div>
+        <div class="row-wrap">
+          <div *ngIf="resource.status === 'running'">
+            <p class="time_info">Up time {{upTimeInHours}} hour(s) since {{upTimeSince || "not specified."}}</p>
+          </div>
+        </div>
+        <div class="m-top-10">
+          <p *ngFor="let item of resource.computational_url">
+            <strong>{{ item.description }}:</strong>
+            <a href="{{item.url}}" target="_blank">{{ item.url }}</a>
+          </p>
+        </div>
+
+        <div class="checkbox-group" *ngIf="resource.image === 'docker.dlab-dataengine' && resource.status === 'running' && environment.image !== 'docker.dlab-zeppelin'">
+          <label>
+            <input #configurationNode type="checkbox" (change)="selectConfiguration()"/> Cluster configurations
+          </label>
+          <div class="checkbox-group">
+            <form [formGroup]="configurationForm" novalidate>
+              <div class="config-details" [ngClass]="{ show: configuration?.nativeElement['checked'] }">
+                <textarea formControlName="configuration_parameters" placeholder="Cluster configuration template, JSON" data-gramm_editor="false"></textarea>
+                <span class="danger_color" *ngIf="!configurationForm.controls.configuration_parameters.valid && configurationForm.controls['configuration_parameters'].dirty">Configuration parameters is not in a valid format</span>
+              </div>
+            </form>
+          </div>
+        </div>
+        <div *ngIf="environment.image === 'docker.dlab-zeppelin' && resource.status === 'running'">
+          <small>Spark default configuration for Apache Zeppelin can not be changed from DLab UI.  Currently it can be done directly through Apache Zeppelin interpreter menu.
+            For more details please refer for Apache Zeppelin <a href="https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/overview.html" target="_blank">official documentation</a>.
+          </small>
+        </div>
+        <div class="text-center m-top-30" *ngIf="configuration?.nativeElement['checked']">
+          <button mat-raised-button type="button" (click)="bindDialog.close()" class="butt action">Cancel</button>
+          <button mat-raised-button type="submit" [disabled]="!configurationForm.valid"
+                  class="butt butt-success action" [ngClass]="{'not-allowed': !configurationForm.valid}"
+                  (click)="editClusterConfiguration(configurationForm.value)">Update</button>
+        </div>
+      </div>
+
+
+      <div class="row-wrap detail-info content-box" *ngIf="resource.error_message">
+        <p class="failed">{{resource.error_message}}</p>
+      </div>
+    </div>
+  </modal-content>
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.scss
new file mode 100644
index 0000000..63eb269
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.scss
@@ -0,0 +1,60 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.checkbox-group {
+  position: relative;
+  label {
+    input[type="checkbox"] {
+      margin: 10px 0;
+    }
+  }
+  span {
+    &.danger_color {
+      position: absolute;
+      bottom: -20px;
+      left: 0;
+    }
+  }
+}
+.config-details {
+  height: 0;
+  opacity: 0;
+  visibility: hidden;
+  text-align: left;
+  position: relative;
+  &.show {
+    height: 200px;
+    visibility: visible;
+    opacity: 1;
+    textarea {
+      height: 100%;
+      resize: none;
+      font-size: 14px;
+      line-height: 1.5;
+      font-family: Consolas, monospace;
+    }
+    span {
+      .danger_color {
+        position: absolute;
+        bottom: -16px;
+        right: 0;
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
new file mode 100644
index 0000000..4f4d973
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Component, ViewChild, OnInit, ViewContainerRef, Output, EventEmitter } from '@angular/core';
+import { DateUtils } from '../../../core/util';
+import { FormGroup, FormBuilder } from '@angular/forms';
+import { ToastsManager } from 'ng2-toastr';
+
+import { CheckUtils } from '../../../core/util';
+import { DataengineConfigurationService } from '../../../core/services';
+import { DICTIONARY } from '../../../../dictionary/global.dictionary';
+import { CLUSTER_CONFIGURATION } from '../computational-resource-create-dialog/cluster-configuration-templates';
+
+@Component({
+  selector: 'dlab-cluster-details',
+  templateUrl: 'cluster-details.component.html',
+  styleUrls: ['./cluster-details.component.scss']
+})
+
+export class DetailComputationalResourcesComponent implements OnInit {
+  readonly DICTIONARY = DICTIONARY;
+
+  resource: any;
+  environment: any;
+  @ViewChild('bindDialog') bindDialog;
+  @ViewChild('configurationNode') configuration;
+
+  upTimeInHours: number;
+  upTimeSince: string = '';
+  tooltip: boolean = false;
+  config: Array<{}> = [];
+  public configurationForm: FormGroup;
+
+  @Output() buildGrid: EventEmitter<{}> = new EventEmitter();
+
+  constructor(
+    private dataengineConfigurationService: DataengineConfigurationService,
+    private _fb: FormBuilder,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
+
+  ngOnInit() {
+    this.bindDialog.onClosing = () => this.resetDialog();
+  }
+
+  public open(param, environment, resource): void {
+    this.tooltip = false;
+    this.resource = resource;
+    this.environment = environment;
+
+    this.upTimeInHours = (this.resource.up_time) ? DateUtils.diffBetweenDatesInHours(this.resource.up_time) : 0;
+    this.upTimeSince = (this.resource.up_time) ? new Date(this.resource.up_time).toString() : '';
+    this.initFormModel();
+
+    if (this.resource.image === 'docker.dlab-dataengine') this.getClusterConfiguration();
+    this.bindDialog.open(param);
+  }
+
+  public isEllipsisActive($event): void {
+    if ($event.target.offsetWidth < $event.target.scrollWidth)
+      this.tooltip = true;
+  }
+
+  public selectConfiguration() {
+    if (this.configuration.nativeElement.checked) {
+
+      this.configurationForm.controls['configuration_parameters']
+        .setValue(JSON.stringify(this.config.length ? this.config : CLUSTER_CONFIGURATION.SPARK, undefined, 2));
+    } else {
+      this.configurationForm.controls['configuration_parameters'].setValue('');
+    }
+  }
+
+  public getClusterConfiguration(): void {
+    this.dataengineConfigurationService
+      .getClusterConfiguration(this.environment.name, this.resource.computational_name)
+      .subscribe((result: any) => this.config = result,
+      error => this.toastr.error(error.message || 'Configuration loading failed!', 'Oops!', { toastLife: 5000 }));
+  }
+
+  public editClusterConfiguration(data): void {
+    this.dataengineConfigurationService
+      .editClusterConfiguration(data.configuration_parameters, this.environment.name, this.resource.computational_name)
+      .subscribe(result => {
+        this.bindDialog.close();
+        this.buildGrid.emit();
+      },
+      error => this.toastr.error(error.message || 'Edit onfiguration failed!', 'Oops!', { toastLife: 5000 }));
+  }
+
+  public resetDialog() {
+    this.initFormModel();
+
+    if (this.configuration) this.configuration.nativeElement['checked'] = false;
+  }
+
+  private initFormModel(): void {
+    this.configurationForm = this._fb.group({
+      configuration_parameters: ['', [this.validConfiguration.bind(this)]]
+    });
+  }
+
+  private validConfiguration(control) {
+    if (this.configuration)
+      return this.configuration.nativeElement['checked']
+        ? (control.value && control.value !== null && CheckUtils.isJSON(control.value) ? null : { valid: false })
+        : null;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/index.ts
new file mode 100644
index 0000000..b81e2e7
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/index.ts
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+
+import { ModalModule } from '../../../shared';
+import { MaterialModule } from '../../../shared/material.module';
+import { DetailComputationalResourcesComponent } from './cluster-details.component';
+
+export * from './cluster-details.component';
+
+@NgModule({
+  imports: [CommonModule, ModalModule, FormsModule, ReactiveFormsModule, MaterialModule],
+  declarations: [DetailComputationalResourcesComponent],
+  exports: [DetailComputationalResourcesComponent],
+})
+
+export class DetailComputationalResourcesModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/cluster-configuration-templates.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/cluster-configuration-templates.ts
new file mode 100644
index 0000000..bd48c84
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/cluster-configuration-templates.ts
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export const CLUSTER_CONFIGURATION = {
+  EMR: [{
+    Classification: 'classification-name',
+    Properties: {
+      property_name: 'property_value'
+    }
+  }, {
+    Classification: 'classification-name',
+    Properties: {
+      property_name: 'property_value',
+      property_name_x: 'property_value'
+    }
+  }],
+  SPARK: [{
+    Classification: 'spark-defaults',
+    Properties: {
+      property_name: 'property_value'
+    }
+  }]
+};
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.css b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.css
deleted file mode 100644
index 6c3831a..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.css
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-.checkbox-group {
-  text-align: right;
-}
-
-.checkbox-group .spot-details,
-.checkbox-group .preemptible-details {
-  height: 0;
-  opacity: 0;
-  visibility: hidden;
-  text-align: left;
-  transition: all .35s linear .2s;
-}
-
-.checkbox-group > label {
-  display: inline-block;
-  line-height: 30px;
-  padding: 5px 15px 0;
-  cursor: pointer;
-}
-
-.checkbox-group .spot-details span.info {
-  color: #35afd5;
-  font-size: 13px;
-  text-align: justify;
-  display: inline-block;
-  padding: 25px 15px 0;
-}
-
-.checkbox-group .spot-details.show,
-.checkbox-group .preemptible-details.show {
-  height: 140px;
-  visibility: visible;
-  opacity: 1;
-}
-.checkbox-group .preemptible-details.show {
-  height: 60px;
-}
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
index 7d01155..d51eea3 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
@@ -1,84 +1,97 @@
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<modal-dialog #bindDialog modalClass="modal-lg">
+<modal-dialog #bindDialog modalClass="create-cluster modal-xxl">
   <modal-header>
     <h4 class="modal-title">Add computational resources</h4>
   </modal-header>
   <modal-content>
-    <div class="content-box" *ngIf="model.selectedImage">
-      <form [formGroup]="resourceForm" novalidate (submit)="createComputationalResource($event, resourceForm.value, shapes.master_shape, shapes.slave_shape)">
+    <div class="content-box">
+      <form [formGroup]="resourceForm"
+            (submit)="createComputationalResource($event, resourceForm.value, shapes.master_shape, shapes.slave_shape)"
+            *ngIf="model.availableTemplates && resourceForm">
 
-        <div class="control-group" *ngIf="PROVIDER !== 'azure'" [hidden]="model.resourceImages.length === 1">
-          <label class="label">Select cluster type</label>
-          <div class="control">
-            <dropdown-list #clusterType (selectedItem)="onUpdate($event)"></dropdown-list>
+        <div class="form-wrapper" [ngClass]="{ compress: model.selectedImage?.image === 'docker.dlab-dataengine' }">
+          <div class="col">
+
+              <div class="control-group" *ngIf="PROVIDER !== 'azure'" [hidden]="model.resourceImages.length === 1">
+                <label class="label">Select cluster type</label>
+                <div class="control">
+                  <dropdown-list #clusterType (selectedItem)="onUpdate($event)"></dropdown-list>
+                </div>
+                <!-- <div class="mt-5" *ngIf="model.resourceImages">
+                  <small *ngIf="model.selectedImage">{{ model.selectedImage.description }}</small>
+                </div> -->
+              </div>
+
+              <div class="control-group" *ngIf="PROVIDER !== 'azure'" [hidden]="!model.templates.length">
+                <label class="label">Select template</label>
+                <div class="control">
+                  <dropdown-list #templatesList (selectedItem)="onUpdate($event)"></dropdown-list>
+                </div>
+              </div>
+
+              <div class="control-group alias-name" *ngIf="model.selectedImage?.image">
+                <label class="label">Cluster alias</label>
+                <div class="control">
+                    <input [class.danger_field]="computationalResourceExist || !resourceForm?.controls['cluster_alias_name'].valid
+                          && resourceForm?.controls['cluster_alias_name'].dirty && resourceForm?.controls['cluster_alias_name'].hasError('duplication')"
+                          type="text" class="form-control" placeholder="Enter cluster alias" formControlName="cluster_alias_name" />
+                    <span class="danger_color" *ngIf="resourceForm?.controls['cluster_alias_name'].hasError('duplication')">This cluster name already exists.</span>
+                    <span class="danger_color" *ngIf="!resourceForm?.controls.cluster_alias_name.valid
+                                              && resourceForm?.controls['cluster_alias_name'].dirty
+                                              && !resourceForm?.controls['cluster_alias_name'].hasError('duplication')">
+                      Cluster name <span *ngIf="DICTIONARY.cloud_provider !== 'aws'">cannot be longer than 10 characters and</span> can only contain letters, numbers, hyphens and '_' but can not end with special characters
+                    </span>
+                </div>
+              </div>
+
+
           </div>
-          <div class="mt-5" *ngIf="model.resourceImages">
-            <small *ngIf="model.selectedImage">{{ model.selectedImage.description }}</small>
+          <div class="col">
+            <div class="control-group" *ngIf="model.selectedImage?.image">
+              <label class="label">{{ DICTIONARY[model.selectedImage.image].instance_number }}</label>
+              <div class="control">
+                <input type="number" class="form-control" min="{{minInstanceNumber}}" max="{{maxInstanceNumber}}"
+                      formControlName="instance_number" (keypress)="isNumberKey($event)" />
+                <span class="danger_color" *ngIf="!resourceForm?.controls.instance_number.valid">
+                  <span>Only integer values greater than or equal to {{ minInstanceNumber }} and less than {{ maxInstanceNumber }} are allowed</span>
+                </span>
+              </div>
+            </div>
+            <div class="control-group" *ngIf="model.selectedImage?.image">
+              <label class="label" *ngIf="model.selectedImage">{{ DICTIONARY[model.selectedImage.image].data_engine_master_instance_size}}</label>
+              <div class="control">
+                <dropdown-list #masterShapesList (selectedItem)="onUpdate($event)"></dropdown-list>
+              </div>
+            </div>
+
+            <div class="control-group" *ngIf="model.selectedImage?.image" [hidden]="model.selectedImage?.image === 'docker.dlab-dataengine'">
+              <label class="label">{{ DICTIONARY[model.selectedImage.image].data_engine_slave_instance_size }}</label>
+              <div class="control">
+                <dropdown-list #shapesSlaveList (selectedItem)="onUpdate($event)"></dropdown-list>
+              </div>
+            </div>
           </div>
         </div>
 
-        <div class="control-group" *ngIf="PROVIDER !== 'azure'" [hidden]="!model.templates.length">
-          <label class="label">Select template</label>
-          <div class="control">
-            <dropdown-list #templatesList (selectedItem)="onUpdate($event)"></dropdown-list>
-          </div>
-        </div>
-        <div class="control-group">
-          <label class="label">Cluster alias</label>
-          <div class="control">
-              <input [class.danger_field]="computationalResourceExist || !resourceForm.controls['cluster_alias_name'].valid
-                     && resourceForm.controls['cluster_alias_name'].dirty && resourceForm.controls['cluster_alias_name'].hasError('duplication')"
-                     type="text" class="form-control" placeholder="Enter cluster alias" formControlName="cluster_alias_name" />
-              <span class="danger_color" *ngIf="resourceForm.controls['cluster_alias_name'].hasError('duplication')">This cluster name already exists.</span>
-              <span class="danger_color" *ngIf="!resourceForm.controls.cluster_alias_name.valid
-                                         && resourceForm.controls['cluster_alias_name'].dirty
-                                         && !resourceForm.controls['cluster_alias_name'].hasError('duplication')">
-                Cluster name <span *ngIf="DICTIONARY.cloud_provider !== 'aws'">cannot be longer than 10 characters and</span> can only contain letters, numbers, hyphens and '_'
-              </span>
-          </div>
-        </div>
-        <div class="control-group">
-          <label class="label">{{ DICTIONARY[model.selectedImage.image].instance_number }}</label>
-          <div class="control">
-            <input type="number" class="form-control" min="{{minInstanceNumber}}" max="{{maxInstanceNumber}}"
-                   formControlName="instance_number" (keypress)="isNumberKey($event)" />
-            <span class="danger_color" *ngIf="!resourceForm.controls.instance_number.valid">
-              <span>Only integer values greater than or equal to {{ minInstanceNumber }} and less than {{ maxInstanceNumber }} are allowed</span>
-            </span>
-          </div>
-        </div>
-        <div class="control-group">
-          <label class="label" *ngIf="model.selectedImage">{{ DICTIONARY[model.selectedImage.image].data_engine_master_instance_size}}</label>
-          <div class="control">
-            <dropdown-list #masterShapesList (selectedItem)="onUpdate($event)"></dropdown-list>
-          </div>
-        </div>
-
-        <div class="control-group" [hidden]="model.selectedImage.image === 'docker.dlab-dataengine'">
-          <label class="label" *ngIf="model.selectedImage">{{ DICTIONARY[model.selectedImage.image].data_engine_slave_instance_size }}</label>
-          <div class="control">
-            <dropdown-list #shapesSlaveList (selectedItem)="onUpdate($event)"></dropdown-list>
-          </div>
-        </div>
-
-        <div class="checkbox-group" *ngIf="PROVIDER === 'gcp' && model.selectedImage.image === 'docker.dlab-dataengine-service'">
+        <div class="checkbox-group m-top-30 m-bott-10" *ngIf="PROVIDER === 'gcp' && model.selectedImage?.image === 'docker.dlab-dataengine-service'">
           <label>
             <input #preemptibleNode type="checkbox" (change)="selectPreemptibleNodes($event)" /> Preemptible nodes
           </label>
@@ -86,8 +99,12 @@
             <div *ngIf="preemptible?.nativeElement['checked']" class="control-group">
               <label class="label">Preemptible node count</label>
               <div class="control">
-                <input type="number" class="form-control" min="{{minPreemptibleInstanceNumber}}" max="{{maxPreemptibleInstanceNumber}}" formControlName="preemptible_instance_number" (keypress)="isNumberKey($event)" />
-                <span class="danger_color" *ngIf="!resourceForm.controls.preemptible_instance_number.valid">
+                <input type="text" class="form-control"
+                  formControlName="preemptible_instance_number"
+                  (keypress)="isNumberKey($event)"
+                  (keydown.arrowup)="preemptibleCounter($event, 'increment')"
+                  (keydown.arrowdown)="preemptibleCounter($event, 'decrement')" />
+                <span class="danger_color" *ngIf="!resourceForm?.controls.preemptible_instance_number.valid">
                   <span *ngIf="minPreemptibleInstanceNumber !== maxPreemptibleInstanceNumber; else equal">
                     Only integer values greater than or equal to {{ minPreemptibleInstanceNumber }} and less than {{ maxPreemptibleInstanceNumber }} are allowed
                   </span>
@@ -98,33 +115,53 @@
           </div>
         </div>
 
-        <div class="checkbox-group" *ngIf="PROVIDER === 'aws'" [hidden]="!model.templates.length || !isAvailableSpots()">
-          <label>
-            <input #spotInstancesCheck type="checkbox" (change)="selectSpotInstances($event)" /> Spot instance
+        <div class="checkbox-group control-group m-top-15" *ngIf="PROVIDER === 'aws'"
+            [hidden]="!model.templates.length || !isAvailableSpots()">
+          <label class="spot-label label">
+            <input #spotInstancesCheck type="checkbox" (change)="selectSpotInstances($event)" />
+            <span>Spot instance</span>
+            <span *ngIf="spotInstancesSelect?.nativeElement['checked']"> bit, %</span>
           </label>
-          <div class="spot-details" [ngClass]="{ show: spotInstancesSelect?.nativeElement['checked'] }">
-            <div *ngIf="spotInstancesSelect?.nativeElement['checked']" class="control-group">
-              <label class="label">Your bid for spot instance, %</label>
-              <div class="control">
-                <input type="number" class="form-control" step="5" min="{{minSpotPrice}}" max="{{maxSpotPrice}}" formControlName="instance_price" (keypress)="isNumberKey($event)">
-                <span class="danger_color" *ngIf="!resourceForm.controls.instance_price.valid">
-                  Only integer values greater than or equal to {{minSpotPrice}} and less than {{maxSpotPrice}} are allowed
-                </span>
-              </div>
-              <span class="info">When the current Spot price rises above your bid price, the Spot instance is reclaimed by AWS so that it can be given to another customer. Make sure to backup your data on periodic basis.</span>
-            </div>
+          <div class="control spot-details" [ngClass]="{ show: spotInstancesSelect?.nativeElement['checked'] }" *ngIf="spotInstancesSelect?.nativeElement['checked']">
+            <input type="number" class="form-control" step="5" min="{{minSpotPrice}}" max="{{maxSpotPrice}}" formControlName="instance_price" (keypress)="isNumberKey($event)">
+            <span class="danger_color" *ngIf="!resourceForm?.controls.instance_price.valid">
+              Only integer values greater than or equal to {{minSpotPrice}} and less than {{maxSpotPrice}} are allowed
+            </span>
           </div>
+          <span class="info" *ngIf="spotInstancesSelect?.nativeElement['checked']">When the current Spot price rises above your bid price, the Spot instance is reclaimed by AWS so that it can be given to another customer. Make sure to backup your data on periodic basis.</span>
         </div>
 
-        <div class="text-right" *ngIf="processError">
-          <small class="danger_color">{{errorMessage}}</small>
+
+        <div class="checkbox-group" [hidden]="PROVIDER === 'gcp' && model.selectedImage?.image === 'docker.dlab-dataengine-service'"
+             *ngIf="notebook_instance?.image !== 'docker.dlab-zeppelin'">
+          <label>
+            <input #configurationNode type="checkbox" (change)="selectConfiguration()"/> Cluster configurations
+          </label>
+          <div class="config-link" *ngIf="configuration?.nativeElement['checked']
+            && model.selectedImage?.image === 'docker.dlab-dataengine-service'
+            && DICTIONARY.cloud_provider === 'aws'">
+            To view example JSON of configurations refer for <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html" target="_blank">AWS official documentation</a>
+          </div>
         </div>
-        <div class="text-center m-top-20">
+        <div class="checkbox-group">
+          <div class="config-details" [ngClass]="{ show: configuration?.nativeElement['checked'] }">
+            <textarea formControlName="configuration_parameters" placeholder="Cluster configuration template, JSON" data-gramm_editor="false"></textarea>
+            <span class="danger_color" *ngIf="!resourceForm?.controls.configuration_parameters.valid && resourceForm?.controls['configuration_parameters'].dirty">Configuration parameters is not in a valid format</span>
+          </div>
+        </div>
+        <div *ngIf="notebook_instance?.image === 'docker.dlab-zeppelin'">
+          <small>Spark default configuration for Apache Zeppelin can not be changed from DLab UI.  Currently it can be done directly through Apache Zeppelin interpreter menu.
+            For more details please refer for Apache Zeppelin <a href="https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/overview.html" target="_blank">official documentation</a>.
+          </small>
+        </div>
+        <div class="text-center m-top-30">
           <button mat-raised-button type="button" (click)="bindDialog.close()" class="butt action">Cancel</button>
-          <button mat-raised-button type="submit" [disabled]="!resourceForm.valid"
-                  class="butt butt-success action" [ngClass]="{'not-allowed': !resourceForm.valid}">Create</button>
+          <button mat-raised-button type="submit" [disabled]="!resourceForm?.valid"
+                  class="butt butt-success action" [ngClass]="{'not-allowed': !resourceForm?.valid}">Create</button>
         </div>
       </form>
+
+      <div *ngIf="!model.availableTemplates" class="info message">Computational resource creations are not available.<br>Please, check your permissions.</div>
     </div>
   </modal-content>
 </modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.scss
new file mode 100644
index 0000000..52135e5
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.scss
@@ -0,0 +1,147 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.form-wrapper {
+  display: flex;
+  .col {
+    width: 50%;
+    .control-group {
+      position: relative;
+      .label {
+        width: 40%;
+        padding-left: 10px;
+      }
+      .control {
+        width: 60%;
+      }
+    }
+    span {
+      &.danger_color {
+        position: absolute;
+        padding-left: 5px;
+        right: 0;
+      }
+    }
+    .alias-name {
+      .danger-color {
+        right: auto;
+      }
+    }
+  }
+  &.compress {
+    flex-direction: column;
+    .col {
+      width: 100%;
+    }
+  }
+}
+.checkbox-group {
+  text-align: left;
+  input[type="checkbox"] {
+    vertical-align: middle;
+    margin-left: 10px;
+    margin-right: 5px;
+  }
+  .spot-details,
+  .preemptible-details,
+  .config-details {
+    height: 0;
+    opacity: 0;
+    visibility: hidden;
+    text-align: left;
+  
+    &.show {
+      height: 60px;
+      visibility: visible;
+      opacity: 1;
+    }
+  }
+  .preemptible-details {
+    .label {
+      padding-left: 10px;
+    }
+    .control {
+      position: relative;
+    }
+  }
+  .spot-details {
+    &.show {
+      height: 50px;
+      text-align: right;
+    }
+  }
+  .config-details {
+    &.show {
+      height: 240px;
+      padding-top: 10px;
+      text-align: right;
+      position: relative;
+      textarea {
+        background: #f8f8f8 !important;
+        height: 100%;
+        resize: none;
+        font-size: 14px;
+        line-height: 1.5;
+        font-family: Consolas, monospace;
+      }
+    }
+  }
+  & > label {
+    font-size: 15px;
+    font-weight: 600;
+    padding-bottom: 10px;
+    cursor: pointer;
+  }
+  span {
+    &.danger_color {
+      position: absolute;
+      bottom: -20px;
+      left: 0;
+    }
+  }
+  &.control-group {
+    padding: 0;
+    span.info {
+      color: #35afd5;
+      font-size: 13px;
+      text-align: justify;
+      display: inline-block;
+      padding-top: 5px;
+      padding-bottom: 10px;
+    }
+    span {
+      &.danger_color {
+        position: absolute;
+        bottom: -15px;
+        right: 0;
+      }
+    }
+    .label {
+      width: 20%;
+    }
+    .control {
+      width: 80%;
+    }
+  }
+  .config-link {
+    font-size: 13px;
+    padding-top: 5px;
+    padding-bottom: 5px;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
index 5ef7d6d..f6b3cf4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
@@ -1,41 +1,43 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, EventEmitter, Output, ViewChild, ChangeDetectorRef } from '@angular/core';
+import { Component, OnInit, EventEmitter, Output, ViewChild, ChangeDetectorRef, ViewContainerRef } from '@angular/core';
 import { FormGroup, FormBuilder, Validators } from '@angular/forms';
-import { Response } from '@angular/http';
+import { ToastsManager } from 'ng2-toastr';
 
-import { ComputationalResourceCreateModel } from './';
+import { ComputationalResourceCreateModel } from '.';
 import { UserResourceService } from '../../../core/services';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from '../../../core/util';
+import { HTTP_STATUS_CODES, CheckUtils } from '../../../core/util';
 
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
+import { CLUSTER_CONFIGURATION } from './cluster-configuration-templates';
 
 @Component({
-  moduleId: module.id,
   selector: 'computational-resource-create-dialog',
   templateUrl: 'computational-resource-create-dialog.component.html',
-  styleUrls: ['./computational-resource-create-dialog.component.css'],
+  styleUrls: ['./computational-resource-create-dialog.component.scss']
 })
 
 export class ComputationalResourceCreateDialogComponent implements OnInit {
   readonly PROVIDER = DICTIONARY.cloud_provider;
   readonly DICTIONARY = DICTIONARY;
+  readonly CLUSTER_CONFIGURATION = CLUSTER_CONFIGURATION;
 
   model: ComputationalResourceCreateModel;
   notebook_instance: any;
@@ -43,11 +45,10 @@
   template_description: string;
   shapes: any;
   spotInstance: boolean = true;
-  clusterNamePattern: string = '[-_a-zA-Z0-9]+';
+  clusterNamePattern: string = '[-_a-zA-Z0-9]*[_-]*[a-zA-Z0-9]+';
   nodeCountPattern: string = '^[1-9]\\d*$';
   delimitersRegex = /[-_]?/g;
-  processError: boolean = false;
-  errorMessage: string = '';
+  integerRegex = '^[0-9]*$';
 
   public minInstanceNumber: number;
   public maxInstanceNumber: number;
@@ -65,15 +66,19 @@
   @ViewChild('shapesSlaveList') slave_shapes_list;
   @ViewChild('spotInstancesCheck') spotInstancesSelect;
   @ViewChild('preemptibleNode') preemptible;
+  @ViewChild('configurationNode') configuration;
 
   @Output() buildGrid: EventEmitter<{}> = new EventEmitter();
 
   constructor(
     private userResourceService: UserResourceService,
     private _fb: FormBuilder,
-    private ref: ChangeDetectorRef
+    private ref: ChangeDetectorRef,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
   ) {
     this.model = ComputationalResourceCreateModel.getDefault(userResourceService);
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
@@ -105,6 +110,7 @@
       this.model.setSelectedClusterType($event.model.index);
       this.setDefaultParams();
       this.getComputationalResourceLimits();
+      this.selectConfiguration();
     }
 
     if (this.shapes[$event.model.type])
@@ -117,8 +123,14 @@
   }
 
   public createComputationalResource($event, data, shape_master: string, shape_slave: string) {
-    this.model.setCreatingParams(data.cluster_alias_name, data.instance_number, shape_master, shape_slave,
-      this.spotInstance, data.instance_price, data.preemptible_instance_number);
+    this.model.setCreatingParams(
+      data.cluster_alias_name,
+      data.instance_number,
+      shape_master, shape_slave,
+      this.spotInstance,
+      data.instance_price,
+      data.preemptible_instance_number,
+      data.configuration_parameters ? JSON.parse(data.configuration_parameters) : null);
     this.model.confirmAction();
     $event.preventDefault();
     return false;
@@ -167,6 +179,17 @@
       this.resourceForm.controls['preemptible_instance_number'].setValue(this.minPreemptibleInstanceNumber);
   }
 
+  public selectConfiguration() {
+    if (this.configuration && this.configuration.nativeElement.checked) {
+      const template = (this.model.selectedImage.image === 'docker.dlab-dataengine-service')
+        ? CLUSTER_CONFIGURATION.EMR
+        : CLUSTER_CONFIGURATION.SPARK;
+      this.resourceForm.controls['configuration_parameters'].setValue(JSON.stringify(template, undefined, 2));
+    } else {
+      this.resourceForm.controls['configuration_parameters'].setValue('');
+    }
+  }
+
   private filterAvailableSpots() {
     const filtered = JSON.parse(JSON.stringify(this.slave_shapes_list.items));
     for (const item in this.slave_shapes_list.items) {
@@ -189,15 +212,15 @@
     if (!this.bindDialog.isOpened) {
       this.notebook_instance = notebook_instance;
       this.full_list = full_list;
-      this.model = new ComputationalResourceCreateModel('', 0, '', '', notebook_instance.name, (response: Response) => {
-        if (response.status === HTTP_STATUS_CODES.OK) {
-          this.close();
-          this.buildGrid.emit();
-        }
-      },
-        (response: Response) => {
-          this.processError = true;
-          this.errorMessage = ErrorMapUtils.setErrorMessage(response);
+      this.model = new ComputationalResourceCreateModel('', 0, '', '', notebook_instance.name,
+        response => {
+          if (response.status === HTTP_STATUS_CODES.OK) {
+            this.close();
+            this.buildGrid.emit();
+          }
+        },
+        error => {
+          this.toastr.error(error.message || 'Computational resource creation failed!', 'Oops!', { toastLife: 5000 });
         },
         () => {
           this.template_description = this.model.selectedItem.description;
@@ -213,6 +236,14 @@
     }
   }
 
+  public preemptibleCounter($event, action): void {
+    $event.preventDefault();
+
+    const value = this.resourceForm.controls['preemptible_instance_number'].value;
+    const newValue = (action === 'increment' ? Number(value) + 1 : Number(value) - 1);
+    this.resourceForm.controls.preemptible_instance_number.setValue(newValue);
+  }
+
   public close(): void {
     if (this.bindDialog.isOpened)
       this.bindDialog.close();
@@ -220,10 +251,12 @@
 
   private initFormModel(): void {
     this.resourceForm = this._fb.group({
-      cluster_alias_name: ['', [Validators.required, Validators.pattern(this.clusterNamePattern), this.providerMaxLength, this.checkDuplication.bind(this)]],
+      cluster_alias_name: ['', [Validators.required, Validators.pattern(this.clusterNamePattern),
+                                this.providerMaxLength, this.checkDuplication.bind(this)]],
       instance_number: ['', [Validators.required, Validators.pattern(this.nodeCountPattern), this.validInstanceNumberRange.bind(this)]],
-      preemptible_instance_number: [0, [this.validPreemptibleRange.bind(this)]],
-      instance_price: [0, [this.validInstanceSpotRange.bind(this)]]
+      preemptible_instance_number: [0, Validators.compose([Validators.pattern(this.integerRegex), this.validPreemptibleRange.bind(this)])],
+      instance_price: [0, [this.validInstanceSpotRange.bind(this)]],
+      configuration_parameters: ['', [this.validConfiguration.bind(this)]]
     });
   }
 
@@ -232,13 +265,13 @@
   }
 
   private getComputationalResourceLimits(): void {
-    let activeImage = DICTIONARY[this.model.selectedImage.image];
+    if (this.model.availableTemplates && this.model.selectedImage && this.model.selectedImage.image) {
+      const activeImage = DICTIONARY[this.model.selectedImage.image];
 
-    if (this.model.selectedImage) {
       this.minInstanceNumber = this.model.selectedImage.limits[activeImage.total_instance_number_min];
       this.maxInstanceNumber = this.model.selectedImage.limits[activeImage.total_instance_number_max];
 
-      if (DICTIONARY.cloud_provider === 'gcp'&& this.model.selectedImage.image === 'docker.dlab-dataengine-service') {
+      if (DICTIONARY.cloud_provider === 'gcp' && this.model.selectedImage.image === 'docker.dlab-dataengine-service') {
         this.maxInstanceNumber = this.model.selectedImage.limits[activeImage.total_instance_number_max] - 1;
         this.minPreemptibleInstanceNumber = this.model.selectedImage.limits.min_dataproc_preemptible_instance_count;
       }
@@ -258,7 +291,7 @@
 
   private validInstanceNumberRange(control) {
     if (control && control.value)
-      if (DICTIONARY.cloud_provider === 'gcp'&& this.model.selectedImage.image === 'docker.dlab-dataengine-service') {
+      if (DICTIONARY.cloud_provider === 'gcp' && this.model.selectedImage.image === 'docker.dlab-dataengine-service') {
         this.validPreemptibleNumberRange();
         return control.value >= this.minInstanceNumber && control.value <= this.maxInstanceNumber ? null : { valid: false };
       } else {
@@ -269,12 +302,14 @@
   private validPreemptibleRange(control) {
     if (this.preemptible)
       return this.preemptible.nativeElement['checked']
-        ? (control.value !== null && control.value >= this.minPreemptibleInstanceNumber && control.value <= this.maxPreemptibleInstanceNumber ? null : { valid: false })
+        ? (control.value !== null
+          && control.value >= this.minPreemptibleInstanceNumber
+          && control.value <= this.maxPreemptibleInstanceNumber ? null : { valid: false })
         : control.value;
   }
 
   private validPreemptibleNumberRange() {
-    let instance_value = this.resourceForm.controls['instance_number'].value;
+    const instance_value = this.resourceForm.controls['instance_number'].value;
     this.maxPreemptibleInstanceNumber = Math.max((this.maxInstanceNumber - instance_value), 0);
 
     const value = this.resourceForm.controls['preemptible_instance_number'].value;
@@ -292,33 +327,42 @@
         : control.value;
   }
 
+  private validConfiguration(control) {
+    if (this.configuration)
+      return this.configuration.nativeElement['checked']
+        ? (control.value && control.value !== null && CheckUtils.isJSON(control.value) ? null : { valid: false })
+        : null;
+  }
+
   private checkDuplication(control) {
     if (this.containsComputationalResource(control.value))
-      return { duplication: true }
+      return { duplication: true };
   }
 
   private providerMaxLength(control) {
     if (DICTIONARY.cloud_provider !== 'aws')
-      return control.value.length <=10 ? null : { valid: false };
+      return control.value.length <= 10 ? null : { valid: false };
   }
 
   private setDefaultParams(): void {
-    this.filterShapes();
-    this.shapes = {
-      master_shape: this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'type'),
-      slave_shape: this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'type')
-    };
-    if (DICTIONARY.cloud_provider !== 'azure') {
-      this.cluster_type.setDefaultOptions(this.model.resourceImages,
-        this.model.selectedImage.template_name, 'cluster_type', 'template_name', 'array');
-        if (this.model.selectedImage.image === 'docker.dlab-dataengine-service')
-          this.templates_list.setDefaultOptions(this.model.templates,
-            this.model.selectedItem.version, 'template', 'version', 'array');
+    if (this.model.selectedImage && this.model.selectedImage.shapes) {
+      this.filterShapes();
+      this.shapes = {
+        master_shape: this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'type'),
+        slave_shape: this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'type')
+      };
+      if (DICTIONARY.cloud_provider !== 'azure' && this.cluster_type) {
+        this.cluster_type.setDefaultOptions(this.model.resourceImages,
+          this.model.selectedImage.template_name, 'cluster_type', 'template_name', 'array');
+          if (this.model.selectedImage.image === 'docker.dlab-dataengine-service')
+            this.templates_list.setDefaultOptions(this.model.templates,
+              this.model.selectedItem.version, 'template', 'version', 'array');
+      }
+      this.master_shapes_list && this.master_shapes_list.setDefaultOptions(this.model.selectedImage.shapes.resourcesShapeTypes,
+        this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'description'), 'master_shape', 'description', 'json');
+        this.slave_shapes_list && this.slave_shapes_list.setDefaultOptions(this.model.selectedImage.shapes.resourcesShapeTypes,
+        this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'description'), 'slave_shape', 'description', 'json');
     }
-    this.master_shapes_list.setDefaultOptions(this.model.selectedImage.shapes.resourcesShapeTypes,
-      this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'description'), 'master_shape', 'description', 'json');
-    this.slave_shapes_list.setDefaultOptions(this.model.selectedImage.shapes.resourcesShapeTypes,
-      this.shapePlaceholder(this.model.selectedImage.shapes.resourcesShapeTypes, 'description'), 'slave_shape', 'description', 'json');
   }
 
   private filterShapes(): void {
@@ -333,23 +377,21 @@
         }, {});
 
       if (DICTIONARY.cloud_provider !== 'azure') {
-        this.model.resourceImages = this.model.resourceImages.filter(image => image.image === 'docker.dlab-dataengine');
-        this.model.setSelectedClusterType(0);
+        const images = this.model.resourceImages.filter(image => image.image === 'docker.dlab-dataengine');
+        this.model.resourceImages = images;
+        (images.length > 0) ? this.model.setSelectedClusterType(0) : this.model.availableTemplates = false;
       }
       this.model.selectedImage.shapes.resourcesShapeTypes = filtered;
     }
   }
 
   private resetDialog(): void {
-    this.processError = false;
-    this.errorMessage = '';
-
     this.spotInstance = false;
     this.initFormModel();
     this.getComputationalResourceLimits();
     this.model.resetModel();
 
-    if (this.PROVIDER === 'aws')
+    if (this.PROVIDER === 'aws' && this.spotInstancesSelect)
       this.spotInstancesSelect.nativeElement['checked'] = false;
 
     if (this.PROVIDER === 'gcp' && this.preemptible)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
index 7c6f486..a1c02d0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
@@ -1,24 +1,24 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 /* tslint:disable:no-empty */
 
 import { Observable } from 'rxjs/Observable';
-import { Response } from '@angular/http';
 
 import { UserResourceService } from '../../../core/services';
 import { ComputationalResourceImage,
@@ -39,6 +39,7 @@
   emr_slave_instance_spot: boolean;
   emr_slave_instance_price: number;
   preemptible_inst: number;
+  config: any;
 
   selectedItem: ComputationalResourceApplicationTemplate = new ComputationalResourceApplicationTemplate({},
     new ResourceShapeTypesModel({}), '', '', '');
@@ -46,6 +47,7 @@
   resourceImages: Array<ComputationalResourceImage> = [];
   templates: Array<ComputationalResourceApplicationTemplate> = [];
 
+  availableTemplates: boolean = false;
   private userResourceService: UserResourceService;
   private continueWith: Function;
 
@@ -84,7 +86,8 @@
     shape_slave: string,
     spot: boolean,
     price: number,
-    preemptible_inst?: number
+    preemptible_inst?: number,
+    config?: any
   ): void {
     this.computational_resource_alias = name;
     this.computational_resource_count = count;
@@ -93,6 +96,7 @@
     this.emr_slave_instance_spot = spot;
     this.emr_slave_instance_price = price;
     this.preemptible_inst = preemptible_inst || 0;
+    this.config = config || null;
   }
 
   public loadTemplates(): void {
@@ -102,6 +106,8 @@
         data => {
           let computationalResourceImage;
 
+          this.availableTemplates = !!data.length;
+
           for (let parentIndex = 0; parentIndex < data.length; parentIndex++) {
             computationalResourceImage = new ComputationalResourceImage(data[parentIndex]);
 
@@ -112,8 +118,8 @@
           if (this.resourceImages.length > 0 && DICTIONARY.cloud_provider !== 'azure') {
             this.setSelectedClusterType(0);
           } else if (DICTIONARY.cloud_provider === 'azure') {
-            this.selectedItem = computationalResourceImage;
-            this.selectedImage = computationalResourceImage;
+            this.selectedItem = computationalResourceImage || {};
+            this.selectedImage = computationalResourceImage || {};
           }
 
           if (this.continueWith)
@@ -148,12 +154,12 @@
   private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
     this.confirmAction = () => this.createComputationalResource()
       .subscribe(
-      (response: Response) => fnProcessResults(response),
-      (response: Response) => fnProcessErrors(response)
+      response => fnProcessResults(response),
+      error => fnProcessErrors(error)
       );
   }
 
-  private createComputationalResource(): Observable<Response> {
+  private createComputationalResource(): Observable<{}> {
     if (DICTIONARY.cloud_provider === 'aws' && this.selectedImage.image === 'docker.dlab-dataengine-service') {
       return this.userResourceService.createComputationalResource_DataengineService({
         name: this.computational_resource_alias,
@@ -165,7 +171,8 @@
         image: this.selectedItem.image,
         template_name: this.selectedItem.template_name,
         emr_slave_instance_spot: this.emr_slave_instance_spot,
-        emr_slave_instance_spot_pct_price: this.emr_slave_instance_price
+        emr_slave_instance_spot_pct_price: this.emr_slave_instance_price,
+        config: this.config
       });
     } else if (DICTIONARY.cloud_provider === 'gcp' && this.selectedImage.image === 'docker.dlab-dataengine-service') {
       return this.userResourceService.createComputationalResource_DataengineService({
@@ -179,6 +186,7 @@
         dataproc_master_count: 1,
         dataproc_slave_count: (this.computational_resource_count - 1),
         dataproc_preemptible_count: this.preemptible_inst,
+        config: this.config
       });
     } else {
       return this.userResourceService.createComputationalResource_Dataengine({
@@ -188,6 +196,7 @@
         notebook_name: this.notebook_name,
         image: this.selectedImage.image,
         template_name: this.selectedImage.template_name,
+        config: this.config
       });
     }
   };
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
index 294c42c..08704bc 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
index db2de4b..bb7ea85 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="source">
 
@@ -56,5 +57,5 @@
     </div>
   </div>
   
-  <detail-computational-resources #detailComputationalResource></detail-computational-resources>
-  <dlab-scheduler #clusterScheduler (buildGrid)="rebuildGrid($event)"></dlab-scheduler>
\ No newline at end of file
+  <dlab-cluster-details #detailComputationalResource (buildGrid)="rebuildGrid()"></dlab-cluster-details>
+  <dlab-scheduler #clusterScheduler (buildGrid)="rebuildGrid($event)"></dlab-scheduler>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss
index 9a488fd..d796115 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .source {
   .no-details {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts
index e17170d..280e8c7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts
@@ -1,27 +1,29 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+import { Component, EventEmitter, Input, Output, ViewChild, Inject, ViewContainerRef } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, EventEmitter, Input, Output, ViewChild, Inject } from '@angular/core';
 import { UserResourceService } from '../../../core/services';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
 
 @Component({
-  moduleId: module.id,
   selector: 'computational-resources-list',
   templateUrl: 'computational-resources-list.component.html',
   styleUrls: ['./computational-resources-list.component.scss']
@@ -40,23 +42,28 @@
 
   constructor(
     private userResourceService: UserResourceService,
-    public dialog: MatDialog
-  ) { }
+    public dialog: MatDialog,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
 
-  toggleResourceAction(resource, action) {
+  toggleResourceAction(resource, action: string) {
     if (action === 'stop' || action === 'terminate') {
-      const dialogRef: MatDialogRef<ConfirmationDialog> = this.dialog.open(ConfirmationDialog, { data: {action, resource}, width: '550px' });
+      const dialogRef: MatDialogRef<ConfirmationDialogComponent> = this.dialog.open(ConfirmationDialogComponent,
+        { data: {action, resource}, width: '550px' });
       dialogRef.afterClosed().subscribe(result => {
         if (result && action === 'stop') {
           this.userResourceService
             .toggleStopStartAction(this.environment['name'], resource.computational_name, action)
-            .subscribe(response => {
+            .subscribe(() => {
               this.rebuildGrid();
             });
         } else if (result && action === 'terminate') {
           this.userResourceService
             .suspendComputationalResource(this.environment['name'], resource.computational_name)
-            .subscribe(response => {
+            .subscribe(() => {
               this.rebuildGrid();
             });
         }
@@ -64,9 +71,9 @@
     } else if (action === 'start') {
       this.userResourceService
         .toggleStopStartAction(this.environment['name'], resource.computational_name, 'start')
-        .subscribe(res => {
-          this.rebuildGrid();
-        });
+        .subscribe(
+          () => this.rebuildGrid(),
+          error => this.toastr.error(error.message || 'Computational resource starting failed!', 'Oops!', { toastLife: 5000 }));
     }
   }
 
@@ -104,9 +111,9 @@
     .content { color: #718ba6; padding: 20px 50px; font-size: 14px; font-weight: 400 }
   `]
 })
-export class ConfirmationDialog {
+export class ConfirmationDialogComponent {
   constructor(
-    public dialogRef: MatDialogRef<ConfirmationDialog>,
+    public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
     @Inject(MAT_DIALOG_DATA) public data: any
   ) { }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/index.ts
index d0262db..be798a8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/index.ts
@@ -1,28 +1,29 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 
 import { MaterialModule } from '../../../shared/material.module';
 import { ModalModule } from '../../../shared';
-import { ComputationalResourcesListComponent, ConfirmationDialog } from './computational-resources-list.component';
-import { DetailComputationalResourcesModule } from './../detail-computational-resources';
+import { ComputationalResourcesListComponent, ConfirmationDialogComponent } from './computational-resources-list.component';
+import { DetailComputationalResourcesModule } from '../cluster-details';
 import { SchedulerModule } from '../../scheduler';
 
 export * from './computational-resources-list.component';
@@ -35,8 +36,8 @@
     SchedulerModule,
     MaterialModule
   ],
-  declarations: [ComputationalResourcesListComponent, ConfirmationDialog],
-  entryComponents: [ConfirmationDialog],
+  declarations: [ComputationalResourcesListComponent, ConfirmationDialogComponent],
+  entryComponents: [ConfirmationDialogComponent],
   exports: [ComputationalResourcesListComponent]
 })
 export class ComputationalResourcesModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/detail-computational-resources.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/detail-computational-resources.component.html
deleted file mode 100644
index 8e22346..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/detail-computational-resources.component.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<modal-dialog #bindDialog  modalClass="detail-dialog modal-sm header-white">
-  <modal-header></modal-header>
-  <modal-content>
-    <div *ngIf="resource">
-      <table class="detail-header">
-        <tr>
-          <td class="tooltip-wrap" (mouseover)="isEllipsisActive($event)">
-            <div class="hint-title ellipsis">{{resource.computational_name}}</div>
-            <div class="tooltip" [style.visibility]="tooltip ? 'visible': 'hidden'">{{resource.computational_name}}</div>
-          </td>
-            <td>
-              <span class="status" [ngClass]="resource.status || ''">
-                {{resource.status}}
-              </span>
-            </td>
-          <td>{{ resource[DICTIONARY[resource.image].master_node_shape] }}</td>
-        </tr>
-      </table>
-      <div class="detail-info content-box" *ngIf="!resource.error_message">
-        <div class="row-wrap">
-          <div class="col"><p>Cluster type:</p></div>
-          <div class="col"><span>{{ resource.template_name }}</span></div>
-        </div>
-        <div class="row-wrap">
-         <div class="col"><p>Cluster alias:</p></div>
-         <div class="col tooltip-wrap" (mouseover)="isEllipsisActive($event)">
-           <span>{{resource.computational_name}}</span>
-           <div class="tooltip" [style.visibility]="tooltip ? 'visible': 'hidden'">{{resource.computational_name}}</div>
-         </div>
-        </div>
-        <div class="row-wrap">
-          <div class="col" *ngIf="DICTIONARY.cloud_provider === 'gcp' && resource.image === 'docker.dlab-dataengine-service'; else inst"><p>{{ DICTIONARY[resource.image].master_instance_number }}:</p></div>
-          <ng-template #inst><div class="col"><p>{{ DICTIONARY[resource.image].instance_number }}:</p></div></ng-template>
-          <div class="col"><span>{{ resource[DICTIONARY[resource.image].total_instance_number] }}</span></div>
-        </div>
-        <div class="row-wrap" *ngIf="DICTIONARY.cloud_provider === 'gcp' && resource.image === 'docker.dlab-dataengine-service'">
-          <div class="col"><p>{{ DICTIONARY[resource.image].slave_instance_number }}:</p></div>
-          <div class="col"><span>{{ resource[DICTIONARY[resource.image].total_slave_instance_number] }}</span></div>
-        </div>
-        <div class="row-wrap">
-         <div class="col"><p>{{ DICTIONARY[resource.image].data_engine_master_instance_size }}:</p></div>
-         <div class="col"><span>{{ resource[DICTIONARY[resource.image].master_node_shape] }}</span></div>
-        </div>
-        <div class="row-wrap" *ngIf="resource.image === 'docker.dlab-dataengine-service'">
-         <div class="col"><p>{{ DICTIONARY[resource.image].data_engine_slave_instance_size }}:</p></div>
-         <div class="col"><span>{{ resource[DICTIONARY[resource.image].slave_node_shape] }}</span></div>
-        </div>
-        <div class="row-wrap">
-          <div *ngIf="resource.status === 'running'">
-            <p class="time_info">Up time {{upTimeInHours}} hour(s) since {{upTimeSince || "not specified."}}</p>
-          </div>
-        </div>
-        <div class="m-top-10">
-          <p *ngFor="let item of resource.computational_url">
-            <strong>{{ item.description }}:</strong>
-            <a href="{{item.url}}" target="_blank">{{ item.url }}</a>
-          </p>
-        </div>
-      </div>
-      <div class="row-wrap detail-info content-box" *ngIf="resource.error_message">
-        <p class="failed">{{resource.error_message}}</p>
-      </div>
-    </div>
-  </modal-content>
-</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/detail-computational-resources.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/detail-computational-resources.component.ts
deleted file mode 100644
index 015b096..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/detail-computational-resources.component.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, ViewChild } from '@angular/core';
-import { DateUtils } from '../../../core/util';
-
-import { DICTIONARY } from '../../../../dictionary/global.dictionary';
-
-@Component({
-  moduleId: module.id,
-  selector: 'detail-computational-resources',
-  templateUrl: 'detail-computational-resources.component.html'
-})
-
-export class DetailComputationalResourcesComponent {
-  readonly DICTIONARY = DICTIONARY;
-
-  resource: any;
-  environment: any;
-  @ViewChild('bindDialog') bindDialog;
-
-  upTimeInHours: number;
-  upTimeSince: string = '';
-  tooltip: boolean = false;
-
-  public open(param, environment, resource): void {
-    this.tooltip = false;
-    this.resource = resource;
-    this.environment = environment;
-
-    this.upTimeInHours = (this.resource.up_time) ? DateUtils.diffBetweenDatesInHours(this.resource.up_time) : 0;
-    this.upTimeSince = (this.resource.up_time) ? new Date(this.resource.up_time).toString() : '';
-
-    this.bindDialog.open(param);
-  }
-
-  public isEllipsisActive($event): void {
-    if ($event.target.offsetWidth < $event.target.scrollWidth)
-      this.tooltip = true;
-  }
-}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/index.ts
deleted file mode 100644
index 9773e0c..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/detail-computational-resources/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { ModalModule } from '../../../shared';
-import { DetailComputationalResourcesComponent } from './detail-computational-resources.component';
-
-export * from './detail-computational-resources.component';
-
-@NgModule({
-  imports: [CommonModule, ModalModule],
-  declarations: [DetailComputationalResourcesComponent],
-  exports: [DetailComputationalResourcesComponent],
-})
-
-export class DetailComputationalResourcesModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.html
index e2722d2..24b979f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="ami-dialog modal-sm">
   <modal-header>
@@ -47,4 +48,4 @@
       </div>
     </div>
   </modal-content>
-</modal-dialog>
\ No newline at end of file
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.scss
index 1364b39..f77e59b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.scss
@@ -1,23 +1,23 @@
-/***************************************************************************
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 form {
-
   textarea {
     height: 70px;
     resize: none;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.ts
index a999794..35c80b1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/ami-create-dialog.component.ts
@@ -1,23 +1,25 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, ViewChild, Output, EventEmitter, ViewContainerRef } from '@angular/core';
 import { FormGroup, FormBuilder, Validators } from '@angular/forms';
+import { ToastsManager } from 'ng2-toastr';
 
 import { UserResourceService } from '../../../core/services';
 import { HTTP_STATUS_CODES } from '../../../core/util';
@@ -28,7 +30,7 @@
   templateUrl: './ami-create-dialog.component.html',
   styleUrls: ['./ami-create-dialog.component.scss']
 })
-export class AmiCreateDialogComponent {
+export class AmiCreateDialogComponent implements OnInit {
   readonly DICTIONARY = DICTIONARY;
   public notebook: any;
   public createAMIForm: FormGroup;
@@ -42,8 +44,12 @@
 
   constructor(
     private _userResource: UserResourceService,
-    private _fb: FormBuilder
-  ) {}
+    private _fb: FormBuilder,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
 
   ngOnInit() {
     this._userResource.getImagesList().subscribe(res => this.imagesList = res);
@@ -53,6 +59,7 @@
     this.notebook = notebook;
 
     this.initFormModel();
+    this._userResource.getImagesList().subscribe(res => this.imagesList = res);
     this.bindDialog.open(param);
   }
 
@@ -62,12 +69,15 @@
   }
 
   public assignChanges(data) {
-    this._userResource.createAMI(data).subscribe(res => {
-      if (res.status === HTTP_STATUS_CODES.ACCEPTED) {
-        this.bindDialog.close();
-        this.buildGrid.emit();
-      }
-    });
+    this._userResource.createAMI(data).subscribe(
+      response => {
+        if (response.status === HTTP_STATUS_CODES.ACCEPTED) {
+          this.bindDialog.close();
+          this.buildGrid.emit();
+        }
+      },
+      error => this.toastr.error(error.message
+        || `${ DICTIONARY.image.toLocaleUpperCase() } creation failed!`, 'Oops!', { toastLife: 5000 }));
   }
 
   private initFormModel(): void {
@@ -80,7 +90,7 @@
 
   private providerMaxLength(control) {
     if (DICTIONARY.cloud_provider !== 'aws')
-      return control.value.length <=10 ? null : { valid: false };
+      return control.value.length <= 10 ? null : { valid: false };
   }
 
   private delimitersFiltering(resource): string {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/index.ts
index dfb0130..1d3bfc7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/ami-create-dialog/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
index ec633ac..6eddc4d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog  modalClass="detail-dialog modal-lg header-white">
   <modal-header></modal-header>
@@ -31,52 +32,80 @@
           <td>{{notebook.shape}}</td>
         </tr>
       </table>
-      <div  class="content-box">
-        <div class="detail-info" *ngIf="!notebook.error_message">
-          <p>Edge Node IP Address {{notebook.ip}}</p>
-          <p *ngIf="notebook.status === 'running'">Up time {{upTimeInHours}} hour(s) since {{upTimeSince || "not specified."}}</p>
-          <p>Open following URL(s) in your browser to access this box:</p>
-          <div class="links_block">
-            <p *ngFor="let item of notebook.url">
-              <strong><b class="highlight">&#9642;</b> {{item.description}}:</strong>
-              <a href="{{item.url}}" target="_blank">{{item.url}}</a>
-            </p>
-          </div>
-          <p *ngIf="notebook.username">Node User: <strong>{{ notebook.username }}</strong></p>
-          <p *ngIf="notebook.password">Password: <strong>{{ notebook.password }}</strong></p>
-
-          <p class="m-top-30">{{ DICTIONARY.personal_storage }}: </p>
-          <div class="links_block">
-            <p *ngIf="DICTIONARY.cloud_provider === 'azure' && notebook.account_name"><b class="highlight">&#9642;</b> {{ DICTIONARY.account }} <strong>{{ notebook.account_name}}</strong></p>
-            <p *ngIf="notebook.bucket_name"><b class="highlight">&#9642;</b> {{ DICTIONARY.container }} <strong>{{ notebook.bucket_name }}</strong></p>
-          </div>
-          <p>{{ DICTIONARY.collaboration_storage }}: </p>
-          <div class="links_block">
-            <p *ngIf="DICTIONARY.cloud_provider === 'azure' && notebook.shared_account_name"><b class="highlight">&#9642;</b> {{ DICTIONARY.account }} <strong>{{ notebook.shared_account_name}}</strong></p>
-            <p *ngIf="notebook.shared_bucket_name"><b class="highlight">&#9642;</b> {{ DICTIONARY.container }} <strong>{{ notebook.shared_bucket_name }}</strong></p>
-          </div>
-          <br/>
-
-          <div *ngIf="DICTIONARY.cloud_provider === 'azure' && notebook.datalake_name">
-            <p>Data Lake Store: </p>
-            <div  class="links_block">
-              <p><b class="highlight">&#9642;</b> Data Lake Store Account: <strong>{{ notebook.datalake_name }}</strong></p>
-              <p><b class="highlight">&#9642;</b> Personal folder: <strong>{{ notebook.datalake_directory }}</strong></p>
-              <p><b class="highlight">&#9642;</b> Collaboration folder: <strong>{{ notebook.datalake_shared_directory }}</strong></p>
-            </div>
-          </div>
-
-          <p>
-            <a href="#/help/accessnotebookguide" target="_blank">
-              <small class="helper_instruction">
-                  <i class="material-icons">help_outline</i>
-                  Read instruction how to create the tunnel</small>
-            </a>
-          </p>
-        </div>
+      <div class="content-box">
         <div class="detail-info" *ngIf="notebook.error_message">
           <p class="failed">{{ notebook.error_message }}</p>
         </div>
+
+        <div class="scroll-box" id="scrolling">
+          <div class="detail-info" *ngIf="!notebook.error_message">
+            <p>Edge Node IP Address {{notebook.ip}}</p>
+            <p *ngIf="notebook.status === 'running'">Up time {{upTimeInHours}} hour(s) since {{upTimeSince || "not specified."}}</p>
+            <p>Open following URL(s) in your browser to access this box:</p>
+            <div class="links_block">
+              <p *ngFor="let item of notebook.url">
+                <strong class="description">{{item.description}}: &#32;</strong>
+                <a class="ellipsis" href="{{item.url}}" target="_blank">&#32;{{item.url}}</a>
+              </p>
+            </div>
+            <p *ngIf="notebook.username">Node User: <strong>{{ notebook.username }}</strong></p>
+            <p *ngIf="notebook.password">Password: <strong>{{ notebook.password }}</strong></p>
+
+            <p class="m-top-30">{{ DICTIONARY.personal_storage }}: </p>
+            <div class="links_block">
+              <p *ngIf="DICTIONARY.cloud_provider === 'azure' && notebook.account_name">{{ DICTIONARY.account }} <strong>{{ notebook.account_name}}</strong></p>
+              <p *ngIf="notebook.bucket_name">{{ DICTIONARY.container }} <strong>{{ notebook.bucket_name }}</strong></p>
+            </div>
+            <p>{{ DICTIONARY.collaboration_storage }}: </p>
+            <div class="links_block">
+              <p *ngIf="DICTIONARY.cloud_provider === 'azure' && notebook.shared_account_name">{{ DICTIONARY.account }} <strong>{{ notebook.shared_account_name}}</strong></p>
+              <p *ngIf="notebook.shared_bucket_name">{{ DICTIONARY.container }} <strong>{{ notebook.shared_bucket_name }}</strong></p>
+            </div>
+            <br/>
+
+            <div *ngIf="DICTIONARY.cloud_provider === 'azure' && notebook.datalake_name">
+              <p>Data Lake Store: </p>
+              <div  class="links_block">
+                <p>Data Lake Store Account: <strong>{{ notebook.datalake_name }}</strong></p>
+                <p>Personal folder: <strong>{{ notebook.datalake_directory }}</strong></p>
+                <p>Collaboration folder: <strong>{{ notebook.datalake_shared_directory }}</strong></p>
+              </div>
+            </div>
+
+            <p>
+              <a href="#/help/accessnotebookguide" target="_blank">
+                <small class="helper_instruction">
+                    <i class="material-icons">help_outline</i>
+                    Read instruction how to create the tunnel</small>
+              </a>
+            </p>
+          </div>
+
+          <div class="checkbox-group" *ngIf="notebook.image !== 'docker.dlab-zeppelin'; else not_support" [hidden]="notebook.status !== 'running'">
+            <label>
+              <input #configurationNode type="checkbox" (change)="selectConfiguration()"/> Cluster configurations
+            </label>
+            <div class="checkbox-group">
+              <form [formGroup]="configurationForm" novalidate>
+                <div class="config-details"  *ngIf="configuration?.nativeElement['checked']">
+                  <textarea formControlName="configuration_parameters" id="config" placeholder="Cluster configuration template, JSON" data-gramm_editor="false"></textarea>
+                  <span class="danger_color" *ngIf="!configurationForm.controls.configuration_parameters.valid && configurationForm.controls['configuration_parameters'].dirty">Configuration parameters is not in a valid format</span>
+                </div>
+              </form>
+            </div>
+          </div>
+          <ng-template #not_support>
+            <small [hidden]="notebook.status !== 'running'">Spark default configuration for Apache Zeppelin can not be changed from DLab UI. Currently it can be done directly through Apache Zeppelin interpreter menu.
+              For more details please refer for Apache Zeppelin <a href="https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/overview.html" target="_blank">official documentation</a>.
+            </small>
+          </ng-template>
+          <div [scrollTo]="configuration?.nativeElement['checked']" class="text-center m-top-20 m-bott-10" *ngIf="configuration?.nativeElement['checked'] && notebook.status === 'running'">
+            <button mat-raised-button type="button" (click)="bindDialog.close()" class="butt action">Cancel</button>
+            <button mat-raised-button type="submit" [disabled]="!configurationForm.valid"
+                    class="butt butt-success action" [ngClass]="{'not-allowed': !configurationForm.valid}"
+                    (click)="editClusterConfiguration(configurationForm.value)">Update</button>
+          </div>
+        </div>
       </div>
     </div>
   </modal-content>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss
new file mode 100644
index 0000000..d28993f
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss
@@ -0,0 +1,70 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.scroll-box {
+  max-height: 65vh;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+.links_block {
+  > p {
+    display: flex;
+    .description {
+      white-space: nowrap;
+      padding-right: 5px;
+    }
+  }
+}
+
+.checkbox-group {
+  position: relative;
+  padding: 5px;
+  label {
+    input[type="checkbox"] {
+      margin: 10px 0;
+    }
+  }
+  span {
+    &.danger_color {
+      position: absolute;
+      bottom: -20px;
+      left: 0;
+    }
+  }
+}
+.config-details {
+  text-align: left;
+  position: relative;
+  height: 280px;
+  textarea {
+    height: 100%;
+    resize: none;
+    font-size: 14px;
+    line-height: 1.5;
+    font-family: Consolas, monospace;
+  }
+  span {
+    .danger_color {
+      position: absolute;
+      bottom: -16px;
+      right: 0;
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
index 0ca5e27..7eda828 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
@@ -1,41 +1,66 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+import { Component, ViewChild, OnInit, ViewContainerRef, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';
+import { FormGroup, FormBuilder } from '@angular/forms';
+import { ToastsManager } from 'ng2-toastr';
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, ViewChild } from '@angular/core';
-
-import { DateUtils } from '../../../core/util';
+import { DateUtils, CheckUtils } from '../../../core/util';
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
+import { DataengineConfigurationService } from '../../../core/services';
+import { CLUSTER_CONFIGURATION } from '../../computational/computational-resource-create-dialog/cluster-configuration-templates';
 
 @Component({
-  moduleId: module.id,
   selector: 'detail-dialog',
-  templateUrl: 'detail-dialog.component.html'
+  templateUrl: 'detail-dialog.component.html',
+  styleUrls: ['./detail-dialog.component.scss']
 })
 
-export class DetailDialogComponent {
+export class DetailDialogComponent implements OnInit {
   readonly DICTIONARY = DICTIONARY;
 
   notebook: any;
   upTimeInHours: number;
   upTimeSince: string = '';
   tooltip: boolean = false;
+  config: Array<{}> = [];
+
+  public configurationForm: FormGroup;
 
   @ViewChild('bindDialog') bindDialog;
+  @ViewChild('configurationNode') configuration;
+
+  @Output() buildGrid: EventEmitter<{}> = new EventEmitter();
+
+  constructor(
+    private dataengineConfigurationService: DataengineConfigurationService,
+    private _fb: FormBuilder,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef,
+    private ref: ChangeDetectorRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
+
+  ngOnInit() {
+    this.bindDialog.onClosing = () => this.resetDialog();
+  }
 
   public open(param, notebook): void {
     this.tooltip = false;
@@ -44,6 +69,8 @@
     this.upTimeInHours = (notebook.time) ? DateUtils.diffBetweenDatesInHours(this.notebook.time) : 0;
     this.upTimeSince = (notebook.time) ? new Date(this.notebook.time).toString() : '';
 
+    this.initFormModel();
+    this.getClusterConfiguration();
     this.bindDialog.open(param);
   }
 
@@ -51,4 +78,52 @@
     if ($event.target.offsetWidth < $event.target.scrollWidth)
       this.tooltip = true;
   }
+
+  public getClusterConfiguration(): void {
+    this.dataengineConfigurationService
+      .getExploratorySparkConfiguration(this.notebook.name)
+      .subscribe(
+        (result: any) => this.config = result,
+        error => this.toastr.error(error.message || 'Configuration loading failed!', 'Oops!', { toastLife: 5000 }));
+  }
+
+  public selectConfiguration() {
+    if (this.configuration.nativeElement.checked) {
+
+      this.configurationForm.controls['configuration_parameters']
+        .setValue(JSON.stringify(this.config.length ? this.config : CLUSTER_CONFIGURATION.SPARK, undefined, 2));
+      document.querySelector('#config').scrollIntoView({ block: 'start', behavior: 'smooth' });
+    } else {
+      this.configurationForm.controls['configuration_parameters'].setValue('');
+    }
+  }
+
+  public editClusterConfiguration(data): void {
+    this.dataengineConfigurationService
+      .editExploratorySparkConfiguration(data.configuration_parameters, this.notebook.name)
+      .subscribe(result => {
+        this.bindDialog.close();
+        this.buildGrid.emit();
+      },
+      error => this.toastr.error(error.message || 'Edit onfiguration failed!', 'Oops!', { toastLife: 5000 }));
+  }
+
+  public resetDialog() {
+    this.initFormModel();
+
+    if (this.configuration) this.configuration.nativeElement['checked'] = false;
+  }
+
+  private initFormModel(): void {
+    this.configurationForm = this._fb.group({
+      configuration_parameters: ['', [this.validConfiguration.bind(this)]]
+    });
+  }
+
+  private validConfiguration(control) {
+    if (this.configuration)
+      return this.configuration.nativeElement['checked']
+        ? (control.value && control.value !== null && CheckUtils.isJSON(control.value) ? null : { valid: false })
+        : null;
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/index.ts
index bfd7d28..12fecee 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/index.ts
@@ -1,33 +1,43 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 
 import { ModalModule } from '../../../shared';
+import { MaterialModule } from '../../../shared/material.module';
 import { DetailDialogComponent } from './detail-dialog.component';
+import { DirectivesModule } from '../../../core/directives';
 
 export * from './detail-dialog.component';
 
 @NgModule({
-  imports: [CommonModule, ModalModule],
+  imports: [
+    CommonModule,
+    ModalModule,
+    FormsModule,
+    ReactiveFormsModule,
+    MaterialModule,
+    DirectivesModule
+  ],
   declarations: [DetailDialogComponent],
-  exports: [DetailDialogComponent],
+  exports: [DetailDialogComponent]
 })
-
-export class DetailDialogModule { }
+export class DetailDialogModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/create-environment.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/create-environment.component.scss
new file mode 100644
index 0000000..2eb2014
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/create-environment.component.scss
@@ -0,0 +1,49 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.checkbox-group {
+  .config-details {
+    height: 0;
+    opacity: 0;
+    visibility: hidden;
+    text-align: left;
+    &.show {
+      height: 200px;
+      visibility: visible;
+      opacity: 1;
+      position: relative;
+      margin-top: 10px;
+    }
+    textarea {
+      height: 100%;
+      background: #f8f8f8 !important;
+      resize: none;
+      font-size: 14px;
+      line-height: 1.5;
+      font-family: Consolas, monospace;
+    }
+    span {
+      &.danger_color {
+        position: absolute;
+        bottom: -20px;
+        left: 0;
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.html
index 3b09d69..9169807 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="modal-lg">
   <modal-header>
@@ -22,9 +23,9 @@
   </modal-header>
   <modal-content>
     <div class="content-box">
-      <form novalidate
-            [formGroup]="createExploratoryEnvironmentForm"
-            (submit)="createExploratoryEnvironment_btnClick($event, createExploratoryEnvironmentForm.value)">
+      <form [formGroup]="createExploratoryEnvironmentForm"
+            (submit)="createExploratoryEnvironment_btnClick($event, createExploratoryEnvironmentForm.value)"
+            *ngIf="createExploratoryEnvironmentForm" novalidate>
         <div class="control-group">
           <label class="label">Select template</label>
           <div class="control">
@@ -48,15 +49,15 @@
         <div class="control-group">
           <label class="label">Name</label>
           <div class="control">
-            <input [class.danger_field]="notebookExist || !createExploratoryEnvironmentForm.controls['environment_name'].valid
-                   && createExploratoryEnvironmentForm.controls['environment_name'].dirty
-                   && createExploratoryEnvironmentForm.controls['environment_name'].hasError('duplication')" type="text"
+            <input [class.danger_field]="notebookExist || !createExploratoryEnvironmentForm?.controls['environment_name'].valid
+                   && createExploratoryEnvironmentForm?.controls['environment_name'].dirty
+                   && createExploratoryEnvironmentForm?.controls['environment_name'].hasError('duplication')" type="text"
                   class="form-control" placeholder="Enter Name" formControlName="environment_name">
-            <span class="danger_color" *ngIf="createExploratoryEnvironmentForm.controls['environment_name'].hasError('duplication')">This name already exists.</span>
-            <span class="danger_color" *ngIf="!createExploratoryEnvironmentForm.controls.environment_name.valid
-                                       && createExploratoryEnvironmentForm.controls['environment_name'].dirty
-                                       && !createExploratoryEnvironmentForm.controls['environment_name'].hasError('duplication')">Name
-              <span *ngIf="DICTIONARY.cloud_provider !== 'aws'">cannot be longer than 10 characters and</span> can only contain letters, numbers, hyphens and '_'
+            <span class="danger_color" *ngIf="createExploratoryEnvironmentForm?.controls['environment_name'].hasError('duplication')">This name already exists.</span>
+            <span class="danger_color" *ngIf="!createExploratoryEnvironmentForm?.controls.environment_name.valid
+                                       && createExploratoryEnvironmentForm?.controls['environment_name'].dirty
+                                       && !createExploratoryEnvironmentForm?.controls['environment_name'].hasError('duplication')">Name
+              <span *ngIf="DICTIONARY.cloud_provider !== 'aws'">cannot be longer than 10 characters and</span> can only contain letters, numbers, hyphens and '_' but can not end with special characters
             </span>
           </div>
         </div>
@@ -66,14 +67,27 @@
             <dropdown-list #shapesList (selectedItem)="onUpdate($event)"></dropdown-list>
           </div>
         </div>
-        <div class="text-right" *ngIf="processError">
-          <small class="danger_color">{{ errorMessage }}</small>
+
+        <div class="checkbox-group" *ngIf="model.selectedItem.image !== 'docker.dlab-zeppelin'; else not_support">
+          <label>
+            <input #configurationNode type="checkbox" (change)="selectConfiguration()" /> Spark configurations
+          </label>
+          <div class="config-details" [ngClass]="{ show: configuration?.nativeElement['checked'] }">
+            <textarea formControlName="configuration_parameters" placeholder="Cluster configuration template, JSON" data-gramm_editor="false"></textarea>
+            <span class="danger_color" *ngIf="!createExploratoryEnvironmentForm?.controls.configuration_parameters.valid && createExploratoryEnvironmentForm?.controls['configuration_parameters'].dirty">Configuration parameters is not in a valid format</span>
+          </div>
         </div>
+        <ng-template #not_support>
+          <small>Spark default configuration for Apache Zeppelin can not be changed from DLab UI.  Currently it can be done directly through Apache Zeppelin interpreter menu.
+            For more details please refer for Apache Zeppelin <a href="https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/overview.html" target="_blank">official documentation</a>.
+          </small>
+        </ng-template>
+        
         <div class="text-center m-top-30">
           <button mat-raised-button type="button" class="butt action" (click)="close()">Cancel</button>
-          <button mat-raised-button type="submit" [disabled]="!createExploratoryEnvironmentForm.valid || !this.environment_shape" class="butt butt-success action">Create</button>
+          <button mat-raised-button type="submit" [disabled]="!createExploratoryEnvironmentForm?.valid || !this.environment_shape" class="butt butt-success action">Create</button>
         </div>
       </form>
     </div>
   </modal-content>
-</modal-dialog>
\ No newline at end of file
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.ts
index 352675c..405f26b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component.ts
@@ -1,34 +1,36 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, EventEmitter, Output, ViewChild, ChangeDetectorRef } from '@angular/core';
+import { Component, OnInit, EventEmitter, Output, ViewChild, ChangeDetectorRef, ViewContainerRef } from '@angular/core';
 import { FormGroup, FormBuilder, Validators } from '@angular/forms';
-import { Response } from '@angular/http';
+import { ToastsManager } from 'ng2-toastr';
 
-import { ExploratoryEnvironmentCreateModel } from './';
+import { ExploratoryEnvironmentCreateModel } from '.';
 import { UserResourceService } from '../../../core/services';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from '../../../core/util';
+import { CheckUtils, HTTP_STATUS_CODES } from '../../../core/util';
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
+import { CLUSTER_CONFIGURATION } from '../../computational/computational-resource-create-dialog/cluster-configuration-templates';
 
 @Component({
-  moduleId: module.id,
   selector: 'exploratory-environment-create-dialog',
-  templateUrl: 'exploratory-environment-create-dialog.component.html'
+  templateUrl: 'exploratory-environment-create-dialog.component.html',
+  styleUrls: ['./create-environment.component.scss']
 })
 
 export class ExploratoryEnvironmentCreateDialogComponent implements OnInit {
@@ -36,14 +38,11 @@
 
   model: ExploratoryEnvironmentCreateModel;
   templateDescription: string;
-  namePattern = '[-_a-zA-Z0-9]+';
+  namePattern = '[-_a-zA-Z0-9]*[_-]*[a-zA-Z0-9]+';
   resourceGrid: any;
   userImages: Array<any>;
   environment_shape: string;
 
-  processError: boolean = false;
-  errorMessage: string = '';
-
   public createExploratoryEnvironmentForm: FormGroup;
 
   @ViewChild('bindDialog') bindDialog;
@@ -51,15 +50,19 @@
   @ViewChild('templatesList') templates_list;
   @ViewChild('shapesList') shapes_list;
   @ViewChild('imagesList') userImagesList;
+  @ViewChild('configurationNode') configuration;
 
   @Output() buildGrid: EventEmitter<{}> = new EventEmitter();
 
   constructor(
     private userResourceService: UserResourceService,
     private _fb: FormBuilder,
-    private changeDetector : ChangeDetectorRef
+    private changeDetector: ChangeDetectorRef,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
   ) {
     this.model = ExploratoryEnvironmentCreateModel.getDefault(userResourceService);
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
@@ -69,18 +72,27 @@
 
   initFormModel(): void {
     this.createExploratoryEnvironmentForm = this._fb.group({
-      environment_name: ['', [Validators.required, Validators.pattern(this.namePattern), this.providerMaxLength, this.checkDuplication.bind(this)]]
+      environment_name: ['', [Validators.required, Validators.pattern(this.namePattern),
+                              this.providerMaxLength, this.checkDuplication.bind(this)]],
+      configuration_parameters: ['', [this.validConfiguration.bind(this)]]
     });
   }
 
   providerMaxLength(control) {
     if (DICTIONARY.cloud_provider !== 'aws')
-      return control.value.length <=10 ? null : { valid: false };
+      return control.value.length <= 10 ? null : { valid: false };
+  }
+
+  private validConfiguration(control) {
+    if (this.configuration)
+      return this.configuration.nativeElement['checked']
+        ? (control.value && control.value !== null && CheckUtils.isJSON(control.value) ? null : { valid: false })
+        : null;
   }
 
   checkDuplication(control) {
     if (this.resourceGrid.containsNotebook(control.value))
-      return { duplication: true }
+      return { duplication: true };
   }
 
   shapePlaceholder(resourceShapes, byField: string): string {
@@ -120,7 +132,10 @@
   }
 
   createExploratoryEnvironment_btnClick($event, data) {
-    this.model.setCreatingParams(data.environment_name, this.environment_shape);
+    this.model.setCreatingParams(
+      data.environment_name,
+      this.environment_shape,
+      data.configuration_parameters ? JSON.parse(data.configuration_parameters) : null);
     this.model.confirmAction();
     $event.preventDefault();
     return false;
@@ -128,25 +143,24 @@
 
   public open(params): void {
     if (!this.bindDialog.isOpened) {
-      this.model = new ExploratoryEnvironmentCreateModel('', '', '', '', '', (response: Response) => {
+      this.model = new ExploratoryEnvironmentCreateModel('', '', '', '', '',
+      response => {
         if (response.status === HTTP_STATUS_CODES.OK) {
           this.close();
           this.buildGrid.emit();
         }
       },
-        (response: Response) => {
-          this.processError = true;
-          this.errorMessage = ErrorMapUtils.setErrorMessage(response);
-        },
-        () => {
-          this.templateDescription = this.model.selectedItem.description;
-        },
-        () => {
-          this.bindDialog.open(params);
-          this.setDefaultParams();
-          this.getImagesList();
-        },
-        this.userResourceService);
+      error => this.toastr.error(error.message || 'Exploratory creation failed!', 'Oops!', { toastLife: 5000 }),
+      () => {
+        this.templateDescription = this.model.selectedItem.description;
+      },
+      () => {
+        this.initFormModel();
+        this.bindDialog.open(params);
+        this.setDefaultParams();
+        this.getImagesList();
+      },
+      this.userResourceService);
     }
   }
 
@@ -154,10 +168,21 @@
     const image = this.model.selectedItem.image;
     this.userResourceService.getUserImages(image)
       .subscribe((res: any) => {
-        this.userImages = res;
+        this.userImages = res.filter(el => el.status === 'CREATED');
+
         this.changeDetector.detectChanges();
         this.setDefaultParams();
-      });
+      },
+      error => this.toastr.error(error.message || 'Images list loading failed!', 'Oops!', { toastLife: 5000 }));
+  }
+
+  public selectConfiguration() {
+    if (this.configuration.nativeElement.checked && this.createExploratoryEnvironmentForm) {
+      this.createExploratoryEnvironmentForm.controls['configuration_parameters']
+        .setValue(JSON.stringify(CLUSTER_CONFIGURATION.SPARK, undefined, 2));
+    } else {
+      this.createExploratoryEnvironmentForm.controls['configuration_parameters'].setValue('');
+    }
   }
 
   public close(): void {
@@ -166,10 +191,9 @@
   }
 
   private resetDialog(): void {
-    this.processError = false;
-    this.errorMessage = '';
-
     this.initFormModel();
     this.model.resetModel();
+
+    if (this.configuration) this.configuration.nativeElement['checked'] = false;
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create.model.ts
index 08d1dc5..3651e4c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/exploratory-environment-create.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 /* tslint:disable:no-empty */
 
 import { Observable } from 'rxjs/Observable';
@@ -38,6 +39,7 @@
   private environment_template_name: string;
   private environment_version: string;
   private environment_shape: string;
+  private config: any;
   private userResourceService: UserResourceService;
   private continueWith: Function;
 
@@ -83,12 +85,13 @@
     }
   }
 
-  public setCreatingParams(name, shape): void {
+  public setCreatingParams(name, shape, config?): void {
     this.environment_image = this.selectedItem.image;
     this.environment_version = this.selectedItem.version;
     this.environment_template_name = this.selectedItem.template_name;
     this.environment_name = name;
     this.environment_shape = shape;
+    this.config = config;
   }
 
   public loadTemplates(): void {
@@ -122,8 +125,8 @@
     this.setSelectedTemplate(0);
   }
 
-  private createExploratoryEnvironment(): Observable<Response> {
-    let params: any = {
+  private createExploratoryEnvironment(): Observable<{}> {
+    const params: any = {
       image: this.environment_image,
       template_name: this.environment_template_name,
       name: this.environment_name,
@@ -133,6 +136,7 @@
     if (this.notebookImage)
       params.notebook_image_name = this.notebookImage;
 
+    if (this.config) params.cluster_config = this.config;
     return this.userResourceService.createExploratoryEnvironment(params);
   }
 
@@ -144,8 +148,10 @@
     environment_shape: string,
     fnProcessResults: any, fnProcessErrors: any): void {
 
-    this.setCreatingParams(environment_name, environment_shape);
+    this.setCreatingParams(environment_name, environment_shape, this.config);
     this.confirmAction = () => this.createExploratoryEnvironment()
-      .subscribe((response: Response) => fnProcessResults(response), (response: Response) => fnProcessErrors(response));
+      .subscribe(
+        response => fnProcessResults(response),
+        error => fnProcessErrors(error));
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/index.ts
index 9078787..e225545 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/exploratory-environment-create-dialog/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
index ec3d100..35141f9 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
@@ -24,8 +25,8 @@
 import { ModalModule, BubbleModule } from '../../../shared';
 import { FormControlsModule } from '../../../shared/form-controls';
 
-import { KeysPipeModule, UnderscorelessPipeModule, LibSortPipeModule, HighLightPipeModule } from '../../../core/pipes';
-import { InstallLibrariesComponent, ErrorMessageDialog } from './install-libraries.component';
+import { KeysPipeModule, LibSortPipeModule, HighLightPipeModule } from '../../../core/pipes';
+import { InstallLibrariesComponent, ErrorMessageDialogComponent } from './install-libraries.component';
 
 export * from './install-libraries.component';
 export * from './install-libraries.model';
@@ -43,8 +44,8 @@
     MaterialModule,
     BubbleModule
   ],
-  declarations: [InstallLibrariesComponent, ErrorMessageDialog],
-  entryComponents: [ErrorMessageDialog],
+  declarations: [InstallLibrariesComponent, ErrorMessageDialogComponent],
+  entryComponents: [ErrorMessageDialogComponent],
   exports: [InstallLibrariesComponent]
 })
 export class InstallLibrariesModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 557609f..5d05eec 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="install-libraries modal-xl">
   <modal-header>
@@ -22,6 +23,7 @@
       <b>{{ notebook?.name }}</b> Libraries</h4>
   </modal-header>
   <modal-content>
+   <div class="aligner">
     <div class="info" *ngIf="notebook?.status !== 'running'">
       <p class=" message">Cannot install libraries: Exploratory
         <strong>{{ notebook?.name }}</strong> is not running</p>
@@ -32,8 +34,8 @@
         <img src="assets/img/gif-spinner.gif" alt="loading">
       </div>
     </div>
-    <div *ngIf="notebook?.status === 'running'" class="lib-view-wrap">
-      <div class="search-box" *ngIf="!uploading">
+    <div *ngIf="notebook?.status === 'running' && !uploading" class="lib-view-wrap">
+      <div class="search-box">
         <div class="search-form">
           <div>
             <div class="control-group constol-select">
@@ -148,12 +150,10 @@
         </div>
       </mat-list>
     </div>
-    <div class="text-center error" *ngIf="processError">
-      <small>{{ errorMessage }}</small>
-    </div>
-    <div class="text-center m-top-15 m-bott-10 actions" *ngIf="!uploading && notebook?.status === 'running'">
+    <div class="m-top-15 actions" *ngIf="!uploading && notebook?.status === 'running'">
       <button mat-raised-button type="button" class="butt action" (click)="close()">Close</button>
       <button mat-raised-button type="submit" class="butt butt-success action" (click)="model.confirmAction()" [disabled]="!model.selectedLibs.length || installingInProgress || !destination">Install</button>
     </div>
+   </div>
   </modal-content>
-</modal-dialog>
\ No newline at end of file
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index 20e4f49..808f27c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -1,40 +1,67 @@
-/***************************************************************************
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ 
+.aligner {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  > div {
+    &.actions {
+      display: flex;
+      flex: initial;
+      justify-content: center;
+      flex-direction: initial;
+      margin-bottom: 25px;
+    }
+  }
+}
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+.loading-block {
+  height: 45%;
+  display: flex;
+  justify-content: center;
+  .uploading {
+    flex-direction: column;
+    align-items: center;
+    align-self: center;
+    list-style: none;
+    display: flex;
+    p {
+      font-size: 16px;;
+    }
+  }
+}
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+.info {
+  height: 40%;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+}
 
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
 
 .install-libraries {
   .dialog-header {
     padding-left: 25px;
   }
-  .loading-block {
-    height: 45%;
-    display: flex;
-    justify-content: center;
-    .uploading {
-      flex-direction: column;
-      align-items: center;
-      align-self: center;
-      list-style: none;
-      display: flex;
-      p {
-        font-size: 16px;;
-      }
-    }
-  }
+
   .info {
     height: 40%;
     display: flex;
@@ -44,7 +71,6 @@
   }
   .mat-list-item {
     height: auto !important;
-
     .mat-list-item-content {
       height: auto !important;
       min-height: 54px !important;
@@ -55,14 +81,14 @@
     display: flex;
     flex-direction: column;
   }
-}
-.error {
-  padding: 15px 20px;
-}
-.uploading {
-  margin: 0 auto;
-}
 
+  .error {
+    padding: 15px 20px;
+  }
+  .uploading {
+    margin: 0 auto;
+  }
+}
 
 .search-box {
   display: flex;
@@ -105,7 +131,7 @@
 .suggestions {
   text-decoration: none;
   list-style: none;
-  .option {
+  mat-option {
     font-size: 13px;
     font-weight: 300;
     font-family: 'Open Sans', sans-serif;
@@ -143,13 +169,6 @@
   }
 }
 
-.list-header {
-  border-bottom: 1px solid #e0e0e0;
-  color: #577289;
-  width: 100%;
-  margin-bottom: 5px;
-}
-
 .list-selected {
   padding: 0 5px;
   font-family: 'Open Sans', sans-serif;
@@ -180,10 +199,12 @@
 
 /* Tab info */
 .libs-info {
-  height: 45%;
   padding: 0 20px;
+  display: flex;
+  flex: 1 1 auto;
+  min-height: 0px;
   .mat-list {
-    height: 100%;
+    width: 100%;
     .scrollingList {
       max-height: 80%;
       height: 80%;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index 37ab0fe..96a3647 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -1,34 +1,42 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Output, EventEmitter, ViewEncapsulation, ChangeDetectorRef, Inject } from '@angular/core';
-import { FormControl } from '@angular/forms';
-import { Observable } from 'rxjs/Observable';
-import { Response } from '@angular/http';
+import { Component,
+  OnInit,
+  ViewChild,
+  Output,
+  EventEmitter,
+  ViewEncapsulation,
+  ChangeDetectorRef,
+  Inject,
+  ViewContainerRef } from '@angular/core';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { FormControl } from '@angular/forms';
+import { ToastsManager } from 'ng2-toastr';
+
+import { InstallLibrariesModel } from '.';
+import { LibrariesInstallationService} from '../../../core/services';
+import { SortUtil, HTTP_STATUS_CODES } from '../../../core/util';
 
 import 'rxjs/add/operator/debounceTime';
 import 'rxjs/add/operator/distinctUntilChanged';
 
-import { InstallLibrariesModel } from './';
-import { LibrariesInstallationService} from '../../../core/services';
-import { SortUtil, HTTP_STATUS_CODES } from '../../../core/util';
-
 @Component({
   selector: 'install-libraries',
   templateUrl: './install-libraries.component.html',
@@ -49,16 +57,20 @@
   public destination: any;
   public uploading: boolean = false;
   public libs_uploaded: boolean = false;
-
-  public processError: boolean = false;
-  public errorMessage: string = '';
   public validity_format: string = '';
 
   public isInstalled: boolean = false;
   public isInSelectedList: boolean = false;
   public installingInProgress: boolean = false;
   public libSearch: FormControl = new FormControl();
-  public groupsListMap = {'r_pkg': 'R packages', 'pip2': 'Python 2', 'pip3': 'Python 3', 'os_pkg': 'Apt/Yum', 'others': 'Others', 'java': 'Java'};
+  public groupsListMap = {
+    'r_pkg': 'R packages',
+    'pip2': 'Python 2',
+    'pip3': 'Python 3',
+    'os_pkg': 'Apt/Yum',
+    'others': 'Others',
+    'java': 'Java'
+  };
 
   private readonly CHECK_GROUPS_TIMEOUT: number = 5000;
   private clear: number;
@@ -73,8 +85,12 @@
   constructor(
     public dialog: MatDialog,
     private librariesInstallationService: LibrariesInstallationService,
-    private changeDetector : ChangeDetectorRef) {
+    private changeDetector: ChangeDetectorRef,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
     this.model = InstallLibrariesModel.getDefault(librariesInstallationService);
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
@@ -98,23 +114,24 @@
           this.libsUploadingStatus(response);
           this.changeDetector.detectChanges();
 
-          this.resource_select && this.resource_select.setDefaultOptions(this.getResourcesList(), this.destination.title, 'destination', 'title', 'array');
-          this.group_select && this.group_select.setDefaultOptions(this.groupsList, 'Select group', 'group_lib', null, 'list', this.groupsListMap);
+          this.resource_select && this.resource_select.setDefaultOptions(
+            this.getResourcesList(),
+            this.destination.title, 'destination', 'title', 'array');
+
+          this.group_select && this.group_select.setDefaultOptions(
+            this.groupsList, 'Select group', 'group_lib', null, 'list', this.groupsListMap);
         },
-        error => {
-          this.processError = true;
-          this.errorMessage = JSON.parse(error.message).message;
-        });
+        error => this.toastr.error(error.message || 'Groups list loading failed!', 'Oops!', { toastLife: 5000 }));
   }
 
   private getResourcesList() {
     this.notebook.type = 'EXPLORATORY';
-    this.notebook.title = `${ this.notebook.name } <em>notebook</em>`;
+    this.notebook.title = `${ this.notebook.name } <em class="capt">notebook</em>`;
     return [this.notebook].concat(this.notebook.resources
       .filter(item => item.status === 'running')
       .map(item => {
         item['name'] = item.computational_name;
-        item['title'] = `${ item.computational_name } <em>cluster</em>`;
+        item['title'] = `${ item.computational_name } <em class="capt">cluster</em>`;
         item['type'] = 'СOMPUTATIONAL';
         return item;
       }));
@@ -125,11 +142,20 @@
     (this.query.length >= 2 && this.group) ? this.getFilteredList() : this.filteredList = null;
   }
 
+  public filterGroups(groupsList) {
+    const PREVENT_TEMPLATES = ['rstudio', 'rstudio with tensorflow'];
+    const CURRENT_TEMPLATE = this.notebook.template_name.toLowerCase();
+    const templateCheck = PREVENT_TEMPLATES.some(template => CURRENT_TEMPLATE.indexOf(template) !== -1);
+
+    const filteredGroups = templateCheck ? groupsList.filter(group => group !== 'java') : groupsList;
+    return SortUtil.libGroupsSort(filteredGroups);
+  }
+
   public onUpdate($event) {
     if ($event.model.type === 'group_lib') {
       this.group = $event.model.value;
     } else if ($event.model.type === 'destination') {
-      this.resetDialog(true);
+      this.resetDialog();
 
       this.destination = $event.model.value;
       this.destination && this.destination.type === 'СOMPUTATIONAL'
@@ -149,9 +175,11 @@
     this.isInSelectedList = this.model.selectedLibs.filter(el => JSON.stringify(el) === JSON.stringify(select)).length > 0;
 
     if (this.destination && this.destination.libs)
-      this.isInstalled = this.destination.libs.findIndex(libr =>
-        select.name === libr.name && select.group === libr.group && select.version === libr.version
-      ) >= 0;
+      this.isInstalled = this.destination.libs.findIndex(libr => {
+        return select.group !== 'java'
+          ? select.name === libr.name && select.group === libr.group && select.version === libr.version
+          : select.name === libr.name && select.group === libr.group;
+      }) >= 0;
 
     return this.isInSelectedList || this.isInstalled;
   }
@@ -172,24 +200,22 @@
   public open(param, notebook): void {
     if (!this.bindDialog.isOpened)
       this.notebook = notebook;
-      this.model = new InstallLibrariesModel(notebook, (response: Response) => {
-        if (response.status === HTTP_STATUS_CODES.OK) {
-          this.getInstalledLibrariesList();
-          this.resetDialog();
-        }
-      },
-      (error: any) => {
-        this.processError = true;
-        this.errorMessage = error.message;
-      },
-      () => {
-        this.bindDialog.open(param);
+      this.model = new InstallLibrariesModel(notebook,
+        response => {
+          if (response.status === HTTP_STATUS_CODES.OK) {
+            this.getInstalledLibrariesList();
+            this.resetDialog();
+          }
+        },
+        error => this.toastr.error(error.message || 'Library installation failed!', 'Oops!', { toastLife: 5000 }),
+        () => {
+          this.bindDialog.open(param);
 
-        this.getInstalledLibrariesList(true);
-        this.changeDetector.detectChanges();
-        this.selectorsReset();
-      },
-      this.librariesInstallationService);
+          this.getInstalledLibrariesList(true);
+          this.changeDetector.detectChanges();
+          this.selectorsReset();
+        },
+       this.librariesInstallationService);
   }
 
   public close(): void {
@@ -201,7 +227,8 @@
   }
 
   public showErrorMessage(item): void {
-    const dialogRef: MatDialogRef<ErrorMessageDialog> = this.dialog.open(ErrorMessageDialog, { data: item.error, width: '550px' });
+    const dialogRef: MatDialogRef<ErrorMessageDialogComponent> = this.dialog.open(
+      ErrorMessageDialogComponent, { data: item.error, width: '550px', panelClass: 'error-modalbox' });
   }
 
   public isInstallingInProgress(data): void {
@@ -220,7 +247,7 @@
   public reinstallLibrary(item, lib) {
     const retry = [{group: lib.group, name: lib.name, version: lib.version}];
 
-    if (this.getResourcesList().find(el => el.name == item.resource).type === 'СOMPUTATIONAL') {
+    if (this.getResourcesList().find(el => el.name === item.resource).type === 'СOMPUTATIONAL') {
       this.model.confirmAction(retry, item.resource);
     } else {
       this.model.confirmAction(retry);
@@ -243,7 +270,7 @@
 
   private libsUploadingStatus(groupsList): void {
     if (groupsList.length) {
-      this.groupsList = SortUtil.libGroupsSort(groupsList);
+      this.groupsList = this.filterGroups(groupsList);
       this.libs_uploaded = true;
       this.uploading = false;
     } else {
@@ -261,35 +288,32 @@
         .subscribe(
           lib => this.filteredList = [lib],
           error => {
-          if (error.status === HTTP_STATUS_CODES.NOT_FOUND || error.status === HTTP_STATUS_CODES.BAD_REQUEST) {
+          if (error.status === HTTP_STATUS_CODES.NOT_FOUND
+            || error.status === HTTP_STATUS_CODES.BAD_REQUEST
+            || error.status === HTTP_STATUS_CODES.INTERNAL_SERVER_ERROR) {
             this.validity_format = error.message;
             this.filteredList = null;
           }
         });
     } else {
       this.model.getLibrariesList(this.group, this.query)
-        .subscribe(libs => {
-          this.filteredList = libs;
-        });
+        .subscribe(libs => this.filteredList = libs);
     }
   }
 
-  private selectorsReset():void {
-    this.resource_select && this.resource_select.setDefaultOptions(this.getResourcesList(), 'Select resource', 'destination', 'title', 'array');
+  private selectorsReset(): void {
+    this.resource_select && this.resource_select.setDefaultOptions(this.getResourcesList(),
+      'Select resource', 'destination', 'title', 'array');
     this.group_select && this.group_select.setDefaultOptions([], '', 'group_lib', null, 'array');
   }
 
-  private resetDialog(nActive?): void {
+  private resetDialog(): void {
     this.group = '';
     this.query = '';
     this.libSearch.setValue('');
-
-    this.processError = false;
     this.isInstalled = false;
     this.isInSelectedList = false;
     this.uploading = false;
-
-    this.errorMessage = '';
     this.model.selectedLibs = [];
     this.filteredList = null ;
     this.destination = null;
@@ -305,12 +329,55 @@
 
 @Component({
   selector: 'error-message-dialog',
-  template: `<div class="content">{{ data }}</div>`,
-  styles: [`.content { color: #f1696e; padding: 20px 25px; font-size: 14px; font-weight: 400 }`]
+  template: `
+  <div class="dialog-header">
+    <h4 class="modal-title">Library installation error</h4>
+    <button type="button" class="close" (click)="dialogRef.close()">&times;</button>
+  </div>
+  <div class="content">{{ data }}</div>
+  <div class="text-center">
+    <button type="button" class="butt" mat-raised-button (click)="dialogRef.close()">Close</button>
+  </div>
+  `,
+  styles: [`
+  .content { color: #f1696e; padding: 20px 25px; font-size: 14px; font-weight: 400 }
+  .dialog-header {
+    position: relative;
+    top: 0;
+    padding-left: 30px;
+    background: #f6fafe;
+    height: 54px;
+    line-height: 54px;
+  }
+  .dialog-header h4 {
+    color: #455c74;
+    font-size: 18px;
+    font-weight: 600;
+  }
+  .close {
+    position: absolute;
+    top: 0;
+    right: 0;
+    height: 50px;
+    width: 50px;
+    font-size: 24px;
+    border: 0;
+    background: none;
+    color: #577289;
+    outline: none;
+    cursor: pointer;
+    transition: all .45s ease-in-out;
+    }
+    .close:hover {
+      color: #36afd5;
+    }
+    .text-center button {
+      margin-bottom: 25px;
+    }`]
 })
-export class ErrorMessageDialog {
+export class ErrorMessageDialogComponent {
   constructor(
-    public dialogRef: MatDialogRef<ErrorMessageDialog>,
+    public dialogRef: MatDialogRef<ErrorMessageDialogComponent>,
     @Inject(MAT_DIALOG_DATA) public data: any
   ) { }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.model.ts
index 496a6f3..b145d99 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.model.ts
@@ -1,94 +1,105 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Observable } from 'rxjs/Observable';
-import { Response } from '@angular/http';
 
 import { LibrariesInstallationService } from '../../../core/services';
 
 interface Library {
-    group: string;
-    name: string;
-    version: string;
+  group: string;
+  name: string;
+  version: string;
 }
 
 export class InstallLibrariesModel {
-    confirmAction: Function;
-    notebook: any;
-    computational_name: string;
+  confirmAction: Function;
+  notebook: any;
+  computational_name: string;
 
-    public selectedLibs: Array<Library> = [];
-    private continueWith: Function;
-    private librariesInstallationService: LibrariesInstallationService;
+  public selectedLibs: Array<Library> = [];
+  private continueWith: Function;
+  private librariesInstallationService: LibrariesInstallationService;
 
-    static getDefault(librariesInstallationService): InstallLibrariesModel {
-        return new InstallLibrariesModel('', () => { }, () => { }, null, librariesInstallationService);
-    }
+  static getDefault(librariesInstallationService): InstallLibrariesModel {
+    return new InstallLibrariesModel('', () => {}, () => {}, null, librariesInstallationService);
+  }
 
-    constructor(
-        notebook: any,
-        fnProcessResults: any,
-        fnProcessErrors: any,
-        continueWith: Function,
-        librariesInstallationService: LibrariesInstallationService
-    ) {
-        this.notebook = notebook;
-        this.continueWith = continueWith;
-        this.librariesInstallationService = librariesInstallationService;
-        this.prepareModel(fnProcessResults, fnProcessErrors);
+  constructor(
+    notebook: any,
+    fnProcessResults: any,
+    fnProcessErrors: any,
+    continueWith: Function,
+    librariesInstallationService: LibrariesInstallationService
+  ) {
+    this.notebook = notebook;
+    this.continueWith = continueWith;
+    this.librariesInstallationService = librariesInstallationService;
+    this.prepareModel(fnProcessResults, fnProcessErrors);
 
-        if (this.continueWith) this.continueWith();
-    }
+    if (this.continueWith) this.continueWith();
+  }
 
-    public getLibrariesList(group: string, query: string): Observable<Response> {
-        let lib_query: any = { exploratory_name: this.notebook.name, group: group, start_with: query };
-        if (this.computational_name) lib_query.computational_name = this.computational_name;
+  public getLibrariesList(group: string, query: string): Observable<{}> {
+    let lib_query: any = {
+      exploratory_name: this.notebook.name,
+      group: group,
+      start_with: query
+    };
+    if (this.computational_name)
+      lib_query.computational_name = this.computational_name;
 
-        return this.librariesInstallationService
-            .getAvailableLibrariesList(lib_query);
-    }
+    return this.librariesInstallationService.getAvailableLibrariesList(
+      lib_query
+    );
+  }
 
-    public getDependencies(query: string): Observable<Response> {
-        return this.librariesInstallationService
-            .getAvailableDependencies(query);
-    }
+  public getDependencies(query: string): Observable<{}> {
+    return this.librariesInstallationService.getAvailableDependencies(query);
+  }
 
-    public getInstalledLibrariesList(notebook): Observable<Response> {
-        return this.librariesInstallationService.getInstalledLibrariesList(notebook.name)
-    }
+  public getInstalledLibrariesList(notebook): Observable<{}> {
+    return this.librariesInstallationService.getInstalledLibrariesList(
+      notebook.name
+    );
+  }
 
-    private installLibraries(retry?: Library, item?): Observable<Response> {
-        let lib_list: any = { exploratory_name: this.notebook.name, libs: (retry ? retry : this.selectedLibs) };
-        if (this.computational_name) lib_list.computational_name = this.computational_name;
-        if (item) lib_list.computational_name = item;
+  private installLibraries(retry?: Library, item?): Observable<{}> {
+    let lib_list: any = {
+      exploratory_name: this.notebook.name,
+      libs: retry ? retry : this.selectedLibs
+    };
+    if (this.computational_name)
+      lib_list.computational_name = this.computational_name;
+    if (item) lib_list.computational_name = item;
 
-        return this.librariesInstallationService
-            .installLibraries(lib_list);
-    }
+    return this.librariesInstallationService.installLibraries(lib_list);
+  }
 
-    public isEmpty(obj) {
-        if (obj) return Object.keys(obj).length === 0;
-    }
+  public isEmpty(obj) {
+    if (obj) return Object.keys(obj).length === 0;
+  }
 
-    private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
-        this.confirmAction = (retry?: Library, item?) => this.installLibraries(retry, item)
-            .subscribe(
-            (response: Response) => fnProcessResults(response),
-            (response: Response) => fnProcessErrors(response));
-    }
+  private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
+    this.confirmAction = (retry?: Library, item?) =>
+      this.installLibraries(retry, item).subscribe(
+        response => fnProcessResults(response),
+        error => fnProcessErrors(error)
+      );
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
index 1962df6..1365e75 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="manage-ungit modal-xxl">
   <modal-header>
@@ -24,7 +25,7 @@
 
     <mat-tab-group mat-stretch-tabs #tabGroup class="content-box">
       <mat-tab label="LIST">
-        <mat-list>
+        <mat-list *ngIf="gitCredentials?.length">
           <mat-list-item class="list-header">
             <div class="hostname-field">Host name</div>
             <div class="user-field">User</div>
@@ -33,7 +34,7 @@
             <div class="actions"></div>
           </mat-list-item>
 
-          <div class="scrollingList" id="scrolling" *ngIf="gitCredentials?.length">
+          <div class="scrollingList" id="scrolling">
             <mat-list-item *ngFor="let item of gitCredentials">
               <div class="hostname-field">
                 <strong>{{ item.hostname }}</strong>
@@ -49,16 +50,13 @@
                   <i class="material-icons">delete_forever</i>
                 </span>
               </div>
-
             </mat-list-item>
           </div>
-          <div *ngIf="!gitCredentials?.length" class="scrollingList info">
-            <p>You have no related accounts</p>
-          </div>
         </mat-list>
-        <div class="info message error" *ngIf="processError">
-          <small>{{ errorMessage }}</small>
+        <div *ngIf="!gitCredentials?.length" class="scrollingList info">
+          <p>You have no related accounts</p>
         </div>
+
         <div class="text-center m-top-30 m-bott-10" *ngIf="editableForm">
           <button mat-raised-button type="button" class="butt action" (click)="cancelAllModifyings()">Cancel</button>
           <button mat-raised-button type="button" class="butt butt-success action" (click)="editAccounts_btnClick()">Apply changes</button>
@@ -73,32 +71,32 @@
                 <div class="control">
                   <input type="text" formControlName="hostname" placeholder="Enter host name ( without http:// or https:// )">
                 </div>
+                <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['hostname'].valid
+                  && updateAccountCredentialsForm.controls['hostname'].touched && !updateAccountCredentialsForm.controls['hostname'].hasError('duplicate')">
+                  Hostname field is required. Please provide a qualified domain name (e.g. gitlab.com or github.com)
+                </span>
+                <span class="danger_color" *ngIf="updateAccountCredentialsForm.controls['hostname'].hasError('duplicate') && updateAccountCredentialsForm.controls['hostname'].dirty">
+                  The Host name is already in use
+                </span>
               </div>
-              <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['hostname'].valid
-                && updateAccountCredentialsForm.controls['hostname'].touched && !updateAccountCredentialsForm.controls['hostname'].hasError('duplicate')">
-                Hostname field is required. Please provide a qualified domain name (e.g. gitlab.com or github.com)
-              </span>
-              <span class="danger_color" *ngIf="updateAccountCredentialsForm.controls['hostname'].hasError('duplicate') && updateAccountCredentialsForm.controls['hostname'].dirty">
-                The Host name is already in use
-              </span>
               <div class="control-group">
                 <label class="label">User name</label>
                 <div class="control">
                   <input type="text" formControlName="username" placeholder="Enter user name">
                 </div>
+                <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['username'].valid && updateAccountCredentialsForm.controls['username'].touched">
+                  Username field is required. Please provide a valid username
+                </span>
               </div>
-              <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['username'].valid && updateAccountCredentialsForm.controls['username'].touched">
-                Username field is required. Please provide a valid username
-              </span>
               <div class="control-group">
                 <label class="label">Email</label>
                 <div class="control">
                   <input type="email" formControlName="email" placeholder="Enter email">
                 </div>
+                <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['email'].valid && updateAccountCredentialsForm.controls['email'].touched">
+                  Email field is required. Please provide a valid email
+                </span>
               </div>
-              <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['email'].valid && updateAccountCredentialsForm.controls['email'].touched">
-                Email field is required. Please provide a valid email
-              </span>
             </div>
             <div class="col">
               <div class="control-group">
@@ -106,31 +104,31 @@
                 <div class="control">
                   <input type="text" formControlName="login" placeholder="Enter login">
                 </div>
+                <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['login'].valid && updateAccountCredentialsForm.controls['login'].touched">
+                  Login field is required. Please provide a valid login
+                </span>
               </div>
-              <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['login'].valid && updateAccountCredentialsForm.controls['login'].touched">
-                Login field is required. Please provide a valid login
-              </span>
               <div class="control-group">
                 <label class="label">Password</label>
                 <div class="control">
                   <input type="password" formControlName="password" placeholder="Enter Password">
                 </div>
+                <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched">
+                  Field is required. Password must be at least 6 characters
+                </span>
               </div>
-              <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched">
-                Field is required. Password must be at least 6 characters
-              </span>
               <div class="control-group">
                 <label class="label">Confirm password</label>
                 <div class="control">
                   <input type="password" formControlName="confirmPassword" placeholder="Enter Password">
                 </div>
+                <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['confirmPassword'].valid && updateAccountCredentialsForm.controls['confirmPassword'].touched">
+                  Field is required. Please confirm a password
+                </span>
               </div>
-              <span class="danger_color" *ngIf="!updateAccountCredentialsForm.controls['confirmPassword'].valid && updateAccountCredentialsForm.controls['confirmPassword'].touched">
-                Field is required. Please confirm a password
-              </span>
             </div>
           </div>
-          <div class="text-center m-top-30 m-bott-10">
+          <div class="text-center m-top-20 m-bott-10">
             <button mat-raised-button type="button" class="butt action" (click)="resetForm()">Clear</button>
             <button mat-raised-button type="button" [disabled]="!updateAccountCredentialsForm.valid" (click)="assignChanges(updateAccountCredentialsForm.value)"
               class="butt butt-success action">Assign</button>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss
index a6515cd..e5b1ddb 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.scss
@@ -1,29 +1,38 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-.modal-dialog .manage-ungit .modal-body {
-  padding: 0 20px;
-}
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .manage-ungit {
+  .content-box {
+    height: 440px;
+    padding: 25px 35px;
+  }
   .scrollingList {
     overflow-x: hidden;
     padding: 5px;
+    &.info {
+      display: flex;
+      justify-content: center;
+      height: 300px;
+      p {
+        align-self: center;
+      }
+    }
   }
   .mail-field,
   .user-field,
@@ -64,7 +73,8 @@
     .control-group {
       width: 100%;
       font-family: 'Open Sans', sans-serif;
-      padding: 10px 0;
+      padding: 10px 0 25px;
+      position: relative;
       input[type='text'],
       input[type='password'],
       input[type='email'] {
@@ -77,6 +87,11 @@
       .control {
         width: 70%;
       }
+      .danger_color {
+        position: absolute;
+        top: 45px;
+        padding: 0;
+      }
     }
     .col {
       padding: 30px 10px;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
index 2a897d8..cb45eaf 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
@@ -1,29 +1,29 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Inject } from '@angular/core';
+import { Component, OnInit, ViewChild, Inject, ViewContainerRef } from '@angular/core';
 import { FormGroup, FormBuilder, Validators } from '@angular/forms';
-import { Response } from '@angular/http';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { ToastsManager } from 'ng2-toastr';
 
 import { AccountCredentials, MangeUngitModel } from './manage-ungit.model';
-import { ManageUngitService } from './../../core/services';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from './../../core/util';
+import { ManageUngitService } from '../../core/services';
 
 @Component({
   selector: 'dlab-manage-ungit',
@@ -41,9 +41,6 @@
   login_acceptance_pattern = '[-_@.a-zA-Z0-9]+';
   acceptance_pattern = '[-_ a-zA-Z0-9]+';
 
-  errorMessage: string;
-  processError: boolean = false;
-
   public editableForm: boolean = false;
   public updateAccountCredentialsForm: FormGroup;
 
@@ -53,9 +50,12 @@
   constructor(
     private manageUngitService: ManageUngitService,
     private _fb: FormBuilder,
-    public dialog: MatDialog
+    public dialog: MatDialog,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
   ) {
     this.model = MangeUngitModel.getDefault(manageUngitService);
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
@@ -67,11 +67,8 @@
 
   public open(param): void {
     if (!this.bindDialog.isOpened)
-      this.model = new MangeUngitModel((response: Response) => { },
-      error => {
-        this.processError = true;
-        this.errorMessage = error.message;
-      },
+      this.model = new MangeUngitModel(response => { },
+      error => this.toastr.error(error.message || 'Manage git credentials failed!', 'Oops!', { toastLife: 5000 }),
       () => {
         this.bindDialog.open(param);
 
@@ -93,9 +90,6 @@
 
   public cancelAllModifyings() {
     this.editableForm = false;
-    this.errorMessage = '';
-    this.processError = false;
-
     this.getGitCredentials();
     this.resetForm();
   }
@@ -115,7 +109,9 @@
   }
 
   public deleteAccount(item: AccountCredentials) {
-    const dialogRef: MatDialogRef<ConfirmDeleteAccountDialog> = this.dialog.open(ConfirmDeleteAccountDialog, { data: item, width: '550px' });
+    const dialogRef: MatDialogRef<ConfirmDeleteAccountDialog> = this.dialog.open(
+      ConfirmDeleteAccountDialog,
+      { data: item, width: '550px' });
     dialogRef.afterClosed().subscribe(result => {
       if (result) {
         this.gitCredentials.splice(this.gitCredentials.indexOf(item), 1);
@@ -125,9 +121,6 @@
   }
 
   public assignChanges(current: any): void {
-    this.errorMessage = '';
-    this.processError = false;
-
     const modifiedCredentials = JSON.parse(JSON.stringify(this.gitCredentials));
     const index = modifiedCredentials.findIndex(el => JSON.stringify(el) === JSON.stringify(this.currentEditableItem));
 
@@ -159,10 +152,9 @@
 
   private getGitCredentials(): void {
     this.model.getGitCredentials()
-      .subscribe((response: any) => {
-          this.gitCredentials = response.git_creds || [];
-        },
-        error => console.log(error));
+      .subscribe(
+        (response: any) => this.gitCredentials = response.git_creds || [],
+        error => this.toastr.error(error.message || 'Git credentials loading failed!', 'Oops!', { toastLife: 5000 }));
   }
 
   private validConfirmField(control) {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.model.ts
index eb085de..ed16f81 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.model.ts
@@ -1,72 +1,70 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Observable } from 'rxjs/Observable';
-import { Response } from '@angular/http';
-
-import { ManageUngitService } from './../../core/services';
+import { ManageUngitService } from '../../core/services';
 
 export interface AccountCredentials {
-    hostname: string;
-    username: string;
-    email: string;
-    login: string;
-    password: string;
+  hostname: string;
+  username: string;
+  email: string;
+  login: string;
+  password: string;
 }
 
 export class MangeUngitModel {
-    confirmAction: Function;
+  confirmAction: Function;
 
-    public accoutCredsList: Array<AccountCredentials> = [];
-    private continueWith: Function;
-    private manageUngitService: ManageUngitService;
+  public accoutCredsList: Array<AccountCredentials> = [];
+  private continueWith: Function;
+  private manageUngitService: ManageUngitService;
 
-    static getDefault(manageUngitService): MangeUngitModel {
-        return new MangeUngitModel(() => { }, () => { }, null, manageUngitService);
-    }
+  static getDefault(manageUngitService): MangeUngitModel {
+    return new MangeUngitModel(() => {}, () => {}, null, manageUngitService);
+  }
 
-    constructor(
-        fnProcessResults: any,
-        fnProcessErrors: any,
-        continueWith: Function,
-        manageUngitService: ManageUngitService
-    ) {
-        this.continueWith = continueWith;
-        this.manageUngitService = manageUngitService;
-        this.prepareModel(fnProcessResults, fnProcessErrors);
+  constructor(
+    fnProcessResults: any,
+    fnProcessErrors: any,
+    continueWith: Function,
+    manageUngitService: ManageUngitService
+  ) {
+    this.continueWith = continueWith;
+    this.manageUngitService = manageUngitService;
+    this.prepareModel(fnProcessResults, fnProcessErrors);
 
-        if (this.continueWith) this.continueWith();
-    }
+    if (this.continueWith) this.continueWith();
+  }
 
-    public getGitCredentials(): Observable<Response> {
-        return this.manageUngitService.getGitCreds();
-    }
+  public getGitCredentials(): Observable<{}> {
+    return this.manageUngitService.getGitCreds();
+  }
 
-    private updateGitCredentials(gitCreds): Observable<Response> {
-        return this.manageUngitService.updateGitCredentials({
-            git_creds : gitCreds
-        });
-    }
+  private updateGitCredentials(gitCreds): Observable<{}> {
+    return this.manageUngitService.updateGitCredentials({ git_creds: gitCreds });
+  }
 
-    private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
-        this.confirmAction = (data?) => this.updateGitCredentials(data)
-            .subscribe(
-                (response: Response) => fnProcessResults(response),
-                (response: Response) => fnProcessErrors(response));
-    }
+  private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
+    this.confirmAction = (data?) =>
+      this.updateGitCredentials(data).subscribe(
+        response => fnProcessResults(response),
+        error => fnProcessErrors(error)
+      );
+  }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/create-resource.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/create-resource.model.ts
index 77d6082..9209b09 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/create-resource.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/create-resource.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class CreateResourceModel {
   constructor(
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/filter-configuration.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/filter-configuration.model.ts
index 631fb4f..e2a31c0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/filter-configuration.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/filter-configuration.model.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class FilterConfigurationModel {
   constructor(
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/index.ts
index 7a2c6be..5db8ea9 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/index.ts
@@ -1,35 +1,36 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 
-import { MaterialModule } from './../../shared/material.module';
+import { MaterialModule } from '../../shared/material.module';
 import { ResourcesGridComponent } from './resources-grid.component';
-import { ComputationalResourcesModule } from './../computational/computational-resources-list';
-import { ModalModule, ConfirmationDialogModule, BubbleModule } from './../../shared';
-import { ComputationalResourceCreateDialogModule } from './../computational/computational-resource-create-dialog';
-import { DetailDialogModule } from './../exploratory/detail-dialog';
+import { ComputationalResourcesModule } from '../computational/computational-resources-list';
+import { ModalModule, ConfirmationDialogModule, BubbleModule } from '../../shared';
+import { ComputationalResourceCreateDialogModule } from '../computational/computational-resource-create-dialog';
+import { DetailDialogModule } from '../exploratory/detail-dialog';
 import { FormControlsModule } from '../../shared/form-controls';
-import { CostDetailsDialogModule } from './../billing/cost-details-dialog';
-import { InstallLibrariesModule } from './../exploratory/install-libraries';
-import { AmiCreateDialogModule } from './../exploratory/ami-create-dialog';
-import { SchedulerModule } from './../scheduler';
+import { CostDetailsDialogModule } from '../billing/cost-details-dialog';
+import { InstallLibrariesModule } from '../exploratory/install-libraries';
+import { AmiCreateDialogModule } from '../exploratory/ami-create-dialog';
+import { SchedulerModule } from '../scheduler';
 import { UnderscorelessPipeModule } from '../../core/pipes/underscoreless-pipe';
 
 export * from './resources-grid.component';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.css b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.css
index 6e08e1a..3d6b687 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.css
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.css
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .dashboard_table {
   width: 100%;
@@ -142,7 +143,7 @@
   box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
     0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);
   border: none;
-  width: 190px;
+  min-width: 190px;
 }
 
 .settings {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
index 4b36cdd..a960f6c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
@@ -1,25 +1,26 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <table class="dashboard_table">
   <tr>
     <th *ngFor="let column of filteringColumns"
-        ngClass="{{column.className || ''}}" [hidden]="column.name === 'cost' && !billingEnabled">
+        ngClass="{{column.className || ''}}" [hidden]="column.name === 'cost' && !healthStatus?.billingEnabled">
       {{column.title}}
       <button mat-icon-button *ngIf="column.filtering" aria-label="More" class="ar" (click)="toggleFilterRow()">
         <i class="material-icons">
@@ -43,7 +44,7 @@
     <td>
       <multi-select-dropdown (selectionChange)="onUpdate($event)" [type]="'resources'" [items]="filterConfiguration.resources" [model]="filterForm.resources"></multi-select-dropdown>
     </td>
-    <td *ngIf="billingEnabled"></td>
+    <td *ngIf="healthStatus?.billingEnabled"></td>
     <td>
       <div class="actions">
         <button mat-icon-button class="btn reset" (click)="resetFilterConfigurations()">
@@ -58,11 +59,11 @@
   </tr>
 
   <tr *ngIf="(!filteredEnvironments) && !filtering || (filteredEnvironments.length == 0) && !filtering" class="message_block">
-    <td [colSpan]="!billingEnabled ? filteringColumns.length -1 : filteringColumns.length">To start working, please, create new environment</td>
+    <td [colSpan]="!healthStatus?.billingEnabled ? filteringColumns.length -1 : filteringColumns.length">To start working, please, create new environment</td>
   </tr>
 
   <tr *ngIf="(filteredEnvironments.length == 0) && filtering" class="message_block">
-    <td [colSpan]="!billingEnabled ? filteringColumns.length -1 : filteringColumns.length">No matches found</td>
+    <td [colSpan]="!healthStatus?.billingEnabled ? filteringColumns.length -1 : filteringColumns.length">No matches found</td>
   </tr>
 
   <tr *ngFor="let env of filteredEnvironments;" class="dashboard_table_body" [ngClass]="{'dropdown-outscreen': isOutscreenDropdown}">
@@ -70,9 +71,9 @@
     <td class="status" ngClass="{{env.status.toLowerCase() || ''}}">{{ env.status | underscoreless }}</td>
     <td>{{env.shape}}</td>
     <td>
-      <computational-resources-list [resources]="env.resources" [environment]="env" [healthStatus]="healthStatus" (buildGrid)="buildGrid($event)"></computational-resources-list>
+      <computational-resources-list [resources]="env.resources" [environment]="env" [healthStatus]="healthStatus?.status" (buildGrid)="buildGrid($event)"></computational-resources-list>
     </td>
-    <td *ngIf="billingEnabled">
+    <td *ngIf="healthStatus?.billingEnabled">
       <span class="total_cost">{{ env.cost || 'N/A' }} {{env.currency_code || ''}}</span>
       <span (click)="env.billing && printCostDetails(env)" class="currency_details" [ngClass]="{'not-allowed' : !env.billing}">
         <i class="material-icons">help_outline</i>
@@ -80,7 +81,7 @@
     </td>
     <td class="settings">
       <span #settings (click)="actions.toggle($event, settings)" class="actions"
-            [ngClass]="{'disabled': env.status.toLowerCase() == 'creating' || healthStatus === 'error'}">
+            [ngClass]="{'disabled': env.status.toLowerCase() == 'creating' || healthStatus?.status === 'error'}">
       </span>
 
       <bubble-up #actions class="list-menu" position="bottom-left" alternative="top-left">
@@ -148,7 +149,7 @@
 
 <computational-resource-create-dialog #computationalResourceModal (buildGrid)="buildGrid($event)"></computational-resource-create-dialog>
 <confirmation-dialog #confirmationDialog (buildGrid)="buildGrid($event)"></confirmation-dialog>
-<detail-dialog #detailDialog></detail-dialog>
+<detail-dialog #detailDialog (buildGrid)="buildGrid($event)"></detail-dialog>
 <cost-details-dialog #costDetailsDialog></cost-details-dialog>
 <install-libraries #installLibs (buildGrid)="buildGrid($event)"></install-libraries>
 <dlab-scheduler #envScheduler (buildGrid)="buildGrid($event)"></dlab-scheduler>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index 2d438e7..9af6343 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -1,32 +1,35 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 /* tslint:disable:no-empty */
 
-import { Component, ViewChild, OnInit } from '@angular/core';
+import { Component, ViewChild, ViewContainerRef, OnInit } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
+
 import { UserResourceService } from '../../core/services';
-import { ResourcesGridRowModel, FilterConfigurationModel, CreateResourceModel } from './';
+import { ResourcesGridRowModel, FilterConfigurationModel, CreateResourceModel } from '.';
+import { GeneralEnvironmentStatus } from '../../health-status/health-status.module';
 import { ConfirmationDialogType } from '../../shared';
 import { SortUtil } from '../../core/util';
 
 import { DICTIONARY } from '../../../dictionary/global.dictionary';
 
 @Component({
-  moduleId: module.id,
   selector: 'resources-grid',
   templateUrl: 'resources-grid.component.html',
   styleUrls: ['./resources-grid.component.css']
@@ -45,8 +48,8 @@
   collapseFilterRow: boolean = false;
   filtering: boolean = false;
   activeFiltering: boolean = false;
-  healthStatus: string = '';
-  billingEnabled: boolean = false;
+  healthStatus: GeneralEnvironmentStatus;
+  // billingEnabled: boolean = false;
 
   delimitersRegex = /[-_]?/g;
 
@@ -69,8 +72,12 @@
   ];
 
   constructor(
-    private userResourceService: UserResourceService
-  ) { }
+    private userResourceService: UserResourceService,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
 
   ngOnInit(): void {
     this.buildGrid();
@@ -139,11 +146,11 @@
   }
 
   isResourcesInProgress(notebook) {
-    let filteredEnv: any = this.environments.find(env => env.name === notebook.name);
+    const filteredEnv: any = this.environments.find(env => env.name === notebook.name);
 
-    if(filteredEnv && filteredEnv.resources.length) {
+    if (filteredEnv && filteredEnv.resources.length) {
       return filteredEnv.resources.filter(resource => (
-        resource.status !== 'failed' 
+        resource.status !== 'failed'
         && resource.status !== 'terminated'
         && resource.status !== 'running'
         && resource.status !== 'stopped')).length > 0;
@@ -250,7 +257,7 @@
 
   getUserPreferences(): void {
     this.userResourceService.getUserPreferences()
-      .subscribe((result) => {
+      .subscribe((result: any) => {
         this.isActiveFilter(result);
         this.filterForm = this.loadUserPreferences( result.type ? this.filterActiveInstances() : this.aliveStatuses(result) );
         this.applyFilter_btnClick(this.filterForm);
@@ -280,17 +287,15 @@
   }
 
   exploratoryAction(data, action: string) {
-
     if (action === 'deploy') {
       this.notebookName = data.name;
       this.computationalResourceModal.open({ isFooter: false }, data, this.environments);
     } else if (action === 'run') {
       this.userResourceService
         .runExploratoryEnvironment({ notebook_instance_name: data.name })
-        .subscribe((result) => {
-          console.log('startUsernotebook result: ', result);
-          this.buildGrid();
-        });
+        .subscribe(
+          () => this.buildGrid(),
+          error => this.toastr.error(error.message || 'Exploratory starting failed!', 'Oops!', { toastLife: 5000 }));
     } else if (action === 'stop') {
       this.confirmationDialog.open({ isFooter: false }, data, ConfirmationDialogType.StopExploratory);
     } else if (action === 'terminate') {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
index e2fe6fe..edd2af6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
@@ -1,44 +1,46 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export class ResourcesGridRowModel {
-  constructor(public name: Array<any>,
-              public template_name: string,
-              public image: string,
-              public status: string,
-              public shape: string,
-              public resources: Array<any>,
-              public time: string,
-              public url: Array<any>,
-              public ip: string,
-              public username: string,
-              public password: string,
-              public bucket_name: string,
-              public shared_bucket_name: string,
-              public error_message: string,
-              public cost: number,
-              public currency_code: string,
-              public billing: Array<any>,
-              public libs: Array<any>,
-              public account_name: string,
-              public shared_account_name: string,
-              public datalake_name: string,
-              public datalake_directory: string,
-              public datalake_shared_directory: string
-            ) { }
+  constructor(
+    public name: Array<any>,
+    public template_name: string,
+    public image: string,
+    public status: string,
+    public shape: string,
+    public resources: Array<any>,
+    public time: string,
+    public url: Array<any>,
+    public ip: string,
+    public username: string,
+    public password: string,
+    public bucket_name: string,
+    public shared_bucket_name: string,
+    public error_message: string,
+    public cost: number,
+    public currency_code: string,
+    public billing: Array<any>,
+    public libs: Array<any>,
+    public account_name: string,
+    public shared_account_name: string,
+    public datalake_name: string,
+    public datalake_directory: string,
+    public datalake_shared_directory: string
+  ) { }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.css b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.css
deleted file mode 100644
index 4802214..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-.btn_refresh {
-  outline: none;
-}
-
-.butt.butt-create {
-  color: #35afd5;
-}
-
-.butt.butt-create:disabled{
-  color: #577289!important;
-}
-
-.butt.butt-tool {
-  margin-right: 10px;
-}
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
index 8ceb752..84962f2 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
@@ -1,26 +1,25 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<dlab-navbar [healthStatus]="healthStatus" [billingEnabled]="billingEnabled" [admin]="admin"></dlab-navbar>
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="sub-nav base-retreat">
   <div>
-    <button mat-raised-button class="butt butt-create" [disabled]="userUploadAccessKeyState == 202 || healthStatus === 'error'" (click)="createNotebook_btnClick()">
+    <button mat-raised-button class="butt butt-create" [disabled]="userUploadAccessKeyState == 202 || healthStatus?.status === 'error'" (click)="createNotebook_btnClick()">
       <i class="material-icons">add</i>Create new
     </button>
   </div>
@@ -50,7 +49,4 @@
 <resources-grid></resources-grid>
 
 <exploratory-environment-create-dialog #createAnalyticalModal (buildGrid)="refreshGrid($event)"></exploratory-environment-create-dialog>
-<key-upload-dialog #keyUploadModal (generateUserKey)="generateUserKey($event)" [primaryUploading]="true"
-                   (checkInfrastructureCreationProgress)="checkInfrastructureCreationProgress($event)"></key-upload-dialog>
-<progress-dialog #preloaderModal></progress-dialog>
 <dlab-manage-ungit #manageUngitDialog></dlab-manage-ungit>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.scss
new file mode 100644
index 0000000..e718a6b
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.scss
@@ -0,0 +1,36 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.btn_refresh {
+  outline: none;
+}
+
+.butt {
+  &.butt-create {
+    color: #35afd5;
+  }
+  &.butt-create {
+    &:disabled{
+      color: #577289!important;
+    }
+  }
+  &.butt-tool {
+    margin-right: 10px;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
index c966b1f..d27176f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
@@ -1,70 +1,81 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+import { Component, OnInit, ViewChild, ViewContainerRef, OnDestroy } from '@angular/core';
+import { Subscription } from 'rxjs/Subscription';
+import { ToastsManager } from 'ng2-toastr';
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild } from '@angular/core';
 import { ResourcesGridComponent } from './resources-grid';
-import { UserAccessKeyService, UserResourceService, HealthStatusService, AppRoutingService } from '../core/services';
+import { UserAccessKeyService, HealthStatusService } from '../core/services';
 import { ExploratoryEnvironmentVersionModel, ComputationalResourceImage } from '../core/models';
 import { HTTP_STATUS_CODES, FileUtils } from '../core/util';
-import { NavbarComponent } from '../shared';
 
 @Component({
-  moduleId: module.id,
   selector: 'dlab-resources',
   templateUrl: 'resources.component.html',
-  styleUrls: ['./resources.component.css']
+  styleUrls: ['./resources.component.scss']
 })
 
-export class ResourcesComponent implements OnInit {
+export class ResourcesComponent implements OnInit, OnDestroy {
 
-  userUploadAccessKeyState: number;
-  exploratoryEnvironments: Array<ExploratoryEnvironmentVersionModel> = [];
-  computationalResources: Array<ComputationalResourceImage> = [];
-  healthStatus: any;
-  billingEnabled: boolean;
-  admin: boolean;
+  public userUploadAccessKeyState: number;
+  public exploratoryEnvironments: Array<ExploratoryEnvironmentVersionModel> = [];
+  public computationalResources: Array<ComputationalResourceImage> = [];
+  public healthStatus: any;
+  // public billingEnabled: boolean;
+  // public admin: boolean;
 
-  @ViewChild('keyUploadModal') keyUploadModal;
-  @ViewChild('preloaderModal') preloaderModal;
   @ViewChild('createAnalyticalModal') createAnalyticalModal;
   @ViewChild('manageUngitDialog') manageUngitDialog;
   @ViewChild(ResourcesGridComponent) resourcesGrid: ResourcesGridComponent;
-  @ViewChild(NavbarComponent) navbarComponent: NavbarComponent;
 
-  private readonly CHECK_ACCESS_KEY_TIMEOUT: number = 20000;
+  subscriptions: Subscription = new Subscription();
 
   constructor(
     private userAccessKeyService: UserAccessKeyService,
-    private userResourceService: UserResourceService,
     private healthStatusService: HealthStatusService,
-    private appRoutingService: AppRoutingService
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
   ) {
     this.userUploadAccessKeyState = HTTP_STATUS_CODES.NOT_FOUND;
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
     this.getEnvironmentHealthStatus();
-    this.checkInfrastructureCreationProgress();
     this.createAnalyticalModal.resourceGrid = this.resourcesGrid;
+
+    this.subscriptions.add(this.userAccessKeyService.accessKeyEmitter.subscribe(response => {
+      if (response) this.userUploadAccessKeyState = response.status;
+    }));
+  }
+
+  ngOnDestroy() {
+    this.subscriptions.unsubscribe();
   }
 
   public createNotebook_btnClick(): void {
-    this.processAccessKeyStatus(this.userUploadAccessKeyState, true);
+    if (this.userUploadAccessKeyState === HTTP_STATUS_CODES.OK) {
+      if (!this.createAnalyticalModal.isOpened) this.createAnalyticalModal.open({ isFooter: false });
+    } else {
+      this.userAccessKeyService.initialUserAccessKeyCheck();
+    }
   }
 
   public refreshGrid(): void {
@@ -80,75 +91,18 @@
     }
   }
 
-  public checkInfrastructureCreationProgress() {
-    this.userAccessKeyService.checkUserAccessKey()
-      .subscribe(
-      response => this.processAccessKeyStatus(response.status, false),
-      error => this.processAccessKeyStatus(error.status, false)
-      );
-  }
-
   public manageUngit(): void {
     if (!this.manageUngitDialog.isOpened)
         this.manageUngitDialog.open({ isFooter: false });
   }
 
-  public generateUserKey($event) {
-    this.userAccessKeyService.generateAccessKey().subscribe(data => {
-      FileUtils.downloadFile(data);
-      this.checkInfrastructureCreationProgress();
-    });
-  }
-
-  private toggleDialogs(keyUploadDialogToggle, preloaderDialogToggle, createAnalyticalToolDialogToggle) {
-
-    if (keyUploadDialogToggle) {
-      this.keyUploadModal.open({ isFooter: false });
-    } else {
-      this.keyUploadModal.close();
-    }
-
-    if (preloaderDialogToggle) {
-      this.preloaderModal.open({ isHeader: false, isFooter: false });
-    } else {
-      this.preloaderModal.close();
-    }
-
-    if (createAnalyticalToolDialogToggle) {
-      if (!this.createAnalyticalModal.isOpened)
-        this.createAnalyticalModal.open({ isFooter: false });
-    } else {
-      if (this.createAnalyticalModal.isOpened)
-        this.createAnalyticalModal.close();
-    }
-  }
-
-  private processAccessKeyStatus(status: number, forceShowKeyUploadDialog: boolean) {
-    this.userUploadAccessKeyState = status;
-
-    if (status === HTTP_STATUS_CODES.NOT_FOUND) {// key haven't been uploaded
-      this.toggleDialogs(true, false, false);
-    } else if (status === HTTP_STATUS_CODES.ACCEPTED) { // Key uploading
-      this.toggleDialogs(false, true, false);
-      setTimeout(() => this.checkInfrastructureCreationProgress(), this.CHECK_ACCESS_KEY_TIMEOUT);
-    } else if (status === HTTP_STATUS_CODES.OK && forceShowKeyUploadDialog) {
-      this.toggleDialogs(false, false, true);
-    } else if (status === HTTP_STATUS_CODES.OK) { // Key uploaded
-      this.toggleDialogs(false, false, false);
-    }
-  }
-
   private getEnvironmentHealthStatus() {
-    this.healthStatusService.getEnvironmentHealthStatus()
-      .subscribe(
+    this.healthStatusService.getEnvironmentHealthStatus().subscribe(
         (result: any) => {
-          this.healthStatus = result.status;
-          this.billingEnabled = result.billingEnabled;
-          this.admin = result.admin;
+          this.healthStatus = result;
           this.resourcesGrid.healthStatus = this.healthStatus;
-          this.resourcesGrid.billingEnabled = this.billingEnabled;
-
-          this.healthStatus === 'error' && this.checkInfrastructureCreationProgress();
-        });
+          this.userAccessKeyService.initialUserAccessKeyCheck();
+        },
+      error => this.toastr.error(error.message, 'Oops!', { toastLife: 5000 }));
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts
index f27949f..59cfbad 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts
@@ -1,37 +1,37 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 
-import { MaterialModule } from './../shared/material.module';
+import { MaterialModule } from '../shared/material.module';
 import { ResourcesComponent } from './resources.component';
 import { ResourcesGridModule } from './resources-grid';
 import { ExploratoryEnvironmentCreateDialogModule } from './exploratory/exploratory-environment-create-dialog';
 import { ManageUngitComponent } from './manage-ungit/manage-ungit.component';
 import { ConfirmDeleteAccountDialog } from './manage-ungit/manage-ungit.component';
 import {
-  NavbarModule,
   ModalModule,
   ProgressDialogModule,
   UploadKeyDialogModule
-} from './../shared';
+} from '../shared';
 
 @NgModule({
   imports: [
@@ -43,7 +43,6 @@
     ProgressDialogModule,
     UploadKeyDialogModule,
     ExploratoryEnvironmentCreateDialogModule,
-    NavbarModule,
     MaterialModule
   ],
   declarations: [
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/index.ts
index 95fa7ee..f407368 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/index.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
index 88e6199..7b889b1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="scheduler-dialog modal-xl-s">
   <modal-header>
@@ -28,11 +29,29 @@
   <modal-content>
     <div *ngIf="destination" class="content-box">
       <form [formGroup]="schedulerForm">
-        <div class="enable-schedule m-bott-10">
+        <div class="enable-schedule">
           <mat-slide-toggle labelPosition="after" [checked]="enableSchedule" (change)="toggleSchedule($event)">
             <span *ngIf="toggleSchedule" class="hold-label">Enable scheduler</span>
           </mat-slide-toggle>
+          <div class="idle" *ngIf="idleImplemented">
+            <mat-slide-toggle labelPosition="before" [checked]="enableIdleTime" (change)="toggleIdleTimes($event)">
+              <span *ngIf="toggleSchedule" class="hold-label">Inactivity time</span>
+            </mat-slide-toggle>
+          </div>
         </div>
+
+        <div *ngIf="idleImplemented" lass="note m-bott-10">NOTE: In case of turning on inactivity time-check, your schedule configuration will be decommissioned.</div>
+
+        <div class="control-group idle-control" [ngClass]="{ show: enableIdleTime }">
+          <label class="label">Inactivity time</label>
+          <div class="control">
+            <input type="number" class="form-control" min="10" max="10080" formControlName="inactivityTime" class="form-control" placeholder="Enter time in min" />
+            <span class="danger_color" *ngIf="!schedulerForm.controls.inactivityTime.valid">
+              <span>The value should be an integer greater than or equal to {{ inactivityLimits.min }} and cannot exceed 1 week ({{ inactivityLimits.max }}) in min</span>
+            </span>
+          </div>
+        </div>
+
         <div class="row-wrap">
           <div class="col-3">
             <mat-form-field>
@@ -91,7 +110,7 @@
             </mat-button-toggle>
           </div>
         </div>
-        <span class="weekdays-note m-bott-10">NOTE: to enable the scheduler at least one weekday should be specified</span>
+        <span class="note m-bott-10">NOTE: to enable the scheduler at least one weekday should be specified.</span>
         <div class="inherit" *ngIf="destination">
           <mat-slide-toggle labelPosition="after" [checked]="inherit" (change)="toggleInherit($event)" [disabled]="!enableSchedule || (!parentInherit && destination.type === 'СOMPUTATIONAL')">
             <span *ngIf="destination.type === 'EXPLORATORY'; else resourcePropagation" class="hold-label">
@@ -105,8 +124,8 @@
       </form>
       <div class="text-center m-top-30">
         <button mat-raised-button type="button" class="butt action" (click)="close()">Cancel</button>
-        <button mat-raised-button type="button" class="butt butt-success action" (click)="scheduleInstance_btnClick()">Save</button>
+        <button mat-raised-button type="button" class="butt butt-success action" [disabled]="!enableSchedule && !enableIdleTime" (click)="scheduleInstance_btnClick()">Save</button>
       </div>
     </div>
   </modal-content>
-</modal-dialog>
\ No newline at end of file
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss
index c90bb1c..80571c1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .scheduler-dialog {
   .mat-select-value {
@@ -26,6 +27,40 @@
   .mat-select-trigger {
     width: 180px;
   }
+  .enable-schedule {
+    display: flex;
+    margin-bottom: 10px;
+    .idle {
+      display: flex;
+      width: 50%;
+      i {
+        font-size: 20px;
+        padding-left: 10px;
+        align-self: center;
+        user-select: none;
+        cursor: pointer;
+      }
+    }
+  }
+  .info-message, .idle-control {
+    height: 0;
+    opacity: 0;
+    visibility: hidden;
+    text-align: left;
+    transition: all .35s linear .2s;
+    padding-bottom: 0;
+    &.show {
+      height: 30px;
+      visibility: visible;
+      opacity: 1;
+      margin-bottom: 50px;
+    }
+  }
+  .info-message {
+    &.show {
+      margin-bottom: 15px;
+    }
+  }
   .col-3 {
     width: 33%;
     box-sizing: border-box;
@@ -101,11 +136,10 @@
     width: 100%;
     padding-right: 10px;
   }
-  .weekdays-note {
+  .note {
     display: flex;
     font-size: 12px;
     color: #36afd5;
-    margin-bottom: 15px;
   }
   .inherit {
     color: #718ba6;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts
index 6b4176c..c152637 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts
@@ -1,34 +1,33 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Output, EventEmitter, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';
-import { FormGroup, FormControl, FormArray, FormBuilder } from '@angular/forms';
-
-import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
-import { MomentDateAdapter } from '@angular/material-moment-adapter';
+import { Component, OnInit, ViewChild, Output, EventEmitter, ViewEncapsulation, ChangeDetectorRef, ViewContainerRef } from '@angular/core';
+import { FormGroup, FormBuilder } from '@angular/forms';
+import { ToastsManager } from 'ng2-toastr';
 
 import * as _moment from 'moment';
 import 'moment-timezone';
 
-import { HTTP_STATUS_CODES } from './../../core/util';
-
-import { SchedulerService } from './../../core/services';
+import { SchedulerService } from '../../core/services';
 import { SchedulerModel, WeekdaysModel } from './scheduler.model';
+import { HTTP_STATUS_CODES } from '../../core/util';
+import { log } from 'util';
 
 @Component({
   selector: 'dlab-scheduler',
@@ -46,6 +45,7 @@
   public inherit: boolean = false;
   public parentInherit: boolean = false;
   public enableSchedule: boolean = false;
+  public enableIdleTime: boolean = false;
   public date_format: string = 'YYYY-MM-DD';
   public timeFormat: string = 'HH:mm';
   public weekdays: string[] = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
@@ -56,6 +56,11 @@
   public startTime = { hour: 9, minute: 0, meridiem: 'AM' };
   public endTime = { hour: 8, minute: 0, meridiem: 'PM' };
 
+  public inactivityLimits = { min: 10, max: 10080 };
+
+
+  public idleImplemented: boolean = false;
+
   @ViewChild('bindDialog') bindDialog;
   @ViewChild('resourceSelect') resource_select;
   @Output() buildGrid: EventEmitter<{}> = new EventEmitter();
@@ -63,11 +68,18 @@
   constructor(
     private formBuilder: FormBuilder,
     private schedulerService: SchedulerService,
-    private changeDetector : ChangeDetectorRef
-  ) {}
+    private changeDetector: ChangeDetectorRef,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
+  }
 
   ngOnInit() {
-    this.bindDialog.onClosing = () => this.resetDialog();
+    this.bindDialog.onClosing = () => {
+      this.resetDialog();
+      this.buildGrid.emit();
+    };
   }
 
   public open(param, notebook, type, resource?): void {
@@ -79,13 +91,13 @@
 
     if (!this.bindDialog.isOpened)
       this.model = new SchedulerModel(
-        (response: Response) => {
+        response => {
           if (response.status === HTTP_STATUS_CODES.OK) {
+            // this.toastr.success('Schedule data were successfully saved', 'Success!', { toastLife: 5000 });
             this.close();
-            this.buildGrid.emit();
           }
         },
-        error => {},
+        error => this.toastr.error(error.message || 'Scheduler configuration failed!', 'Oops!', { toastLife: 5000 }),
         () => {
           this.formInit();
           this.changeDetector.detectChanges();
@@ -127,48 +139,80 @@
   public toggleSchedule($event) {
     this.enableSchedule = $event.checked;
     this.timeReqiered = false;
-    
+
+    this.enableSchedule && this.enableIdleTime && this.toggleIdleTimes({checked: false});
     (this.enableSchedule && !(this.destination.type === 'СOMPUTATIONAL' && this.inherit))
       ? this.schedulerForm.get('startDate').enable()
       : this.schedulerForm.get('startDate').disable();
 
     this.enableSchedule ? this.schedulerForm.get('finishDate').enable() : this.schedulerForm.get('finishDate').disable();
+
+    if (!this.enableSchedule)
+      this.model
+        .resetSchedule(this.notebook.name, this.destination.type === 'СOMPUTATIONAL' ? this.destination.computational_name : null)
+        .subscribe(res => {
+          this.resetDialog();
+        });
+  }
+
+  public toggleIdleTimes($event) {
+    this.enableIdleTime = $event.checked;
+    this.enableIdleTime && this.enableSchedule && this.toggleSchedule({checked: false});
+
+    if (!this.enableIdleTime) {
+      this.schedulerForm.controls.inactivityTime.setValue(this.inactivityLimits.min);
+    }
+  }
+
+  public setInactivity(...params) {
+    this.model.setInactivityTime(params).subscribe(
+      () => {
+        this.toastr.success('Inactivity settings were successfully saved', 'Success!', { toastLife: 5000 });
+      },
+      error => this.toastr.error(error.message || 'Scheduler configuration failed!', 'Oops!', { toastLife: 5000 }));
   }
 
   public scheduleInstance_btnClick() {
-    let data = {
-      startDate: this.schedulerForm.controls.startDate.value,
-      finishDate: this.schedulerForm.controls.finishDate.value
-    };
 
-    if (!this.startTime && !this.endTime && this.enableSchedule) {
-      this.timeReqiered = true;
-      return false;
+    if (!this.enableIdleTime) {
+      const data = {
+        startDate: this.schedulerForm.controls.startDate.value,
+        finishDate: this.schedulerForm.controls.finishDate.value
+      };
+
+      if (!this.startTime && !this.endTime && this.enableSchedule) {
+        this.timeReqiered = true;
+        return false;
+      }
+      const selectedDays = Object.keys(this.selectedStartWeekDays);
+      const parameters: any = {
+        begin_date: data.startDate ? _moment(data.startDate).format(this.date_format) : null,
+        finish_date: data.finishDate ? _moment(data.finishDate).format(this.date_format) : null,
+        start_time: this.startTime ? this.convertTimeFormat(this.startTime) : null,
+        end_time: this.endTime ? this.convertTimeFormat(this.endTime) : null,
+        start_days_repeat: selectedDays.filter(el => Boolean(this.selectedStartWeekDays[el])).map(day => day.toUpperCase()),
+        stop_days_repeat: selectedDays.filter(el => Boolean(this.selectedStopWeekDays[el])).map(day => day.toUpperCase()),
+        timezone_offset: this.tzOffset,
+        sync_start_required: this.inherit,
+        check_inactivity_required: this.enableIdleTime
+      };
+
+      (this.destination.type === 'СOMPUTATIONAL')
+        ? this.model.confirmAction(this.notebook.name, parameters, this.destination.computational_name)
+        : this.model.confirmAction(this.notebook.name, parameters);
+    } else {
+      const data = { check_inactivity_required: true, max_inactivity: this.schedulerForm.controls.inactivityTime.value };
+
+      (this.destination.type === 'СOMPUTATIONAL')
+        ? this.setInactivity(this.notebook.name, data, this.destination.computational_name)
+        : this.setInactivity(this.notebook.name, data);
     }
-    const selectedDays = Object.keys(this.selectedStartWeekDays);
-    let parameters = {
-      begin_date: data.startDate ? _moment(data.startDate).format(this.date_format) : null,
-      finish_date: data.finishDate ? _moment(data.finishDate).format(this.date_format) : null,
-      start_time: this.startTime ? this.convertTimeFormat(this.startTime) : null,
-      end_time: this.endTime ? this.convertTimeFormat(this.endTime) : null,
-      start_days_repeat: selectedDays.filter(el => Boolean(this.selectedStartWeekDays[el])).map(day => day.toUpperCase()),
-      stop_days_repeat: selectedDays.filter(el => Boolean(this.selectedStopWeekDays[el])).map(day => day.toUpperCase()),
-      timezone_offset: this.tzOffset,
-      sync_start_required: this.inherit
-    };
-
-    if(!this.enableSchedule) {
-      parameters = { begin_date: null, finish_date: null, start_time: null, end_time: null, start_days_repeat: [], stop_days_repeat: [], timezone_offset: null, sync_start_required: false };
-    }
-
-    (this.destination.type === 'СOMPUTATIONAL')
-      ? this.model.confirmAction(this.notebook.name, parameters, this.destination.computational_name)
-      : this.model.confirmAction(this.notebook.name, parameters);
   }
 
   public close(): void {
-    if (this.bindDialog.isOpened) this.bindDialog.close();
-    this.buildGrid.emit();
+    if (this.bindDialog.isOpened) {
+      this.bindDialog.close();
+    }
 
     this.resetDialog();
   }
@@ -176,7 +220,8 @@
   private formInit(start?, end?) {
     this.schedulerForm = this.formBuilder.group({
       startDate: { disabled: this.inherit, value: start ? _moment(start).format() : null },
-      finishDate: { disabled: false, value: end ? _moment(end).format() : null }
+      finishDate: { disabled: false, value: end ? _moment(end).format() : null },
+      inactivityTime: [this.inactivityLimits.min , this.validInactivityRange.bind(this)]
     });
   }
 
@@ -191,12 +236,15 @@
           this.startTime = params.start_time ? this.convertTimeFormat(params.start_time) : null;
           this.endTime = params.end_time ? this.convertTimeFormat(params.end_time) : null;
           this.formInit(params.begin_date, params.finish_date);
+          this.schedulerForm.controls.inactivityTime.setValue(params.max_inactivity);
+
+          this.enableIdleTime = params.check_inactivity_required;
           this.toggleSchedule({checked: true});
         }
       },
       error => {
-        let errorMessage = JSON.parse(error.message);
-        this.toggleSchedule({checked: false});
+        this.toastr.info(error.message || 'Scheduler job data not found!', null, { toastLife: 5000 });
+        this.resetDialog();
       }
     );
   }
@@ -206,6 +254,13 @@
       .subscribe((res: any) => this.parentInherit = res.sync_start_required);
   }
 
+  private validInactivityRange(control) {
+    if (control)
+      return this.enableIdleTime
+          ? (control.value && control.value >= this.inactivityLimits.min && control.value <= this.inactivityLimits.max ? null : { valid: false })
+          : control.value;
+  }
+
   private convertTimeFormat(time24: any) {
     let result;
     if (typeof time24 === 'string') {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.model.ts
index aebc8f1..2f69bd0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.model.ts
@@ -1,92 +1,101 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2018, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Observable } from 'rxjs/Observable';
-import { Response } from '@angular/http';
-
-import { SortUtil } from './../../core/util';
-import { SchedulerService } from './../../core/services';
+import { SchedulerService } from '../../core/services';
 
 export interface SchedulerParameters {
-    begin_date : string;
-    finish_date : string;
-    start_time: string;
-    end_time: string;
-    days_repeat: Array<string>;
-    timezone_offset: string;
-    sync_start_required: boolean;
+  begin_date: string;
+  finish_date: string;
+  start_time: string;
+  end_time: string;
+  days_repeat: Array<string>;
+  timezone_offset: string;
+  sync_start_required: boolean;
 }
 
 export class SchedulerModel {
-    public confirmAction: Function;
+  public confirmAction: Function;
+  private continueWith: Function;
+  private schedulerService: SchedulerService;
 
-    private createParameters: SchedulerParameters;
+  fnProcessResults: any;
+  fnProcessErrors: any;
 
-    private continueWith: Function;
-    private schedulerService: SchedulerService;
+  static getDefault(schedulerService): SchedulerModel {
+    return new SchedulerModel(() => {}, () => {}, null, schedulerService);
+  }
 
-    static getDefault(schedulerService): SchedulerModel {
-        return new SchedulerModel(() => { }, () => { }, null, schedulerService);
-    }
+  constructor(
+    fnProcessResults: any,
+    fnProcessErrors: any,
+    continueWith: Function,
+    schedulerService: SchedulerService
+  ) {
+    this.fnProcessResults = fnProcessResults;
+    this.fnProcessErrors = fnProcessErrors;
+    this.continueWith = continueWith;
+    this.schedulerService = schedulerService;
+    this.prepareModel(fnProcessResults, fnProcessErrors);
 
-    constructor(
-        fnProcessResults: any,
-        fnProcessErrors: any,
-        continueWith: Function,
-        schedulerService: SchedulerService
-    ) {
-        this.continueWith = continueWith;
-        this.schedulerService = schedulerService;
-        this.prepareModel(fnProcessResults, fnProcessErrors);
+    if (this.continueWith) this.continueWith();
+  }
 
-        if (this.continueWith) this.continueWith();
-    }
+  private scheduleInstance(notebook, params, resourse) {
+    return this.schedulerService.setExploratorySchedule(notebook, params, resourse);
+  }
 
-    private scheduleInstance(notebook, params, resourse): Observable<Response> {
-        return this.schedulerService.setExploratorySchedule(notebook, params, resourse);
-    }
+  public setInactivityTime(params) {
+    let [notebook, data, resource] = params;
+    return this.scheduleInstance(notebook, data, resource);
+  }
 
-    private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
-        this.confirmAction = (notebook, data, resourse?) => this.scheduleInstance(notebook, data, resourse)
-            .subscribe(
-                (response: Response) => fnProcessResults(response),
-                (response: Response) => fnProcessErrors(response));
-    }
+  public resetSchedule(notebook, resourse) {
+    return this.schedulerService.resetScheduleSettings(notebook, resourse);
+  }
+
+  private prepareModel(fnProcessResults: any, fnProcessErrors: any): void {
+    this.confirmAction = (notebook, data, resourse?) =>
+      this.scheduleInstance(notebook, data, resourse).subscribe(
+        response => fnProcessResults(response),
+        error => fnProcessErrors(error)
+      );
+  }
 }
 
 export class WeekdaysModel {
-    constructor(
-      public sunday: boolean,
-      public monday: boolean,
-      public tuesday: boolean,
-      public wednesday: boolean,
-      public thursday: boolean,
-      public friday: boolean,
-      public saturday: boolean
-    ) { }
-  
-    setDegault(): void {
-      this.sunday = false;
-      this.monday = false;
-      this.tuesday = false;
-      this.wednesday = false;
-      this.thursday = false;
-      this.friday = false;
-      this.saturday = false;
-    }
-  }
\ No newline at end of file
+  constructor(
+    public sunday: boolean,
+    public monday: boolean,
+    public tuesday: boolean,
+    public wednesday: boolean,
+    public thursday: boolean,
+    public friday: boolean,
+    public saturday: boolean
+  ) {}
+
+  setDegault(): void {
+    this.sunday = false;
+    this.monday = false;
+    this.tuesday = false;
+    this.wednesday = false;
+    this.thursday = false;
+    this.friday = false;
+    this.saturday = false;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.css b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.css
index 27e0851..90c88aa 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.css
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.css
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .bubble-up {
   width: 100%;  
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.ts
index 7be3dc7..9bc17f5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, Input, Output, EventEmitter, HostBinding,
          ChangeDetectorRef, ElementRef, OnInit, OnDestroy,
@@ -22,7 +23,6 @@
 import { BubblesCollector, BubbleService } from './bubble.service';
 
 @Component({
-  moduleId: module.id,
   selector: 'bubble-up',
   template: '<ng-content></ng-content>',
   styleUrls: ['./bubble.component.css'],
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts
index a819585..4b88a59 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Injectable, Inject, } from '@angular/core';
 import { DOCUMENT } from '@angular/platform-browser';
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/index.ts
index 4886f74..db12024 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/index.ts
@@ -1,26 +1,27 @@
-/***************************************************************************
-
-Copyright (c) 2017, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { BubbleComponent} from './bubble.component';
 import { BubblesCollector, BubbleService } from './bubble.service';
-import { MaterialModule } from '../../shared/material.module';
+import { MaterialModule } from '../material.module';
 
 @NgModule({
     imports: [CommonModule, MaterialModule],
@@ -28,4 +29,4 @@
     providers: [BubblesCollector, BubbleService],
     exports: [BubbleComponent]
 })
-export class BubbleModule { }
\ No newline at end of file
+export class BubbleModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.html
index 1be0233..e3dae92 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="dropdown-list">
   <button class="dropdown-toggle" type="button" #list (click)="actions.toggle($event, list)">
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.ts
index cb21016..7622adf 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdown-list/dropdown-list.component.ts
@@ -1,22 +1,23 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Output, Component, EventEmitter, ViewEncapsulation } from '@angular/core';
+import { Output, Component, EventEmitter } from '@angular/core';
 
 export class DropdownListModel {
   constructor(
@@ -27,11 +28,9 @@
 }
 
 @Component({
-  moduleId: module.id,
   selector: 'dropdown-list',
   templateUrl: 'dropdown-list.component.html',
-  styleUrls: ['../dropdowns.component.css'],
-  encapsulation: ViewEncapsulation.None
+  styleUrls: ['../dropdowns.component.scss']
 })
 
 export class DropdownListComponent {
@@ -42,7 +41,7 @@
   listStructure: string;
   items: any;
   map: any;
-  empty: boolean = false;s
+  empty: boolean = false;
 
   @Output() selectedItem: EventEmitter<{}> = new EventEmitter();
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdowns.component.css b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdowns.component.css
deleted file mode 100644
index 24b38ef..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdowns.component.css
+++ /dev/null
@@ -1,226 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-.dropdown-list,
-.dropdown-multiselect {
-  width: 100%;
-  position: relative;
-}
-
-.dropdown-list button,
-.dropdown-multiselect button {
-  min-width: 100%;
-  background: #fff;
-  /* padding: 8px 20px; */
-  padding-left: 20px;
-  font-size: 16px;
-  text-align: left;
-  white-space: nowrap;
-  cursor: pointer;
-  border-radius: 0;
-  border: none;
-  outline: none;
-  box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
-}
-
-.dropdown-list button {
-  line-height: 38px;
-}
-
-.dropdown-list button:active,
-.dropdown-list button:focus,
-.dropdown-multiselect button:active,
-.dropdown-multiselect button:focus {
-  box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
-}
-
-.dropdown-list button span {
-  color: #4a5c89;
-}
-
-.dropdown-multiselect button span {
-  color: #999;
-  font-weight: 300;
-  display: inline-block;
-  max-width: 80%;
-}
-
-.dropdown-multiselect button .selected-items {
-  color: #4eaf3e;
-}
-
-.selected-items strong {
-  font-weight: 300;
-}
-
-.dropdown-list .caret-btn,
-.dropdown-multiselect .caret-btn {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 40px;
-  height: 100%;
-  text-align: center;
-  padding: 7px;
-  -webkit-appearance: none;
-  -moz-appearance: none;
-  border-left: 1px solid #ececec;
-  background: #fff;
-  color: #36afd5;
-}
-
-.dropdown-list .list-menu,
-.dropdown-multiselect .list-menu {
-  width: 100%;
-  max-height: 260px;
-  left: 0;
-  padding: 0;
-  margin: 0;
-  overflow-y: auto;
-  overflow-x: hidden;
-}
-
-.dropdown-list .list-menu li,
-.dropdown-multiselect .list-menu li {
-  padding: 0;
-  margin: 0;
-}
-
-.dropdown-multiselect.statuses .list-menu .list-item,
-.dropdown-multiselect.resources .list-menu .list-item {
-  text-transform: capitalize;
-}
-
-.dropdown-list .list-menu a,
-.dropdown-multiselect .list-menu li a {
-  display: block;
-  padding: 10px;
-  padding-left: 15px;
-  position: relative;
-  font-weight: 300;
-  cursor: pointer;
-  color: #4a5c89;
-  text-decoration: none;
-}
-
-.dropdown-multiselect .list-menu li a {
-  padding-left: 45px;
-  transition: all .45s ease-in-out;
-}
-
-.dropdown-list .list-menu a:hover,
-.dropdown-multiselect .list-menu a:hover {
-  background: #f7f7f7;
-  color: #35afd5;
-}
-
-.dropdown-multiselect .list-menu .filter-actions {
-  display: flex;
-  cursor: pointer;
-  border-bottom: 1px solid #ececec;
-}
-
-.dropdown-multiselect .list-menu .filter-actions a {
-  width: 50%;
-  /* padding: 10px; */
-  color: #35afd5;
-  display: block;
-  padding: 0;
-  line-height: 40px;
-  text-align: center;
-}
-
-
-.dropdown-list .list-menu span,
-.dropdown-list .title span {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  font-weight: 300;
-}
-
-.dropdown-list .title em,
-.dropdown-list .list-menu li em {
-  font-size: 13px;
-  color: #35afd5;
-  margin-right: 0px;
-  font-style: normal;
-}
-.dropdown-list .title em {
-  margin-right: 50px;
-}
-.dropdown-list .list-menu li span.caption {
-  display: block;
-  padding: 10px 15px;
-  cursor: default;
-}
-.dropdown-list .list-menu li i,
-.dropdown-list .list-menu li strong {
-  display: inline-block;
-  width: 30px;
-  text-align: center;
-  vertical-align: middle;
-  color: #35afd5;
-  line-height: 26px;
-}
-.dropdown-list .list-menu li i {
-  vertical-align: sub;
-  font-size: 18px;
-}
-
-.dropdown-list .list-menu a {
-  padding: 12px;
-  padding-left: 15px;
-  position: relative;
-  font-weight: 300;
-  cursor: pointer;
-}
-.dropdown-list .list-menu a.empty {
-  height: 36px;
-}
-
-.dropdown-multiselect .list-menu .filter-actions i {
-    vertical-align: sub;
-    color: #35afd5;
-    font-size: 18px;
-    line-height: 26px;
-    transition: all .45s ease-in-out;
-}
-
-.dropdown-multiselect .list-menu .select_all:hover,
-.dropdown-multiselect .list-menu .select_all:hover i {
-  color: #4eaf3e;
-  background: #f9fafb;
-}
-
-.dropdown-multiselect .list-menu .deselect_all:hover,
-.dropdown-multiselect .list-menu .deselect_all:hover i {
-  color: #f1696e;
-  background: #f9fafb;
-}
-
-.dropdown-multiselect .list-menu a span {
-  position: absolute;
-  top: 8px;
-  left: 12px;
-  color: #35afd5;
-}
-
-.dropdown-multiselect.btn-group.open .dropdown-toggle {
-  box-shadow: none;
-}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdowns.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdowns.component.scss
new file mode 100644
index 0000000..0f296be
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/dropdowns.component.scss
@@ -0,0 +1,236 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.dropdown-list,
+.dropdown-multiselect {
+  width: 100%;
+  position: relative;
+}
+
+.dropdown-list button,
+.dropdown-multiselect button {
+  min-width: 100%;
+  background: #fff;
+  padding-left: 20px;
+  font-size: 14px;
+  // height: 34px;
+  text-align: left;
+  white-space: nowrap;
+  cursor: pointer;
+  border-radius: 0;
+  border: none;
+  outline: none;
+  box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
+}
+
+.dropdown-list {
+  button {
+    line-height: 38px;
+    span {
+      color: #4a5c89;
+      em {
+        font-size: 13px;
+        color: #35afd5;
+        margin-right: 0px;
+        font-style: normal;
+      }
+    }
+  }
+}
+
+.dropdown-list button:active,
+.dropdown-list button:focus,
+.dropdown-multiselect button:active,
+.dropdown-multiselect button:focus {
+  box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
+}
+
+.dropdown-multiselect {
+  button {
+    span {
+      color: #999;
+      font-weight: 300;
+      display: inline-block;
+      max-width: 80%;
+    }
+    .selected-items {
+      color: #4eaf3e;
+    }
+  }
+}
+
+.selected-items strong {
+  font-weight: 300;
+}
+
+.dropdown-list, .dropdown-multiselect {
+  .caret-btn {
+    position: absolute;
+    top: 0;
+    right: 0;
+    width: 40px;
+    height: 100%;
+    text-align: center;
+    padding: 7px;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    border-left: 1px solid #ececec;
+    background: #fff;
+    color: #36afd5 !important;
+  }
+  .list-menu {
+    width: 100%;
+    max-height: 260px;
+    left: 0;
+    padding: 0;
+    margin: 0;
+    overflow-y: auto;
+    overflow-x: hidden;
+    li {
+      padding: 0;
+      margin: 0;
+    }
+    .list-item {
+      text-transform: capitalize;
+    }
+  }
+  &.user {
+    .list-menu {
+      .list-item {
+        text-transform: initial;
+      }
+    }
+  }
+}
+
+.dropdown-list .list-menu a,
+.dropdown-multiselect .list-menu li a {
+  display: block;
+  padding: 10px;
+  padding-left: 15px;
+  position: relative;
+  font-weight: 300;
+  cursor: pointer;
+  color: #4a5c89;
+  text-decoration: none;
+}
+
+.dropdown-multiselect .list-menu li a {
+  padding-left: 45px;
+  transition: all .45s ease-in-out;
+}
+
+.dropdown-list .list-menu a:hover,
+.dropdown-multiselect .list-menu a:hover {
+  background: #f7f7f7;
+  color: #35afd5;
+}
+
+.dropdown-multiselect .list-menu .filter-actions {
+  display: flex;
+  cursor: pointer;
+  border-bottom: 1px solid #ececec;
+}
+
+.dropdown-multiselect .list-menu .filter-actions a {
+  width: 50%;
+  color: #35afd5;
+  display: block;
+  padding: 0;
+  line-height: 40px;
+  text-align: center;
+}
+
+.dropdown-list {
+  .list-menu, .title {
+    span {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      font-weight: 300;
+    }
+  }
+}
+
+.dropdown-list .list-menu li span.caption {
+  display: block;
+  padding: 10px 15px;
+  cursor: default;
+}
+.dropdown-list .list-menu li i,
+.dropdown-list .list-menu li strong {
+  display: inline-block;
+  width: 30px;
+  text-align: center;
+  vertical-align: middle;
+  color: #35afd5;
+  line-height: 26px;
+}
+.dropdown-list .list-menu li i {
+  vertical-align: sub;
+  font-size: 18px;
+}
+
+.dropdown-list .list-menu a {
+  padding: 12px;
+  padding-left: 15px;
+  position: relative;
+  font-weight: 300;
+  cursor: pointer;
+  em {
+    font-size: 13px;
+    color: #35afd5;
+    margin-right: 0px;
+    font-style: normal;
+  }
+}
+.dropdown-list .list-menu a.empty {
+  height: 36px;
+}
+
+.dropdown-multiselect .list-menu .filter-actions i {
+    vertical-align: sub;
+    color: #35afd5;
+    font-size: 18px;
+    line-height: 26px;
+    transition: all .45s ease-in-out;
+}
+
+.dropdown-multiselect .list-menu .select_all:hover,
+.dropdown-multiselect .list-menu .select_all:hover i {
+  color: #4eaf3e !important;
+  background: #f9fafb;
+}
+
+.dropdown-multiselect .list-menu .deselect_all:hover,
+.dropdown-multiselect .list-menu .deselect_all:hover i {
+  color: #f1696e !important;
+  background: #f9fafb;
+}
+
+.dropdown-multiselect .list-menu a span {
+  position: absolute;
+  top: 8px;
+  left: 12px;
+  color: #35afd5;
+}
+
+.dropdown-multiselect.btn-group.open .dropdown-toggle {
+  box-shadow: none;
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/index.ts
index 7e15a28..bac0dd6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/index.ts
@@ -1,29 +1,30 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 
 import { DropdownListComponent } from './dropdown-list/dropdown-list.component';
 import { MultiSelectDropdownComponent } from './multi-select-dropdown/multi-select-dropdown.component';
-import { ClickOutsideModule } from '../../core/directives/click-outside/index';
+import { DirectivesModule } from '../../core/directives';
 import { KeysPipeModule, UnderscorelessPipeModule } from '../../core/pipes';
-import { BubbleModule } from '../';
+import { BubbleModule } from '..';
 
 export * from './multi-select-dropdown/multi-select-dropdown.component';
 export * from './dropdown-list/dropdown-list.component';
@@ -31,7 +32,7 @@
 @NgModule({
   imports: [
     CommonModule,
-    ClickOutsideModule,
+    DirectivesModule,
     KeysPipeModule,
     UnderscorelessPipeModule,
     BubbleModule
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.html
index 6a38f6c..4ce2029 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div class="dropdown-multiselect btn-group" ngClass="{{type || ''}}">
   <button type="button" #list (click)="multiactions.toggle($event, list)">
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.ts
index 137902f..5fcb6d1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/form-controls/multi-select-dropdown/multi-select-dropdown.component.ts
@@ -1,29 +1,28 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Input, Output, Component, EventEmitter, ViewEncapsulation } from '@angular/core';
+import { Input, Output, Component, EventEmitter } from '@angular/core';
 
 @Component({
-  moduleId: module.id,
   selector: 'multi-select-dropdown',
   templateUrl: 'multi-select-dropdown.component.html',
-  styleUrls: ['../dropdowns.component.css'],
-  encapsulation: ViewEncapsulation.None
+  styleUrls: ['../dropdowns.component.scss']
 })
 
 export class MultiSelectDropdownComponent {
@@ -38,7 +37,7 @@
     const index = model.indexOf(value);
     (index >= 0) ? model.splice(index, 1) : model.push(value);
 
-    this.onUpdate();
+    this.onUpdate($event);
     $event.preventDefault();
   }
 
@@ -46,17 +45,17 @@
     this.model = [];
     this.items.forEach((item) => { this.model.push(item); });
 
-    this.onUpdate();
+    this.onUpdate($event);
     $event.preventDefault();
   }
 
   deselectAllOptions($event) {
     this.model = [];
-    this.onUpdate();
+    this.onUpdate($event);
     $event.preventDefault();
   }
 
-  onUpdate(): void {
-    this.selectionChange.emit({ model: this.model, type: this.type });
+  onUpdate($event): void {
+    this.selectionChange.emit({ model: this.model, type: this.type, $event });
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/index.ts
index b567f4d..9bcd6cd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/index.ts
@@ -1,22 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-export * from './navbar/index';
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export * from './modal-dialog';
 export * from './modal-dialog/confirmation-dialog';
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/material.module.ts b/services/self-service/src/main/resources/webapp/src/app/shared/material.module.ts
index cf64b62..9805a19 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/material.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/material.module.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CdkTableModule } from '@angular/cdk/table';
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog-type.enum.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog-type.enum.ts
index d6db865..701f03f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog-type.enum.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog-type.enum.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export enum ConfirmationDialogType {
   StopExploratory = 0,
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html
index 9cb7d16..641f735 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="confirmation-dialog modal-md">
   <modal-header>
@@ -29,35 +30,30 @@
   </modal-header>
   <modal-content>
     <div class="content-box">
-      <p class="info">{{ model.title }}</p>
+      <p class="info text-center">{{ model.title }}</p>
 
-      <mat-list class="resources" [hidden]="model.notebook.type === 'Edge Node' || model.notebook.name === 'edge node'">
+      <mat-list class="resources" [hidden]="model.notebook.type === 'Edge Node' || model.notebook.name === 'edge node'
+                                  || !model.notebook.resources || model.notebook.resources.length === 0 || (!isAliveResources && !confirmationType) || onlyKilled">
         <mat-list-item class="list-header">
           <div class="cluster">Cluster</div>
           <div class="status">Further status</div>
           <div class="size">Size</div>
         </mat-list-item>
         <div class="scrolling-content" id="scrolling">
-          <mat-list-item *ngFor="let resource of model.notebook.resources" [hidden]="resource.status === 'failed' || resource.status === 'terminated' || resource.status === 'terminating' || (resource.status === 'stopped' && !confirmationType)">
+          <mat-list-item *ngFor="let resource of model.notebook.resources"
+                        [hidden]="resource.status === 'failed' || resource.status === 'terminated' || resource.status === 'terminating' || (resource.status === 'stopped' && !confirmationType)">
             <div class="cluster ellipsis">{{ resource.computational_name  }}</div>
             <div class="status" [ngClass]="{ 'stopped': !confirmationType && resource.image === 'docker.dlab-dataengine',
                   'terminated': resource.image === 'docker.dlab-dataengine-service' || confirmationType }">{{ (!confirmationType && resource.image === 'docker.dlab-dataengine') ? 'Stopped' : 'Terminated' }}</div>
             <div class="size">{{ resource[DICTIONARY[resource.image].master_node_shape] }}</div>
           </mat-list-item>
         </div>
-        <div *ngIf="!model.notebook.resources || model.notebook.resources.length === 0 || !isAliveResources"
-              [hidden]="model.notebook.type" class="empty-list">
-            <span>You have no active resources</span>
-        </div>
       </mat-list>
 
       <div class="text-center m-top-20">
         <p *ngIf="model.notebook.name">Do you want to proceed?</p>
         <p *ngIf="model.notebook.type">Are you sure you want to continue?</p>
       </div>
-      <div class="text-right" *ngIf="processError">
-        <small class="danger_color">{{ errorMessage }}</small>
-      </div>
       <div class="text-center m-top-20">
         <button mat-raised-button type="button" class="butt action" (click)="bindDialog.close()">No</button>
         <button mat-raised-button type="button" class="butt butt-success action" (click)="model.confirmAction()">Yes</button>
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss
index 3eca190..ab3a434 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 .confirmation-dialog {
   color: #718ba6;
@@ -34,8 +35,12 @@
     .status {
       width: 30%;
     }
+    .size {
+      width: 25%;
+    }
     .scrolling-content {
       max-height: 200px;
+      overflow-y: auto;
     }
   }
   .empty-list {
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts
index 117d826..7a7d7db 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.ts
@@ -1,32 +1,32 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, ViewChild, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
-import { Response } from '@angular/http';
+import { Component, OnInit, ViewChild, Input, Output, EventEmitter, ViewEncapsulation, ViewContainerRef } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
 
 import { ConfirmationDialogModel } from './confirmation-dialog.model';
 import { ConfirmationDialogType } from './confirmation-dialog-type.enum';
 import { UserResourceService, HealthStatusService, ManageEnvironmentsService } from '../../../core/services';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from '../../../core/util';
+import { HTTP_STATUS_CODES } from '../../../core/util';
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
 
 @Component({
-  moduleId: module.id,
   selector: 'confirmation-dialog',
   templateUrl: 'confirmation-dialog.component.html',
   styleUrls: ['./confirmation-dialog.component.scss', '../modal.component.scss'],
@@ -37,12 +37,9 @@
   readonly DICTIONARY = DICTIONARY;
   model: ConfirmationDialogModel;
   isAliveResources: boolean;
-  processError: boolean = false;
-  errorMessage: string = '';
-
+  onlyKilled: boolean = false;
   dataengines: Array<any> = [];
   dataengineServices: Array<any> = [];
-
   confirmationType: number = 0;
 
   @ViewChild('bindDialog') bindDialog;
@@ -53,9 +50,12 @@
   constructor(
     private userResourceService: UserResourceService,
     private healthStatusService: HealthStatusService,
-    private manageEnvironmentsService: ManageEnvironmentsService
+    private manageEnvironmentsService: ManageEnvironmentsService,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
   ) {
     this.model = ConfirmationDialogModel.getDefault();
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
@@ -65,16 +65,14 @@
   public open(param, notebook: any, type: ConfirmationDialogType) {
     this.confirmationType = type;
 
-    this.model = new ConfirmationDialogModel(type, notebook, (response: Response) => {
-      if (response.status === HTTP_STATUS_CODES.OK) {
-        this.close();
-        this.buildGrid.emit();
-      }
-    },
-      (response: Response) => {
-        this.processError = true;
-        this.errorMessage = ErrorMapUtils.setErrorMessage(response);
+    this.model = new ConfirmationDialogModel(type, notebook,
+      response => {
+        if (response.status === HTTP_STATUS_CODES.OK) {
+          this.close();
+          this.buildGrid.emit();
+        }
       },
+      error => this.toastr.error(error.message || 'Action failed!', 'Oops!', { toastLife: 5000 }),
       this.manageAction,
       this.userResourceService,
       this.healthStatusService,
@@ -83,6 +81,7 @@
     this.bindDialog.open(param);
     if (!this.confirmationType) this.filterResourcesByType(notebook.resources);
     this.isAliveResources = this.model.isAliveResources(notebook.resources);
+    this.onlyKilled = !notebook.resources.some(el => el.status !== 'terminated')
   }
 
   public close() {
@@ -96,9 +95,7 @@
   }
 
   private resetDialog(): void {
-    this.processError = false;
     this.dataengines = [];
     this.dataengineServices = [];
-    this.errorMessage = '';
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
index 052ff54..2261172 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
@@ -1,30 +1,30 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 /* tslint:disable:no-empty */
 
-import { Response } from '@angular/http';
 import { Observable } from 'rxjs/Observable';
 
 import { ConfirmationDialogType } from './confirmation-dialog-type.enum';
 import { UserResourceService, HealthStatusService, ManageEnvironmentsService } from '../../../core/services';
 
 export class ConfirmationDialogModel {
-  private title: string;
+  public title: string;
   private notebook: any;
   private confirmAction: Function;
   private manageAction: Function;
@@ -33,8 +33,7 @@
   private manageEnvironmentsService: ManageEnvironmentsService;
 
   static getDefault(): ConfirmationDialogModel {
-    return new
-      ConfirmationDialogModel(
+    return new ConfirmationDialogModel(
       ConfirmationDialogType.StopExploratory, { name: '', resources: [] }, () => { }, () => { }, false, null, null, null);
   }
 
@@ -70,19 +69,19 @@
   }
 
 
-  private stopExploratory(): Observable<{} | Response> {
+  private stopExploratory(): Observable<{}> {
     return this.manageAction 
       ? this.manageEnvironmentsService.environmentManagement(this.notebook.user, 'stop', this.notebook.name)
       : this.userResourceService.suspendExploratoryEnvironment(this.notebook, 'stop');
   }
 
-  private terminateExploratory(): Observable<{} | Response> {
+  private terminateExploratory(): Observable<{}> {
     return this.manageAction 
       ? this.manageEnvironmentsService.environmentManagement(this.notebook.user, 'terminate', this.notebook.name)
       : this.userResourceService.suspendExploratoryEnvironment(this.notebook, 'terminate');
   }
 
-  private stopEdgeNode(): Observable<{} | Response> {
+  private stopEdgeNode(): Observable<{}> {
     return this.manageAction 
       ? this.manageEnvironmentsService.environmentManagement(this.notebook.user, 'stop', 'edge')
       : this.healthStatusService.suspendEdgeNode();
@@ -102,32 +101,36 @@
         this.title = this.isAliveResources(notebook.resources) ? containRunningResourcesStopMessage : defaultStopMessage;
         this.notebook = notebook;
         this.confirmAction = () => this.stopExploratory()
-          .subscribe((response: Response) => fnProcessResults(response),
-          (response: Response) => fnProcessErrors(response));
+          .subscribe(
+            response => fnProcessResults(response),
+            error => fnProcessErrors(error));
       }
         break;
       case ConfirmationDialogType.TerminateExploratory: {
         this.title = this.isAliveResources(notebook.resources) ? containRunningResourcesTerminateMessage : defaultTerminateMessage;
         this.notebook = notebook;
         this.confirmAction = () => this.terminateExploratory()
-          .subscribe((response: Response) => fnProcessResults(response),
-          (response: Response) => fnProcessErrors(response));
+          .subscribe(
+            response => fnProcessResults(response),
+            error => fnProcessErrors(error));
       }
         break;
       case ConfirmationDialogType.StopEdgeNode: {
         this.title = edgeNodeStopMessage;
         this.notebook = notebook;
         this.confirmAction = () => this.stopEdgeNode()
-          .subscribe((response: Response) => fnProcessResults(response),
-          (response: Response) => fnProcessErrors(response));
+          .subscribe(
+            response => fnProcessResults(response),
+            error => fnProcessErrors(error));
       }
         break;
       default: {
         this.title = this.isAliveResources(notebook.resources) ? containRunningResourcesTerminateMessage : defaultTerminateMessage;
         this.notebook = notebook;
         this.confirmAction = () => this.stopExploratory()
-          .subscribe((response: Response) => fnProcessResults(response),
-          (response: Response) => fnProcessErrors(response));
+          .subscribe(
+            response => fnProcessResults(response),
+            error => fnProcessErrors(error));
       }
         break;
     }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/index.ts
index 2856265..2790f28 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/index.ts
@@ -1,25 +1,26 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 
-import { ModalModule } from '../index';
+import { ModalModule } from '..';
 import { ConfirmationDialogComponent } from './confirmation-dialog.component';
 import { MaterialModule } from '../../material.module';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/index.ts
index 3026263..cb3835b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/index.ts
@@ -1,25 +1,26 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { CommonModule } from '@angular/common';
 import { NgModule, Component } from '@angular/core';
 
-import { MaterialModule } from './../material.module';
+import { MaterialModule } from '../material.module';
 import { ModalComponent } from './modal.component';
 
 export * from './modal.component';
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/index.ts
index 985d5f9..58093d8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/index.ts
@@ -1,25 +1,26 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 
-import { ModalModule } from '../index';
+import { ModalModule } from '..';
 import { UploadKeyDialogComponent } from './key-upload-dialog.component';
 import { MaterialModule } from '../../material.module';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.html
index 0c25fde..10eb2d6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="modal-sm">
   <modal-header>
@@ -47,12 +48,9 @@
             <button mat-raised-button type="button" class="butt butt-generate" (click)="generateUserAccessKey_btnClick($event)">
               <i class="material-icons">move_to_inbox</i> Generate
             </button>
-            <div *ngIf="model.accessKeyLabel.length" class="m-bott-10 m-top-10" [class.danger_color]="!model.accessKeyFormValid">{{model.accessKeyLabel}}</div>
+            <div *ngIf="model.accessKeyLabel.length" class="m-bott-10 m-top-10 ellipsis" [class.danger_color]="!model.accessKeyFormValid">{{model.accessKeyLabel}}</div>
           </div>
         </div>
-        <div class="text-center" *ngIf="processError">
-          <small class="danger_color">{{errorMessage}}</small>
-        </div>
         <div class="text-center m-top-30">
           <button mat-raised-button type="button" class="butt action" (click)="close()">Cancel</button>
           <button mat-raised-button type="submit" class="butt butt-success action" [disabled]="!model.accessKeyFormValid">
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.ts
index 38dce81..f0058b5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload-dialog.component.ts
@@ -1,38 +1,36 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, OnInit, EventEmitter, Input, Output, ViewChild } from '@angular/core';
-import { Response } from '@angular/http';
+import { Component, OnInit, EventEmitter, Input, Output, ViewChild, ViewContainerRef } from '@angular/core';
+import { ToastsManager } from 'ng2-toastr';
 
 import { KeyUploadDialogModel } from './key-upload.model';
 import { UserAccessKeyService } from '../../../core/services';
-import { ErrorMapUtils, HTTP_STATUS_CODES } from '../../../core/util';
+import { HTTP_STATUS_CODES } from '../../../core/util';
 
 @Component({
-  moduleId: module.id,
   selector: 'key-upload-dialog',
   templateUrl: 'key-upload-dialog.component.html'
 })
 
 export class UploadKeyDialogComponent implements OnInit {
   model: KeyUploadDialogModel;
-  processError: boolean = false;
-  errorMessage: string = '';
   @Input() primaryUploading: boolean = true;
   
   @ViewChild('bindDialog') bindDialog;
@@ -40,8 +38,13 @@
   @Output() checkInfrastructureCreationProgress: EventEmitter<{}> = new EventEmitter();
   @Output() generateUserKey: EventEmitter<{}> = new EventEmitter();
 
-  constructor(private userAccessKeyService: UserAccessKeyService) {
+  constructor(
+    private userAccessKeyService: UserAccessKeyService,
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef
+  ) {
     this.model = KeyUploadDialogModel.getDefault();
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
   ngOnInit() {
@@ -67,18 +70,17 @@
 
   public open(params) {
     if (!this.bindDialog.isOpened) {
-      this.model = new KeyUploadDialogModel(null, (response: Response) => {
-        if (response.status === HTTP_STATUS_CODES.OK) {
-          this.close();
-          this.checkInfrastructureCreationProgress.emit();
-        }
-      },
-        (response: Response) => {
-          this.processError = true;
-          this.errorMessage = `${response.text()}`;
+      this.model = new KeyUploadDialogModel(null,
+        response => {
+          if (response.status === HTTP_STATUS_CODES.OK) {
+            this.close();
+            this.checkInfrastructureCreationProgress.emit();
+          }
+        },
+        error => {
+          this.toastr.error(error.message, 'Oops!', { toastLife: 5000 });
         },
         this.userAccessKeyService);
-
       this.bindDialog.open(params);
     }
   }
@@ -90,8 +92,5 @@
 
   private resetDialog(): void {
     this.userAccessKeyUploadControl.nativeElement.value = '';
-
-    this.processError = false;
-    this.errorMessage = '';
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload.model.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload.model.ts
index 08b6ef3..e156cec 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/key-upload-dialog/key-upload.model.ts
@@ -1,24 +1,24 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 /* tslint:disable:no-empty */
 
 import { Observable } from 'rxjs/Observable';
-import { Response } from '@angular/http';
 import { UserAccessKeyService } from '../../../core/services';
 
 export class KeyUploadDialogModel {
@@ -51,7 +51,7 @@
     this.accessKeyLabel = this.getLabel(accessKey);
   }
 
-  private uploadUserAccessKey(primary?: boolean): Observable<Response | {}> {
+  private uploadUserAccessKey(primary?: boolean): Observable<{}> {
     const formData = new FormData();
     formData.append('file', this.newAccessKeyForUpload);
 
@@ -62,8 +62,8 @@
     this.setUserAccessKey(newAccessKeyForUpload);
     this.confirmAction = (primary?: boolean) => this.uploadUserAccessKey(primary)
       .subscribe(
-      (response: Response) => fnProcessResults(response),
-      (response: Response) => fnProcessErrors(response));
+      response => fnProcessResults(response),
+      error => fnProcessErrors(error));
   }
 
   private getLabel(file: File): string {
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.html
index 792bfba..fdd1a03 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <div #modalRoot id="modalRoot" class="dialog" role="dialog"
      (keydown.esc)="closeOnEscape ? close() : 0"
@@ -23,9 +24,9 @@
     <div [class]="'dialog-container ' + modalClass">
         <div class="dialog-content" tabindex="0" *ngIf="isOpened">
             <div [ngClass]="{ 'dialog-header': isHeader,  'hidden': !isHeader }">
-                <button *ngIf="!hideCloseButton" type="button" class="close" data-dismiss="modal" [attr.aria-label]="cancelButtonLabel || 'Close'" (click)="close()">&times;</button>
                 <h4 class="modal-title" *ngIf="title">{{ title }}</h4>
                 <ng-content select="modal-header"></ng-content>
+                <button *ngIf="!hideCloseButton" type="button" class="close" data-dismiss="modal" [attr.aria-label]="cancelButtonLabel || 'Close'" (click)="close()">&times;</button>
             </div>
             <div class="dialog-body">
                 <ng-content select="modal-content"></ng-content>
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss
index ab697b0..e4891ad 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 /** Keyframes **/
 @keyframes show {
@@ -165,6 +166,7 @@
   list-style: none;
   padding: 0;
   margin: 0;
+  transition: all .35s linear .2s;
 }
 
 .dialog-content {
@@ -178,16 +180,16 @@
   outline: 0;
   -webkit-box-shadow: 0 3px 9px rgba(0,0,0,.5);
   box-shadow: 0 3px 9px rgba(0,0,0,.5);
+  .danger_color {
+    padding-left: 5px;
+    font-size: 12px;
+    display: inline-block;
+    font-family: 'Open Sans', sans-serif;
+    font-weight: 300;
+    border-color: #d9534f !important;
+  }
 }
-
-.dialog-content .danger_color {
-  padding-top: 5px;
-  font-size: 12px;
-  display: inline-block;
-}
-.dialog-content .danger_field {
-  border-color: #d9534f !important;
-}
+ 
 .modal-footer .btn {
   margin-top: 0;
 }
@@ -204,8 +206,10 @@
     height: 54px;
     line-height: 54px;
     .modal-title {
+      width: 90%;
       margin: 0;
       overflow: hidden;
+      white-space: nowrap;
       text-overflow: ellipsis;
       font-weight: 600;
       color: #455c74;
@@ -236,9 +240,6 @@
 
   .dialog-body {
     padding-top: 0;
-    .content-box {
-      padding: 25px 35px 45px;
-    }
   }
   .upload-key {
     margin-bottom: 20px;
@@ -327,7 +328,9 @@
     }
   }
 }
-
+.content-box {
+  padding: 25px 30px 35px;
+}
 .detail-header {
   border-bottom: 0;
   width: 100%;
@@ -388,7 +391,6 @@
   }
   span {
     font-size: 14px;
-    color: #9cadbe;
     overflow: hidden;
     text-overflow: ellipsis;
     display: block;
@@ -399,4 +401,10 @@
   .time_info {
     margin-top: 15px;
   }
-}
\ No newline at end of file
+}
+
+.create-cluster {
+  .dialog-header {
+    padding-left: 45px !important;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.ts
index 238c66d..d6a1665 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/modal.component.ts
@@ -1,25 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, OnDestroy, Input, Output, EventEmitter, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';
 
 @Component({
-  moduleId: module.id,
   selector: 'modal-dialog',
   templateUrl: 'modal.component.html',
   styleUrls: ['./modal.component.scss'],
@@ -92,7 +92,7 @@
 
     this.isHide = true;
     this.clear = window.setTimeout(() => {
-      document.body.removeChild(this.backdropElement);
+      document.body.contains(this.backdropElement) && document.body.removeChild(this.backdropElement);
       document.body.className = document.body.className.replace(/modal-open\b/, '');
       this.el.nativeElement.classList.remove('out');
       this.isOpened = false;
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/index.ts
new file mode 100644
index 0000000..4daec02
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/index.ts
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { ModalModule } from '..';
+import { NotificationDialogComponent } from './notification-dialog.component';
+import { MaterialModule } from '../../material.module';
+
+export * from './notification-dialog.component';
+
+@NgModule({
+  imports: [CommonModule, ModalModule, MaterialModule],
+  declarations: [NotificationDialogComponent],
+  entryComponents: [NotificationDialogComponent],
+  exports: [NotificationDialogComponent]
+})
+export class NotificationDialogModule {}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
new file mode 100644
index 0000000..86ca5a5
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Component, Inject } from '@angular/core';
+import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+
+@Component({
+  selector: 'notification-dialog',
+  template: `
+  <header>
+    <h4><i class="material-icons">priority_high</i>Warning</h4>
+    <a class="ani" (click)="dialogRef.close()"><i class="material-icons">close</i></a>
+  </header>
+  <div mat-dialog-content class="content info message">
+    <div *ngIf="data.type === 'list'; else info">
+      <div *ngIf="data.template.notebook.length > 0">
+        Following notebook server<span *ngIf="data.template.notebook.length>1">s </span>
+        <span *ngFor="let item of data.template.notebook">
+          <b>{{ item.exploratory_name }}</b>
+          <span *ngIf="data.template.notebook.length > 1">, </span>
+        </span> will be stopped and all computational resources will be stopped/terminated 
+      </div>
+
+      <div *ngIf="data.template.cluster.length > 0">
+        <p *ngFor="let item of data.template.cluster">
+            Computational resource<span *ngIf="data.template.cluster.length > 1">s </span>
+            <b>{{ item.computational_name }}</b> on <b>{{ item.exploratory_name }}</b> 
+            will be stopped
+        </p>
+      </div>
+      <strong>by a schedule in 15 minutes.</strong>
+    </div>
+    <ng-template #info><span [innerHTML]="data.template"></span></ng-template>
+  </div>
+  `,
+  styles: [`
+    .content { color: #718ba6; padding: 20px 50px; font-size: 14px; font-weight: 400 }
+    .info { color: #35afd5; }
+    header { display: flex; justify-content: space-between; color: #607D8B; }
+    header h4 i { vertical-align: bottom; }
+    header a i { font-size: 20px; }
+    header a:hover i { color: #35afd5; cursor: pointer; }
+    .plur { font-style: normal; }
+  `]
+})
+export class NotificationDialogComponent {
+  constructor(
+    public dialogRef: MatDialogRef<NotificationDialogComponent>,
+    @Inject(MAT_DIALOG_DATA) public data: any
+  ) { }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/index.ts
index 425eec5..8001541 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/index.ts
@@ -1,24 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
-import { ModalModule } from '../index';
+import { ModalModule } from '..';
 import { ProgressDialogComponent } from './progress-dialog.component';
 
 export * from './progress-dialog.component';
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.html
index d575b0f..45cc7ae 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.html
@@ -1,20 +1,21 @@
 <!--
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
 <modal-dialog #bindDialog modalClass="modal-xs progress-dialog">
   <modal-header></modal-header>
@@ -25,4 +26,4 @@
     </div>
   </modal-content>
   <modal-footer></modal-footer>
-</modal-dialog>
\ No newline at end of file
+</modal-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.ts
index 6955d9d..5dc200a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/progress-dialog/progress-dialog.component.ts
@@ -1,25 +1,25 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, OnInit, ViewChild, Input } from '@angular/core';
 
 @Component({
-  moduleId: module.id,
   selector: 'progress-dialog',
   templateUrl: 'progress-dialog.component.html'
 })
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts
index f0a038e..3fb6b2f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts
@@ -1,32 +1,43 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { RouterModule } from '@angular/router';
+import { MaterialModule } from '../material.module';
+import { ModalModule, UploadKeyDialogModule, ProgressDialogModule } from '../index';
 
 import { NavbarComponent } from './navbar.component';
-import { MaterialModule } from '../material.module';
+import { NotificationDialogModule } from '../modal-dialog/notification-dialog';
 
 export * from './navbar.component';
 
 @NgModule({
-  imports: [CommonModule, RouterModule, MaterialModule],
+  imports: [
+    CommonModule,
+    RouterModule,
+    MaterialModule,
+    NotificationDialogModule,
+    ModalModule,
+    UploadKeyDialogModule,
+    ProgressDialogModule
+  ],
   declarations: [NavbarComponent],
   exports: [NavbarComponent, RouterModule]
 })
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.css b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.css
deleted file mode 100644
index fccb833..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.css
+++ /dev/null
@@ -1,181 +0,0 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-.nav-bar {
-  min-height: 48px;
-  height: 48px;
-  background-color: #222;
-  border-color: #080808;
-  position: relative;
-  display: flex;
-  justify-content: space-between;
-  margin-bottom: 0;
-  border-radius: 0;
-}
-
-.menu-area,
-.control-area {
-  display: flex;
-  align-items: center;
-}
-
-a.nav-item {
-  position: relative;
-  height: 56px;
-  padding: 5px 40px;
-  line-height: 48px;
-  font-family: "Open Sans", sans-serif;
-  transition: all .45s ease-in-out;
-  text-decoration: none;
-  font-size: 14px;
-  overflow: hidden;
-  color: #577289;
-  outline: none;
- }
- a.nav-item:not(:last-child)::after {
-  content: ' ';
-  position: absolute;
-  bottom: 0;
-  left: calc(50% - 200px/2);
-  height: 1px;
-  width: 200px;
-  display: block;
-  background: #edf1f5;
-}
-
-a.nav-item.active {
-  color: #36afd5;
-}
-a.nav-item:hover {
-  background: none !important;
-  color: #36afd5;
-}
-
-.nav-bar .navbar-logo {
-  width: 65px;
-  align-self: center;
-  margin-left: 10px;
-}
-
-.nav-bar .navbar-logo img {
-  display: block;
-  width: 100%;
-}
-
-.nav-bar .statusbar {
-  display: flex;
-  width: 60px;
-  height: 46px;
-  text-decoration: none;
-  justify-content: center;
-  color: #f9fafb;
-}
-
-.nav-bar .statusbar span {
-  align-self: center;
-  font-size: 18px;
-}
-
-.ok, .warning, .error, .user-name {
-  transition: all .35s ease-in-out;
-}
-
-.statusbar .ok { color: #81b44a; }
-.statusbar .ok:hover { color: #618738; }
-
-.statusbar .warning { color: #f7b500; }
-.statusbar .warning:hover { color: #bd8d0a; }
-
-.statusbar .error { color: #ef5c4b; }
-.statusbar .error:hover { color: #bd4146; }
-
-.nav-bar .btn-logout {
-  height: 46px;
-  padding: 0 28px;
-  background: #383838;
-  color: #cfdae6;
-  border: 0;
-  border-radius: 0;
-  font-size: 14px;
-}
-.btn-logout:hover .user-name { color: #3392b0; }
-
-.user-name { color: #36afd5; }
-
-.hamburger {
-  border: none;
-  padding: 0px;
-  background: none;
-  outline: none;
-  width: 56px;
-  height: 46px;
-  cursor: pointer;
-  border-radius: 0;
-  transition: all .45s ease-in-out;
-}
-.hamburger .line{
-  width: 22px;
-  height: 2px;
-  display: block;
-  margin: 4px auto;
-  border-radius: 1px;
-  background-color: #ecf0f1;
-  -webkit-transition: all .35s ease-in-out;
-  -o-transition: all .35s ease-in-out;
-  transition: all .35s ease-in-out;
-}
-
-.hamburger:hover {
-  background: #36afd5;
-}
-
-.hamburger:hover .line:nth-child(2) {
-  -webkit-transition: none;
-  -o-transition: none;
-  transition: none;
-}
-
-.hamburger .line:nth-child(2) {
-  -webkit-transition-delay: 0.3s;
-  -o-transition-delay: 0.3s;
-  transition-delay: 0.3s;
-}
-
-
-.hamburger:hover .line:nth-child(2) {
-  opacity: 0;
-}
-
-.hamburger:hover .line:nth-child(1),
-.hamburger:hover .line:nth-child(3) {
-  width: 18px;
-}
-
-.hamburger:hover .line:nth-child(1){
-  -webkit-transform: translateY(8px) translateX(-6px) rotate(45deg);
-  -ms-transform: translateY(8px) translateX(-6px) rotate(45deg);
-  -o-transform: translateY(8px) translateX(-6px) rotate(45deg);
-  transform: translateY(8px) translateX(-6px) rotate(45deg);
-}
-
-.hamburger:hover .line:nth-child(3){
-  -webkit-transform: translateY(-4px) translateX(6px) rotate(-45deg);
-  -ms-transform: translateY(-4px) translateX(6px) rotate(-45deg);
-  -o-transform: translateY(-4px) translateX(6px) rotate(-45deg);
-  transform: translateY(-4px) translateX(6px) rotate(-45deg);
-}
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
index 3e2d861..53eb87f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
@@ -1,23 +1,24 @@
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<div class="nav-bar">
-  <div class="menu-area">
+<div class="nav-bar" *ngIf="isLoggedIn">
+  <div class="menu-area" *ngIf="healthStatus">
 
     <button class="hamburger" [matMenuTriggerFor]="menu">
       <span class="line"></span>
@@ -29,8 +30,8 @@
       <mat-menu #menu="matMenu" [overlapTrigger]="false">
         <a class="nav-item" mat-menu-item [routerLink]="['/resources_list']" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">List of Resources</a>
         <a class="nav-item" mat-menu-item [routerLink]="['/environment_health_status']" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">Environment Health Status</a>
-        <a *ngIf="billingEnabled" class="nav-item" mat-menu-item [routerLink]="['/billing_report']" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">Billing Report</a>
-        <a *ngIf="admin" class="nav-item" mat-menu-item [routerLink]="['/environment_management']" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">Environment Management</a>
+        <a *ngIf="healthStatus.billingEnabled" class="nav-item" mat-menu-item [routerLink]="['/billing_report']" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">Billing Report</a>
+        <a *ngIf="healthStatus.admin" class="nav-item" mat-menu-item [routerLink]="['/environment_management']" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">Environment Management</a>
       </mat-menu>
     </nav>
     <a [routerLink]="['/resources_list']" class="navbar-logo">
@@ -38,13 +39,16 @@
     </a>
   </div>
 
-  <div class="control-area">
-    <a *ngIf="healthStatus" [routerLink]="['/environment_health_status']" class="statusbar">
-      <span class="material-icons" ngClass="{{healthStatus || ''}}">radio_button_checked</span>
+  <div class="control-area" *ngIf="healthStatus">
+    <a *ngIf="healthStatus.status" [routerLink]="['/environment_health_status']" class="statusbar">
+      <span class="material-icons" ngClass="{{healthStatus.status || ''}}">radio_button_checked</span>
     </a>
-    <button class="btn btn-logout" (click)="logout_btnClick()">
-      Log out
-      <span class="user-name">{{currentUserName}}</span>
-    </button>
+    <button class="btn btn-logout" (click)="logout_btnClick()">Log out <span class="user-name">{{currentUserName}}</span></button>
   </div>
 </div>
+
+<key-upload-dialog #keyUploadModal
+  (generateUserKey)="generateUserKey($event)"
+  (checkInfrastructureCreationProgress)="checkCreationProgress($event)"
+  [primaryUploading]="true"></key-upload-dialog>
+<progress-dialog #preloaderModal></progress-dialog>
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss
new file mode 100644
index 0000000..dcb454e
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss
@@ -0,0 +1,178 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.nav-bar {
+  min-height: 48px;
+  height: 48px;
+  background-color: #222;
+  border-color: #080808;
+  position: relative;
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 0;
+  border-radius: 0;
+  .menu-area {
+    display: flex;
+    align-items: center;
+    .navbar-logo {
+      width: 65px;
+      align-self: center;
+      margin-left: 10px;
+      img {
+        display: block;
+        width: 100%;
+      }
+    }
+  }
+  .control-area {
+    @extend .menu-area;
+
+    .statusbar {
+      display: flex;
+      width: 60px;
+      height: 46px;
+      text-decoration: none;
+      justify-content: center;
+      color: #f9fafb;
+      span {
+        align-self: center;
+        font-size: 18px;
+      }
+      .ok {
+        color: #81b44a;
+        &:hover { color: #618738; }
+      }
+      .warning {
+        color: #f7b500;
+        &:hover { color: #bd8d0a; }
+      }
+      .error {
+        color: #ef5c4b;
+        &:hover {
+          color: #bd4146;
+        }
+      }
+    }
+    .btn-logout {
+      height: 46px;
+      padding: 0 28px;
+      background: #383838;
+      color: #cfdae6;
+      border: 0;
+      border-radius: 0;
+      font-size: 14px;
+      .user-name {
+        color: #36afd5;
+      }
+      &:hover .user-name {
+        color: #3392b0;
+      }
+    }
+  }
+}
+
+a.nav-item {
+  position: relative;
+  height: 56px;
+  padding: 5px 40px;
+  line-height: 48px;
+  font-family: "Open Sans", sans-serif;
+  transition: all .45s ease-in-out;
+  text-decoration: none;
+  font-size: 14px;
+  overflow: hidden;
+  color: #577289;
+  outline: none;
+  &:hover {
+    background: none !important;
+    color: #36afd5;
+  }
+  &:not(:last-child)::after {
+    content: ' ';
+    position: absolute;
+    bottom: 0;
+    left: calc(50% - 200px/2);
+    height: 1px;
+    width: 200px;
+    display: block;
+    background: #edf1f5;
+  }
+  &.active {
+    color: #36afd5;
+  }
+ }
+
+.ok, .warning, .error, .user-name {
+  transition: all .35s ease-in-out;
+}
+
+.hamburger {
+  border: none;
+  padding: 0px;
+  background: none;
+  outline: none;
+  width: 56px;
+  height: 46px;
+  cursor: pointer;
+  border-radius: 0;
+  transition: all .45s ease-in-out;
+  .line{
+    width: 22px;
+    height: 2px;
+    display: block;
+    margin: 4px auto;
+    border-radius: 1px;
+    background-color: #ecf0f1;
+    -webkit-transition: all .35s ease-in-out;
+    -o-transition: all .35s ease-in-out;
+    transition: all .35s ease-in-out;
+    &:nth-child(2) {
+      -webkit-transition-delay: 0.3s;
+      -o-transition-delay: 0.3s;
+      transition-delay: 0.3s;
+    }
+  }
+  &:hover {
+    background: #36afd5;
+  }
+  &:hover .line:nth-child(1),
+  &:hover .line:nth-child(3) {
+    width: 18px;
+  }
+  &:hover .line:nth-child(2) {
+    -webkit-transition: none;
+    -o-transition: none;
+    transition: none;
+    opacity: 0;
+  }
+}
+
+.hamburger:hover .line:nth-child(1){
+  -webkit-transform: translateY(8px) translateX(-6px) rotate(45deg);
+  -ms-transform: translateY(8px) translateX(-6px) rotate(45deg);
+  -o-transform: translateY(8px) translateX(-6px) rotate(45deg);
+  transform: translateY(8px) translateX(-6px) rotate(45deg);
+}
+
+.hamburger:hover .line:nth-child(3){
+  -webkit-transform: translateY(-4px) translateX(6px) rotate(-45deg);
+  -ms-transform: translateY(-4px) translateX(6px) rotate(-45deg);
+  -o-transform: translateY(-4px) translateX(6px) rotate(-45deg);
+  transform: translateY(-4px) translateX(6px) rotate(-45deg);
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
index 6ab7f14..92b810b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
@@ -1,64 +1,221 @@
-/***************************************************************************
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
-Copyright (c) 2016, EPAM SYSTEMS INC
+import { Component, ViewEncapsulation, OnInit, OnDestroy, ViewChild, ViewContainerRef } from '@angular/core';
+import { MatDialog, MatDialogRef } from '@angular/material';
+import { Subscription } from 'rxjs/Subscription';
+import { ToastsManager } from 'ng2-toastr';
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+import { TimerObservable } from 'rxjs/observable/TimerObservable';
+import { timer } from 'rxjs/observable/timer';
+import { interval } from 'rxjs/observable/interval';
+import 'rxjs/add/operator/takeWhile';
 
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
-
-import { Component, ViewEncapsulation, Input, OnInit } from '@angular/core';
-
-import { ApplicationSecurityService } from '../../core/services/applicationSecurity.service';
-import { HealthStatusService } from '../../core/services/healthStatus.service';
-import { AppRoutingService } from '../../core/services/appRouting.service';
-
+import { ApplicationSecurityService,
+  HealthStatusService,
+  AppRoutingService,
+  UserAccessKeyService,
+  SchedulerService } from '../../core/services';
+import { GeneralEnvironmentStatus } from '../../health-status/environment-status.model';
 import { DICTIONARY } from '../../../dictionary/global.dictionary';
+import { HTTP_STATUS_CODES, FileUtils } from '../../core/util';
+import { NotificationDialogComponent } from '../modal-dialog/notification-dialog';
 
 @Component({
-  moduleId: module.id,
   selector: 'dlab-navbar',
   templateUrl: 'navbar.component.html',
-  styleUrls: ['./navbar.component.css'],
+  styleUrls: ['./navbar.component.scss'],
   encapsulation: ViewEncapsulation.None
 })
-
-export class NavbarComponent implements OnInit {
+export class NavbarComponent implements OnInit, OnDestroy {
   readonly PROVIDER = DICTIONARY.cloud_provider;
-  currentUserName: string;
 
-  @Input() healthStatus: string;
-  @Input() billingEnabled: boolean;
-  @Input() admin: boolean;
+  private alive: boolean = false;
+  private readonly CHECK_ACCESS_KEY_TIMEOUT: number = 30000;
+  private readonly CHECK_ACTIVE_SCHEDULE_TIMEOUT: number = 55000;
+  private readonly CHECK_ACTIVE_SCHEDULE_PERIOD: number = 15;
+
+  currentUserName: string;
+  quotesLimit: number;
+  isLoggedIn: boolean = false;
+
+  healthStatus: GeneralEnvironmentStatus;
+  subscriptions: Subscription = new Subscription();
+
+  @ViewChild('keyUploadModal') keyUploadDialog;
+  @ViewChild('preloaderModal') preloaderDialog;
 
   constructor(
+    public toastr: ToastsManager,
+    public vcr: ViewContainerRef,
     private applicationSecurityService: ApplicationSecurityService,
     private appRoutingService: AppRoutingService,
-    private healthStatusService: HealthStatusService
-  ) { }
-
-  ngOnInit() {
-    this.currentUserName = this.getUserName();
+    private healthStatusService: HealthStatusService,
+    private userAccessKeyService: UserAccessKeyService,
+    private schedulerService: SchedulerService,
+    private dialog: MatDialog
+  ) {
+    this.toastr.setRootViewContainerRef(vcr);
   }
 
-  getUserName() {
+  ngOnInit() {
+    this.applicationSecurityService.loggedInStatus.subscribe(response => {
+      this.subscriptions.unsubscribe();
+      this.subscriptions.closed = false;
+      this.alive = false;
+
+      this.isLoggedIn = response;
+
+      if (this.isLoggedIn) {
+        this.subscriptions.add(this.healthStatusService.statusData.subscribe(result => {
+          this.healthStatus = result;
+          result.status && this.checkQuoteUsed(this.healthStatus);
+        }));
+        this.subscriptions.add(this.userAccessKeyService.accessKeyEmitter.subscribe(result => {
+          result && this.processAccessKeyStatus(result.status);
+        }));
+        this.subscriptions.add(timer(0, this.CHECK_ACTIVE_SCHEDULE_TIMEOUT).subscribe(() => this.refreshSchedulerData()));
+        this.currentUserName = this.getUserName();
+      }
+    });
+    this.quotesLimit = 70;
+  }
+
+  ngOnDestroy(): void {
+    this.subscriptions.unsubscribe();
+    this.alive = false;
+  }
+
+  getUserName(): string {
     return this.applicationSecurityService.getCurrentUserName() || '';
   }
 
-  logout_btnClick() {
-    this.applicationSecurityService.logout()
-      .subscribe(
-      () => this.appRoutingService.redirectToLoginPage(),
-      error => console.log(error),
-      () => this.appRoutingService.redirectToLoginPage());
+  logout_btnClick(): void {
+    this.healthStatusService.resetStatusValue();
+    this.userAccessKeyService.resetUserAccessKey();
+    this.applicationSecurityService.logout().subscribe(
+      () => {
+        this.appRoutingService.redirectToLoginPage();
+        this.subscriptions.unsubscribe();
+      },
+      error => console.error(error));
+  }
+
+  public emitQuotes(alert, user_quota?, total_quota?): void {
+    const dialogRef: MatDialogRef<NotificationDialogComponent> = this.dialog.open(NotificationDialogComponent, {
+      data: { template: this.selectQuotesAlert(alert, user_quota, total_quota), type: 'message' },
+      width: '550px'
+    });
+    dialogRef.afterClosed().subscribe(() => {
+      this.applicationSecurityService.setBillingQuoteUsed('informed');
+    });
+  }
+
+  public generateUserKey($event): void {
+    console.log('generate key', $event);
+    this.userAccessKeyService.generateAccessKey().subscribe(
+      data => {
+        FileUtils.downloadFile(data);
+        this.userAccessKeyService.initialUserAccessKeyCheck();
+      }, error => this.toastr.error(error.message || 'Access key generation failed!', 'Oops!', { toastLife: 5000 }));
+  }
+
+  public checkCreationProgress($event): void {
+    this.userAccessKeyService.initialUserAccessKeyCheck();
+  }
+
+  private checkQuoteUsed(params): void {
+    if (!this.applicationSecurityService.getBillingQuoteUsed() && params) {
+      let checkQuotaAlert = '';
+
+      if (params.billingUserQuoteUsed >= this.quotesLimit && params.billingUserQuoteUsed < 100) checkQuotaAlert = 'user_quota';
+      if (params.billingQuoteUsed >= this.quotesLimit && params.billingQuoteUsed < 100) checkQuotaAlert = 'total_quota';
+      if (Number(params.billingUserQuoteUsed) >= 100) checkQuotaAlert = 'user_exceed';
+      if (Number(params.billingQuoteUsed) >= 100) checkQuotaAlert = 'total_exceed';
+
+      if (this.dialog.openDialogs.length > 0 || this.dialog.openDialogs.length > 0) return;
+      checkQuotaAlert && this.emitQuotes(checkQuotaAlert, params.billingUserQuoteUsed, params.billingQuoteUsed);
+    }
+  }
+
+  private processAccessKeyStatus(status: number): void {
+    if (status === HTTP_STATUS_CODES.NOT_FOUND) {
+      this.keyUploadDialog.open({ isFooter: false });
+      this.alive = false;
+    } else if (status === HTTP_STATUS_CODES.ACCEPTED) {
+      !this.preloaderDialog.bindDialog.isOpened && this.preloaderDialog.open({ isHeader: false, isFooter: false });
+
+      if (!this.alive) {
+        this.alive = true;
+        this.subscriptions.add(interval(this.CHECK_ACCESS_KEY_TIMEOUT)
+        .takeWhile(() => this.alive)
+        .subscribe(() => this.userAccessKeyService.initialUserAccessKeyCheck()));
+      }
+
+    } else if (status === HTTP_STATUS_CODES.OK) {
+      this.alive = false;
+      this.userAccessKeyService.emitActionOnKeyUploadComplete();
+      this.preloaderDialog.close();
+      this.keyUploadDialog.close();
+    }
+  }
+
+  private refreshSchedulerData(): void {
+      this.schedulerService.getActiveSchcedulersData(this.CHECK_ACTIVE_SCHEDULE_PERIOD).subscribe((list: Array<any>) => {
+        if (list.length) {
+          if (this.dialog.openDialogs.length > 0 || this.dialog.openDialogs.length > 0) return;
+          const filteredData = this.groupSchedulerData(list);
+          const dialogRef: MatDialogRef<NotificationDialogComponent> = this.dialog.open(NotificationDialogComponent, {
+            data: { template: filteredData, type: 'list' },
+            width: '550px'
+          });
+        }
+    });
+  }
+
+  private groupSchedulerData(sheduler_data) {
+    const memo = { notebook: [], cluster: [] };
+    sheduler_data.map(item =>  !item.computational_name ? memo.notebook.push(item) : memo.cluster.push(item));
+    memo.cluster = memo.cluster.filter(el => !memo.notebook.some(elm => el.exploratory_name === elm.exploratory_name));
+    return memo;
+  }
+
+  private selectQuotesAlert(type: string, user_quota?: number, total_quota?: number): string {
+    const alerts = {
+      user_exceed: `Dear <b>${ this.currentUserName }</b>,<br />
+          DLab cloud infrastructure usage quota associated with your user has been exceeded.
+          All your analytical environment will be stopped. To proceed working with environment, 
+          request increase of user quota from DLab administrator.`,
+      total_exceed: `Dear <b>${ this.currentUserName }</b>,<br />
+          DLab cloud infrastructure usage quota has been exceeded.
+          All your analytical environment will be stopped. To proceed working with environment, 
+          request increase application quota from DLab administrator.`,
+      user_quota: `Dear <b>${ this.currentUserName }</b>,<br />
+          Cloud infrastructure usage quota associated with your user has been used for <b>${user_quota}%</b>.
+          Once quota is depleted all your analytical environment will be stopped. 
+          To proceed working with environment you'll have to request increase of user quota from DLab administrator.`,
+      total_quota: `Dear <b>${ this.currentUserName }</b>,<br />
+          DLab cloud infrastructure usage quota has been used for <b>${total_quota}%</b>.
+          Once quota is depleted all your analytical environment will be stopped. 
+          To proceed working with environment you'll have to request increase of user quota from DLab administrator. `
+    };
+
+    return alerts[type];
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/index.ts
index bf690ce..9161e89 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/index.ts
@@ -1,25 +1,26 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { MaterialModule } from '../../shared/material.module';
+import { MaterialModule } from '../material.module';
 
 import { TimeCoverComponent } from './time-cover.component';
 import { TickerComponent } from './ticker.component';
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/ticker.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/ticker.component.ts
index c7f4e3e..d6f7874 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/ticker.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/ticker.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, Input, Output, EventEmitter, OnChanges } from '@angular/core';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-cover.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-cover.component.ts
index f6df5d1..96aa5ef 100755
--- a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-cover.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-cover.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, Input, Output, OnInit, Inject, EventEmitter  } from '@angular/core';
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.scss
index 472a9f8..5d6448e 100755
--- a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 @-webkit-keyframes bounce {
   from {
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.ts
index 00e5d7d..0ec7376 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/time-picker/time-picker.component.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { Component, OnInit, Inject, Input, Output, EventEmitter } from '@angular/core';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
diff --git a/services/self-service/src/main/resources/webapp/src/assets/fonts/Material_Icons/material-icons.css b/services/self-service/src/main/resources/webapp/src/assets/fonts/Material_Icons/material-icons.css
index 7a3fc54..fe62cc2 100755
--- a/services/self-service/src/main/resources/webapp/src/assets/fonts/Material_Icons/material-icons.css
+++ b/services/self-service/src/main/resources/webapp/src/assets/fonts/Material_Icons/material-icons.css
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 @font-face {
   font-family: 'Material Icons';
   font-style: normal;
diff --git a/services/self-service/src/main/resources/webapp/src/assets/fonts/Open_Sans/open-sans.css b/services/self-service/src/main/resources/webapp/src/assets/fonts/Open_Sans/open-sans.css
index 5adc856..3ec5486 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/fonts/Open_Sans/open-sans.css
+++ b/services/self-service/src/main/resources/webapp/src/assets/fonts/Open_Sans/open-sans.css
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 @font-face {
   font-family: 'Open Sans';
   font-style: normal;
@@ -36,4 +55,4 @@
     url(OpenSans-Bold.ttf) format('truetype'),
     url(OpenSans-Bold.woff2) format('woff2'),
     url(OpenSans-Bold.svg) format('svg');
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/assets/img/login-background.png b/services/self-service/src/main/resources/webapp/src/assets/img/login-background.png
index 31a9b4e..7e1fdf2 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/img/login-background.png
+++ b/services/self-service/src/main/resources/webapp/src/assets/img/login-background.png
Binary files differ
diff --git a/services/self-service/src/main/resources/webapp/src/assets/img/security-screen.png b/services/self-service/src/main/resources/webapp/src/assets/img/security-screen.png
new file mode 100644
index 0000000..1521fb4
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/assets/img/security-screen.png
Binary files differ
diff --git a/services/self-service/src/main/resources/webapp/src/assets/img/security.png b/services/self-service/src/main/resources/webapp/src/assets/img/security.png
new file mode 100644
index 0000000..6b8f98a
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/assets/img/security.png
Binary files differ
diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_general.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_general.scss
index 8306af5..2299f2f 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/styles/_general.scss
+++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_general.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 body {
   font-family: 'Open Sans', sans-serif;
@@ -112,3 +113,28 @@
 .success_color {color: #5cb85c}
 .warning_color {color: #f0ad4e}
 .danger_color {color: #d9534f}
+
+.list-header {
+  width: 100%;
+  border-top: 1px solid #edf1f5;
+  border-bottom: 1px solid #edf1f5;
+  color: #577289 !important;
+  font-size: 15px !important;
+  font-weight: 600 !important;
+}
+
+.dropdown-list {
+  .title {
+    span {
+      .capt {
+        margin-right: 50px;
+      }
+    }
+  }
+  .capt {
+    font-size: 13px;
+    color: #35afd5;
+    margin-right: 0px;
+    font-style: normal;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_reset.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_reset.scss
index 412e82a..87026e3 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/styles/_reset.scss
+++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_reset.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 * {
   box-sizing: border-box;
@@ -78,4 +79,11 @@
 [type="radio"] {
   box-sizing: border-box;
   padding: 0;
-}
\ No newline at end of file
+}
+
+input {
+  &::-ms-clear,
+  &::-ms-reveal {
+    display: none;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
index 6c46017..7659568 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
+++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 /* material buttons */
 .mat-raised-button.butt {
@@ -135,4 +136,117 @@
 
 .mat-focused .mat-form-field-label {
   color: #36afd5;
-}
\ No newline at end of file
+}
+
+.break-tooltip {
+  white-space: pre-line !important;
+  word-break: break-all;
+}
+.manage-roles-dialog {
+  .mat-form-field {
+    width: 100%;
+  }
+  .inner-step {
+    .mat-select-value {
+      width: 96%;
+    }
+  }
+  .mat-reset {
+    .mat-form-field-type-mat-select:not(.mat-form-field-disabled) {
+      .mat-form-field-flex {
+        line-height: 20px;
+      }
+    }
+    .mat-input-wrapper {
+      &.mat-form-field-wrapper {
+        overflow: hidden;
+        .mat-input-infix.mat-form-field-infix {
+          width: 275px;
+          border: 0;
+          font-family: 'Open Sans', sans-serif;
+          font-size: 16px;
+          font-weight: 300;
+          .mat-select-value-text {
+            span {
+              // padding: 0 10px;
+              color: #607D8B;
+            }
+          }
+        }
+        .mat-form-field-underline {
+          display: none;
+        }
+        .mat-select-arrow {
+          color: transparent !important;
+        }
+        .mat-form-field-label {
+          padding-top: 0;
+        }
+        .mat-select{
+          &:focus {
+            .mat-input-underline {
+              .mat-input-ripple {
+                background-color: transparent !important;
+              }
+            }
+            &:not(.mat-select-disabled) {
+              .mat-select-arrow {
+                color: transparent;
+              }
+            }
+          } 
+        }
+      }
+      .mat-input-wrapper.mat-form-field-wrapper .mat-form-field-underline {
+        display: none;
+      }
+    }
+  }
+  .mat-form-field-type-mat-chip-list {
+      width: 100%;
+  }
+  .mat-step-header {
+    .mat-step-icon {
+      background-color: #36afd5;
+    }
+  }
+  .mat-chip {
+    background-color: rgba(47, 174, 215, 0.2) !important;
+    color: #687e96;
+  }
+  .roles {
+    .selector-wrapper-edit {
+      .mat-select-value {
+        width: 93%;
+      }
+    }
+  }
+}
+
+.dashboard_table {
+  &.reporting {
+    .dropdown-multiselect {
+      button {
+        font-size: 13px;
+        padding-left: 10px;
+      }
+    }
+  }
+}
+
+.mat-primary {
+  .mat-pseudo-checkbox-checked {
+    background: #00BCD4;
+  }
+}
+
+.mat-icon-button .mat-icon, .mat-icon-button i {
+  line-height: 1 !important;
+  font-size: 18px;
+}
+
+.error-modalbox {
+  .mat-dialog-container {
+    padding: 0;
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/assets/svg/ps_icon_1.svg b/services/self-service/src/main/resources/webapp/src/assets/svg/ps_icon_1.svg
new file mode 100644
index 0000000..a801820
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/assets/svg/ps_icon_1.svg
@@ -0,0 +1 @@
+<svg width="89" height="89" viewBox="0 0 89 89" xmlns="http://www.w3.org/2000/svg"><g stroke="#485F76" stroke-width="2" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M88 44.5C88 68.524 68.524 88 44.5 88S1 68.524 1 44.5 20.476 1 44.5 1 88 20.476 88 44.5z"/><path d="M10 70V34c0-1.105.895-2 2-2h14c1.105 0 2 .895 2 2v3h50c1.105 0 2 .895 2 2v31"/><path d="M18 31v-3c0-1.105.895-2 2-2h54c1.105 0 2 .895 2 2v9M49.915 58.067c.363 2.008-.474 3.85-1.915 4.933v4c0 1.657-1.343 3-3 3s-3-1.343-3-3L42.003 63C40.786 62.09 40 60.637 40 59c0-3.113 2.844-5.56 6.075-4.888 1.94.405 3.488 2.005 3.84 3.955z"/><path d="M44.963 77.977S31 75.167 31 64V46s2.99 2 7 2c3.966 0 7-2 7-2h1s3.015 2 7 2c3.942 0 6.928-2 6.928-2v18c0 12.084-14.965 13.977-14.965 13.977z"/></g></svg>
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/assets/svg/secure.svg b/services/self-service/src/main/resources/webapp/src/assets/svg/secure.svg
new file mode 100644
index 0000000..130533e
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/assets/svg/secure.svg
@@ -0,0 +1 @@
+<svg width="579" height="352" viewBox="0 0 579 352" xmlns="http://www.w3.org/2000/svg"><title>secured_illustr</title><g transform="translate(2)" fill="none" fill-rule="evenodd"><ellipse fill="#35afd5" cx="139" cy="179" rx="57" ry="57"/><ellipse fill="#35afd5" cx="464" cy="140" rx="37" ry="37"/><circle fill="#35afd5" cx="322" cy="231" r="17"/><g stroke="#485F76"><path d="M175 195.89V129c0-3.314 2.686-6 6-6h225c3.314 0 6 2.686 6 6v15M412 236v40H175v-17.11M411.5 276.056l19.488-.056c2.214-.007 4.012 1.786 4.012 4v16.988H152v-16.874c0-2.204 1.783-3.993 3.988-4l19.012-.058" stroke-width="2"/><path d="M328 276l-4.813 7.22c-.74 1.112-1.99 1.78-3.328 1.78h-49.72c-1.337 0-2.586-.668-3.327-1.78L262 276M289 131h11M388 287h14M190 254v10h207v-9M397 153.1V139l-207 .1v63" stroke-width="2"/><path d="M156.85 243.93c-9.134-9.134-9.134-23.944 0-33.08 9.136-9.134 23.946-9.134 33.08 0 9.136 9.136 9.136 23.946 0 33.08-9.134 9.136-23.944 9.136-33.08 0z" stroke-width="2.374"/><path d="M198.924 233.803L181 229M199.348 220l-3.348.897M191.828 208L189 210.828M179.963 201l-.963 3.594M166 201l4.802 17.923M154 208l2.12 2.12M147 220l3.284.88M147 234.048l3.912-1.048M154 246.435L167.435 233M166 253.478l.932-3.478M179.995 252.714L179 249M192.12 246.12L190 244" stroke-width="2"/><path d="M167.344 232.66c-3.125-3.124-3.125-8.19 0-11.316 3.125-3.125 8.192-3.125 11.317 0 3.126 3.125 3.126 8.192 0 11.317-3.124 3.126-8.19 3.126-11.316 0z" stroke-width="2.374"/><path d="M167.344 232.66c-3.125-3.124-3.125-8.19 0-11.316 3.125-3.125 8.192-3.125 11.317 0 3.126 3.125 3.126 8.192 0 11.317-3.124 3.126-8.19 3.126-11.316 0zM380 236.994c0-6.072 4.922-10.994 10.994-10.994s10.995 4.922 10.995 10.994-4.924 10.994-10.996 10.994S380 243.066 380 236.994z" stroke-width="2.374"/><path d="M403.598 230L401 231.5M398.087 225L393 233.81M391 223v3M384 225l1.5 2.598M379 230l2.598 1.5M377 237h10M379 243.5l2.598-1.5M384 248.598l1.5-2.598M391 251v-3M398.087 248.81L393 240M403.548 243.47L401 242M405 237h-3" stroke-width="2"/><path d="M387 236.76c0-2.076 1.684-3.76 3.76-3.76 2.08 0 3.762 1.684 3.762 3.76 0 2.078-1.683 3.762-3.76 3.762-2.078 0-3.762-1.684-3.762-3.76z" stroke-width="2.374"/><path d="M387 236.76c0-2.076 1.684-3.76 3.76-3.76 2.08 0 3.762 1.684 3.762 3.76 0 2.078-1.683 3.762-3.76 3.762-2.078 0-3.762-1.684-3.762-3.76zM403.43 216.15c-14.443-15.225-13.808-39.277 1.42-53.72 15.225-14.443 39.277-13.808 53.72 1.418 14.443 15.227 13.808 39.28-1.42 53.722-15.225 14.443-39.277 13.807-53.72-1.42z" stroke-width="2.374"/><path d="M462.628 160L459 163.44M453.613 153L451 157.263M443.42 149l-1.42 4.794M432.132 147l-.132 4.998M421 148l7.067 29.466M411 152l2.385 4.395M402 159l3.44 3.628M395 167l4.263 2.613M390 178l4.794 1.42M388 189l4.998.132M389 200.166l4.862-1.166M393 210.385l4.395-2.385M400 219.646L421.766 199M409 226.263l2.613-4.263M419 230.794l1.42-4.794M430 232.998l.132-4.998M441.166 231.862L440 227M451.385 227.395L449 223M460.44 221.628L457 218M468.263 212.613L464 210M471.942 202.283L444 194M473.998 191.132L469 191M469.395 169L465 171.385M472.862 180L468 181.166M472.862 180L468 181.166" stroke-width="2"/><path d="M421.568 198.946c-4.94-5.21-4.724-13.437.485-18.378 5.21-4.94 13.438-4.724 18.38.485 4.94 5.21 4.722 13.437-.487 18.378-5.21 4.942-13.437 4.725-18.378-.484z" stroke-width="2.374"/><path d="M421.568 198.946c-4.94-5.21-4.724-13.437.485-18.378 5.21-4.94 13.438-4.724 18.38.485 4.94 5.21 4.722 13.437-.487 18.378-5.21 4.942-13.437 4.725-18.378-.484z" stroke-width="2.374"/><path stroke-width="2" d="M310.77 185l-21.213 21.213-9.9-9.9-5.657 5.658 15.557 15.557 26.87-26.87z"/><path d="M290 251.45s-45-5.946-45-86l45-7.45 45 7.45c.053 80.054-45 86-45 86zM260.59 212.736C256.064 200.728 253 184.886 253 164M265.435 222.055c-.84-1.593-1.654-3.277-2.435-5.055M224 176l6.835 1.118M228 214.882l6.835-1.882M245 245.882l5.835-4.882M356.835 176L350 177.118M352.835 214.882L346 213M335.835 245.882L330 241M142.624 200.48l-8.808-8.81H79.67L52 164M139.37 214.226L127.147 202H63M85.25 180.25L71 166M349 123.038l28.993-28.887V37" stroke-width="2"/><path stroke-width="2" d="M367 122.752l22.706-22.756V45.954L408.66 27M387 123.186l15.273-15.144V72"/><path d="M72 164c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM381 34c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM405 69c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM414 25c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM52 162c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM93 308c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM541 297c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM575 277c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM575 324c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM64 202c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3z" stroke-width="2.374"/><path stroke-width="2" d="M159.025 297h-86l-15 15L22 311.975M53.362 322h-25L5 345.362M156 308H93"/><path d="M22 312c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3zM6 347c0 1.657-1.343 3-3 3s-3-1.343-3-3 1.343-3 3-3 3 1.343 3 3z" stroke-width="2.374"/><path stroke-width="2" d="M483 286h35l9.45-9H570M484 297h51M494 308h62l13.302 13.302M507.29 297H426M414 76c58.74 37.112 97.75 102.62 97.75 177.238 0 8.996-.566 17.86-1.666 26.557M104 186.39C131.68 103.082 210.25 43 302.853 43c22.2 0 43.592 3.453 63.67 9.85M97.638 297.152C94.598 282.95 93 268.215 93 253.106c0-15.485 1.68-30.578 4.868-45.106"/><path d="M493 196c5.734 18.572 8.822 38.306 8.822 58.76 0 7.576-.424 15.052-1.248 22.408M489 185c.49 1.317.966 2.64 1.43 3.972M418 93c29.125 20.896 52.374 49.463 66.79 82.747M335 58c4.58.758 9.108 1.673 13.576 2.738M288 56.5c4.69-.332 9.428-.5 14.203-.5 7.96 0 15.813.467 23.53 1.377M149 127.42C180.37 89.58 225.487 63.555 276.694 57M143 136.503c.623-.84 1.253-1.674 1.89-2.503M117 182.097c5.855-15.003 13.478-29.12 22.615-42.097M108.404 296.302C105.52 282.818 104 268.826 104 254.48c0-15.29 1.725-30.18 4.992-44.48M301 0v22M295 16l6 6 6-6M140 59l14.14 16.853M146 75.713l8.453.74.74-8.453M549.666 206L528 209.82M532.867 203L528 209.95l6.95 4.868M463.14 58L449 74.853M448 66l.74 8.453 8.453-.74M290 235v16M290 225v6M290 157v27" stroke-width="2"/></g></g></svg>
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
index 3a8f568..bbb35a5 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export const NAMING_CONVENTION = {
     'cloud_provider': 'aws',
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
index f040e97..52a264d 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export const NAMING_CONVENTION = {
     'cloud_provider': 'azure',
@@ -107,4 +108,4 @@
         this.date_end = '';
         this.dlab_id = '';
     }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
index 7c7f10d..15f2f17 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 export const NAMING_CONVENTION = {
   'cloud_provider': 'gcp',
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts
index e50c399..6d0d8ea 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 // from './{{ aws | gcp | azure }}.dictionary';
 
diff --git a/services/self-service/src/main/resources/webapp/src/environments/environment.prod.ts b/services/self-service/src/main/resources/webapp/src/environments/environment.prod.ts
index 3612073..a03b094 100644
--- a/services/self-service/src/main/resources/webapp/src/environments/environment.prod.ts
+++ b/services/self-service/src/main/resources/webapp/src/environments/environment.prod.ts
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 export const environment = {
   production: true
 };
diff --git a/services/self-service/src/main/resources/webapp/src/environments/environment.ts b/services/self-service/src/main/resources/webapp/src/environments/environment.ts
index b7f639a..134d4a1 100644
--- a/services/self-service/src/main/resources/webapp/src/environments/environment.ts
+++ b/services/self-service/src/main/resources/webapp/src/environments/environment.ts
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 // The file contents for the current environment will overwrite these during build.
 // The build system defaults to the dev environment which uses `environment.ts`, but if you do
 // `ng build --env=prod` then `environment.prod.ts` will be used instead.
diff --git a/services/self-service/src/main/resources/webapp/src/index.html b/services/self-service/src/main/resources/webapp/src/index.html
index 23ada6a..51e1583 100644
--- a/services/self-service/src/main/resources/webapp/src/index.html
+++ b/services/self-service/src/main/resources/webapp/src/index.html
@@ -1,22 +1,23 @@
-<!doctype html>
-
 <!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
+<!doctype html>
 
 <html>
 <head>
diff --git a/services/self-service/src/main/resources/webapp/src/main.ts b/services/self-service/src/main/resources/webapp/src/main.ts
index 411ebb2..9586596 100644
--- a/services/self-service/src/main/resources/webapp/src/main.ts
+++ b/services/self-service/src/main/resources/webapp/src/main.ts
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 import { enableProdMode } from '@angular/core';
 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
diff --git a/services/self-service/src/main/resources/webapp/src/polyfills.ts b/services/self-service/src/main/resources/webapp/src/polyfills.ts
index 2a02751..8804bb0 100644
--- a/services/self-service/src/main/resources/webapp/src/polyfills.ts
+++ b/services/self-service/src/main/resources/webapp/src/polyfills.ts
@@ -1,4 +1,23 @@
-/**
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ /**
  * This file includes polyfills needed by Angular and is loaded before the app.
  * You can add your own extra polyfills to this file.
  *
diff --git a/services/self-service/src/main/resources/webapp/src/styles.scss b/services/self-service/src/main/resources/webapp/src/styles.scss
index 9dee56f..c39db15 100644
--- a/services/self-service/src/main/resources/webapp/src/styles.scss
+++ b/services/self-service/src/main/resources/webapp/src/styles.scss
@@ -1,20 +1,21 @@
-/***************************************************************************
-
-Copyright (c) 2016, EPAM SYSTEMS INC
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-****************************************************************************/
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 @import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
 
@@ -25,38 +26,38 @@
 @import './assets/styles/_general.scss';
 @import './assets/styles/_theme.scss';
 
-.install-libraries .mat-tab-label,
-.install-libraries .mat-tab-label,
-.manage-ungit .mat-tab-label {
+.mat-tab-label {
   font-family: 'Open Sans', sans-serif !important;
   color: #455c74;
 }
-.install-libraries .mat-ink-bar,
+
 .install-libraries .mat-ink-bar,
 .manage-ungit .mat-ink-bar {
   background-color: #35afd5 !important;
   width: 50% !important;
 }
 
-.install-libraries .mat-tab-labels .mat-tab-label:focus,
-.install-libraries .mat-tab-labels .mat-tab-label:focus,
-.manage-ungit .mat-tab-labels .mat-tab-label:focus {
-  background-color: rgba(53, 175, 213, 0.11);
-  color: #577289;
+.mat-ink-bar {
+  background-color: #35afd5 !important;
 }
 
-.install-libraries .mat-tab-header-pagination.mat-tab-header-pagination-after,
-.install-libraries .mat-tab-header-pagination.mat-tab-header-pagination-before {
+.mat-tab-labels .mat-tab-label:focus,
+.mat-tab-labels .mat-tab-label:focus {
+  background-color: rgba(53, 175, 213, 0.11) !important;
+  color: #577289;
+}
+.mat-tab-header-pagination.mat-tab-header-pagination-after,
+.mat-tab-header-pagination.mat-tab-header-pagination-before {
   display: none !important;
 }
 
-.install-libraries mat-chip.mat-chip {
+mat-chip.mat-chip {
   outline: none;
   color: #758ea8;
   font-size: 14px;
   padding: 8px 18px;
 }
-.install-libraries mat-chip.mat-chip a {
+mat-chip.mat-chip a {
   display: inline-block;
   width: 12px;
   cursor: pointer;
@@ -66,7 +67,7 @@
   vertical-align: middle;
 }
 
-.install-libraries mat-chip.mat-chip strong {
+mat-chip.mat-chip strong {
   font-size: 10px;
   font-weight: 300;
 }
@@ -105,6 +106,7 @@
 
 .creating,
 .configuring,
+.reconfiguring,
 .installing,
 .reuploading,
 .highlight {
@@ -245,6 +247,9 @@
 .text-center {
   text-align: center !important;
 }
+.text-right {
+  text-align: right;
+}
 .m-top-10 {
   margin-top: 10px;
 }
@@ -267,6 +272,9 @@
 .full-height {
   height: 100%;
 }
+.ani {
+  transition: all .35s ease-in-out;
+}
 
 #scrolling::-webkit-scrollbar,
 .list-selected mat-chip-list .mat-chip-list-wrapper::-webkit-scrollbar {
@@ -314,7 +322,53 @@
   white-space: nowrap;
   overflow: hidden;
 }
-
 .capitalize {
   text-transform: capitalize;
-}
\ No newline at end of file
+}
+
+toast-container {
+  #toast-container {
+    > div.toast {
+      box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
+      border-radius: 2px;
+      background-color: #fff;
+      padding: 12px 20px;
+      overflow: inherit;
+      margin: 0 0 15px;
+      &::before {
+        position: absolute;
+        left: -15px;
+        top: -12px;
+        font-family: "Material Icons";
+        background-color: #fff;
+        width: 30px;
+        height: 30px;
+        padding: 7px;
+        box-sizing: border-box;
+        border-radius: 50%;
+        box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
+      }
+      &.toast-success {
+        background-image: none;
+        color: #49af38;
+        &::before {
+          content: "done";
+        }
+      }
+      &.toast-error {
+        background-image: none;
+        color: #e2747d;
+        &::before {
+          content: "priority_high";
+        }
+      }
+      &.toast-info {
+        background-image: none;
+        color: #35afd5;
+        &::before {
+          content: "priority_high";
+        }
+      }
+    }
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/typings.d.ts b/services/self-service/src/main/resources/webapp/src/typings.d.ts
deleted file mode 100644
index edc2f1e..0000000
--- a/services/self-service/src/main/resources/webapp/src/typings.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* SystemJS module definition */
-declare var module: {
-  id: string;
-};
diff --git a/services/self-service/src/main/resources/webapp/tslint.json b/services/self-service/src/main/resources/webapp/tslint.json
index 87f0b1e..981262e 100644
--- a/services/self-service/src/main/resources/webapp/tslint.json
+++ b/services/self-service/src/main/resources/webapp/tslint.json
@@ -26,8 +26,14 @@
     "member-access": false,
     "member-ordering": [
       true,
-      "static-before-instance",
-      "variables-before-functions"
+      {
+        "order": [
+          "public-static-field",
+          "protected-static-field",
+          "public-static-method",
+          "protected-static-method"
+        ]
+      }
     ],
     "no-arg": true,
     "no-bitwise": true,
@@ -50,8 +56,8 @@
     "no-string-throw": true,
     "no-switch-case-fall-through": true,
     "no-trailing-whitespace": true,
-    "no-unused-expression": true,
-    "no-use-before-declare": true,
+    "no-unused-expression": false,
+    "no-use-before-declare": false,
     "no-var-keyword": true,
     "object-literal-sort-keys": false,
     "one-line": [
@@ -68,6 +74,7 @@
     ],
     "radix": true,
     "semicolon": [
+      true,
       "always"
     ],
     "triple-equals": [
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/domain/ExploratoryLibListTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/domain/ExploratoryLibListTest.java
index a575267..69d2f50 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/domain/ExploratoryLibListTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/domain/ExploratoryLibListTest.java
@@ -1,20 +1,21 @@
-/***************************************************************************
-
- Copyright (c) 2016, EPAM SYSTEMS INC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- ****************************************************************************/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.domain;
 
 import static junit.framework.TestCase.assertEquals;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ApplicationSettingResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ApplicationSettingResourceTest.java
new file mode 100644
index 0000000..9dd042e
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ApplicationSettingResourceTest.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources;
+
+
+import com.epam.dlab.backendapi.service.ApplicationSettingService;
+import io.dropwizard.auth.AuthenticationException;
+import io.dropwizard.testing.junit.ResourceTestRule;
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.Collections;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.*;
+
+public class ApplicationSettingResourceTest extends TestBase {
+
+	private ApplicationSettingService applicationSettingService = mock(ApplicationSettingService.class);
+
+	@Rule
+	public final ResourceTestRule resources =
+			getResourceTestRuleInstance(new ApplicationSettingResource(applicationSettingService));
+
+	@Before
+	public void setup() throws AuthenticationException {
+		authSetup();
+	}
+
+
+	@Test
+	public void setMaxBudget() {
+		final Response response = resources.getJerseyTest()
+				.target("/settings/budget/12")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.entity("dummy", MediaType.TEXT_PLAIN));
+
+		assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
+
+		verify(applicationSettingService).setMaxBudget(12L);
+		verifyNoMoreInteractions(applicationSettingService);
+	}
+
+	@Test
+	public void removeMaxBudget() {
+		final Response response = resources.getJerseyTest()
+				.target("/settings/budget")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.delete();
+
+		assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
+
+		verify(applicationSettingService).removeMaxBudget();
+		verifyNoMoreInteractions(applicationSettingService);
+	}
+
+	@Test
+	public void getSettings() {
+
+		when(applicationSettingService.getSettings()).thenReturn(Collections.singletonMap("key", "value"));
+		final Response response = resources.getJerseyTest()
+				.target("/settings")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+		final Map map = response.readEntity(Map.class);
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getMediaType());
+		assertEquals(1, map.size());
+		assertEquals("value", map.get("key"));
+
+		verify(applicationSettingService).getSettings();
+		verifyNoMoreInteractions(applicationSettingService);
+
+
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/BackupResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/BackupResourceTest.java
index e4817f3..a5b6d1d 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/BackupResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/BackupResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -108,8 +111,7 @@
 				.get();
 
 		assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus());
-		assertEquals("Backup not found", response.readEntity(String.class));
-		assertEquals(MediaType.TEXT_PLAIN, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
 		verify(backupService).getBackup(USER.toLowerCase(), "1");
 		verifyNoMoreInteractions(backupService);
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java
index 26446d8..075502e 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java
index 7bc42c5..4d62744 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java
@@ -1,21 +1,25 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
 import com.epam.dlab.backendapi.service.EnvironmentService;
 import com.epam.dlab.exceptions.ResourceConflictException;
 import io.dropwizard.auth.AuthenticationException;
@@ -31,7 +35,7 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.util.Collections;
-import java.util.Set;
+import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -52,28 +56,31 @@
 
 	@Test
 	public void getUsersWithActiveEnv() {
-		when(environmentService.getActiveUsers()).thenReturn(Collections.singleton("activeUser"));
+		when(environmentService.getUsers()).thenReturn(Collections.singletonList(new UserDTO("activeUser",
+				null, UserDTO.Status.ACTIVE)));
 		final Response response = resources.getJerseyTest()
-				.target("/environment/user/active")
+				.target("/environment/user")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
 				.get();
 
 		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals(Collections.singleton("activeUser"), response.readEntity(new GenericType<Set<String>>() {
-		}));
+		assertEquals(Collections.singletonList(new UserDTO("activeUser", null, UserDTO.Status.ACTIVE)),
+				response.readEntity(new GenericType<List<UserDTO>>() {
+				}));
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(environmentService).getActiveUsers();
+		verify(environmentService).getUsers();
 		verifyNoMoreInteractions(environmentService);
 	}
 
 	@Test
 	public void getUsersWithActiveEnvWithFailedAuth() throws AuthenticationException {
 		authFailSetup();
-		when(environmentService.getActiveUsers()).thenReturn(Collections.singleton("activeUser"));
+		when(environmentService.getUsers()).thenReturn(Collections.singletonList(new UserDTO("activeUser",
+				null, UserDTO.Status.ACTIVE)));
 		final Response response = resources.getJerseyTest()
-				.target("/environment/user/active")
+				.target("/environment/user")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
 				.get();
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ExploratoryResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ExploratoryResourceTest.java
index 2fc4696..2fa4c45 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ExploratoryResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ExploratoryResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -20,8 +23,9 @@
 import com.epam.dlab.backendapi.resources.dto.ExploratoryActionFormDTO;
 import com.epam.dlab.backendapi.resources.dto.ExploratoryCreateFormDTO;
 import com.epam.dlab.backendapi.service.ExploratoryService;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.model.exploratory.Exploratory;
 import io.dropwizard.auth.AuthenticationException;
 import io.dropwizard.testing.junit.ResourceTestRule;
 import org.apache.http.HttpStatus;
@@ -32,9 +36,12 @@
 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
 import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.Collections;
+import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -252,6 +259,42 @@
 		verifyNoMoreInteractions(exploratoryService);
 	}
 
+	@Test
+	public void updateSparkConfig() {
+		final Response response = resources.getJerseyTest()
+				.target("/infrastructure_provision/exploratory_environment/someName/reconfigure")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(Collections.singletonList(new ClusterConfig())));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+		verify(exploratoryService).updateClusterConfig(refEq(getUserInfo()), eq("someName"),
+				eq(Collections.singletonList(new ClusterConfig())));
+		verifyNoMoreInteractions(exploratoryService);
+	}
+
+	@Test
+	public void getSparkConfig() {
+		final ClusterConfig config = new ClusterConfig();
+		config.setClassification("test");
+		when(exploratoryService.getClusterConfig(any(UserInfo.class), anyString())).thenReturn(Collections.singletonList(config));
+		final Response response = resources.getJerseyTest()
+				.target("/infrastructure_provision/exploratory_environment/someName/cluster/config")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+
+		final List<ClusterConfig> clusterConfigs = response.readEntity(new GenericType<List<ClusterConfig>>() {
+		});
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertEquals(1, clusterConfigs.size());
+		assertEquals("test", clusterConfigs.get(0).getClassification());
+
+		verify(exploratoryService).getClusterConfig(refEq(getUserInfo()), eq("someName"));
+		verifyNoMoreInteractions(exploratoryService);
+	}
+
 	private ExploratoryCreateFormDTO getExploratoryCreateFormDTO() {
 		ExploratoryCreateFormDTO ecfDto = new ExploratoryCreateFormDTO();
 		ecfDto.setImage("someImage");
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/GitCredsResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/GitCredsResourceTest.java
index 22e090c..8557792 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/GitCredsResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/GitCredsResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ImageExploratoryResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ImageExploratoryResourceTest.java
index 9342be3..11522d1 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ImageExploratoryResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/ImageExploratoryResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -120,7 +123,7 @@
 
 	@Test
 	public void getImages() {
-		when(imageExploratoryService.getCreatedImages(anyString(), anyString()))
+		when(imageExploratoryService.getNotFailedImages(anyString(), anyString()))
 				.thenReturn(getImageList());
 		final Response response = resources.getJerseyTest()
 				.target("/infrastructure_provision/exploratory_environment/image")
@@ -134,14 +137,14 @@
 		}));
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(imageExploratoryService).getCreatedImages(USER.toLowerCase(), "someDockerImage");
+		verify(imageExploratoryService).getNotFailedImages(USER.toLowerCase(), "someDockerImage");
 		verifyNoMoreInteractions(imageExploratoryService);
 	}
 
 	@Test
 	public void getImagesWithFailedAuth() throws AuthenticationException {
 		authFailSetup();
-		when(imageExploratoryService.getCreatedImages(anyString(), anyString()))
+		when(imageExploratoryService.getNotFailedImages(anyString(), anyString()))
 				.thenReturn(getImageList());
 		final Response response = resources.getJerseyTest()
 				.target("/infrastructure_provision/exploratory_environment/image")
@@ -155,7 +158,7 @@
 		}));
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(imageExploratoryService).getCreatedImages(USER.toLowerCase(), "someDockerImage");
+		verify(imageExploratoryService).getNotFailedImages(USER.toLowerCase(), "someDockerImage");
 		verifyNoMoreInteractions(imageExploratoryService);
 	}
 
@@ -207,7 +210,7 @@
 				.get();
 
 		assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus());
-		assertEquals(MediaType.TEXT_PLAIN, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
 		verify(imageExploratoryService).getImage(USER.toLowerCase(), "someName");
 		verifyNoMoreInteractions(imageExploratoryService);
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResourceTest.java
index e141e93..631b79f 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResourceTest.java
index d0f8788..a054ff7 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureTemplateResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java
index b88bd74..1628cba 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -95,7 +98,7 @@
 				.get();
 
 		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
 		verify(keyService).getUserKeyStatus(USER.toLowerCase());
 		verifyNoMoreInteractions(keyService);
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java
index 2a8b77d..50f6763 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/LibExploratoryResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -22,9 +25,9 @@
 import com.epam.dlab.backendapi.resources.dto.*;
 import com.epam.dlab.backendapi.service.ExternalLibraryService;
 import com.epam.dlab.backendapi.service.LibraryService;
-import com.epam.dlab.backendapi.resources.dto.LibraryDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.exploratory.LibInstallDTO;
 import com.epam.dlab.dto.exploratory.LibraryInstallDTO;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.rest.client.RESTService;
@@ -41,9 +44,9 @@
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
-import java.util.Collections;
 import java.util.List;
 
+import static java.util.Collections.singletonList;
 import static org.junit.Assert.assertEquals;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyString;
@@ -51,6 +54,12 @@
 
 public class LibExploratoryResourceTest extends TestBase {
 
+	private static final String LIB_GROUP = "group";
+	private static final String LIB_NAME = "name";
+	private static final String LIB_VERSION = "version";
+	private static final String EXPLORATORY_NAME = "explName";
+	private static final String COMPUTATIONAL_NAME = "compName";
+	private static final String UUID = "uid";
 	private ExploratoryDAO exploratoryDAO = mock(ExploratoryDAO.class);
 	private LibraryService libraryService = mock(LibraryService.class);
 	private RESTService provisioningService = mock(RESTService.class);
@@ -59,8 +68,7 @@
 
 	@Rule
 	public final ResourceTestRule resources = getResourceTestRuleInstance(
-			new LibExploratoryResource(exploratoryDAO, libraryService, provisioningService, requestId,
-					externalLibraryService));
+			new LibExploratoryResource(exploratoryDAO, libraryService, externalLibraryService));
 
 	@Before
 	public void setup() throws AuthenticationException {
@@ -256,79 +264,49 @@
 
 	@Test
 	public void libInstall() {
-		when(libraryService.generateLibraryInstallDTO(any(UserInfo.class), any(LibInstallFormDTO.class)))
-				.thenReturn(getLibraryInstallDTO());
-		when(libraryService.prepareComputationalLibInstallation(anyString(), any(LibInstallFormDTO.class),
-				any(LibraryInstallDTO.class))).thenReturn(getLibraryInstallDTO());
-		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any()))
-				.thenReturn("someUuid");
-		when(requestId.put(anyString(), anyString())).thenReturn("someUuid");
+		when(libraryService.installComputationalLibs(any(UserInfo.class), anyString(), anyString(),
+				anyListOf(LibInstallDTO.class))).thenReturn(UUID);
 		LibInstallFormDTO libInstallFormDTO = new LibInstallFormDTO();
-		libInstallFormDTO.setComputationalName("compName");
-		libInstallFormDTO.setNotebookName("explName");
-		libInstallFormDTO.setLibs(Collections.emptyList());
+		libInstallFormDTO.setComputationalName(COMPUTATIONAL_NAME);
+		libInstallFormDTO.setNotebookName(EXPLORATORY_NAME);
+		libInstallFormDTO.setLibs(singletonList(new LibInstallDTO(LIB_GROUP, LIB_NAME, LIB_VERSION)));
 		final Response response = resources.getJerseyTest()
 				.target("/infrastructure_provision/exploratory_environment/lib_install")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
 				.post(Entity.json(libInstallFormDTO));
 
-		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(UUID, response.readEntity(String.class));
 
-		verifyZeroInteractions(libraryService, provisioningService, requestId);
-	}
-
-	@Test
-	public void libInstallWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(libraryService.generateLibraryInstallDTO(any(UserInfo.class), any(LibInstallFormDTO.class)))
-				.thenReturn(getLibraryInstallDTO());
-		when(libraryService.prepareComputationalLibInstallation(anyString(), any(LibInstallFormDTO.class),
-				any(LibraryInstallDTO.class))).thenReturn(getLibraryInstallDTO());
-		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any()))
-				.thenReturn("someUuid");
-		when(requestId.put(anyString(), anyString())).thenReturn("someUuid");
-		LibInstallFormDTO libInstallFormDTO = new LibInstallFormDTO();
-		libInstallFormDTO.setComputationalName("compName");
-		libInstallFormDTO.setNotebookName("explName");
-		libInstallFormDTO.setLibs(Collections.emptyList());
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure_provision/exploratory_environment/lib_install")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(libInstallFormDTO));
-
-		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verifyZeroInteractions(libraryService, provisioningService, requestId);
+		verify(libraryService).installComputationalLibs(refEq(getUserInfo()), eq(EXPLORATORY_NAME),
+				eq(COMPUTATIONAL_NAME), eq(singletonList(new LibInstallDTO(LIB_GROUP, LIB_NAME, LIB_VERSION))));
+		verifyNoMoreInteractions(libraryService);
+		verifyZeroInteractions(provisioningService, requestId);
 	}
 
 
 	@Test
 	public void libInstallWithoutComputational() {
-		when(libraryService.generateLibraryInstallDTO(any(UserInfo.class), any(LibInstallFormDTO.class)))
-				.thenReturn(getLibraryInstallDTO());
-		when(libraryService.prepareExploratoryLibInstallation(anyString(), any(LibInstallFormDTO.class),
-				any(LibraryInstallDTO.class))).thenReturn(getLibraryInstallDTO());
-		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any()))
-				.thenReturn("someUuid");
-		when(requestId.put(anyString(), anyString())).thenReturn("someUuid");
+		when(libraryService.installExploratoryLibs(any(UserInfo.class), anyString(), anyListOf(LibInstallDTO.class))).thenReturn(UUID);
 		LibInstallFormDTO libInstallFormDTO = new LibInstallFormDTO();
-		libInstallFormDTO.setComputationalName("");
-		libInstallFormDTO.setNotebookName("explName");
-		libInstallFormDTO.setLibs(Collections.emptyList());
+		libInstallFormDTO.setNotebookName(EXPLORATORY_NAME);
+		libInstallFormDTO.setLibs(singletonList(new LibInstallDTO(LIB_GROUP, LIB_NAME, LIB_VERSION)));
 		final Response response = resources.getJerseyTest()
 				.target("/infrastructure_provision/exploratory_environment/lib_install")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
 				.post(Entity.json(libInstallFormDTO));
 
-		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(UUID, response.readEntity(String.class));
 
-		verifyZeroInteractions(libraryService, provisioningService, requestId);
+		verify(libraryService).installExploratoryLibs(refEq(getUserInfo()), eq(EXPLORATORY_NAME),
+				eq(singletonList(new LibInstallDTO(LIB_GROUP, LIB_NAME, LIB_VERSION))));
+		verifyNoMoreInteractions(libraryService);
+		verifyZeroInteractions(provisioningService, requestId);
 	}
 
 	@Test
@@ -447,16 +425,16 @@
 		UserComputationalResource ucResource = new UserComputationalResource();
 		ucResource.setComputationalName("compName");
 		return new UserInstanceDTO().withUser(USER).withExploratoryName("explName")
-				.withResources(Collections.singletonList(ucResource));
+				.withResources(singletonList(ucResource));
 	}
 
 	private List<Document> getDocuments() {
-		return Collections.singletonList(new Document());
+		return singletonList(new Document());
 	}
 
 	private List<LibInfoRecord> getLibInfoRecords() {
-		return Collections.singletonList(new LibInfoRecord(
-				new LibKey(), Collections.singletonList(new LibraryStatus())));
+		return singletonList(new LibInfoRecord(
+				new LibKey(), singletonList(new LibraryStatus())));
 	}
 
 	private LibraryInstallDTO getLibraryInstallDTO() {
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SchedulerJobResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SchedulerJobResourceTest.java
index f6f4280..f85156c 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SchedulerJobResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SchedulerJobResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -20,6 +23,7 @@
 import com.epam.dlab.dto.SchedulerJobDTO;
 import com.epam.dlab.exceptions.ResourceInappropriateStateException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.epam.dlab.model.scheduler.SchedulerJobData;
 import io.dropwizard.auth.AuthenticationException;
 import io.dropwizard.testing.junit.ResourceTestRule;
 import org.apache.http.HttpStatus;
@@ -28,12 +32,15 @@
 import org.junit.Test;
 
 import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.time.*;
 import java.time.temporal.ChronoUnit;
 import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -80,7 +87,7 @@
 		final Response response = resources.getJerseyTest()
 				.target("/infrastructure_provision/exploratory_environment/scheduler/explName")
 				.request()
-				.header("Authorization", "Bearer " + TOKEN)
+				.header("Authorization", String.join(" ", "Bearer", TOKEN))
 				.post(Entity.json(getSchedulerJobDTO()));
 
 		assertEquals(HttpStatus.SC_OK, response.getStatus());
@@ -215,7 +222,7 @@
 				.get();
 
 		assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus());
-		assertEquals(MediaType.TEXT_PLAIN, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
 		verify(schedulerJobService).fetchSchedulerJobForUserAndExploratory(USER.toLowerCase(), "explName");
 		verifyNoMoreInteractions(schedulerJobService);
@@ -272,13 +279,39 @@
 				.get();
 
 		assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus());
-		assertEquals(MediaType.TEXT_PLAIN, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
 		verify(schedulerJobService).fetchSchedulerJobForComputationalResource(USER.toLowerCase(),
 				"explName", "compName");
 		verifyNoMoreInteractions(schedulerJobService);
 	}
 
+	@Test
+	public void testGetActiveSchedulers() {
+		when(schedulerJobService.getActiveSchedulers(anyString(), anyLong()))
+				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, "exploratoryName", null,
+						getSchedulerJobDTO())));
+		final long minuteOffset = 10L;
+		final Response response = resources.getJerseyTest()
+				.target("/infrastructure_provision/exploratory_environment/scheduler/active")
+				.queryParam("minuteOffset", minuteOffset)
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+		final List<SchedulerJobData> activeSchedulers = response.readEntity(new GenericType<List<SchedulerJobData>>() {
+		});
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertEquals(1, activeSchedulers.size());
+		assertEquals(Collections.singletonList(new SchedulerJobData(USER, "exploratoryName", null,
+				getSchedulerJobDTO())), activeSchedulers);
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+
+		verify(schedulerJobService).getActiveSchedulers(USER.toLowerCase(), minuteOffset);
+		verifyNoMoreInteractions(schedulerJobService);
+
+	}
+
 	private SchedulerJobDTO getSchedulerJobDTO() {
 		SchedulerJobDTO schedulerJobDTO = new SchedulerJobDTO();
 		schedulerJobDTO.setTimeZoneOffset(OffsetDateTime.now(ZoneId.systemDefault()).getOffset());
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SecurityResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SecurityResourceTest.java
index d9800d6..967c05e 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SecurityResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SecurityResourceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
@@ -26,6 +29,7 @@
 import io.dropwizard.testing.junit.ResourceTestRule;
 import org.apache.http.HttpHeaders;
 import org.apache.http.HttpStatus;
+import org.bson.Document;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -33,6 +37,7 @@
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import java.util.ArrayList;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -101,7 +106,7 @@
 				.target("/user/authorize")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(USER));
+				.post(Entity.entity(USER, MediaType.TEXT_PLAIN));
 
 		assertEquals(HttpStatus.SC_OK, response.getStatus());
 		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
@@ -120,7 +125,7 @@
 				.target("/user/authorize")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(USER));
+				.post(Entity.entity(USER, MediaType.TEXT_PLAIN));
 
 		assertEquals(HttpStatus.SC_OK, response.getStatus());
 		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
@@ -139,7 +144,7 @@
 				.target("/user/authorize")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(USER));
+				.post(Entity.entity(USER, MediaType.TEXT_PLAIN));
 
 		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
@@ -151,22 +156,6 @@
 	}
 
 	@Test
-	public void authorizeWhenStatusIsNotOk() {
-		doNothing().when(envStatusListener).registerSession(any(UserInfo.class));
-		when(configuration.isRolePolicyEnabled()).thenReturn(true);
-		final Response response = resources.getJerseyTest()
-				.target("/user/authorize")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json("someUser"));
-
-		assertEquals(HttpStatus.SC_FORBIDDEN, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verifyZeroInteractions(envStatusListener, configuration);
-	}
-
-	@Test
 	public void authorizeWithException() {
 		doThrow(new RuntimeException()).when(envStatusListener).registerSession(any(UserInfo.class));
 		when(configuration.isRolePolicyEnabled()).thenReturn(true);
@@ -174,7 +163,7 @@
 				.target("/user/authorize")
 				.request()
 				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(USER));
+				.post(Entity.entity(USER, MediaType.TEXT_PLAIN));
 
 		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SystemInfoResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SystemInfoResourceTest.java
new file mode 100644
index 0000000..1d7eea1
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/SystemInfoResourceTest.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.backendapi.resources.dto.SystemInfoDto;
+import com.epam.dlab.backendapi.service.SystemInfoService;
+import com.epam.dlab.model.systeminfo.DiskInfo;
+import com.epam.dlab.model.systeminfo.MemoryInfo;
+import com.epam.dlab.model.systeminfo.OsInfo;
+import com.epam.dlab.model.systeminfo.ProcessorInfo;
+import io.dropwizard.auth.AuthenticationException;
+import io.dropwizard.testing.junit.ResourceTestRule;
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.Collections;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.*;
+
+public class SystemInfoResourceTest extends TestBase {
+
+	private SystemInfoService systemInfoService = mock(SystemInfoService.class);
+
+	@Rule
+	public final ResourceTestRule resources = getResourceTestRuleInstance(new SystemInfoResource(systemInfoService));
+
+	@Before
+	public void setup() throws AuthenticationException {
+		authSetup();
+	}
+
+	@Test
+	public void getSystemInfo() {
+		when(systemInfoService.getSystemInfo()).thenReturn(getSystemInfoDto());
+		final Response response = resources.getJerseyTest()
+				.target("/sysinfo")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+
+		verify(systemInfoService).getSystemInfo();
+		verifyNoMoreInteractions(systemInfoService);
+	}
+
+	@Test
+	public void getSystemInfoWithFailedAuth() throws AuthenticationException {
+		authFailSetup();
+		when(systemInfoService.getSystemInfo()).thenReturn(getSystemInfoDto());
+		final Response response = resources.getJerseyTest()
+				.target("/sysinfo")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+
+		assertEquals(HttpStatus.SC_FORBIDDEN, response.getStatus());
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+
+		verifyZeroInteractions(systemInfoService);
+	}
+
+	private SystemInfoDto getSystemInfoDto() {
+		OsInfo osInfo = OsInfo.builder()
+				.family(System.getProperty("os.name"))
+				.buildNumber(System.getProperty("os.version"))
+				.build();
+		ProcessorInfo processorInfo = ProcessorInfo.builder().build();
+		MemoryInfo memoryInfo = MemoryInfo.builder().build();
+		DiskInfo diskInfo = DiskInfo.builder().build();
+		return new SystemInfoDto(osInfo, processorInfo, memoryInfo, Collections.singletonList(diskInfo));
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/TestBase.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/TestBase.java
index 8f8b01d..ea6b9cc 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/TestBase.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/TestBase.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserGroupResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserGroupResourceTest.java
new file mode 100644
index 0000000..1953694
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserGroupResourceTest.java
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.backendapi.resources.dto.GroupDTO;
+import com.epam.dlab.backendapi.resources.dto.UpdateRoleGroupDto;
+import com.epam.dlab.backendapi.resources.dto.UpdateUserGroupDto;
+import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
+import com.epam.dlab.backendapi.service.UserGroupService;
+import io.dropwizard.auth.AuthenticationException;
+import io.dropwizard.testing.junit.ResourceTestRule;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import static java.util.Collections.singleton;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.*;
+
+public class UserGroupResourceTest extends TestBase {
+
+	private static final String USER = "user";
+	private static final String ROLE_ID = "id";
+	private static final String GROUP = "group";
+	private UserGroupService userGroupService = mock(UserGroupService.class);
+
+	@Before
+	public void setup() throws AuthenticationException {
+		authSetup();
+	}
+
+	@Rule
+	public final ResourceTestRule resources =
+			getResourceTestRuleInstance(new UserGroupResource(userGroupService));
+
+	@Test
+	public void createGroup() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/group")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.post(Entity.json(getCreateGroupDto(GROUP, Collections.singleton(ROLE_ID))));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+		verify(userGroupService).createGroup(GROUP, Collections.singleton(ROLE_ID), Collections.singleton(USER));
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void createGroupWhenGroupNameIsEmpty() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/group")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.post(Entity.json(getCreateGroupDto("", Collections.singleton(ROLE_ID))));
+
+		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
+
+		verifyZeroInteractions(userGroupService);
+	}
+
+	@Test
+	public void createGroupWhenRoleIdIsEmpty() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/group")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.post(Entity.json(getCreateGroupDto(GROUP, Collections.emptySet())));
+
+		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
+
+		verifyZeroInteractions(userGroupService);
+	}
+
+	@Test
+	public void updateGroup() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/group")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(getCreateGroupDto(GROUP, Collections.singleton(ROLE_ID))));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+		verify(userGroupService).updateGroup(GROUP, Collections.singleton(ROLE_ID), Collections.singleton(USER));
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void getGroups() {
+		when(userGroupService.getAggregatedRolesByGroup()).thenReturn(Collections.singletonList(getUserGroup()));
+
+		final Response response = resources.getJerseyTest()
+				.target("/group")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+
+		final List<UserGroupDto> actualRoles = response.readEntity(new GenericType<List<UserGroupDto>>() {
+		});
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertEquals(GROUP, actualRoles.get(0).getGroup());
+		assertTrue(actualRoles.get(0).getRoles().isEmpty());
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+
+		verify(userGroupService).getAggregatedRolesByGroup();
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void addRolesToGroup() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/group/role")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(new UpdateRoleGroupDto(singleton(ROLE_ID), GROUP)));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+		verify(userGroupService).updateRolesForGroup(GROUP, singleton(ROLE_ID));
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void addRolesToGroupWithValidationException() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/group/role")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(new UpdateRoleGroupDto(singleton(ROLE_ID), StringUtils.EMPTY)));
+
+		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
+
+		verifyZeroInteractions(userGroupService);
+	}
+
+	@Test
+	public void deleteGroupFromRole() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/role")
+				.queryParam("group", GROUP)
+				.queryParam("roleId", ROLE_ID)
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.delete();
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+
+		verify(userGroupService).removeGroupFromRole(singleton(GROUP), singleton(ROLE_ID));
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void deleteGroup() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/" + GROUP)
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.delete();
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+
+		verify(userGroupService).removeGroup(GROUP);
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void deleteGroupFromRoleWithValidationException() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/role")
+				.queryParam("group", GROUP)
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.delete();
+
+		assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatus());
+
+		verifyZeroInteractions(userGroupService);
+	}
+
+	@Test
+	public void addUserToGroup() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/user")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(new UpdateUserGroupDto(GROUP, singleton(USER))));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+		verify(userGroupService).addUsersToGroup(GROUP, singleton(USER));
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void addUserToGroupWithValidationException() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/user")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(new UpdateUserGroupDto(StringUtils.EMPTY, singleton(USER))));
+
+		assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, response.getStatus());
+
+		verifyZeroInteractions(userGroupService);
+	}
+
+	@Test
+	public void deleteUserFromGroup() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/user")
+				.queryParam("user", USER)
+				.queryParam("group", GROUP)
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.delete();
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+
+		verify(userGroupService).removeUserFromGroup(GROUP, USER);
+		verifyNoMoreInteractions(userGroupService);
+	}
+
+	@Test
+	public void deleteUserFromGroupWithValidationException() {
+		final Response response = resources.getJerseyTest()
+				.target("/group/user")
+				.queryParam("group", GROUP)
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.delete();
+
+		assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatus());
+
+		verifyZeroInteractions(userGroupService);
+	}
+
+	private UserGroupDto getUserGroup() {
+		return new UserGroupDto(GROUP, Collections.emptyList(), Collections.emptySet());
+	}
+
+	private GroupDTO getCreateGroupDto(String group, Set<String> roleIds) {
+		final GroupDTO dto = new GroupDTO();
+		dto.setName(group);
+		dto.setRoleIds(roleIds);
+		dto.setUsers(Collections.singleton(USER));
+		return dto;
+	}
+
+
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserRoleResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserRoleResourceTest.java
new file mode 100644
index 0000000..6c0f5be
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserRoleResourceTest.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.resources;
+
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+import com.epam.dlab.backendapi.service.UserRoleService;
+import io.dropwizard.auth.AuthenticationException;
+import io.dropwizard.testing.junit.ResourceTestRule;
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.Collections;
+import java.util.List;
+
+import static java.util.Collections.singleton;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.*;
+
+public class UserRoleResourceTest extends TestBase {
+
+
+	private static final String USER = "user";
+	private static final String ROLE_ID = "id";
+
+	private UserRoleService rolesService = mock(UserRoleService.class);
+
+	@Before
+	public void setup() throws AuthenticationException {
+		authSetup();
+	}
+
+	@Rule
+	public final ResourceTestRule resources =
+			getResourceTestRuleInstance(new UserRoleResource(rolesService));
+
+
+	@Test
+	public void getRoles() {
+		when(rolesService.getUserRoles()).thenReturn(Collections.singletonList(getUserRole()));
+
+		final Response response = resources.getJerseyTest()
+				.target("/role")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.get();
+
+		final List<UserRoleDto> actualRoles = response.readEntity(new GenericType<List<UserRoleDto>>() {
+		});
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertEquals(ROLE_ID, actualRoles.get(0).getId());
+		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+
+		verify(rolesService).getUserRoles();
+		verifyNoMoreInteractions(rolesService);
+	}
+
+	@Test
+	public void createRole() {
+
+		final Response response = resources.getJerseyTest()
+				.target("/role")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.post(Entity.json(getUserRole()));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+
+		verify(rolesService).createRole(refEq(getUserRole()));
+		verifyNoMoreInteractions(rolesService);
+	}
+
+	private UserRoleDto getUserRole() {
+		final UserRoleDto userRoleDto = new UserRoleDto();
+		userRoleDto.setId(ROLE_ID);
+		return userRoleDto;
+	}
+
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserSettingsResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserSettingsResourceTest.java
index c9c8062..be2569c 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserSettingsResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/UserSettingsResourceTest.java
@@ -1,23 +1,27 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.UserSettingsDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+import com.epam.dlab.backendapi.service.UserSettingService;
 import io.dropwizard.auth.AuthenticationException;
 import io.dropwizard.testing.junit.ResourceTestRule;
 import org.apache.http.HttpHeaders;
@@ -30,6 +34,7 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+import static java.util.Collections.singletonList;
 import static org.junit.Assert.*;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyString;
@@ -39,10 +44,11 @@
 
 public class UserSettingsResourceTest extends TestBase {
 
-	private UserSettingsDAO userSettingsDAO = mock(UserSettingsDAO.class);
+	private UserSettingService userSettingService = mock(UserSettingService.class);
 
 	@Rule
-	public final ResourceTestRule resources = getResourceTestRuleInstance(new UserSettingsResource(userSettingsDAO));
+	public final ResourceTestRule resources =
+			getResourceTestRuleInstance(new UserSettingsResource(userSettingService));
 
 	@Before
 	public void setup() throws AuthenticationException {
@@ -51,7 +57,7 @@
 
 	@Test
 	public void getSettings() {
-		when(userSettingsDAO.getUISettings(any(UserInfo.class))).thenReturn("someSettings");
+		when(userSettingService.getUISettings(any(UserInfo.class))).thenReturn("someSettings");
 		final Response response = resources.getJerseyTest()
 				.target("/user/settings")
 				.request()
@@ -62,14 +68,14 @@
 		assertEquals("someSettings", response.readEntity(String.class));
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(userSettingsDAO).getUISettings(refEq(getUserInfo()));
-		verifyNoMoreInteractions(userSettingsDAO);
+		verify(userSettingService).getUISettings(refEq(getUserInfo()));
+		verifyNoMoreInteractions(userSettingService);
 	}
 
 	@Test
 	public void getSettingsWithFailedAuth() throws AuthenticationException {
 		authFailSetup();
-		when(userSettingsDAO.getUISettings(any(UserInfo.class))).thenReturn("someSettings");
+		when(userSettingService.getUISettings(any(UserInfo.class))).thenReturn("someSettings");
 		final Response response = resources.getJerseyTest()
 				.target("/user/settings")
 				.request()
@@ -80,13 +86,13 @@
 		assertEquals("someSettings", response.readEntity(String.class));
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(userSettingsDAO).getUISettings(refEq(getUserInfo()));
-		verifyNoMoreInteractions(userSettingsDAO);
+		verify(userSettingService).getUISettings(refEq(getUserInfo()));
+		verifyNoMoreInteractions(userSettingService);
 	}
 
 	@Test
 	public void saveSettings() {
-		doNothing().when(userSettingsDAO).setUISettings(any(UserInfo.class), anyString());
+		doNothing().when(userSettingService).saveUISettings(any(UserInfo.class), anyString());
 		final Response response = resources.getJerseyTest()
 				.target("/user/settings")
 				.request()
@@ -96,14 +102,14 @@
 		assertEquals(HttpStatus.SC_OK, response.getStatus());
 		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(userSettingsDAO).setUISettings(refEq(getUserInfo()), eq("someSettings"));
-		verifyNoMoreInteractions(userSettingsDAO);
+		verify(userSettingService).saveUISettings(refEq(getUserInfo()), eq("someSettings"));
+		verifyNoMoreInteractions(userSettingService);
 	}
 
 	@Test
 	public void saveSettingsWithFailedAuth() throws AuthenticationException {
 		authFailSetup();
-		doNothing().when(userSettingsDAO).setUISettings(any(UserInfo.class), anyString());
+		doNothing().when(userSettingService).saveUISettings(any(UserInfo.class), anyString());
 		final Response response = resources.getJerseyTest()
 				.target("/user/settings")
 				.request()
@@ -113,13 +119,13 @@
 		assertEquals(HttpStatus.SC_OK, response.getStatus());
 		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(userSettingsDAO).setUISettings(refEq(getUserInfo()), eq("someSettings"));
-		verifyNoMoreInteractions(userSettingsDAO);
+		verify(userSettingService).saveUISettings(refEq(getUserInfo()), eq("someSettings"));
+		verifyNoMoreInteractions(userSettingService);
 	}
 
 	@Test
 	public void saveSettingsWithException() {
-		doThrow(new RuntimeException()).when(userSettingsDAO).setUISettings(any(UserInfo.class), anyString());
+		doThrow(new RuntimeException()).when(userSettingService).saveUISettings(any(UserInfo.class), anyString());
 		final Response response = resources.getJerseyTest()
 				.target("/user/settings")
 				.request()
@@ -131,7 +137,23 @@
 				"processing your request. It has been logged"));
 		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
 
-		verify(userSettingsDAO).setUISettings(refEq(getUserInfo()), eq("someSettings"));
-		verifyNoMoreInteractions(userSettingsDAO);
+		verify(userSettingService).saveUISettings(refEq(getUserInfo()), eq("someSettings"));
+		verifyNoMoreInteractions(userSettingService);
+	}
+
+	@Test
+	public void saveAllowedBudget() {
+		doNothing().when(userSettingService).saveUISettings(any(UserInfo.class), anyString());
+		final Response response = resources.getJerseyTest()
+				.target("/user/settings/budget")
+				.request()
+				.header("Authorization", "Bearer " + TOKEN)
+				.put(Entity.json(singletonList(new UserDTO(USER, 10, UserDTO.Status.ACTIVE))));
+
+		assertEquals(HttpStatus.SC_OK, response.getStatus());
+		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
+
+		verify(userSettingService).updateUsersBudget(singletonList(new UserDTO(USER, 10, UserDTO.Status.ACTIVE)));
+		verifyNoMoreInteractions(userSettingService);
 	}
 }
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/roles/UserRolesTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/roles/UserRolesTest.java
index 62f1c2f..d974c81 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/roles/UserRolesTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/roles/UserRolesTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.roles;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/schedulers/CheckApplicationQuoteSchedulerTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/schedulers/CheckApplicationQuoteSchedulerTest.java
new file mode 100644
index 0000000..99fd932
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/schedulers/CheckApplicationQuoteSchedulerTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.schedulers;
+
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.service.EnvironmentService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.quartz.JobExecutionContext;
+
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class CheckApplicationQuoteSchedulerTest {
+
+	@Mock
+	private BillingDAO billingDAO;
+	@Mock
+	private EnvironmentService environmentService;
+	@Mock
+	private JobExecutionContext jobExecutionContext;
+	@InjectMocks
+	private CheckApplicationQuoteScheduler checkApplicationQuoteScheduler;
+
+	@Test
+	public void testWhenQuoteNotReached() {
+		when(billingDAO.isBillingQuoteReached()).thenReturn(false);
+
+		checkApplicationQuoteScheduler.execute(jobExecutionContext);
+
+		verify(billingDAO).isBillingQuoteReached();
+		verifyNoMoreInteractions(billingDAO);
+		verifyZeroInteractions(environmentService);
+	}
+
+	@Test
+	public void testWhenQuoteReached() {
+		when(billingDAO.isBillingQuoteReached()).thenReturn(true);
+
+		checkApplicationQuoteScheduler.execute(jobExecutionContext);
+
+		verify(billingDAO).isBillingQuoteReached();
+		verify(environmentService).stopAll();
+		verifyNoMoreInteractions(billingDAO, environmentService);
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteSchedulerTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteSchedulerTest.java
new file mode 100644
index 0000000..d858573
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteSchedulerTest.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.schedulers;
+
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+import com.epam.dlab.backendapi.service.EnvironmentService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.quartz.JobExecutionContext;
+
+import java.util.Collections;
+
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class CheckUserQuoteSchedulerTest {
+
+	private static final String USER = "test";
+	@Mock
+	private BillingDAO billingDAO;
+	@Mock
+	private EnvironmentService environmentService;
+	@Mock
+	private JobExecutionContext jobExecutionContext;
+	@InjectMocks
+	private CheckUserQuoteScheduler checkUserQuoteScheduler;
+
+	@Test
+	public void testWhenUserQuoteReached() {
+		when(billingDAO.isUserQuoteReached(anyString())).thenReturn(true);
+		when(environmentService.getUsers()).thenReturn(Collections.singletonList(new UserDTO(USER, 1, UserDTO.Status.ACTIVE)));
+
+		checkUserQuoteScheduler.execute(jobExecutionContext);
+
+		verify(environmentService).getUsers();
+		verify(billingDAO).isUserQuoteReached(USER);
+		verify(environmentService).stopEnvironment(USER);
+		verifyNoMoreInteractions(environmentService, billingDAO);
+		verifyZeroInteractions(jobExecutionContext);
+	}
+
+	@Test
+	public void testWhenUserQuoteNotReached() {
+		when(billingDAO.isUserQuoteReached(anyString())).thenReturn(false);
+		when(environmentService.getUsers()).thenReturn(Collections.singletonList(new UserDTO(USER, 1, UserDTO.Status.ACTIVE)));
+
+		checkUserQuoteScheduler.execute(jobExecutionContext);
+
+		verify(environmentService).getUsers();
+		verify(billingDAO).isUserQuoteReached(USER);
+		verify(environmentService, never()).stopEnvironment(anyString());
+		verifyNoMoreInteractions(environmentService, billingDAO);
+		verifyZeroInteractions(jobExecutionContext);
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/ApplicationSettingServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/ApplicationSettingServiceImplTest.java
new file mode 100644
index 0000000..317a076
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/ApplicationSettingServiceImplTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.dao.MongoSetting;
+import com.epam.dlab.backendapi.dao.SettingsDAO;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.util.Collections;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class ApplicationSettingServiceImplTest {
+
+	private static final long MAX_BUDGET = 10L;
+	@Mock
+	private SettingsDAO settingsDAO;
+	@InjectMocks
+	private ApplicationSettingServiceImpl applicationSettingService;
+
+	@Test
+	public void setMaxBudget() {
+
+		applicationSettingService.setMaxBudget(MAX_BUDGET);
+
+		verify(settingsDAO).setMaxBudget(MAX_BUDGET);
+		verifyNoMoreInteractions(settingsDAO);
+	}
+
+	@Test
+	public void getSettings() {
+		when(settingsDAO.getSettings()).thenReturn(Collections.singletonMap("key", "value"));
+		final Map<String, Object> settings = applicationSettingService.getSettings();
+		assertEquals(1, settings.size());
+		assertEquals("value", settings.get("key"));
+
+		verify(settingsDAO).getSettings();
+		verifyNoMoreInteractions(settingsDAO);
+	}
+
+	@Test
+	public void removeMaxBudget() {
+
+		applicationSettingService.removeMaxBudget();
+
+		verify(settingsDAO).removeSetting(MongoSetting.CONF_MAX_BUDGET);
+		verifyNoMoreInteractions(settingsDAO);
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/UserRoleServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/UserRoleServiceImplTest.java
new file mode 100644
index 0000000..83fab66
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/UserRoleServiceImplTest.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.backendapi.dao.UserRoleDao;
+import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
+import com.epam.dlab.exceptions.ResourceNotFoundException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.util.Collections;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class UserRoleServiceImplTest {
+
+	private static final String ROLE_ID = "roleId";
+	@Mock
+	private UserRoleDao dao;
+	@InjectMocks
+	private UserRoleServiceImpl userRoleService;
+	@Rule
+	public ExpectedException expectedException = ExpectedException.none();
+
+	@Test
+	public void getUserRoles() {
+		when(dao.findAll()).thenReturn(Collections.singletonList(getUserRole()));
+		final List<UserRoleDto> roles = userRoleService.getUserRoles();
+
+		assertEquals(1, roles.size());
+		assertEquals(ROLE_ID, roles.get(0).getId());
+
+		verify(dao).findAll();
+		verifyNoMoreInteractions(dao);
+	}
+
+
+	@Test
+	public void createRole() {
+
+		userRoleService.createRole(getUserRole());
+
+		verify(dao).insert(refEq(getUserRole()));
+		verifyNoMoreInteractions(dao);
+	}
+
+	@Test
+	public void updateRole() {
+		when(dao.update(any())).thenReturn(true);
+		userRoleService.updateRole(getUserRole());
+
+		verify(dao).update(refEq(getUserRole()));
+		verifyNoMoreInteractions(dao);
+	}
+
+	@Test
+	public void updateRoleWithException() {
+
+		expectedException.expectMessage("Any of role : [" + ROLE_ID + "] were not found");
+		expectedException.expect(ResourceNotFoundException.class);
+		when(dao.update(any())).thenReturn(false);
+		userRoleService.updateRole(getUserRole());
+	}
+
+	@Test
+	public void removeRole() {
+
+		userRoleService.removeRole(ROLE_ID);
+
+		verify(dao).remove(ROLE_ID);
+		verifyNoMoreInteractions(dao);
+	}
+
+	private UserRoleDto getUserRole() {
+		final UserRoleDto userRoleDto = new UserRoleDto();
+		userRoleDto.setId(ROLE_ID);
+		return userRoleDto;
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/UserSettingServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/UserSettingServiceImplTest.java
new file mode 100644
index 0000000..e44d8eb
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/UserSettingServiceImplTest.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service;
+
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.UserSettingsDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.util.Collections;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.refEq;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class UserSettingServiceImplTest {
+
+	private static final String SETTINGS = "settings";
+	private static final String TOKEN = "Token";
+	private static final String USER = "user";
+	private static final Integer BUDGET = 10;
+	@Mock
+	private UserSettingsDAO settingsDAO;
+	@InjectMocks
+	private UserSettingServiceImpl userSettingService;
+
+	@Test
+	public void saveUISettings() {
+		userSettingService.saveUISettings(getUserInfo(), SETTINGS);
+
+		verify(settingsDAO).setUISettings(refEq(getUserInfo()), eq(SETTINGS));
+		verifyNoMoreInteractions(settingsDAO);
+	}
+
+	@Test
+	public void getUISettings() {
+		when(settingsDAO.getUISettings(any(UserInfo.class))).thenReturn(SETTINGS);
+
+		final String uiSettings = userSettingService.getUISettings(getUserInfo());
+
+		assertEquals(SETTINGS, uiSettings);
+		verify(settingsDAO).getUISettings(refEq(getUserInfo()));
+	}
+
+	@Test
+	public void updateUsersBudget() {
+
+		userSettingService.updateUsersBudget(Collections.singletonList(getBudgetDTO()));
+
+		verify(settingsDAO).updateBudget(refEq(getBudgetDTO()));
+		verifyNoMoreInteractions(settingsDAO);
+	}
+
+	private UserDTO getBudgetDTO() {
+		return new UserDTO(USER, BUDGET, UserDTO.Status.ACTIVE);
+	}
+
+
+	private UserInfo getUserInfo() {
+		return new UserInfo(USER, TOKEN);
+	}
+
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java
index 0c5ca87..6b58482 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.aws;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java
index b6b3c96..50aeb39 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.aws;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java
index d01e87c..a69717d 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.aws;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureBillingServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureBillingServiceTest.java
index 9efc6fa..1fafa87 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureBillingServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureBillingServiceTest.java
@@ -1,23 +1,26 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.azure;
 
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.azure.AzureBillingDAO;
+import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.resources.dto.azure.AzureBillingFilter;
 import com.epam.dlab.exceptions.DlabException;
 import org.bson.Document;
@@ -46,7 +49,7 @@
 	private Document basicDocument;
 
 	@Mock
-	private AzureBillingDAO billingDAO;
+	private BillingDAO<AzureBillingFilter> billingDAO;
 
 	@InjectMocks
 	private AzureBillingService azureBillingService;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java
index 756965a..37f5e46 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.azure;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java
index a3ff2b4..0da7503 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.azure;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java
index ae84cf4..b57daf3 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.gcp;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java
index bb254e6..80c7d7a 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.gcp;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java
index 2a27b52..6e6ddbb 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/BackupServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/BackupServiceImplTest.java
index c9672ea..4a27bb5 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/BackupServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/BackupServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java
index ebe7895..6111852 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -24,8 +27,10 @@
 import com.epam.dlab.backendapi.resources.dto.ComputationalCreateFormDTO;
 import com.epam.dlab.backendapi.resources.dto.SparkStandaloneClusterCreateForm;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.dto.SchedulerJobDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.base.computational.ComputationalBase;
 import com.epam.dlab.dto.computational.*;
@@ -43,13 +48,14 @@
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
+import java.time.LocalDateTime;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Optional;
 
-import static com.epam.dlab.dto.UserInstanceStatus.CREATING;
-import static com.epam.dlab.dto.UserInstanceStatus.RUNNING;
+import static com.epam.dlab.dto.UserInstanceStatus.*;
+import static java.util.Collections.singletonList;
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
@@ -57,11 +63,16 @@
 @RunWith(MockitoJUnitRunner.class)
 public class ComputationalServiceImplTest {
 
+	private static final long MAX_INACTIVITY = 10L;
+	private static final String DOCKER_DLAB_DATAENGINE = "docker.dlab-dataengine";
+	private static final String DOCKER_DLAB_DATAENGINE_SERVICE = "docker.dlab-dataengine-service";
+	private static final String COMP_ID = "compId";
 	private final String USER = "test";
 	private final String TOKEN = "token";
 	private final String EXPLORATORY_NAME = "expName";
 	private final String COMP_NAME = "compName";
 	private final String UUID = "1234-56789765-4321";
+	private final LocalDateTime LAST_ACTIVITY = LocalDateTime.now().minusMinutes(MAX_INACTIVITY);
 
 	private UserInfo userInfo;
 	private List<ComputationalCreateFormDTO> formList;
@@ -102,13 +113,11 @@
 		computationalStatusDTOWithStatusStopping = getComputationalStatusDTOWithStatus("stopping");
 		computationalStatusDTOWithStatusStarting = getComputationalStatusDTOWithStatus("starting");
 		sparkClusterResource = getSparkClusterResource();
-		ucResource = getUserComputationalResource();
+		ucResource = getUserComputationalResource(STOPPED, DOCKER_DLAB_DATAENGINE);
 	}
 
 	@Test
 	public void createSparkCluster() {
-		when(configuration.getMinSparkInstanceCount()).thenReturn(2);
-		when(configuration.getMaxSparkInstanceCount()).thenReturn(1000);
 		when(computationalDAO.addComputational(anyString(), anyString(),
 				any(SparkStandaloneClusterResource.class))).thenReturn(true);
 		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(userInstance);
@@ -124,9 +133,6 @@
 				computationalService.createSparkCluster(userInfo, sparkClusterCreateForm);
 		assertTrue(creationResult);
 
-		verify(configuration).getMinSparkInstanceCount();
-		verify(configuration).getMaxSparkInstanceCount();
-
 		verify(computationalDAO)
 				.addComputational(eq(USER), eq(EXPLORATORY_NAME), refEq(sparkClusterResource));
 
@@ -142,35 +148,7 @@
 	}
 
 	@Test
-	public void createSparkClusterWithInappropriateDataEngineInstanceCount() {
-		when(configuration.getMinSparkInstanceCount()).thenReturn(2);
-		when(configuration.getMaxSparkInstanceCount()).thenReturn(1000);
-
-		expectedException.expect(IllegalArgumentException.class);
-		expectedException.expectMessage("Instance count should be in range ");
-
-		SparkStandaloneClusterCreateForm sparkClusterForm = (SparkStandaloneClusterCreateForm) formList.get(0);
-		sparkClusterForm.setDataEngineInstanceCount(String.valueOf(1));
-		computationalService.createSparkCluster(userInfo, sparkClusterForm);
-	}
-
-	@Test
-	public void createSparkClusterWithInappropriateDataEngineImageType() {
-		when(configuration.getMinSparkInstanceCount()).thenReturn(2);
-		when(configuration.getMaxSparkInstanceCount()).thenReturn(1000);
-
-		expectedException.expect(IllegalArgumentException.class);
-		expectedException.expectMessage("Unknown data engine ");
-
-		SparkStandaloneClusterCreateForm sparkClusterForm = (SparkStandaloneClusterCreateForm) formList.get(0);
-		sparkClusterForm.setImage("someImageType");
-		computationalService.createSparkCluster(userInfo, sparkClusterForm);
-	}
-
-	@Test
 	public void createSparkClusterWhenResourceAlreadyExists() {
-		when(configuration.getMinSparkInstanceCount()).thenReturn(2);
-		when(configuration.getMaxSparkInstanceCount()).thenReturn(1000);
 		when(computationalDAO.addComputational(anyString(), anyString(),
 				any(SparkStandaloneClusterResource.class))).thenReturn(false);
 
@@ -178,17 +156,12 @@
 				computationalService.createSparkCluster(userInfo, (SparkStandaloneClusterCreateForm) formList.get(0));
 		assertFalse(creationResult);
 
-		verify(configuration).getMinSparkInstanceCount();
-		verify(configuration).getMaxSparkInstanceCount();
-
 		verify(computationalDAO).addComputational(eq(USER), eq(EXPLORATORY_NAME), refEq(sparkClusterResource));
 		verifyNoMoreInteractions(configuration, computationalDAO);
 	}
 
 	@Test
 	public void createSparkClusterWhenMethodFetchExploratoryFieldsThrowsException() {
-		when(configuration.getMinSparkInstanceCount()).thenReturn(2);
-		when(configuration.getMaxSparkInstanceCount()).thenReturn(1000);
 		when(computationalDAO.addComputational(anyString(), anyString(),
 				any(SparkStandaloneClusterResource.class))).thenReturn(true);
 		doThrow(new ResourceNotFoundException("Exploratory for user with name not found"))
@@ -204,8 +177,6 @@
 			assertEquals("Exploratory for user with name not found", e.getMessage());
 		}
 
-		verify(configuration).getMinSparkInstanceCount();
-		verify(configuration).getMaxSparkInstanceCount();
 		verify(computationalDAO).addComputational(USER, EXPLORATORY_NAME, sparkClusterResource);
 		verify(computationalDAO).updateComputationalStatus(refEq(computationalStatusDTOWithStatusFailed, "self"));
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
@@ -214,8 +185,6 @@
 
 	@Test
 	public void createSparkClusterWhenMethodNewComputationalCreateThrowsException() {
-		when(configuration.getMinSparkInstanceCount()).thenReturn(2);
-		when(configuration.getMaxSparkInstanceCount()).thenReturn(1000);
 		when(computationalDAO.addComputational(anyString(), anyString(),
 				any(SparkStandaloneClusterResource.class))).thenReturn(true);
 		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(userInstance);
@@ -233,9 +202,6 @@
 		} catch (DlabException e) {
 			assertEquals("Cannot create instance of resource class ", e.getMessage());
 		}
-
-		verify(configuration).getMinSparkInstanceCount();
-		verify(configuration).getMaxSparkInstanceCount();
 		verify(computationalDAO).addComputational(USER, EXPLORATORY_NAME, sparkClusterResource);
 		verify(computationalDAO).updateComputationalStatus(refEq(computationalStatusDTOWithStatusFailed, "self"));
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
@@ -267,7 +233,7 @@
 				.thenReturn(UUID);
 		when(requestId.put(anyString(), anyString())).thenReturn(UUID);
 
-		computationalService.terminateComputationalEnvironment(userInfo, EXPLORATORY_NAME, COMP_NAME);
+		computationalService.terminateComputational(userInfo, EXPLORATORY_NAME, COMP_NAME);
 
 		verify(computationalDAO).updateComputationalStatus(refEq(computationalStatusDTOWithStatusTerminating, "self"));
 		verify(computationalDAO).fetchComputationalFields(USER, EXPLORATORY_NAME, COMP_NAME);
@@ -294,7 +260,7 @@
 				.thenReturn(mock(UpdateResult.class));
 
 		try {
-			computationalService.terminateComputationalEnvironment(userInfo, EXPLORATORY_NAME, COMP_NAME);
+			computationalService.terminateComputational(userInfo, EXPLORATORY_NAME, COMP_NAME);
 		} catch (DlabException e) {
 			assertEquals("Could not update computational resource status", e.getMessage());
 		}
@@ -317,7 +283,7 @@
 				.thenReturn(mock(UpdateResult.class));
 
 		try {
-			computationalService.terminateComputationalEnvironment(userInfo, EXPLORATORY_NAME, COMP_NAME);
+			computationalService.terminateComputational(userInfo, EXPLORATORY_NAME, COMP_NAME);
 		} catch (DlabException e) {
 			assertEquals("Computational resource for user with exploratory name not found.", e.getMessage());
 		}
@@ -351,7 +317,7 @@
 				.thenReturn(mock(UpdateResult.class));
 
 		try {
-			computationalService.terminateComputationalEnvironment(userInfo, EXPLORATORY_NAME, COMP_NAME);
+			computationalService.terminateComputational(userInfo, EXPLORATORY_NAME, COMP_NAME);
 		} catch (DlabException e) {
 			assertEquals("Cannot create instance of resource class ", e.getMessage());
 		}
@@ -468,13 +434,11 @@
 
 	@Test
 	public void stopSparkCluster() {
-		final UserInstanceDTO exploratory = new UserInstanceDTO();
-		exploratory.setExploratoryId("someId");
-		exploratory.setExploratoryName(EXPLORATORY_NAME);
-		when(computationalDAO.fetchComputationalFields(anyString(), anyString(), anyString())).thenReturn(ucResource);
+		final UserInstanceDTO exploratory = getUserInstanceDto();
+		exploratory.setResources(singletonList(getUserComputationalResource(RUNNING, DOCKER_DLAB_DATAENGINE)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(exploratory);
 		when(computationalDAO.updateComputationalStatus(any(ComputationalStatusDTO.class)))
 				.thenReturn(mock(UpdateResult.class));
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(exploratory);
 
 		ComputationalStopDTO computationalStopDTO = new ComputationalStopDTO();
 		when(requestBuilder.newComputationalStop(any(UserInfo.class), any(UserInstanceDTO.class), anyString()))
@@ -485,9 +449,8 @@
 
 		computationalService.stopSparkCluster(userInfo, EXPLORATORY_NAME, COMP_NAME);
 
-		verify(computationalDAO).fetchComputationalFields(USER, EXPLORATORY_NAME, COMP_NAME);
 		verify(computationalDAO).updateComputationalStatus(refEq(computationalStatusDTOWithStatusStopping, "self"));
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
+		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, true);
 		verify(requestBuilder).newComputationalStop(refEq(userInfo), refEq(exploratory), eq(COMP_NAME));
 		verify(provisioningService)
 				.post(eq("computational/stop/spark"), eq(TOKEN), refEq(computationalStopDTO), eq(String.class));
@@ -498,24 +461,22 @@
 
 	@Test
 	public void stopSparkClusterWhenDataengineTypeIsAnother() {
-		ucResource.setImageName("dataengine-service");
-		when(computationalDAO.fetchComputationalFields(anyString(), anyString(), anyString())).thenReturn(ucResource);
-
-		expectedException.expect(UnsupportedOperationException.class);
-		expectedException.expectMessage("Operation for data engine service is not supported");
+		final UserInstanceDTO exploratory = getUserInstanceDto();
+		exploratory.setResources(singletonList(getUserComputationalResource(RUNNING, DOCKER_DLAB_DATAENGINE_SERVICE)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(exploratory);
+		expectedException.expect(IllegalStateException.class);
+		expectedException.expectMessage("There is no running dataengine compName for exploratory expName");
 
 		computationalService.stopSparkCluster(userInfo, EXPLORATORY_NAME, COMP_NAME);
 	}
 
 	@Test
 	public void startSparkCluster() {
-		final UserInstanceDTO exploratory = new UserInstanceDTO();
-		exploratory.setExploratoryId("someId");
-		exploratory.setExploratoryName(EXPLORATORY_NAME);
-		when(computationalDAO.fetchComputationalFields(anyString(), anyString(), anyString())).thenReturn(ucResource);
+		final UserInstanceDTO exploratory = getUserInstanceDto();
+		exploratory.setResources(singletonList(getUserComputationalResource(STOPPED, DOCKER_DLAB_DATAENGINE)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(exploratory);
 		when(computationalDAO.updateComputationalStatus(any(ComputationalStatusDTO.class)))
 				.thenReturn(mock(UpdateResult.class));
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(exploratory);
 
 		ComputationalStartDTO computationalStartDTO = new ComputationalStartDTO();
 		when(requestBuilder.newComputationalStart(any(UserInfo.class), any(UserInstanceDTO.class), anyString()))
@@ -526,9 +487,8 @@
 
 		computationalService.startSparkCluster(userInfo, EXPLORATORY_NAME, COMP_NAME);
 
-		verify(computationalDAO).fetchComputationalFields(USER, EXPLORATORY_NAME, COMP_NAME);
 		verify(computationalDAO).updateComputationalStatus(refEq(computationalStatusDTOWithStatusStarting, "self"));
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
+		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, true);
 		verify(requestBuilder).newComputationalStart(refEq(userInfo), refEq(exploratory), eq(COMP_NAME));
 		verify(provisioningService)
 				.post(eq("computational/start/spark"), eq(TOKEN), refEq(computationalStartDTO), eq(String.class));
@@ -538,12 +498,14 @@
 	}
 
 	@Test
-	public void startSparkClusterWhenDataengineTypeIsAnother() {
-		ucResource.setImageName("dataengine-service");
-		when(computationalDAO.fetchComputationalFields(anyString(), anyString(), anyString())).thenReturn(ucResource);
+	public void startSparkClusterWhenDataengineStatusIsRunning() {
+		final UserInstanceDTO userInstanceDto = getUserInstanceDto();
+		userInstanceDto.setResources(singletonList(getUserComputationalResource(RUNNING,
+				DOCKER_DLAB_DATAENGINE_SERVICE)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(userInstanceDto);
 
-		expectedException.expect(UnsupportedOperationException.class);
-		expectedException.expectMessage("Operation for data engine service is not supported");
+		expectedException.expect(IllegalStateException.class);
+		expectedException.expectMessage("There is no stopped dataengine compName for exploratory expName");
 
 		computationalService.startSparkCluster(userInfo, EXPLORATORY_NAME, COMP_NAME);
 	}
@@ -554,12 +516,12 @@
 		doNothing().when(computationalDAO).updateReuploadKeyFlagForComputationalResources(anyString(), any(List.class),
 				any(List.class), anyBoolean(), anyVararg());
 
-		computationalService.updateComputationalsReuploadKeyFlag(USER, Collections.singletonList(RUNNING),
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE), true, RUNNING);
+		computationalService.updateComputationalsReuploadKeyFlag(USER, singletonList(RUNNING),
+				singletonList(DataEngineType.SPARK_STANDALONE), true, RUNNING);
 
-		verify(computationalDAO).updateReuploadKeyFlagForComputationalResources(USER, Collections.singletonList
+		verify(computationalDAO).updateReuploadKeyFlagForComputationalResources(USER, singletonList
 						(RUNNING),
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE), true, RUNNING);
+				singletonList(DataEngineType.SPARK_STANDALONE), true, RUNNING);
 		verifyNoMoreInteractions(computationalDAO);
 	}
 
@@ -590,6 +552,107 @@
 		verifyNoMoreInteractions(computationalDAO);
 	}
 
+	@Test
+	public void testUpdateSparkClusterConfig() {
+		final ComputationalClusterConfigDTO clusterConfigDTO = new ComputationalClusterConfigDTO();
+		final UserInstanceDTO userInstanceDto = getUserInstanceDto();
+		final List<ClusterConfig> config = Collections.singletonList(new ClusterConfig());
+		userInstanceDto.setResources(Collections.singletonList(getUserComputationalResource(RUNNING, COMP_NAME)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(userInstanceDto);
+		when(requestBuilder.newClusterConfigUpdate(any(UserInfo.class), any(UserInstanceDTO.class),
+				any(UserComputationalResource.class), anyListOf(ClusterConfig.class))).thenReturn(clusterConfigDTO);
+		when(provisioningService.post(anyString(), anyString(), any(ComputationalClusterConfigDTO.class), any()))
+				.thenReturn("someUuid");
+		computationalService.updateSparkClusterConfig(getUserInfo(), EXPLORATORY_NAME, COMP_NAME,
+				config);
+
+		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, true);
+		verify(requestBuilder).newClusterConfigUpdate(refEq(getUserInfo()), refEq(userInstanceDto),
+				refEq(getUserComputationalResource(RUNNING, COMP_NAME)),
+				eq(Collections.singletonList(new ClusterConfig())));
+		verify(requestId).put(USER, "someUuid");
+		verify(computationalDAO).updateComputationalFields(refEq(new ComputationalStatusDTO()
+				.withConfig(config)
+				.withUser(USER)
+				.withExploratoryName(EXPLORATORY_NAME)
+				.withComputationalName(COMP_NAME)
+				.withStatus(UserInstanceStatus.RECONFIGURING.toString()), "self"));
+		verify(provisioningService).post(eq("computational/spark/reconfigure"), eq(getUserInfo().getAccessToken()),
+				refEq(new ComputationalClusterConfigDTO()), eq(String.class));
+
+	}
+
+	@Test
+	public void testUpdateSparkClusterConfigWhenClusterIsNotRunning() {
+		final UserInstanceDTO userInstanceDto = getUserInstanceDto();
+		final List<ClusterConfig> config = Collections.singletonList(new ClusterConfig());
+		userInstanceDto.setResources(Collections.singletonList(getUserComputationalResource(STOPPED, COMP_NAME)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(userInstanceDto);
+		try {
+			computationalService.updateSparkClusterConfig(getUserInfo(), EXPLORATORY_NAME, COMP_NAME,
+					config);
+		} catch (ResourceNotFoundException e) {
+			assertEquals("Running computational resource with name compName for exploratory expName not found",
+					e.getMessage());
+		}
+
+		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, true);
+		verifyNoMoreInteractions(exploratoryDAO);
+		verifyZeroInteractions(provisioningService, requestBuilder, requestId);
+
+	}
+
+	@Test
+	public void testUpdateSparkClusterConfigWhenClusterIsNotFound() {
+		final UserInstanceDTO userInstanceDto = getUserInstanceDto();
+		final List<ClusterConfig> config = Collections.singletonList(new ClusterConfig());
+		userInstanceDto.setResources(Collections.singletonList(getUserComputationalResource(STOPPED, COMP_NAME)));
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyBoolean())).thenReturn(userInstanceDto);
+		try {
+			computationalService.updateSparkClusterConfig(getUserInfo(), EXPLORATORY_NAME, COMP_NAME + "X",
+					config);
+		} catch (ResourceNotFoundException e) {
+			assertEquals("Running computational resource with name compNameX for exploratory expName not found",
+					e.getMessage());
+		}
+
+		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, true);
+		verifyNoMoreInteractions(exploratoryDAO);
+		verifyZeroInteractions(provisioningService, requestBuilder, requestId);
+
+	}
+
+	@Test
+	public void testGetClusterConfig() {
+		when(computationalDAO.getClusterConfig(anyString(), anyString(), anyString())).thenReturn(Collections.singletonList(getClusterConfig()));
+
+		final List<ClusterConfig> clusterConfig = computationalService.getClusterConfig(getUserInfo(),
+				EXPLORATORY_NAME, COMP_NAME);
+		final ClusterConfig config = clusterConfig.get(0);
+
+		assertEquals(1, clusterConfig.size());
+		assertEquals("test", config.getClassification());
+		assertNull(config.getConfigurations());
+		assertNull(config.getProperties());
+	}
+
+
+	@Test
+	public void testGetClusterConfigWithException() {
+		when(computationalDAO.getClusterConfig(anyString(), anyString(), anyString())).thenThrow(new RuntimeException(
+				"Exception"));
+
+		expectedException.expectMessage("Exception");
+		expectedException.expect(RuntimeException.class);
+		computationalService.getClusterConfig(getUserInfo(), EXPLORATORY_NAME, COMP_NAME);
+	}
+
+	private ClusterConfig getClusterConfig() {
+		final ClusterConfig config = new ClusterConfig();
+		config.setClassification("test");
+		return config;
+	}
+
 	private UserInfo getUserInfo() {
 		return new UserInfo(USER, TOKEN);
 	}
@@ -627,9 +690,18 @@
 				.build();
 	}
 
-	private UserComputationalResource getUserComputationalResource() {
+	private UserComputationalResource getUserComputationalResource(UserInstanceStatus status, String imageName) {
 		UserComputationalResource ucResource = new UserComputationalResource();
+		ucResource.setComputationalName(COMP_NAME);
 		ucResource.setImageName("dataengine");
+		ucResource.setImageName(imageName);
+		ucResource.setStatus(status.toString());
+		ucResource.setLastActivity(LAST_ACTIVITY);
+		ucResource.setComputationalId(COMP_ID);
+		final SchedulerJobDTO schedulerData = new SchedulerJobDTO();
+		schedulerData.setCheckInactivityRequired(true);
+		schedulerData.setMaxInactivity(MAX_INACTIVITY);
+		ucResource.setSchedulerData(schedulerData);
 		return ucResource;
 	}
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java
index 38d34a3..09784eb 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java
index b389154..1dce004 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java
@@ -1,26 +1,31 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.EnvStatusDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
+import com.epam.dlab.backendapi.dao.UserSettingsDAO;
+import com.epam.dlab.backendapi.resources.dto.UserDTO;
 import com.epam.dlab.backendapi.resources.dto.UserResourceInfo;
 import com.epam.dlab.backendapi.service.ComputationalService;
 import com.epam.dlab.backendapi.service.EdgeService;
@@ -39,10 +44,7 @@
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -60,7 +62,7 @@
 	private static final String STOPPED_STATE = "stopped";
 
 	@Mock
-	private EnvStatusDAO envStatusDAO;
+	private EnvDAO envDAO;
 	@Mock
 	private ExploratoryDAO exploratoryDAO;
 	@Mock
@@ -73,6 +75,8 @@
 	private EdgeService edgeService;
 	@Mock
 	private KeyDAO keyDAO;
+	@Mock
+	private UserSettingsDAO userSettingsDAO;
 
 	@InjectMocks
 	private EnvironmentServiceImpl environmentService;
@@ -82,53 +86,59 @@
 
 	@Test
 	public void getActiveUsers() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchActiveEnvUsers();
-		final Set<String> activeUsers = environmentService.getActiveUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchActiveEnvUsers();
+		doReturn(Collections.singleton(USER + "2")).when(envDAO).fetchUsersNotIn(anySet());
+		when(userSettingsDAO.getAllowedBudget(anyString())).thenReturn(Optional.empty());
+		final List<UserDTO> activeUsers = environmentService.getUsers();
 
-		assertEquals(1, activeUsers.size());
-		assertTrue(activeUsers.contains(USER));
+		assertEquals(2, activeUsers.size());
+		assertEquals(USER, activeUsers.get(0).getName());
+		assertEquals(USER + "2", activeUsers.get(1).getName());
 
-		verify(envStatusDAO).fetchActiveEnvUsers();
-		verifyNoMoreInteractions(envStatusDAO);
+		verify(userSettingsDAO).getAllowedBudget(USER);
+		verify(userSettingsDAO).getAllowedBudget(USER + "2");
+		verify(envDAO).fetchActiveEnvUsers();
+		verify(envDAO).fetchUsersNotIn(Collections.singleton(USER));
+		verifyNoMoreInteractions(envDAO);
 	}
 
 	@Test
 	public void getActiveUsersWithException() {
-		doThrow(new DlabException("Users not found")).when(envStatusDAO).fetchActiveEnvUsers();
+		doThrow(new DlabException("Users not found")).when(envDAO).fetchActiveEnvUsers();
 
 		expectedException.expect(DlabException.class);
 		expectedException.expectMessage("Users not found");
 
-		environmentService.getActiveUsers();
+		environmentService.getUsers();
 	}
 
 	@Test
 	public void getAllUsers() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
-		final Set<String> users = environmentService.getAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
+		final Set<String> users = environmentService.getUserNames();
 
 		assertEquals(1, users.size());
 		assertTrue(users.contains(USER));
 
-		verify(envStatusDAO).fetchAllUsers();
-		verifyNoMoreInteractions(envStatusDAO);
+		verify(envDAO).fetchAllUsers();
+		verifyNoMoreInteractions(envDAO);
 	}
 
 	@Test
 	public void getAllUsersWithException() {
-		doThrow(new DlabException("Users not found")).when(envStatusDAO).fetchAllUsers();
+		doThrow(new DlabException("Users not found")).when(envDAO).fetchAllUsers();
 
 		expectedException.expect(DlabException.class);
 		expectedException.expectMessage("Users not found");
 
-		environmentService.getAllUsers();
+		environmentService.getUserNames();
 	}
 
 	@Test
 	public void getAllEnv() {
 		List<UserInstanceDTO> instances = getUserInstances();
 		when(exploratoryDAO.getInstances()).thenReturn(instances);
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 
 		EdgeInfo edgeInfo = new EdgeInfo();
 		edgeInfo.setEdgeStatus("running");
@@ -154,14 +164,14 @@
 		resources.forEach(resource -> assertTrue(actualEnv.contains(resource)));
 
 		verify(exploratoryDAO).getInstances();
-		verify(envStatusDAO).fetchAllUsers();
+		verify(envDAO).fetchAllUsers();
 		verify(keyDAO).getEdgeInfo(USER);
-		verifyNoMoreInteractions(exploratoryDAO, envStatusDAO, keyDAO);
+		verifyNoMoreInteractions(exploratoryDAO, envDAO, keyDAO);
 	}
 
 	@Test
 	public void stopAll() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryDAO.fetchRunningExploratoryFields(anyString())).thenReturn(getUserInstances());
 		when(systemUserInfoService.create(anyString())).thenReturn(userInfo);
@@ -171,7 +181,7 @@
 
 		environmentService.stopAll();
 
-		verify(envStatusDAO).fetchAllUsers();
+		verify(envDAO).fetchAllUsers();
 		verify(exploratoryDAO).fetchRunningExploratoryFields(USER);
 		verify(systemUserInfoService, times(3)).create(USER);
 		verify(exploratoryService).stop(refEq(userInfo), eq(EXPLORATORY_NAME_1));
@@ -182,13 +192,13 @@
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(envStatusDAO, keyDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(envDAO, keyDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
 	public void stopAllWithWrongResourceState() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg()))
 				.thenReturn(getUserInstances());
 		expectedException.expect(ResourceConflictException.class);
@@ -198,7 +208,7 @@
 
 	@Test
 	public void stopAllWithEdgeStarting() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		when(keyDAO.getEdgeStatus(anyString())).thenReturn("starting");
 		expectedException.expect(ResourceConflictException.class);
 
@@ -207,7 +217,7 @@
 
 	@Test
 	public void stopAllWithoutEdge() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryDAO.fetchRunningExploratoryFields(anyString())).thenReturn(getUserInstances());
 		when(systemUserInfoService.create(anyString())).thenReturn(userInfo);
@@ -217,7 +227,7 @@
 
 		environmentService.stopAll();
 
-		verify(envStatusDAO).fetchAllUsers();
+		verify(envDAO).fetchAllUsers();
 		verify(exploratoryDAO).fetchRunningExploratoryFields(USER);
 		verify(systemUserInfoService, times(2)).create(USER);
 		verify(exploratoryService).stop(refEq(userInfo), eq(EXPLORATORY_NAME_1));
@@ -227,7 +237,7 @@
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envStatusDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
@@ -292,7 +302,7 @@
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envStatusDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
@@ -350,7 +360,7 @@
 	@Test
 	@SuppressWarnings("unchecked")
 	public void terminateAll() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg()))
 				.thenReturn(Collections.emptyList());
@@ -361,7 +371,7 @@
 
 		environmentService.terminateAll();
 
-		verify(envStatusDAO).fetchAllUsers();
+		verify(envDAO).fetchAllUsers();
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg());
 		verify(systemUserInfoService).create(USER);
 		verify(keyDAO).edgeNodeExist(USER);
@@ -371,13 +381,13 @@
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envStatusDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
 	public void terminateAllWithoutEdge() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class),
 				eq(UserInstanceStatus.CREATING), eq(UserInstanceStatus.STARTING))).thenReturn(Collections.emptyList());
@@ -390,7 +400,7 @@
 
 		environmentService.terminateAll();
 
-		verify(envStatusDAO).fetchAllUsers();
+		verify(envDAO).fetchAllUsers();
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusNotIn(USER, UserInstanceStatus.TERMINATED,
 				UserInstanceStatus.FAILED, UserInstanceStatus.TERMINATING);
 		verify(systemUserInfoService, times(2)).create(USER);
@@ -402,13 +412,13 @@
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envStatusDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
 	public void terminateAllWithWrongResourceState() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg()))
 				.thenReturn(getUserInstances());
 		expectedException.expect(ResourceConflictException.class);
@@ -418,7 +428,7 @@
 
 	@Test
 	public void terminateAllWithEdgeStarting() {
-		doReturn(Collections.singleton(USER)).when(envStatusDAO).fetchAllUsers();
+		doReturn(Collections.singleton(USER)).when(envDAO).fetchAllUsers();
 		when(keyDAO.getEdgeStatus(anyString())).thenReturn("starting");
 		expectedException.expect(ResourceConflictException.class);
 
@@ -447,7 +457,7 @@
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envStatusDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
@@ -476,7 +486,7 @@
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envStatusDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
 	}
 
 	@Test
@@ -515,13 +525,13 @@
 		final UserInfo userInfo = getUserInfo();
 		when(systemUserInfoService.create(anyString())).thenReturn(userInfo);
 		doNothing().when(computationalService)
-				.terminateComputationalEnvironment(any(UserInfo.class), anyString(), anyString());
+				.terminateComputational(any(UserInfo.class), anyString(), anyString());
 
 		environmentService.terminateComputational(USER, EXPLORATORY_NAME_1, "compName");
 
 		verify(systemUserInfoService).create(USER);
 		verify(computationalService)
-				.terminateComputationalEnvironment(refEq(userInfo), eq(EXPLORATORY_NAME_1), eq("compName"));
+				.terminateComputational(refEq(userInfo), eq(EXPLORATORY_NAME_1), eq("compName"));
 		verifyNoMoreInteractions(systemUserInfoService, computationalService);
 	}
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java
index bbfa865..2c28539 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -25,12 +28,12 @@
 import com.epam.dlab.dto.StatusEnvBaseDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.DataEngineType;
+import com.epam.dlab.dto.aws.computational.ClusterConfig;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import com.epam.dlab.dto.exploratory.*;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.model.exploratory.Exploratory;
 import com.epam.dlab.rest.client.RESTService;
 import com.mongodb.client.result.UpdateResult;
 import org.junit.Before;
@@ -43,8 +46,10 @@
 import org.mockito.runners.MockitoJUnitRunner;
 
 import java.util.Collections;
+import java.util.List;
 import java.util.Optional;
 
+import static java.util.Collections.singletonList;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.mockito.Mockito.*;
@@ -212,7 +217,8 @@
 		verify(exploratoryDAO).updateExploratoryStatus(refEq(statusEnvBaseDTO, "self"));
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
 		verify(computationalDAO).updateComputationalStatusesForExploratory(USER, EXPLORATORY_NAME, UserInstanceStatus
-				.TERMINATING, UserInstanceStatus.TERMINATING, UserInstanceStatus.TERMINATED, UserInstanceStatus.FAILED);
+						.TERMINATING, UserInstanceStatus.TERMINATING, UserInstanceStatus.TERMINATED,
+				UserInstanceStatus.FAILED);
 		verify(requestBuilder).newExploratoryStop(userInfo, userInstance);
 		verify(provisioningService).post(exploratoryTerminate, TOKEN, eaDto, String.class);
 		verify(requestId).put(USER, UUID);
@@ -330,7 +336,7 @@
 	@Test
 	public void updateExploratoryStatusesWithRunningStatus() {
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusNotIn(anyString(), anyVararg()))
-				.thenReturn(Collections.singletonList(userInstance));
+				.thenReturn(singletonList(userInstance));
 		when(exploratoryDAO.updateExploratoryStatus(any(StatusEnvBaseDTO.class)))
 				.thenReturn(mock(UpdateResult.class));
 
@@ -348,7 +354,7 @@
 	public void updateExploratoryStatusesWithStoppingStatus() {
 		userInstance.setStatus("stopping");
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusNotIn(anyString(), anyVararg()))
-				.thenReturn(Collections.singletonList(userInstance));
+				.thenReturn(singletonList(userInstance));
 		when(exploratoryDAO.updateExploratoryStatus(any(StatusEnvBaseDTO.class)))
 				.thenReturn(mock(UpdateResult.class));
 		doNothing().when(computationalDAO).updateComputationalStatusesForExploratory(anyString(), anyString(),
@@ -371,7 +377,7 @@
 	public void updateExploratoryStatusesWithTerminatingStatus() {
 		userInstance.setStatus("terminating");
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusNotIn(anyString(), anyVararg()))
-				.thenReturn(Collections.singletonList(userInstance));
+				.thenReturn(singletonList(userInstance));
 		when(exploratoryDAO.updateExploratoryStatus(any(StatusEnvBaseDTO.class)))
 				.thenReturn(mock(UpdateResult.class));
 		when(computationalDAO.updateComputationalStatusesForExploratory(any(StatusEnvBaseDTO.class)))
@@ -404,7 +410,7 @@
 	@Test
 	public void getInstancesWithStatuses() {
 		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), anyBoolean(), anyVararg()))
-				.thenReturn(Collections.singletonList(userInstance));
+				.thenReturn(singletonList(userInstance));
 		exploratoryService.getInstancesWithStatuses(USER, UserInstanceStatus.RUNNING, UserInstanceStatus.RUNNING);
 
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, true, UserInstanceStatus.RUNNING);
@@ -436,6 +442,79 @@
 		verifyNoMoreInteractions(exploratoryDAO);
 	}
 
+	@Test
+	public void testUpdateExploratoryClusterConfig() {
+
+		when(exploratoryDAO.fetchRunningExploratoryFields(anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(requestBuilder.newClusterConfigUpdate(any(UserInfo.class), any(UserInstanceDTO.class),
+				anyListOf(ClusterConfig.class))).thenReturn(new ExploratoryReconfigureSparkClusterActionDTO());
+		when(provisioningService.post(anyString(), anyString(), any(ExploratoryReconfigureSparkClusterActionDTO.class)
+				, any())).thenReturn(UUID);
+
+		exploratoryService.updateClusterConfig(getUserInfo(), EXPLORATORY_NAME, singletonList(new ClusterConfig()));
+
+		verify(exploratoryDAO).fetchRunningExploratoryFields(USER, EXPLORATORY_NAME);
+		verify(requestBuilder).newClusterConfigUpdate(refEq(getUserInfo()), refEq(getUserInstanceDto()),
+				refEq(singletonList(new ClusterConfig())));
+		verify(requestId).put(USER, UUID);
+		verify(provisioningService).post(eq("exploratory/reconfigure_spark"), eq(TOKEN),
+				refEq(new ExploratoryReconfigureSparkClusterActionDTO(), "self"), eq(String.class));
+		verify(exploratoryDAO).updateExploratoryFields(refEq(new ExploratoryStatusDTO()
+				.withUser(USER)
+				.withConfig(singletonList(new ClusterConfig()))
+				.withStatus(UserInstanceStatus.RECONFIGURING.toString())
+				.withExploratoryName(EXPLORATORY_NAME), "self"));
+		verifyNoMoreInteractions(requestBuilder, requestId, exploratoryDAO, provisioningService);
+	}
+
+	@Test
+	public void testUpdateExploratoryClusterConfigWhenNotRunning() {
+
+		when(exploratoryDAO.fetchRunningExploratoryFields(anyString(), anyString())).thenThrow(new ResourceNotFoundException("EXCEPTION"));
+
+		try {
+
+			exploratoryService.updateClusterConfig(getUserInfo(), EXPLORATORY_NAME,
+					singletonList(new ClusterConfig()));
+		} catch (ResourceNotFoundException e) {
+			assertEquals("EXCEPTION", e.getMessage());
+		}
+
+		verify(exploratoryDAO).fetchRunningExploratoryFields(USER, EXPLORATORY_NAME);
+		verifyNoMoreInteractions(exploratoryDAO);
+		verifyZeroInteractions(requestBuilder, requestId, provisioningService);
+
+	}
+
+	@Test
+	public void testGetClusterConfig() {
+
+		when(exploratoryDAO.getClusterConfig(anyString(), anyString())).thenReturn(Collections.singletonList(getClusterConfig()));
+		final List<ClusterConfig> clusterConfig = exploratoryService.getClusterConfig(getUserInfo(), EXPLORATORY_NAME);
+
+		assertEquals(1, clusterConfig.size());
+		assertEquals("classification", clusterConfig.get(0).getClassification());
+
+		verify(exploratoryDAO).getClusterConfig(getUserInfo().getName(), EXPLORATORY_NAME);
+		verifyNoMoreInteractions(exploratoryDAO);
+	}
+
+	@Test
+	public void testGetClusterConfigWithException() {
+
+		when(exploratoryDAO.getClusterConfig(anyString(), anyString())).thenThrow(new RuntimeException("Exception"));
+
+		expectedException.expect(RuntimeException.class);
+		expectedException.expectMessage("Exception");
+		exploratoryService.getClusterConfig(getUserInfo(), EXPLORATORY_NAME);
+	}
+
+	private ClusterConfig getClusterConfig() {
+		final ClusterConfig config = new ClusterConfig();
+		config.setClassification("classification");
+		return config;
+	}
+
 	private UserInfo getUserInfo() {
 		return new UserInfo(USER, TOKEN);
 	}
@@ -445,8 +524,9 @@
 		compResource.setImageName("YYYY.dataengine");
 		compResource.setComputationalName("compName");
 		compResource.setStatus("stopped");
+		compResource.setComputationalId("compId");
 		return new UserInstanceDTO().withUser(USER).withExploratoryName(EXPLORATORY_NAME).withStatus("running")
-				.withResources(Collections.singletonList(compResource));
+				.withResources(singletonList(compResource));
 	}
 
 	private StatusEnvBaseDTO getStatusEnvBaseDTOWithStatus(String status) {
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java
index 5c5721c..2029cea 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java
index d89d814..5ad2c84 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -31,7 +34,7 @@
 import com.epam.dlab.exceptions.ResourceAlreadyExistException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
 import com.epam.dlab.model.ResourceType;
-import com.epam.dlab.model.exloratory.Image;
+import com.epam.dlab.model.exploratory.Image;
 import com.epam.dlab.model.library.Library;
 import com.epam.dlab.rest.client.RESTService;
 import com.mongodb.client.result.UpdateResult;
@@ -231,15 +234,16 @@
 	public void getCreatedImages() {
 		ImageInfoRecord imageInfoRecord = getImageInfoRecord();
 		List<ImageInfoRecord> expectedRecordList = Collections.singletonList(imageInfoRecord);
-		when(imageExploratoryDao.getImages(anyString(), any(ImageStatus.class), anyString()))
+		when(imageExploratoryDao.getImages(anyString(), anyString(), anyVararg()))
 				.thenReturn(expectedRecordList);
 
-		List<ImageInfoRecord> actualRecordList = imageExploratoryService.getCreatedImages(USER, "someImage");
+		List<ImageInfoRecord> actualRecordList = imageExploratoryService.getNotFailedImages(USER,
+				"someImage");
 		assertNotNull(actualRecordList);
 		assertEquals(1, actualRecordList.size());
 		assertEquals(expectedRecordList, actualRecordList);
 
-		verify(imageExploratoryDao).getImages(USER, ImageStatus.CREATED, "someImage");
+		verify(imageExploratoryDao).getImages(USER, "someImage", ImageStatus.CREATED, ImageStatus.CREATING);
 		verifyNoMoreInteractions(imageExploratoryDao);
 	}
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InactivityServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InactivityServiceImplTest.java
new file mode 100644
index 0000000..5ed31cc
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InactivityServiceImplTest.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.auth.SystemUserInfoService;
+import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.dao.ComputationalDAO;
+import com.epam.dlab.backendapi.dao.ExploratoryDAO;
+import com.epam.dlab.backendapi.domain.RequestId;
+import com.epam.dlab.backendapi.service.ComputationalService;
+import com.epam.dlab.backendapi.service.ExploratoryService;
+import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.dto.SchedulerJobDTO;
+import com.epam.dlab.dto.UserInstanceDTO;
+import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.computational.CheckInactivityStatus;
+import com.epam.dlab.dto.computational.CheckInactivityStatusDTO;
+import com.epam.dlab.dto.computational.ComputationalStatusDTO;
+import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.status.EnvResource;
+import com.epam.dlab.rest.client.RESTService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static com.epam.dlab.dto.UserInstanceStatus.RUNNING;
+import static java.util.Collections.singletonList;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyList;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.refEq;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class InactivityServiceImplTest {
+
+	private static final long MAX_INACTIVITY = 10L;
+	private static final String DOCKER_DLAB_DATAENGINE = "docker.dlab-dataengine";
+	private static final String DOCKER_DLAB_DATAENGINE_SERVICE = "docker.dlab-dataengine-service";
+	private final String USER = "test";
+	private final String TOKEN = "token";
+	private final String EXPLORATORY_NAME = "expName";
+	private final String COMP_NAME = "compName";
+	private final LocalDateTime LAST_ACTIVITY = LocalDateTime.now().minusMinutes(MAX_INACTIVITY);
+
+	@Mock
+	private ExploratoryDAO exploratoryDAO;
+	@Mock
+	private ComputationalDAO computationalDAO;
+	@Mock
+	private RESTService provisioningService;
+	@Mock
+	private SelfServiceApplicationConfiguration configuration;
+	@Mock
+	private RequestBuilder requestBuilder;
+	@Mock
+	private RequestId requestId;
+	@Mock
+	private ExploratoryService exploratoryService;
+	@Mock
+	private ComputationalService computationalService;
+	@Mock
+	private SystemUserInfoService systemUserInfoService;
+	@InjectMocks
+	private InactivityServiceImpl inactivityService;
+
+	@Test
+	@SuppressWarnings("unchecked")
+	public void stopClustersByConditionForDataengines() {
+		CheckInactivityStatusDTO dto = new CheckInactivityStatusDTO()
+				.withStatus(CheckInactivityStatus.COMPLETED)
+				.withResources(singletonList(new EnvResource().withName(COMP_NAME).withId("someId")));
+		final List<UserComputationalResource> computationalResources =
+				singletonList(getUserComputationalResource(RUNNING, DOCKER_DLAB_DATAENGINE));
+		final UserInstanceDTO exploratory = getUserInstanceDTO(computationalResources);
+
+		when(exploratoryDAO.getInstancesByComputationalIdsAndStatus(anyList(), any(UserInstanceStatus.class)))
+				.thenReturn(singletonList(exploratory));
+		when(systemUserInfoService.create(anyString())).thenReturn(getUserInfo());
+
+		inactivityService.stopClustersByInactivity(dto.getResources().stream().map(EnvResource::getId).collect(Collectors.toList()));
+
+		verify(exploratoryDAO).getInstancesByComputationalIdsAndStatus(singletonList("someId"), RUNNING);
+		verify(systemUserInfoService).create(USER);
+		verify(computationalService).stopSparkCluster(refEq(getUserInfo()), eq(EXPLORATORY_NAME), eq(COMP_NAME));
+		verify(exploratoryDAO).getInstancesByComputationalIdsAndStatus(singletonList("someId"), RUNNING);
+		verifyNoMoreInteractions(exploratoryService, configuration, systemUserInfoService, computationalDAO,
+				exploratoryDAO, computationalService, requestBuilder, provisioningService, requestId);
+	}
+
+	@Test
+	@SuppressWarnings("unchecked")
+	public void stopClustersByConditionForDataengineServices() {
+		CheckInactivityStatusDTO dto = new CheckInactivityStatusDTO()
+				.withStatus(CheckInactivityStatus.COMPLETED)
+				.withResources(singletonList(new EnvResource().withName(COMP_NAME).withId("someId")));
+		final UserComputationalResource ucResource = getUserComputationalResource(RUNNING,
+				DOCKER_DLAB_DATAENGINE_SERVICE);
+		final UserInstanceDTO exploratory = getUserInstanceDTO(singletonList(ucResource));
+		;
+		when(exploratoryDAO.getInstancesByComputationalIdsAndStatus(anyList(), any(UserInstanceStatus.class))).thenReturn(singletonList(
+				exploratory.withResources(singletonList(ucResource))));
+		when(systemUserInfoService.create(anyString())).thenReturn(getUserInfo());
+
+		inactivityService.stopClustersByInactivity(dto.getResources().stream().map(EnvResource::getId).collect(Collectors.toList()));
+
+		verify(exploratoryDAO).getInstancesByComputationalIdsAndStatus(singletonList("someId"), RUNNING);
+		verify(systemUserInfoService).create(USER);
+		verify(computationalService).terminateComputational(refEq(getUserInfo()), eq(EXPLORATORY_NAME), eq(COMP_NAME));
+		verifyNoMoreInteractions(exploratoryService, configuration, systemUserInfoService, computationalDAO,
+				exploratoryDAO, requestBuilder, provisioningService, requestId, computationalService);
+	}
+
+	@Test
+	@SuppressWarnings("unchecked")
+	public void updateLastActivityForClusters() {
+		CheckInactivityStatusDTO dto = new CheckInactivityStatusDTO()
+				.withStatus(CheckInactivityStatus.COMPLETED)
+				.withResources(singletonList(new EnvResource().withName(COMP_NAME).withId("someId").withLastActivity(LAST_ACTIVITY)));
+		doNothing().when(computationalDAO).updateLastActivityDateForInstanceId(anyString(), any(LocalDateTime.class));
+
+		inactivityService.updateLastActivityForClusters(dto.getResources());
+
+		verify(computationalDAO).updateLastActivityDateForInstanceId("someId", LAST_ACTIVITY);
+		verifyNoMoreInteractions(exploratoryService, computationalDAO);
+	}
+
+
+	private UserComputationalResource getUserComputationalResource(UserInstanceStatus status, String imageName) {
+		UserComputationalResource ucResource = new UserComputationalResource();
+		ucResource.setComputationalName(COMP_NAME);
+		ucResource.setImageName("dataengine");
+		ucResource.setImageName(imageName);
+		ucResource.setStatus(status.toString());
+		ucResource.setLastActivity(LAST_ACTIVITY);
+		final SchedulerJobDTO schedulerData = new SchedulerJobDTO();
+		schedulerData.setCheckInactivityRequired(true);
+		schedulerData.setMaxInactivity(MAX_INACTIVITY);
+		ucResource.setSchedulerData(schedulerData);
+		return ucResource;
+	}
+
+	private ComputationalStatusDTO getComputationalStatusDTOWithStatus(String status) {
+		return new ComputationalStatusDTO()
+				.withUser(USER)
+				.withExploratoryName(EXPLORATORY_NAME)
+				.withComputationalName(COMP_NAME)
+				.withStatus(UserInstanceStatus.of(status));
+	}
+
+	private UserInfo getUserInfo() {
+		return new UserInfo(USER, TOKEN);
+	}
+
+	private UserInstanceDTO getUserInstanceDTO(List<UserComputationalResource> computationalResources) {
+		final UserInstanceDTO exploratory = new UserInstanceDTO();
+		exploratory.setExploratoryId("someId");
+		exploratory.setExploratoryName(EXPLORATORY_NAME);
+		exploratory.setUser(USER);
+		exploratory.setResources(computationalResources);
+		return exploratory;
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBaseTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBaseTest.java
index 444151c..aad8094 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBaseTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBaseTest.java
@@ -1,23 +1,27 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.backendapi.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.dao.EnvStatusDAO;
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusEnum;
@@ -44,13 +48,15 @@
 	private final String USER = "test";
 
 	@Mock
-	private EnvStatusDAO envDAO;
+	private EnvDAO envDAO;
 	@Mock
 	private ExploratoryDAO expDAO;
 	@Mock
 	private KeyDAO keyDAO;
 	@Mock
 	private SelfServiceApplicationConfiguration configuration;
+	@Mock
+	private BillingDAO billingDAO;
 
 	@InjectMocks
 	private InfrastructureInfoServiceBase infrastructureInfoServiceBase = spy(InfrastructureInfoServiceBase.class);
@@ -100,6 +106,7 @@
 		when(envDAO.getHealthStatusPageDTO(anyString(), anyBoolean())).thenReturn(new HealthStatusPageDTO()
 				.withStatus(HealthStatusEnum.OK));
 		when(configuration.isBillingSchedulerEnabled()).thenReturn(false);
+		when(billingDAO.getBillingQuoteUsed()).thenReturn(10);
 
 		HealthStatusPageDTO actualHealthStatusPageDTO =
 				infrastructureInfoServiceBase.getHeathStatus(USER, false, true);
@@ -107,6 +114,7 @@
 		assertEquals(HealthStatusEnum.OK.toString(), actualHealthStatusPageDTO.getStatus());
 		assertFalse(actualHealthStatusPageDTO.isBillingEnabled());
 		assertTrue(actualHealthStatusPageDTO.isAdmin());
+		assertEquals(10, actualHealthStatusPageDTO.getBillingQuoteUsed());
 
 		verify(envDAO).getHealthStatusPageDTO(USER, false);
 		verify(configuration).isBillingSchedulerEnabled();
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
index f6a37f0..225a5c8 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -32,6 +35,7 @@
 
 import java.lang.reflect.Field;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -102,11 +106,12 @@
 
 	@Test
 	public void getComputationalTemplates() throws NoSuchFieldException, IllegalAccessException {
-		List<ComputationalMetadataDTO> expectedCmdDtoList = Arrays.asList(
-				new ComputationalMetadataDTO("dataengine-service"),
-				new ComputationalMetadataDTO("dataengine-service")
+		final ComputationalMetadataDTO computationalMetadataDTO = new ComputationalMetadataDTO("dataengine-service");
+		computationalMetadataDTO.setComputationResourceShapes(Collections.emptyMap());
+		List<ComputationalMetadataDTO> expectedCmdDtoList = Collections.singletonList(
+				computationalMetadataDTO
 		);
-		when(provisioningService.get(anyString(), anyString(), any())).thenReturn(expectedCmdDtoList.toArray());
+		when(provisioningService.get(anyString(), anyString(), any())).thenReturn(expectedCmdDtoList.toArray(new ComputationalMetadataDTO[]{}));
 
 		List<FullComputationalTemplate> expectedFullCmdDtoList = expectedCmdDtoList.stream()
 				.map(e -> infrastructureTemplateServiceBaseChild.getCloudFullComputationalTemplate(e))
@@ -142,11 +147,10 @@
 
 	@Test
 	public void getComputationalTemplatesWithInapproprietaryImageName() {
-		List<ComputationalMetadataDTO> expectedCmdDtoList = Arrays.asList(
-				new ComputationalMetadataDTO("dataengine-service"),
-				new ComputationalMetadataDTO("blablabla")
-		);
-		when(provisioningService.get(anyString(), anyString(), any())).thenReturn(expectedCmdDtoList.toArray());
+		final ComputationalMetadataDTO computationalMetadataDTO = new ComputationalMetadataDTO("dataengine-service");
+		computationalMetadataDTO.setComputationResourceShapes(Collections.emptyMap());
+		List<ComputationalMetadataDTO> expectedCmdDtoList = Collections.singletonList(computationalMetadataDTO);
+		when(provisioningService.get(anyString(), anyString(), any())).thenReturn(expectedCmdDtoList.toArray(new ComputationalMetadataDTO[]{}));
 
 		UserInfo userInfo = new UserInfo("test", "token");
 		try {
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
index 9a658a59..9354fd3 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -19,6 +22,7 @@
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryLibDAO;
+import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.dto.LibInfoRecord;
 import com.epam.dlab.backendapi.resources.dto.LibInstallFormDTO;
 import com.epam.dlab.backendapi.resources.dto.LibKey;
@@ -30,10 +34,13 @@
 import com.epam.dlab.dto.exploratory.LibStatus;
 import com.epam.dlab.dto.exploratory.LibraryInstallDTO;
 import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.exceptions.ResourceNotFoundException;
+import com.epam.dlab.model.library.Library;
+import com.epam.dlab.rest.client.RESTService;
 import org.bson.Document;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
@@ -51,6 +58,10 @@
 @RunWith(MockitoJUnitRunner.class)
 public class LibraryServiceImplTest {
 
+	private static final String LIB_NAME = "name";
+	private static final String LIB_GROUP = "group";
+	private static final String LIB_VERSION = "version";
+	private static final String UUID = "id";
 	private final String USER = "test";
 	private final String EXPLORATORY_NAME = "explName";
 	private final String COMPUTATIONAL_NAME = "compName";
@@ -59,8 +70,6 @@
 	private List<LibInstallDTO> libs;
 	private LibInstallFormDTO libInstallFormDTO;
 	private LibraryInstallDTO libraryInstallDto;
-	private UserInfo userInfo;
-	private UserInstanceDTO userInstance;
 
 	@Mock
 	private ExploratoryDAO exploratoryDAO;
@@ -68,6 +77,13 @@
 	private ExploratoryLibDAO libraryDAO;
 	@Mock
 	private RequestBuilder requestBuilder;
+	@Mock
+	private RequestId requestId;
+	@Mock
+	private RESTService provisioningService;
+
+	@Rule
+	public ExpectedException expectedException = ExpectedException.none();
 
 	@InjectMocks
 	private LibraryServiceImpl libraryService;
@@ -75,12 +91,10 @@
 	@Before
 	public void setUp() {
 		prepareForTesting();
-		userInfo = new UserInfo(USER, "token");
-		userInstance = getUserInstanceDto();
 	}
 
 	@Test
-	public void getLibs() {
+	public void testGetLibs() {
 		Document document = new Document();
 		when(libraryDAO.findExploratoryLibraries(anyString(), anyString())).thenReturn(document);
 
@@ -122,228 +136,205 @@
 	}
 
 	@Test
-	public void generateLibraryInstallDTO() {
-		UserComputationalResource userComputationalResource = getUserComputationalResourceWithName(COMPUTATIONAL_NAME);
-		userInstance.withResources(Collections.singletonList(userComputationalResource));
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(userInstance);
+	public void installComputationalLibsWithoutOverride() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
 
-		LibraryInstallDTO expectedLiDTO = new LibraryInstallDTO().withExploratoryName(EXPLORATORY_NAME)
-				.withComputationalName(COMPUTATIONAL_NAME).withApplicationName("");
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
 		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
-				any(UserComputationalResource.class))).thenReturn(expectedLiDTO);
+				any(UserComputationalResource.class), anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
 
-		LibraryInstallDTO actualLiDto = libraryService.generateLibraryInstallDTO(userInfo, libInstallFormDTO);
-		assertNotNull(actualLiDto);
-		assertEquals(expectedLiDTO, actualLiDto);
 
+		final String uuid = libraryService.installComputationalLibs(user, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
+				getLibs(null));
+
+		assertEquals(UUID, uuid);
+
+		verify(libraryDAO).getLibrary(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME, LIB_GROUP, LIB_NAME);
+		verify(requestBuilder).newLibInstall(refEq(user), refEq(getUserInstanceDto()),
+				refEq(getUserComputationalResourceWithName(COMPUTATIONAL_NAME)), eq(libsToInstall));
+		verify(provisioningService).post(eq("library/computational/lib_install"), eq(user.getAccessToken()),
+				refEq(libraryInstallDTO), eq(String.class));
+		verify(libraryDAO).addLibrary(eq(USER), eq(EXPLORATORY_NAME), eq(COMPUTATIONAL_NAME),
+				refEq(libsToInstall.get(0)), eq(false));
+		verify(requestId).put(user.getName(), UUID);
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verify(requestBuilder).newLibInstall(userInfo, userInstance, userComputationalResource);
-		verifyNoMoreInteractions(exploratoryDAO, requestBuilder);
+		verifyNoMoreInteractions(libraryDAO, requestBuilder, provisioningService, requestId, exploratoryDAO);
 	}
 
 	@Test
-	public void generateLibraryInstallDTOWhenClusterAbsent() {
-		userInstance.withStatus("running");
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(userInstance);
+	public void installComputationalLibsWhenComputationalNotFound() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
 
-		LibraryInstallDTO expectedLiDTO = new LibraryInstallDTO().withExploratoryName(EXPLORATORY_NAME);
-		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class))).thenReturn(expectedLiDTO);
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
+		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
+				any(UserComputationalResource.class), anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
 
-		LibInstallFormDTO lifDTO = new LibInstallFormDTO();
-		lifDTO.setNotebookName(EXPLORATORY_NAME);
-		lifDTO.setLibs(libs);
-		LibraryInstallDTO actualLiDto = libraryService.generateLibraryInstallDTO(userInfo, lifDTO);
-		assertNotNull(actualLiDto);
-		assertEquals(expectedLiDTO, actualLiDto);
 
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
-		verify(requestBuilder).newLibInstall(userInfo, userInstance);
-		verifyNoMoreInteractions(exploratoryDAO, requestBuilder);
+		expectedException.expect(DlabException.class);
+		expectedException.expectMessage("Computational with name " + COMPUTATIONAL_NAME + "X was not found");
+
+		libraryService.installComputationalLibs(user, EXPLORATORY_NAME, COMPUTATIONAL_NAME + "X",
+				getLibs(null));
 	}
 
 	@Test
-	public void generateLibraryInstallDTOWhenClusterAbsentAndMethodFetchExploratoryFieldsThrowsException() {
-		doThrow(new ResourceNotFoundException("Exploratory for user with name not found"))
-				.when(exploratoryDAO).fetchExploratoryFields(anyString(), anyString());
+	public void installComputationalLibsWithOverride() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
 
-		LibInstallFormDTO lifDTO = new LibInstallFormDTO();
-		lifDTO.setNotebookName(EXPLORATORY_NAME);
-		lifDTO.setLibs(libs);
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
+		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
+				any(UserComputationalResource.class), anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
+		when(libraryDAO.getLibrary(anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(getLibrary(LibStatus.INSTALLED));
+
+		final String uuid = libraryService.installComputationalLibs(user, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
+				getLibs(null));
+
+		assertEquals(UUID, uuid);
+
+		libsToInstall.get(0).setOverride(true);
+		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
+		verify(libraryDAO).getLibrary(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME, LIB_GROUP, LIB_NAME);
+		verify(libraryDAO).addLibrary(eq(USER), eq(EXPLORATORY_NAME), eq(COMPUTATIONAL_NAME),
+				refEq(libsToInstall.get(0)), eq(true));
+		verify(requestBuilder).newLibInstall(refEq(user), refEq(getUserInstanceDto()),
+				refEq(getUserComputationalResourceWithName(COMPUTATIONAL_NAME)), eq(libsToInstall));
+		verify(provisioningService).post(eq("library/computational/lib_install"), eq(user.getAccessToken()),
+				refEq(libraryInstallDTO), eq(String.class));
+		verify(requestId).put(user.getName(), UUID);
+		verifyNoMoreInteractions(libraryDAO, requestBuilder, provisioningService, requestId, exploratoryDAO);
+
+	}
+
+
+	@Test
+	public void installComputationalLibsWhenLibraryIsAlreadyInstalling() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
+
+		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
+		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
+				any(UserComputationalResource.class), anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
+		when(libraryDAO.getLibrary(anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(getLibrary(LibStatus.INSTALLING));
+
 		try {
-			libraryService.generateLibraryInstallDTO(userInfo, lifDTO);
-		} catch (ResourceNotFoundException e) {
-			assertEquals("Exploratory for user with name not found", e.getMessage());
-		}
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
-		verifyNoMoreInteractions(exploratoryDAO);
-	}
-
-	@Test
-	public void generateLibraryInstallDTOWhenClusterAbsentAndNotebookStatusIsNotRunning() {
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(userInstance);
-
-		LibInstallFormDTO lifDTO = new LibInstallFormDTO();
-		lifDTO.setNotebookName(EXPLORATORY_NAME);
-		lifDTO.setLibs(libs);
-		try {
-			libraryService.generateLibraryInstallDTO(userInfo, lifDTO);
+			libraryService.installComputationalLibs(user, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
+					getLibs(null));
 		} catch (DlabException e) {
-			assertEquals("Exploratory explName is not running", e.getMessage());
-		}
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
-		verifyNoMoreInteractions(exploratoryDAO);
-	}
-
-	@Test
-	public void generateLibraryInstallDTOWhenClusterAbsentAndMethodNewLibInstallThrowsException() {
-		userInstance.withStatus("running");
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(userInstance);
-
-		doThrow(new DlabException("Cannot create instance of resource class"))
-				.when(requestBuilder).newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class));
-
-		LibInstallFormDTO lifDTO = new LibInstallFormDTO();
-		lifDTO.setNotebookName(EXPLORATORY_NAME);
-		lifDTO.setLibs(libs);
-		try {
-			libraryService.generateLibraryInstallDTO(userInfo, lifDTO);
-		} catch (DlabException e) {
-			assertEquals("Cannot create instance of resource class", e.getMessage());
-		}
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
-		verify(requestBuilder).newLibInstall(userInfo, userInstance);
-		verifyNoMoreInteractions(exploratoryDAO, requestBuilder);
-	}
-
-	@Test
-	public void generateLibraryInstallDTOWhenClusterPresentButRunningNotebookNotFound() {
-		doThrow(new DlabException("Running notebook with running cluster not found for user"))
-				.when(exploratoryDAO).fetchExploratoryFields(anyString(), anyString(), anyString());
-
-		try {
-			libraryService.generateLibraryInstallDTO(userInfo, libInstallFormDTO);
-		} catch (DlabException e) {
-			assertEquals("Running notebook with running cluster not found for user", e.getMessage());
+			assertEquals("Library name is already installing", e.getMessage());
 		}
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(exploratoryDAO);
+		verify(libraryDAO).getLibrary(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME, LIB_GROUP, LIB_NAME);
+		verifyNoMoreInteractions(libraryDAO, requestBuilder, provisioningService, requestId, exploratoryDAO);
+
 	}
 
 	@Test
-	public void generateLibraryInstallDTOWhenClusterPresentButHasInaproprietaryName() {
-		userInstance.withResources(Collections.singletonList(getUserComputationalResourceWithName
-				("inaproprietaryName")));
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(userInstance);
+	public void installExploratoryLibsWithoutOverride() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
+
+		when(exploratoryDAO.fetchRunningExploratoryFields(anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
+		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
+				anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
+
+
+		final String uuid = libraryService.installExploratoryLibs(user, EXPLORATORY_NAME, getLibs(null));
+
+		assertEquals(UUID, uuid);
+
+		verify(libraryDAO).getLibrary(USER, EXPLORATORY_NAME, LIB_GROUP, LIB_NAME);
+		verify(requestBuilder).newLibInstall(refEq(user), refEq(getUserInstanceDto()), eq(libsToInstall));
+		verify(provisioningService).post(eq("library/exploratory/lib_install"), eq(user.getAccessToken()),
+				refEq(libraryInstallDTO), eq(String.class));
+		verify(libraryDAO).addLibrary(eq(USER), eq(EXPLORATORY_NAME), refEq(libsToInstall.get(0)), eq(false));
+		verify(requestId).put(user.getName(), UUID);
+		verify(exploratoryDAO).fetchRunningExploratoryFields(USER, EXPLORATORY_NAME);
+		verifyNoMoreInteractions(libraryDAO, requestBuilder, provisioningService, requestId, exploratoryDAO);
+	}
+
+	@Test
+	public void installExploratoryLibsWithOverride() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
+
+		when(exploratoryDAO.fetchRunningExploratoryFields(anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
+		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
+				anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
+		when(libraryDAO.getLibrary(anyString(), anyString(), anyString(), anyString())).thenReturn(getLibrary(LibStatus.INSTALLED));
+
+		final String uuid = libraryService.installExploratoryLibs(user, EXPLORATORY_NAME, getLibs(null));
+
+		assertEquals(UUID, uuid);
+
+		libsToInstall.get(0).setOverride(true);
+		verify(libraryDAO).getLibrary(USER, EXPLORATORY_NAME, LIB_GROUP, LIB_NAME);
+		verify(libraryDAO).addLibrary(eq(USER), eq(EXPLORATORY_NAME), refEq(libsToInstall.get(0)), eq(true));
+		verify(requestBuilder).newLibInstall(refEq(user), refEq(getUserInstanceDto()), eq(libsToInstall));
+		verify(exploratoryDAO).fetchRunningExploratoryFields(USER, EXPLORATORY_NAME);
+		verify(provisioningService).post(eq("library/exploratory/lib_install"), eq(user.getAccessToken()),
+				refEq(libraryInstallDTO), eq(String.class));
+		verify(requestId).put(USER, uuid);
+		verifyNoMoreInteractions(libraryDAO, requestBuilder, provisioningService, requestId, exploratoryDAO);
+	}
+
+	@Test
+	public void installExploratoryLibsWhenLibIsAlreadyInstalling() {
+		final LibraryInstallDTO libraryInstallDTO = new LibraryInstallDTO();
+		final List<LibInstallDTO> libsToInstall = getLibs("installing");
+		libraryInstallDTO.setLibs(libsToInstall);
+		final UserInfo user = getUser();
+
+		when(exploratoryDAO.fetchRunningExploratoryFields(anyString(), anyString())).thenReturn(getUserInstanceDto());
+		when(provisioningService.post(anyString(), anyString(), any(LibraryInstallDTO.class), any())).thenReturn(UUID);
+		when(requestBuilder.newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
+				anyListOf(LibInstallDTO.class))).thenReturn(libraryInstallDTO);
+		when(libraryDAO.getLibrary(anyString(), anyString(), anyString(), anyString())).thenReturn(getLibrary(LibStatus.INSTALLING));
+
 		try {
-			libraryService.generateLibraryInstallDTO(userInfo, libInstallFormDTO);
+			libraryService.installExploratoryLibs(user, EXPLORATORY_NAME, getLibs(null));
 		} catch (DlabException e) {
-			assertEquals("Computational with name compName is not unique or absent", e.getMessage());
+			assertEquals("Library name is already installing", e.getMessage());
 		}
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(exploratoryDAO);
+
+		verify(libraryDAO).getLibrary(USER, EXPLORATORY_NAME, LIB_GROUP, LIB_NAME);
+		verify(exploratoryDAO).fetchRunningExploratoryFields(USER, EXPLORATORY_NAME);
+		verifyNoMoreInteractions(libraryDAO, requestBuilder, provisioningService, requestId, exploratoryDAO);
+
 	}
 
-	@Test
-	public void generateLibraryInstallDTOWhenTwoClustersHaveEqualNames() {
-		List<UserComputationalResource> listOfCompResources = Arrays.asList(
-				getUserComputationalResourceWithName("compName"),
-				getUserComputationalResourceWithName("compName")
-		);
-		userInstance.withResources(listOfCompResources);
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(userInstance);
-		try {
-			libraryService.generateLibraryInstallDTO(userInfo, libInstallFormDTO);
-		} catch (DlabException e) {
-			assertEquals("Computational with name compName is not unique or absent", e.getMessage());
-		}
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(exploratoryDAO);
+	private Library getLibrary(LibStatus status) {
+		return new Library(LIB_GROUP, LIB_NAME, "1", status, "");
 	}
 
-	@Test
-	public void generateLibraryInstallDTOWhenMethodNewLibInstallThrowsException() {
-		UserComputationalResource userComputationalResource = getUserComputationalResourceWithName(COMPUTATIONAL_NAME);
-		userInstance.withResources(Collections.singletonList(userComputationalResource));
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString(), anyString())).thenReturn(userInstance);
-
-		doThrow(new DlabException("Cannot create instance of resource class"))
-				.when(requestBuilder).newLibInstall(any(UserInfo.class), any(UserInstanceDTO.class),
-				any(UserComputationalResource.class));
-		try {
-			libraryService.generateLibraryInstallDTO(userInfo, libInstallFormDTO);
-		} catch (DlabException e) {
-			assertEquals("Cannot create instance of resource class", e.getMessage());
-		}
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verify(requestBuilder).newLibInstall(userInfo, userInstance, userComputationalResource);
-		verifyNoMoreInteractions(exploratoryDAO, requestBuilder);
+	private List<LibInstallDTO> getLibs(String status) {
+		final LibInstallDTO libInstallDTO = new LibInstallDTO(LIB_GROUP, LIB_NAME, LIB_VERSION);
+		libInstallDTO.setStatus(status);
+		return Collections.singletonList(libInstallDTO);
 	}
 
-	@Test
-	public void prepareExploratoryLibInstallation() {
-		when(libraryDAO.fetchLibraryStatus(anyString(), anyString(), anyString(), anyString(), anyString()))
-				.thenReturn(LibStatus.INSTALLED);
-		when(libraryDAO.addLibrary(anyString(), anyString(), any(LibInstallDTO.class), anyBoolean()))
-				.thenReturn(true);
-		LibraryInstallDTO actualLiDto =
-				libraryService.prepareExploratoryLibInstallation(USER, libInstallFormDTO, libraryInstallDto);
-		libraryInstallDto.setLibs(libs);
-		assertNotNull(actualLiDto);
-		assertEquals(libraryInstallDto, actualLiDto);
-
-		verify(libraryDAO).fetchLibraryStatus(USER, EXPLORATORY_NAME, "someGroup", "someName", "someVersion");
-		verify(libraryDAO).addLibrary(USER, EXPLORATORY_NAME, liDto, false);
-		verifyNoMoreInteractions(libraryDAO);
-	}
-
-	@Test
-	public void prepareExploratoryLibInstallationWhenLibraryStatusIsInstalling() {
-		when(libraryDAO.fetchLibraryStatus(anyString(), anyString(), anyString(), anyString(), anyString()))
-				.thenReturn(LibStatus.INSTALLING);
-		try {
-			libraryService.prepareExploratoryLibInstallation(USER, libInstallFormDTO, libraryInstallDto);
-		} catch (DlabException e) {
-			assertEquals("Library someName is already installing", e.getMessage());
-		}
-		verify(libraryDAO)
-				.fetchLibraryStatus(USER, EXPLORATORY_NAME, "someGroup", "someName", "someVersion");
-		verifyNoMoreInteractions(libraryDAO);
-	}
-
-	@Test
-	public void prepareComputationalLibInstallation() {
-		when(libraryDAO.fetchLibraryStatus(
-				anyString(), anyString(), anyString(), anyString(), anyString(), anyString()))
-				.thenReturn(LibStatus.INSTALLED);
-		when(libraryDAO.addLibrary(anyString(), anyString(), any(LibInstallDTO.class), anyBoolean())).thenReturn(true);
-
-		LibraryInstallDTO actualLiDto =
-				libraryService.prepareComputationalLibInstallation(USER, libInstallFormDTO, libraryInstallDto);
-		libraryInstallDto.setLibs(libs);
-		assertNotNull(actualLiDto);
-		assertEquals(libraryInstallDto, actualLiDto);
-
-		verify(libraryDAO)
-				.fetchLibraryStatus(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME, "someGroup", "someName",
-						"someVersion");
-		verify(libraryDAO).addLibrary(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME, liDto, false);
-		verifyNoMoreInteractions(libraryDAO);
-	}
-
-	@Test
-	public void prepareComputationalLibInstallationWhenLibraryStatusIsInstalling() {
-		when(libraryDAO.fetchLibraryStatus(
-				anyString(), anyString(), anyString(), anyString(), anyString(), anyString()))
-				.thenReturn(LibStatus.INSTALLING);
-		try {
-			libraryService.prepareComputationalLibInstallation(USER, libInstallFormDTO, libraryInstallDto);
-		} catch (DlabException e) {
-			assertEquals("Library someName is already installing", e.getMessage());
-		}
-		verify(libraryDAO)
-				.fetchLibraryStatus(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME, "someGroup", "someName",
-						"someVersion");
-		verifyNoMoreInteractions(libraryDAO);
+	private UserInfo getUser() {
+		return new UserInfo(USER, "token123");
 	}
 
 	private void prepareForTesting() {
@@ -367,10 +358,13 @@
 	}
 
 	private UserInstanceDTO getUserInstanceDto() {
-		return new UserInstanceDTO().withUser(USER).withExploratoryName(EXPLORATORY_NAME);
+		final UserInstanceDTO userInstanceDTO =
+				new UserInstanceDTO().withUser(USER).withExploratoryName(EXPLORATORY_NAME);
+		userInstanceDTO.getResources().add(getUserComputationalResourceWithName(COMPUTATIONAL_NAME));
+		return userInstanceDTO;
 	}
 
-	private List<Document> getExplLibsList() {
+	private List<Document> getExpLibsList() {
 		Document explLibsDoc = new Document();
 		explLibsDoc.append(ExploratoryLibDAO.LIB_NAME, "expLibName");
 		explLibsDoc.append(ExploratoryLibDAO.LIB_VERSION, "expLibVersion");
@@ -394,7 +388,7 @@
 	}
 
 	private Document getDocumentWithExploratoryAndComputationalLibs() {
-		return new Document().append(ExploratoryLibDAO.EXPLORATORY_LIBS, getExplLibsList())
+		return new Document().append(ExploratoryLibDAO.EXPLORATORY_LIBS, getExpLibsList())
 				.append(ExploratoryLibDAO.COMPUTATIONAL_LIBS, getCompLibs());
 	}
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java
index 1426030..5e94ba8 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/MavenCentralLibraryServiceTest.java
@@ -1,21 +1,20 @@
 /*
- * **************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ***************************************************************************
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
@@ -23,6 +22,7 @@
 import com.epam.dlab.backendapi.domain.MavenSearchArtifactResponse;
 import com.epam.dlab.backendapi.resources.dto.LibraryDTO;
 import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.rest.client.RESTService;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -31,10 +31,6 @@
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
 import java.net.URI;
 import java.util.Collections;
 
@@ -48,7 +44,7 @@
 public class MavenCentralLibraryServiceTest {
 
 	@Mock
-	private Client client;
+	private RESTService client;
 	@InjectMocks
 	private MavenCentralLibraryService mavenCentralLibraryService;
 	@Rule
@@ -56,16 +52,7 @@
 
 	@Test
 	public void getLibraryId() {
-		final WebTarget webTarget = mock(WebTarget.class);
-		final Invocation.Builder requestBuilder = mock(Invocation.Builder.class);
-		final Response response = mock(Response.class);
-		final Response.StatusType statusType = mock(Response.StatusType.class);
-		when(client.target(any(URI.class))).thenReturn(webTarget);
-		when(webTarget.request()).thenReturn(requestBuilder);
-		when(requestBuilder.get()).thenReturn(response);
-		when(response.getStatusInfo()).thenReturn(statusType);
-		when(statusType.getFamily()).thenReturn(Response.Status.Family.SUCCESSFUL);
-		when(response.readEntity(MavenSearchArtifactResponse.class)).thenReturn(getMavenResponse());
+		when(client.get(any(URI.class), any())).thenReturn(getMavenResponse());
 
 		final LibraryDTO libDTO = mavenCentralLibraryService.getLibrary("groupId", "artifactId", "version");
 
@@ -73,25 +60,15 @@
 		assertEquals("groupId:artifactId", libDTO.getName());
 		assertEquals("version", libDTO.getVersion());
 
-		verify(client).target(refEq(URI.create("http://search.maven.org/solrsearch/select?q=a:%22artifactId%22+AND+g" +
-				":%22groupId%22+AND+v:%22version%22+AND+p:%22jar%22&rows=20&wt=json&core=gav&p=jar")));
-		verify(webTarget).request();
-		verify(response).readEntity(MavenSearchArtifactResponse.class);
+		verify(client).get(refEq(URI.create("/solrsearch/select?q=a:%22artifactId%22+AND+g" +
+						":%22groupId%22+AND+v:%22version%22+AND+p:%22jar%22&rows=20&wt=json&core=gav&p=jar")),
+				eq(MavenSearchArtifactResponse.class));
 	}
 
 	@Test
 	public void getLibraryIdWithException() {
-		final WebTarget webTarget = mock(WebTarget.class);
-		final Invocation.Builder requestBuilder = mock(Invocation.Builder.class);
-		final Response response = mock(Response.class);
-		final Response.StatusType statusType = mock(Response.StatusType.class);
-		when(client.target(any(URI.class))).thenReturn(webTarget);
-		when(webTarget.request()).thenReturn(requestBuilder);
-		when(requestBuilder.get()).thenReturn(response);
-		when(response.getStatusInfo()).thenReturn(statusType);
-		when(statusType.getStatusCode()).thenReturn(500);
-		when(statusType.getReasonPhrase()).thenReturn("Exception");
-		when(response.readEntity(MavenSearchArtifactResponse.class)).thenReturn(getMavenResponse());
+		when(client.get(any(URI.class), any())).thenThrow(new DlabException("Can not get artifact info from maven " +
+				"central due to: Exception"));
 
 		expectedException.expect(DlabException.class);
 		expectedException.expectMessage("Can not get artifact info from maven central due to: Exception");
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java
index 6ce9e37..06dd1a5 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.service.impl;
 
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImplTest.java
index be80055..45ba862 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SchedulerJobServiceImplTest.java
@@ -1,34 +1,44 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.service.impl;
 
-import com.epam.dlab.auth.SystemUserInfoServiceImpl;
+import com.epam.dlab.auth.SystemUserInfoService;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
+import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.SchedulerJobDAO;
+import com.epam.dlab.backendapi.domain.RequestId;
+import com.epam.dlab.backendapi.service.ComputationalService;
+import com.epam.dlab.backendapi.service.ExploratoryService;
 import com.epam.dlab.dto.SchedulerJobDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
+import com.epam.dlab.dto.aws.computational.AwsComputationalResource;
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.computational.UserComputationalResource;
+import com.epam.dlab.dto.status.EnvResource;
 import com.epam.dlab.exceptions.ResourceInappropriateStateException;
 import com.epam.dlab.exceptions.ResourceNotFoundException;
 import com.epam.dlab.model.scheduler.SchedulerJobData;
+import com.epam.dlab.rest.client.RESTService;
 import com.mongodb.client.result.UpdateResult;
 import org.junit.Before;
 import org.junit.Test;
@@ -39,10 +49,16 @@
 
 import java.time.*;
 import java.time.temporal.ChronoUnit;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
 
 import static com.epam.dlab.dto.UserInstanceStatus.*;
+import static java.util.Collections.singletonList;
 import static org.junit.Assert.*;
+import static org.mockito.Matchers.anyVararg;
 import static org.mockito.Mockito.*;
 
 @RunWith(MockitoJUnitRunner.class)
@@ -63,11 +79,17 @@
 	@Mock
 	private ComputationalDAO computationalDAO;
 	@Mock
-	private SystemUserInfoServiceImpl systemUserService;
+	private SystemUserInfoService systemUserService;
 	@Mock
-	private ExploratoryServiceImpl exploratoryService;
+	private ExploratoryService exploratoryService;
 	@Mock
-	private ComputationalServiceImpl computationalService;
+	private ComputationalService computationalService;
+	@Mock
+	private EnvDAO envDAO;
+	@Mock
+	private RESTService provisioningService;
+	@Mock
+	private RequestId requestId;
 
 	@InjectMocks
 	private SchedulerJobServiceImpl schedulerJobService;
@@ -76,13 +98,15 @@
 	@Before
 	public void setUp() {
 		userInfo = getUserInfo();
-		schedulerJobDTO = getSchedulerJobDTO();
+		schedulerJobDTO = getSchedulerJobDTO(LocalDate.now(), LocalDate.now().plusDays(1),
+				Arrays.asList(DayOfWeek.values()), Arrays.asList(DayOfWeek.values()), false,
+				LocalDateTime.of(LocalDate.now(), LocalTime.now().truncatedTo(ChronoUnit.MINUTES)),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
 		userInstance = getUserInstanceDTO();
 	}
 
 	@Test
 	public void fetchSchedulerJobForUserAndExploratory() {
-		when(exploratoryDAO.isExploratoryExist(anyString(), anyString())).thenReturn(true);
 		when(schedulerJobDAO.fetchSingleSchedulerJobByUserAndExploratory(anyString(), anyString()))
 				.thenReturn(Optional.of(schedulerJobDTO));
 
@@ -91,21 +115,20 @@
 		assertNotNull(actualSchedulerJobDto);
 		assertEquals(schedulerJobDTO, actualSchedulerJobDto);
 
-		verify(exploratoryDAO).isExploratoryExist(USER, EXPLORATORY_NAME);
 		verify(schedulerJobDAO).fetchSingleSchedulerJobByUserAndExploratory(USER, EXPLORATORY_NAME);
 		verifyNoMoreInteractions(exploratoryDAO, schedulerJobDAO);
 	}
 
 	@Test
 	public void fetchSchedulerJobForUserAndExploratoryWhenNotebookNotExist() {
-		when(exploratoryDAO.isExploratoryExist(anyString(), anyString())).thenReturn(false);
+		when(schedulerJobDAO.fetchSingleSchedulerJobByUserAndExploratory(anyString(), anyString())).thenReturn(Optional.empty());
 		try {
 			schedulerJobService.fetchSchedulerJobForUserAndExploratory(USER, EXPLORATORY_NAME);
 		} catch (ResourceNotFoundException e) {
-			assertEquals("Exploratory for user test with name explName not found", e.getMessage());
+			assertEquals("Scheduler job data not found for user test with exploratory explName", e.getMessage());
 		}
-		verify(exploratoryDAO).isExploratoryExist(USER, EXPLORATORY_NAME);
-		verifyNoMoreInteractions(exploratoryDAO);
+		verify(schedulerJobDAO).fetchSingleSchedulerJobByUserAndExploratory(USER, EXPLORATORY_NAME);
+		verifyNoMoreInteractions(schedulerJobDAO);
 	}
 
 	@Test
@@ -118,14 +141,12 @@
 		} catch (ResourceNotFoundException e) {
 			assertEquals("Scheduler job data not found for user test with exploratory explName", e.getMessage());
 		}
-		verify(exploratoryDAO).isExploratoryExist(USER, EXPLORATORY_NAME);
 		verify(schedulerJobDAO).fetchSingleSchedulerJobByUserAndExploratory(USER, EXPLORATORY_NAME);
 		verifyNoMoreInteractions(exploratoryDAO, schedulerJobDAO);
 	}
 
 	@Test
 	public void fetchSchedulerJobForComputationalResource() {
-		when(computationalDAO.isComputationalExist(anyString(), anyString(), anyString())).thenReturn(true);
 		when(schedulerJobDAO.fetchSingleSchedulerJobForCluster(anyString(), anyString(), anyString()))
 				.thenReturn(Optional.of(schedulerJobDTO));
 
@@ -134,27 +155,12 @@
 		assertNotNull(actualSchedulerJobDto);
 		assertEquals(schedulerJobDTO, actualSchedulerJobDto);
 
-		verify(computationalDAO).isComputationalExist(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
 		verify(schedulerJobDAO).fetchSingleSchedulerJobForCluster(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
 		verifyNoMoreInteractions(computationalDAO, schedulerJobDAO);
 	}
 
 	@Test
-	public void fetchSchedulerJobForComputationalResourceWhenClusterNotExist() {
-		when(computationalDAO.isComputationalExist(anyString(), anyString(), anyString())).thenReturn(false);
-		try {
-			schedulerJobService.fetchSchedulerJobForComputationalResource(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		} catch (ResourceNotFoundException e) {
-			assertEquals("Computational resource compName affiliated with exploratory explName for user test " +
-					"not found", e.getMessage());
-		}
-		verify(computationalDAO).isComputationalExist(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(computationalDAO);
-	}
-
-	@Test
 	public void fetchEmptySchedulerJobForComputationalResource() {
-		when(computationalDAO.isComputationalExist(anyString(), anyString(), anyString())).thenReturn(true);
 		when(schedulerJobDAO.fetchSingleSchedulerJobForCluster(anyString(), anyString(), anyString()))
 				.thenReturn(Optional.empty());
 		try {
@@ -163,7 +169,6 @@
 			assertEquals("Scheduler job data not found for user test with exploratory explName with " +
 					"computational resource compName", e.getMessage());
 		}
-		verify(computationalDAO).isComputationalExist(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
 		verify(schedulerJobDAO).fetchSingleSchedulerJobForCluster(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
 		verifyNoMoreInteractions(computationalDAO, schedulerJobDAO);
 	}
@@ -185,25 +190,6 @@
 	}
 
 	@Test
-	public void updateSchedulerDataForUserAndExploratoryWhenSchedulerIsNull() {
-		userInstance.withStatus("running");
-		when(exploratoryDAO.fetchExploratoryFields(anyString(), anyString())).thenReturn(userInstance);
-		when(exploratoryDAO.updateSchedulerDataForUserAndExploratory(anyString(), anyString(),
-				any(SchedulerJobDTO.class))).thenReturn(mock(UpdateResult.class));
-
-		final SchedulerJobDTO schedulerJobDTO = getSchedulerJobDTO();
-		schedulerJobDTO.setStartDaysRepeat(Collections.emptyList());
-		schedulerJobDTO.setStopDaysRepeat(Collections.emptyList());
-		schedulerJobService.updateExploratorySchedulerData(USER, EXPLORATORY_NAME, schedulerJobDTO);
-
-		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
-		verify(exploratoryDAO).updateSchedulerDataForUserAndExploratory(USER, EXPLORATORY_NAME, null);
-		verify(computationalDAO).updateSchedulerSyncFlag(USER, EXPLORATORY_NAME, false);
-		verifyNoMoreInteractions(exploratoryDAO);
-		verifyZeroInteractions(computationalDAO);
-	}
-
-	@Test
 	public void updateSchedulerDataForUserAndExploratoryWhenMethodFetchExploratoryFieldsThrowsException() {
 		doThrow(new ResourceNotFoundException("Exploratory for user with name not found"))
 				.when(exploratoryDAO).fetchExploratoryFields(anyString(), anyString());
@@ -265,7 +251,7 @@
 		when(exploratoryDAO.updateSchedulerDataForUserAndExploratory(anyString(), anyString(),
 				any(SchedulerJobDTO.class))).thenReturn(mock(UpdateResult.class));
 		when(computationalDAO.getComputationalResourcesWhereStatusIn(anyString(), any(List.class),
-				anyString(), anyVararg())).thenReturn(Collections.singletonList(COMPUTATIONAL_NAME));
+				anyString(), anyVararg())).thenReturn(singletonList(COMPUTATIONAL_NAME));
 		when(computationalDAO.updateSchedulerDataForComputationalResource(anyString(), anyString(), anyString(),
 				any(SchedulerJobDTO.class))).thenReturn(mock(UpdateResult.class));
 
@@ -274,7 +260,7 @@
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
 		verify(exploratoryDAO).updateSchedulerDataForUserAndExploratory(USER, EXPLORATORY_NAME, schedulerJobDTO);
 		verify(computationalDAO).getComputationalResourcesWhereStatusIn(USER,
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE),
+				singletonList(DataEngineType.SPARK_STANDALONE),
 				EXPLORATORY_NAME, STARTING, RUNNING, STOPPING, STOPPED);
 		schedulerJobDTO.setEndTime(null);
 		schedulerJobDTO.setStopDaysRepeat(Collections.emptyList());
@@ -299,7 +285,7 @@
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
 		verify(exploratoryDAO).updateSchedulerDataForUserAndExploratory(USER, EXPLORATORY_NAME, schedulerJobDTO);
 		verify(computationalDAO).getComputationalResourcesWhereStatusIn(USER,
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE),
+				singletonList(DataEngineType.SPARK_STANDALONE),
 				EXPLORATORY_NAME, STARTING, RUNNING, STOPPING, STOPPED);
 		verifyNoMoreInteractions(exploratoryDAO, computationalDAO);
 	}
@@ -333,7 +319,10 @@
 		when(computationalDAO.updateSchedulerDataForComputationalResource(anyString(), anyString(), anyString(),
 				any(SchedulerJobDTO.class))).thenReturn(mock(UpdateResult.class));
 
-		final SchedulerJobDTO schedulerJobDTO = getSchedulerJobDTO();
+		final SchedulerJobDTO schedulerJobDTO = getSchedulerJobDTO(LocalDate.now(), LocalDate.now().plusDays(1),
+				Arrays.asList(DayOfWeek.values()), Arrays.asList(DayOfWeek.values()), false,
+				LocalDateTime.of(LocalDate.now(), LocalTime.now().truncatedTo(ChronoUnit.MINUTES)),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
 		schedulerJobDTO.setStartDaysRepeat(null);
 		schedulerJobDTO.setStopDaysRepeat(null);
 		schedulerJobService.updateComputationalSchedulerData(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
@@ -341,8 +330,8 @@
 
 		verify(exploratoryDAO).fetchExploratoryFields(USER, EXPLORATORY_NAME);
 		verify(computationalDAO).fetchComputationalFields(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verify(computationalDAO).updateSchedulerDataForComputationalResource(USER, EXPLORATORY_NAME,
-				COMPUTATIONAL_NAME, null);
+		verify(computationalDAO).updateSchedulerDataForComputationalResource(eq(USER), eq(EXPLORATORY_NAME),
+				eq(COMPUTATIONAL_NAME), refEq(schedulerJobDTO));
 		verifyNoMoreInteractions(exploratoryDAO, computationalDAO);
 	}
 
@@ -411,319 +400,721 @@
 	}
 
 	@Test
-	public void executeStartExploratoryJobWithoutSparkClusters() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
-						schedulerJobDTO)));
-		when(exploratoryService.start(any(UserInfo.class), anyString())).thenReturn("someUuid");
-		when(schedulerJobDAO.fetchSingleSchedulerJobByUserAndExploratory(anyString(), anyString()))
-				.thenReturn(Optional.of(schedulerJobDTO));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
+	public void executeCheckClusterInactivityJob() {
+		EnvResource resource = new EnvResource();
+		when(envDAO.findRunningResourcesForCheckInactivity()).thenReturn(singletonList(resource));
+		when(provisioningService.post(anyString(), anyString(), anyListOf(EnvResource.class), any()))
+				.thenReturn("someUuid");
+		when(requestId.put(anyString(), anyString())).thenReturn("someUuid");
 
-		schedulerJobService.executeStartResourceJob(false);
+		schedulerJobService.updateRunningResourcesLastActivity(userInfo);
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.RUNNING), eq(false));
-		verify(exploratoryService).start(userInfo, EXPLORATORY_NAME);
-		verify(schedulerJobDAO).fetchSingleSchedulerJobByUserAndExploratory(USER, EXPLORATORY_NAME);
-		verify(systemUserService).create(USER);
-		verifyNoMoreInteractions(schedulerJobDAO, systemUserService, exploratoryService);
-		verifyZeroInteractions(computationalService);
+		verify(envDAO).findRunningResourcesForCheckInactivity();
+		verify(provisioningService).post("/infrastructure/check_inactivity", "token",
+				singletonList(resource), String.class);
+		verify(requestId).put(USER, "someUuid");
+		verifyNoMoreInteractions(envDAO, provisioningService, requestId);
 	}
 
 	@Test
-	@SuppressWarnings("unchecked")
-	public void executeStartExploratoryJobWithSparkClusters() {
-		schedulerJobDTO.setSyncStartRequired(true);
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
-						schedulerJobDTO)));
-		when(schedulerJobDAO.fetchSingleSchedulerJobByUserAndExploratory(anyString(), anyString()))
-				.thenReturn(Optional.of(schedulerJobDTO));
-		when(exploratoryService.start(any(UserInfo.class), anyString())).thenReturn("someUuid");
-		when(computationalDAO.getComputationalResourcesWhereStatusIn(anyString(), any(List.class),
-				anyString(), any(UserInstanceStatus.class))).thenReturn(Collections.singletonList(COMPUTATIONAL_NAME));
+	public void executeCheckClusterInactivityJobWithoutRunningClusters() {
+		when(envDAO.findRunningResourcesForCheckInactivity()).thenReturn(Collections.emptyList());
 
-		LocalDate notebookBeginDate = schedulerJobDTO.getBeginDate();
-		LocalDate notebookFinishDate = schedulerJobDTO.getFinishDate();
-		LocalTime notebookStartTime = schedulerJobDTO.getStartTime();
-		LocalTime notebookEndTime = schedulerJobDTO.getEndTime();
-		List<DayOfWeek> notebookStartDaysRepeat = schedulerJobDTO.getStartDaysRepeat();
-		List<DayOfWeek> notebookStopDaysRepeat = schedulerJobDTO.getStopDaysRepeat();
-		LocalDateTime notebookTerminateDateTime = schedulerJobDTO.getTerminateDateTime();
-		ZoneOffset notebookZoneOffset = schedulerJobDTO.getTimeZoneOffset();
-		boolean notebookIsSyncStartRequired = schedulerJobDTO.isSyncStartRequired();
+		schedulerJobService.updateRunningResourcesLastActivity(userInfo);
 
-		SchedulerJobDTO clusterScheduler = new SchedulerJobDTO();
-		clusterScheduler.setBeginDate(LocalDate.of(notebookBeginDate.getYear(), notebookBeginDate.getMonth(),
-				notebookBeginDate.getDayOfMonth()));
-		clusterScheduler.setFinishDate(LocalDate.of(notebookFinishDate.getYear() + 1, notebookFinishDate.getMonth(),
-				notebookFinishDate.getDayOfMonth()));
-		clusterScheduler.setStartTime(LocalTime.of(notebookStartTime.getHour(), notebookStartTime.getMinute()));
-		clusterScheduler.setEndTime(LocalTime.of((notebookEndTime.getHour() + 1) % 24, notebookEndTime.getMinute()));
-		clusterScheduler.setStartDaysRepeat(new ArrayList<>(notebookStartDaysRepeat));
-		clusterScheduler.setStopDaysRepeat(new ArrayList<>(notebookStopDaysRepeat));
-		clusterScheduler.setTerminateDateTime(LocalDateTime.of(notebookTerminateDateTime.getYear() + 1,
-				notebookTerminateDateTime.getMonth(), notebookTerminateDateTime.getDayOfMonth(),
-				notebookTerminateDateTime.getHour(), notebookTerminateDateTime.getMinute()));
-		clusterScheduler.setTimeZoneOffset(notebookZoneOffset);
-		clusterScheduler.setSyncStartRequired(notebookIsSyncStartRequired);
+		verify(envDAO).findRunningResourcesForCheckInactivity();
+		verifyNoMoreInteractions(envDAO);
+		verifyZeroInteractions(provisioningService, requestId);
+	}
 
-		when(schedulerJobDAO.fetchSingleSchedulerJobForCluster(anyString(), anyString(), anyString()))
-				.thenReturn(Optional.of(clusterScheduler));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
+	@Test
+	public void testStartComputationalByScheduler() {
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(getSchedulerJobData(LocalDate.now(),
+				LocalDate.now().plusDays(1), Arrays.asList(DayOfWeek.values()), Arrays.asList(DayOfWeek.values()),
+				LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES))));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
 
-		doNothing().when(computationalService).startSparkCluster(any(UserInfo.class), anyString(), anyString());
+		schedulerJobService.startComputationalByScheduler();
 
-		schedulerJobService.executeStartResourceJob(false);
+		verify(systemUserService).create(USER);
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED);
+		verify(computationalService).startSparkCluster(refEq(getUserInfo()), eq(EXPLORATORY_NAME),
+				eq(COMPUTATIONAL_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.RUNNING), eq(false));
-		verify(schedulerJobDAO).fetchSingleSchedulerJobByUserAndExploratory(USER, EXPLORATORY_NAME);
-		verify(computationalDAO).getComputationalResourcesWhereStatusIn(USER,
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE),
-				EXPLORATORY_NAME, UserInstanceStatus.STOPPED);
-		verify(schedulerJobDAO).fetchSingleSchedulerJobForCluster(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
+	@Test
+	public void testStartComputationalBySchedulerWhenSchedulerIsNotConfigured() {
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(Collections.emptyList());
+
+		schedulerJobService.startComputationalByScheduler();
+
+		verify(schedulerJobDAO).getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE,
+				STOPPED);
+		verifyNoMoreInteractions(schedulerJobDAO);
+		verifyZeroInteractions(systemUserService, computationalService);
+	}
+
+	@Test
+	public void testStartComputationalBySchedulerWhenSchedulerFinishDateBeforeNow() {
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final LocalDate endDate = LocalDate.now();
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(beginDate, endDate, startDays, stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.startComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testStartComputationalBySchedulerWhenSchedulerStartDateAfterNow() {
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final LocalDate finishDate = LocalDate.now();
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				beginDate, finishDate, startDays, stopDays, terminateDateTime, false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.startComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testStartComputationalBySchedulerWhenStartDayIsNotCurrentDay() {
+		final List<DayOfWeek> stopDays = Arrays.stream(DayOfWeek.values()).collect(Collectors.toList());
+		final List<DayOfWeek> startDays = Arrays.stream(DayOfWeek.values()).collect(Collectors.toList());
+		startDays.remove(LocalDate.now().getDayOfWeek());
+		final LocalDate beginDate = LocalDate.now();
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				beginDate, LocalDate.now().minusDays(1), startDays, stopDays,
+				LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.startComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+
+	@Test
+	public void testStopComputationalByScheduler() {
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(getSchedulerJobData(LocalDate.now(),
+				LocalDate.now().plusDays(1), Arrays.asList(DayOfWeek.values()), Arrays.asList(DayOfWeek.values()),
+				LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES))));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopComputationalByScheduler();
+
+		verify(systemUserService).create(USER);
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, RUNNING);
+		verify(computationalService).stopSparkCluster(refEq(getUserInfo()), eq(EXPLORATORY_NAME),
+				eq(COMPUTATIONAL_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testStopComputationalBySchedulerWhenSchedulerIsNotConfigured() {
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(Collections.emptyList());
+
+		schedulerJobService.stopComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, RUNNING);
+		verifyNoMoreInteractions(schedulerJobDAO);
+		verifyZeroInteractions(systemUserService, computationalService);
+	}
+
+	@Test
+	public void testStopComputationalBySchedulerWhenSchedulerFinishDateBeforeNow() {
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final LocalDate endDate = LocalDate.now();
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(beginDate, endDate, startDays, stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testStopComputationalBySchedulerWhenSchedulerStartDateAfterNow() {
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final LocalDate finishDate = LocalDate.now();
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				beginDate, finishDate, startDays, stopDays, terminateDateTime, false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testStopComputationalBySchedulerWhenStopDayIsNotCurrentDay() {
+		final List<DayOfWeek> stopDays = Arrays.stream(DayOfWeek.values()).collect(Collectors.toList());
+		stopDays.remove(LocalDate.now().getDayOfWeek());
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), Arrays.asList(DayOfWeek.values()), stopDays,
+				LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+
+	@Test
+	public void testStopExploratoryByScheduler() {
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(getSchedulerJobData(LocalDate.now(), LocalDate.now().plusDays(1), Arrays.asList(DayOfWeek.values()), Arrays.asList(DayOfWeek.values()), LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES))));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopExploratoryByScheduler();
+
+		verify(systemUserService).create(USER);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(RUNNING);
+		verify(exploratoryService).stop(refEq(getUserInfo()), eq(EXPLORATORY_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService);
+	}
+
+	@Test
+	public void testStopExploratoryBySchedulerWhenSchedulerIsNotConfigured() {
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(Collections.emptyList());
+
+		schedulerJobService.stopExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(RUNNING);
+		verifyNoMoreInteractions(schedulerJobDAO);
+		verifyZeroInteractions(systemUserService, exploratoryService);
+	}
+
+	@Test
+	public void testStopExploratoryBySchedulerWhenSchedulerFinishDateBeforeNow() {
+		final LocalDate finishDate = LocalDate.now().minusDays(1);
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(LocalDate.now(), finishDate,
+				Arrays.asList(DayOfWeek.values()), stopDays, LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService);
+	}
+
+	@Test
+	public void testStopExploratoryBySchedulerWhenSchedulerStartDateAfterNow() {
+		final LocalDate now = LocalDate.now();
+		final LocalDate finishDate = now;
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final LocalDate beginDate = now.plusDays(1);
+		final LocalDateTime terminateDateTime = LocalDateTime.of(now, LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(beginDate, finishDate, startDays, stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService);
+	}
+
+	@Test
+	public void testStopExploratoryBySchedulerWhenStopDayIsNotCurrentDay() {
+		final List<DayOfWeek> stopDays = Arrays.stream((DayOfWeek.values())).collect(Collectors.toList());
+		stopDays.remove(LocalDate.now().getDayOfWeek());
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), Arrays.asList(DayOfWeek.values()), stopDays,
+				LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.stopExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService);
+	}
+
+
+	@Test
+	public void testStartExploratoryByScheduler() {
+		final LocalDate finishDate = LocalDate.now().plusDays(1);
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class)))
+				.thenReturn(singletonList(getSchedulerJobData(LocalDate.now(), finishDate,
+						Arrays.asList(DayOfWeek.values()), stopDays, LocalDateTime.of(LocalDate.now(),
+								LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+				)));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.startExploratoryByScheduler();
+
+		verify(systemUserService).create(USER);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verify(exploratoryService).start(refEq(getUserInfo()), eq(EXPLORATORY_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService);
+		verifyZeroInteractions(computationalService, computationalDAO);
+	}
+
+	@Test
+	public void testStartExploratoryBySchedulerWithSyncComputationalStart() {
+		final LocalDate finishDate = LocalDate.now().plusDays(1);
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class)))
+				.thenReturn(singletonList(getSchedulerJobData(LocalDate.now(), finishDate,
+						Arrays.asList(DayOfWeek.values()), stopDays, LocalDateTime.of(LocalDate.now(),
+								LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), true, USER,
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+				)));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+		when(computationalDAO.findComputationalResourcesWithStatus(anyString(), anyString(),
+				any(UserInstanceStatus.class))).thenReturn(singletonList(getComputationalResource(
+				DataEngineType.SPARK_STANDALONE, true)));
+
+		schedulerJobService.startExploratoryByScheduler();
+
 		verify(systemUserService, times(2)).create(USER);
-		verify(exploratoryService).start(userInfo, EXPLORATORY_NAME);
-		verify(computationalService).startSparkCluster(userInfo, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, computationalDAO, systemUserService, exploratoryService,
-				computationalService);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verify(exploratoryService).start(refEq(getUserInfo()), eq(EXPLORATORY_NAME));
+		verify(computationalDAO).findComputationalResourcesWithStatus(USER, EXPLORATORY_NAME, STOPPED);
+		verify(computationalService).startSparkCluster(refEq(getUserInfo()), eq(EXPLORATORY_NAME),
+				eq(COMPUTATIONAL_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService, computationalService,
+				computationalDAO);
 	}
 
 	@Test
-	@SuppressWarnings("unchecked")
-	public void executeStartExploratoryJobWithSparkClustersWhenNotebookAndClusterSchedulersAreNotEqual() {
-		schedulerJobDTO.setSyncStartRequired(true);
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
-						schedulerJobDTO)));
-		when(schedulerJobDAO.fetchSingleSchedulerJobByUserAndExploratory(anyString(), anyString()))
-				.thenReturn(Optional.of(schedulerJobDTO));
-		when(exploratoryService.start(any(UserInfo.class), anyString())).thenReturn("someUuid");
-		when(computationalDAO.getComputationalResourcesWhereStatusIn(anyString(), any(List.class),
-				anyString(), any(UserInstanceStatus.class))).thenReturn(Collections.singletonList(COMPUTATIONAL_NAME));
+	public void testStartExploratoryBySchedulerWithSyncComputationalStartDataEngine() {
+		final LocalDate finishDate = LocalDate.now().plusDays(1);
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class)))
+				.thenReturn(singletonList(getSchedulerJobData(LocalDate.now(), finishDate,
+						Arrays.asList(DayOfWeek.values()), stopDays, LocalDateTime.of(LocalDate.now(),
+								LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), true, USER,
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+				)));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+		when(computationalDAO.findComputationalResourcesWithStatus(anyString(), anyString(),
+				any(UserInstanceStatus.class))).thenReturn(singletonList(getComputationalResource(
+				DataEngineType.CLOUD_SERVICE, true)));
 
-		LocalDate notebookBeginDate = schedulerJobDTO.getBeginDate();
-		LocalDate notebookFinishDate = schedulerJobDTO.getFinishDate();
-		LocalTime notebookStartTime = schedulerJobDTO.getStartTime();
-		LocalTime notebookEndTime = schedulerJobDTO.getEndTime();
-		List<DayOfWeek> notebookStartDaysRepeat = schedulerJobDTO.getStartDaysRepeat();
-		List<DayOfWeek> notebookStopDaysRepeat = schedulerJobDTO.getStopDaysRepeat();
-		LocalDateTime notebookTerminateDateTime = schedulerJobDTO.getTerminateDateTime();
-		ZoneOffset notebookZoneOffset = schedulerJobDTO.getTimeZoneOffset();
-		boolean notebookIsSyncStartRequired = schedulerJobDTO.isSyncStartRequired();
+		schedulerJobService.startExploratoryByScheduler();
 
-		SchedulerJobDTO clusterScheduler = new SchedulerJobDTO();
-		clusterScheduler.setBeginDate(LocalDate.of(notebookBeginDate.getYear() + 1, notebookBeginDate.getMonth(),
-				notebookBeginDate.getDayOfMonth()));
-		clusterScheduler.setFinishDate(LocalDate.of(notebookFinishDate.getYear() + 1, notebookFinishDate.getMonth(),
-				notebookFinishDate.getDayOfMonth()));
-		clusterScheduler.setStartTime(LocalTime.of((notebookStartTime.getHour() + 1) % 24,
-				notebookStartTime.getMinute()));
-		clusterScheduler.setEndTime(LocalTime.of((notebookEndTime.getHour() + 1) % 24, notebookEndTime.getMinute()));
-		clusterScheduler.setStartDaysRepeat(new ArrayList<>(notebookStartDaysRepeat));
-		clusterScheduler.setStopDaysRepeat(new ArrayList<>(notebookStopDaysRepeat));
-		clusterScheduler.setTerminateDateTime(LocalDateTime.of(notebookTerminateDateTime.getYear() + 1,
-				notebookTerminateDateTime.getMonth(), notebookTerminateDateTime.getDayOfMonth(),
-				notebookTerminateDateTime.getHour(), notebookTerminateDateTime.getMinute()));
-		clusterScheduler.setTimeZoneOffset(notebookZoneOffset);
-		clusterScheduler.setSyncStartRequired(notebookIsSyncStartRequired);
-
-		when(schedulerJobDAO.fetchSingleSchedulerJobForCluster(anyString(), anyString(), anyString()))
-				.thenReturn(Optional.of(clusterScheduler));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
-
-		schedulerJobService.executeStartResourceJob(false);
-
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.RUNNING), eq(false));
-		verify(schedulerJobDAO).fetchSingleSchedulerJobByUserAndExploratory(USER, EXPLORATORY_NAME);
-		verify(computationalDAO).getComputationalResourcesWhereStatusIn(USER,
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE),
-				EXPLORATORY_NAME, UserInstanceStatus.STOPPED);
-		verify(schedulerJobDAO).fetchSingleSchedulerJobForCluster(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
 		verify(systemUserService).create(USER);
-		verify(exploratoryService).start(userInfo, EXPLORATORY_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, computationalDAO, systemUserService, exploratoryService);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verify(exploratoryService).start(refEq(getUserInfo()), eq(EXPLORATORY_NAME));
+		verify(computationalDAO).findComputationalResourcesWithStatus(USER, EXPLORATORY_NAME, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService, computationalDAO);
 		verifyZeroInteractions(computationalService);
 	}
 
 	@Test
-	public void executeStartExploratoryJobWhenSchedulerIsAbsent() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.emptyList());
-		schedulerJobService.executeStartResourceJob(false);
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.RUNNING), eq(false));
-		verify(systemUserService, never()).create(any());
-		verify(exploratoryService, never()).start(any(), any());
-		verifyNoMoreInteractions(schedulerJobDAO);
-	}
+	public void testStartExploratoryBySchedulerWithSyncComputationalStartOnExploratoryButNotOnComputational() {
+		final LocalDate finishDate = LocalDate.now().plusDays(1);
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class)))
+				.thenReturn(singletonList(getSchedulerJobData(LocalDate.now(), finishDate,
+						Arrays.asList(DayOfWeek.values()), stopDays, LocalDateTime.of(LocalDate.now(),
+								LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), true, USER,
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+				)));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+		when(computationalDAO.findComputationalResourcesWithStatus(anyString(), anyString(),
+				any(UserInstanceStatus.class))).thenReturn(singletonList(getComputationalResource(
+				DataEngineType.SPARK_STANDALONE, false)));
 
-	@Test
-	public void executeStartComputationalJob() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME, COMPUTATIONAL_NAME,
-						schedulerJobDTO)));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
-		doNothing().when(computationalService).startSparkCluster(any(UserInfo.class), anyString(), anyString());
+		schedulerJobService.startExploratoryByScheduler();
 
-		schedulerJobService.executeStartResourceJob(true);
-
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.RUNNING), eq(true));
 		verify(systemUserService).create(USER);
-		verify(computationalService).startSparkCluster(userInfo, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, systemUserService, computationalService);
-		verifyZeroInteractions(exploratoryService);
-	}
-
-	@Test
-	public void executeStartComputationalJobWhenSchedulerIsAbsent() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.emptyList());
-		schedulerJobService.executeStartResourceJob(true);
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.RUNNING), eq(true));
-		verify(systemUserService, never()).create(any());
-		verify(computationalService, never()).startSparkCluster(any(), any(), any());
-		verifyNoMoreInteractions(schedulerJobDAO);
-	}
-
-	@Test
-	public void executeStopExploratoryJob() {
-		schedulerJobDTO.setStartTime(LocalTime.now().minusHours(1));
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME,
-						COMPUTATIONAL_NAME, schedulerJobDTO)));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
-		when(exploratoryService.stop(any(UserInfo.class), anyString())).thenReturn("someUuid");
-
-		schedulerJobService.executeStopResourceJob(false);
-
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.STOPPED), eq(false));
-		verify(systemUserService).create(USER);
-		verify(exploratoryService).stop(userInfo, EXPLORATORY_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, systemUserService, exploratoryService);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verify(exploratoryService).start(refEq(getUserInfo()), eq(EXPLORATORY_NAME));
+		verify(computationalDAO).findComputationalResourcesWithStatus(USER, EXPLORATORY_NAME, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService, computationalDAO);
 		verifyZeroInteractions(computationalService);
 	}
 
 	@Test
-	public void executeStopExploratoryJobWhenSchedulerIsAbsent() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.emptyList());
-		schedulerJobService.executeStopResourceJob(false);
+	public void testStartExploratoryBySchedulerWhenSchedulerIsNotConfigured() {
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(Collections.emptyList());
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.STOPPED), eq(false));
-		verify(systemUserService, never()).create(USER);
-		verify(exploratoryService, never()).stop(any(), any());
+		schedulerJobService.startExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
 		verifyNoMoreInteractions(schedulerJobDAO);
-		verifyZeroInteractions(computationalService);
+		verifyZeroInteractions(systemUserService, exploratoryService, computationalService, computationalDAO);
 	}
 
 	@Test
-	public void executeStopComputationalJob() {
-		schedulerJobDTO.setStartTime(LocalTime.now().minusHours(1));
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME,
-						COMPUTATIONAL_NAME, schedulerJobDTO)));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
-		doNothing().when(computationalService).stopSparkCluster(any(UserInfo.class), anyString(), anyString());
+	public void testStartExploratoryBySchedulerWhenSchedulerFinishDateBeforeNow() {
+		final LocalDate finishDate = LocalDate.now().minusDays(1);
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(LocalDate.now(), finishDate,
+				Arrays.asList(DayOfWeek.values()), stopDays, LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
 
-		schedulerJobService.executeStopResourceJob(true);
+		schedulerJobService.startExploratoryByScheduler();
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.STOPPED), eq(true));
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verifyZeroInteractions(systemUserService, exploratoryService, computationalService, computationalDAO);
+	}
+
+	@Test
+	public void testStartExploratoryBySchedulerWhenSchedulerStartDateAfterNow() {
+		final LocalDate finishDate = LocalDate.now();
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(beginDate, finishDate, startDays, stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.startExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verifyZeroInteractions(systemUserService, exploratoryService, computationalService, computationalDAO);
+	}
+
+	@Test
+	public void testStartExploratoryBySchedulerWhenStartDayIsNotCurrentDay() {
+		final List<DayOfWeek> stopDays = Arrays.stream((DayOfWeek.values())).collect(Collectors.toList());
+		final List<DayOfWeek> startDays = Arrays.stream(DayOfWeek.values()).collect(Collectors.toList());
+		startDays.remove(LocalDate.now().getDayOfWeek());
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), startDays, stopDays, LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.startExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithStatus(STOPPED);
+		verifyZeroInteractions(systemUserService, exploratoryService, computationalService, computationalDAO);
+	}
+
+
+	@Test
+	public void testTerminateComputationalByScheduler() {
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final LocalDate finishDate = LocalDate.now().plusDays(1);
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(LocalDate.now(), finishDate, startDays, stopDays
+				, terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.terminateComputationalByScheduler();
+
 		verify(systemUserService).create(USER);
-		verify(computationalService).stopSparkCluster(userInfo, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, systemUserService, computationalService);
-		verifyZeroInteractions(exploratoryService);
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED,
+						RUNNING);
+		verify(computationalService).terminateComputational(refEq(getUserInfo()), eq(EXPLORATORY_NAME),
+				eq(COMPUTATIONAL_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
 	}
 
 	@Test
-	public void executeStopComputationalJobWhenSchedulerIsAbsent() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.emptyList());
-		schedulerJobService.executeStopResourceJob(true);
+	public void testTerminateComputationalBySchedulerWhenSchedulerIsNotConfigured() {
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(Collections.emptyList());
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.STOPPED), eq(true));
-		verify(systemUserService, never()).create(USER);
-		verify(computationalService, never()).stopSparkCluster(any(), any(), any());
+		schedulerJobService.terminateComputationalByScheduler();
+
+		verify(schedulerJobDAO).getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE,
+				STOPPED, RUNNING);
 		verifyNoMoreInteractions(schedulerJobDAO);
-		verifyZeroInteractions(exploratoryService);
+		verifyZeroInteractions(systemUserService, computationalService);
 	}
 
 	@Test
-	public void executeTerminateExploratoryJob() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME,
-						COMPUTATIONAL_NAME, schedulerJobDTO)));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
-		when(exploratoryService.terminate(any(UserInfo.class), anyString())).thenReturn("someUuid");
+	public void testTerminateComputationalBySchedulerWhenSchedulerFinishDateBeforeNow() {
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), Arrays.asList(DayOfWeek.values()),
+				Arrays.asList(DayOfWeek.values()), LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
 
-		schedulerJobService.executeTerminateResourceJob(false);
+		schedulerJobService.terminateComputationalByScheduler();
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.TERMINATED), eq(false));
+		verify(schedulerJobDAO).getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE,
+				STOPPED, RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testTerminateComputationalBySchedulerWhenSchedulerStartDateAfterNow() {
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final LocalDate finishDate = LocalDate.now();
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(beginDate, finishDate, startDays, stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.terminateComputationalByScheduler();
+
+		verify(schedulerJobDAO).getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE,
+				STOPPED, RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testTerminateComputationalBySchedulerWhenTerminateDateNotCurrent() {
+		final List<DayOfWeek> stopDays = Arrays.stream(DayOfWeek.values()).collect(Collectors.toList());
+		stopDays.remove(LocalDate.now().getDayOfWeek());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)).plusDays(1);
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), Arrays.asList(DayOfWeek.values()), stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.terminateComputationalByScheduler();
+
+		verify(schedulerJobDAO)
+				.getComputationalSchedulerDataWithOneOfStatus(RUNNING, DataEngineType.SPARK_STANDALONE, STOPPED,
+						RUNNING);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService);
+	}
+
+	@Test
+	public void testTerminateExploratoryByScheduler() {
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final LocalDate finishDate = LocalDate.now().plusDays(1);
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(LocalDate.now(), finishDate, startDays, stopDays
+				, terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithOneOfStatus(anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.terminateExploratoryByScheduler();
+
 		verify(systemUserService).create(USER);
-		verify(exploratoryService).terminate(userInfo, EXPLORATORY_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, systemUserService, exploratoryService);
-		verifyZeroInteractions(computationalService);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithOneOfStatus(RUNNING, STOPPED);
+		verify(exploratoryService).terminate(refEq(getUserInfo()), eq(EXPLORATORY_NAME));
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService, exploratoryService);
 	}
 
 	@Test
-	public void executeTerminateExploratoryJobWhenSchedulerIsAbsent() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.emptyList());
-		schedulerJobService.executeTerminateResourceJob(false);
+	public void testTerminateExploratoryBySchedulerWhenSchedulerIsNotConfigured() {
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(Collections.emptyList());
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.TERMINATED), eq(false));
-		verify(systemUserService, never()).create(USER);
-		verify(exploratoryService, never()).terminate(any(), any());
+		schedulerJobService.terminateExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithOneOfStatus(RUNNING, STOPPED);
 		verifyNoMoreInteractions(schedulerJobDAO);
-		verifyZeroInteractions(computationalService);
+		verifyZeroInteractions(systemUserService, exploratoryService, computationalService);
 	}
 
 	@Test
-	public void executeTerminateComputationalJob() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.singletonList(new SchedulerJobData(USER, EXPLORATORY_NAME,
-						COMPUTATIONAL_NAME, schedulerJobDTO)));
-		when(systemUserService.create(anyString())).thenReturn(userInfo);
-		doNothing().when(computationalService).terminateComputationalEnvironment(any(UserInfo.class), anyString(),
-				anyString());
+	public void testTerminateExploratoryBySchedulerWhenSchedulerFinishDateBeforeNow() {
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), Arrays.asList(DayOfWeek.values()),
+				Arrays.asList(DayOfWeek.values()), LocalDateTime.of(LocalDate.now(),
+						LocalTime.now().truncatedTo(ChronoUnit.MINUTES)), false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithOneOfStatus(anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
 
-		schedulerJobService.executeTerminateResourceJob(true);
+		schedulerJobService.terminateExploratoryByScheduler();
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.TERMINATED), eq(true));
-		verify(systemUserService).create(USER);
-		verify(computationalService).terminateComputationalEnvironment(userInfo, EXPLORATORY_NAME, COMPUTATIONAL_NAME);
-		verifyNoMoreInteractions(schedulerJobDAO, systemUserService, computationalService);
-		verifyZeroInteractions(exploratoryService);
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithOneOfStatus(RUNNING, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService, computationalService);
 	}
 
 	@Test
-	public void executeTerminateComputationalJobWhenSchedulerIsAbsent() {
-		when(schedulerJobDAO.getSchedulerJobsToAchieveStatus(any(UserInstanceStatus.class), anyBoolean()))
-				.thenReturn(Collections.emptyList());
-		schedulerJobService.executeTerminateResourceJob(true);
+	public void testTerminateExploratoryBySchedulerWhenSchedulerStartDateAfterNow() {
+		final LocalDate beginDate = LocalDate.now().plusDays(1);
+		final LocalDate finishDate = LocalDate.now();
+		final List<DayOfWeek> startDays = Arrays.asList(DayOfWeek.values());
+		final List<DayOfWeek> stopDays = Arrays.asList(DayOfWeek.values());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				beginDate, finishDate, startDays, stopDays, terminateDateTime, false, USER,
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
+		when(schedulerJobDAO.getExploratorySchedulerDataWithOneOfStatus(anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
 
-		verify(schedulerJobDAO).getSchedulerJobsToAchieveStatus(refEq(UserInstanceStatus.TERMINATED), eq(true));
-		verify(systemUserService, never()).create(USER);
-		verify(computationalService, never()).terminateComputationalEnvironment(any(), any(), any());
-		verifyNoMoreInteractions(schedulerJobDAO);
-		verifyZeroInteractions(exploratoryService);
+		schedulerJobService.terminateExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithOneOfStatus(RUNNING, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, exploratoryService, computationalService);
+	}
+
+	@Test
+	public void testTerminateExploratoryBySchedulerWhenTerminateDateNotCurrent() {
+		final List<DayOfWeek> stopDays = Arrays.stream(DayOfWeek.values()).collect(Collectors.toList());
+		stopDays.remove(LocalDate.now().getDayOfWeek());
+		final LocalDateTime terminateDateTime = LocalDateTime.of(LocalDate.now(),
+				LocalTime.now().truncatedTo(ChronoUnit.MINUTES)).plusDays(1);
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(
+				LocalDate.now(), LocalDate.now().minusDays(1), Arrays.asList(DayOfWeek.values()), stopDays,
+				terminateDateTime, false, USER, LocalTime.now().truncatedTo(ChronoUnit.MINUTES)
+		);
+		when(schedulerJobDAO.getExploratorySchedulerDataWithOneOfStatus(anyVararg())).thenReturn(singletonList(schedulerJobData));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+
+		schedulerJobService.terminateExploratoryByScheduler();
+
+		verify(schedulerJobDAO).getExploratorySchedulerDataWithOneOfStatus(RUNNING, STOPPED);
+		verifyNoMoreInteractions(systemUserService, schedulerJobDAO, computationalService, exploratoryService);
+	}
+
+	@Test
+	public void testGetActiveSchedulers() {
+		final int minutesOffset = 123;
+		final LocalDate now = LocalDate.now();
+		final DayOfWeek[] weekDays = DayOfWeek.values();
+		final LocalTime currentTime = LocalTime.now();
+		final LocalTime offsetTime = LocalTime.now().plusMinutes(minutesOffset);
+		final SchedulerJobData schedulerJobData = getSchedulerJobData(now,
+				now.plusDays(1), Arrays.asList(weekDays), Arrays.asList(weekDays),
+				LocalDateTime.of(now, currentTime.plusMinutes(minutesOffset).truncatedTo(ChronoUnit.MINUTES)), false,
+				USER, offsetTime.truncatedTo(ChronoUnit.MINUTES));
+
+		final SchedulerJobData secondScheduler = getSchedulerJobData(now,
+				now.plusDays(1), Arrays.asList(weekDays), Arrays.asList(weekDays),
+				LocalDateTime.of(now, currentTime.plusMinutes(minutesOffset).truncatedTo(ChronoUnit.MINUTES)),
+				false, "user123", offsetTime.truncatedTo(ChronoUnit.MINUTES));
+
+		when(schedulerJobDAO.getExploratorySchedulerDataWithStatus(any(UserInstanceStatus.class))).thenReturn(Arrays.asList(schedulerJobData, secondScheduler));
+		when(systemUserService.create(anyString())).thenReturn(getUserInfo());
+		when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class),
+				any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData));
+
+		final List<SchedulerJobData> activeSchedulers = schedulerJobService.getActiveSchedulers(USER, minutesOffset);
+
+		assertEquals(2, activeSchedulers.size());
+	}
+
+	private SchedulerJobData getSchedulerJobData(LocalDate beginDate, LocalDate schedulerFinishDate,
+												 List<DayOfWeek> startDays, List<DayOfWeek> stopDays,
+												 LocalDateTime terminateDateTime, boolean syncStartRequired,
+												 String user, LocalTime endTime) {
+		return new SchedulerJobData(user, EXPLORATORY_NAME, COMPUTATIONAL_NAME, getSchedulerJobDTO(beginDate,
+				schedulerFinishDate, startDays, stopDays, syncStartRequired, terminateDateTime, endTime));
 	}
 
 	private UserInfo getUserInfo() {
 		return new UserInfo(USER, "token");
 	}
 
-	private SchedulerJobDTO getSchedulerJobDTO() {
+	private SchedulerJobDTO getSchedulerJobDTO(LocalDate beginDate, LocalDate finishDate, List<DayOfWeek> startDays,
+											   List<DayOfWeek> stopDays, boolean syncStartRequired,
+											   LocalDateTime terminateDateTime, LocalTime endTime) {
 		SchedulerJobDTO schedulerJobDTO = new SchedulerJobDTO();
 		schedulerJobDTO.setTimeZoneOffset(OffsetDateTime.now(ZoneId.systemDefault()).getOffset());
-		schedulerJobDTO.setBeginDate(LocalDate.now());
-		schedulerJobDTO.setFinishDate(LocalDate.now().plusDays(1));
+		schedulerJobDTO.setBeginDate(beginDate);
+		schedulerJobDTO.setFinishDate(finishDate);
 		schedulerJobDTO.setStartTime(LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
-		schedulerJobDTO.setEndTime(LocalTime.now().truncatedTo(ChronoUnit.MINUTES));
-		schedulerJobDTO.setTerminateDateTime(
-				LocalDateTime.of(LocalDate.now(), LocalTime.now().truncatedTo(ChronoUnit.MINUTES)));
-		schedulerJobDTO.setStartDaysRepeat(Arrays.asList(DayOfWeek.values()));
-		schedulerJobDTO.setStopDaysRepeat(Arrays.asList(DayOfWeek.values()));
-		schedulerJobDTO.setSyncStartRequired(false);
+		schedulerJobDTO.setEndTime(endTime);
+		schedulerJobDTO.setTerminateDateTime(terminateDateTime);
+		schedulerJobDTO.setStartDaysRepeat(startDays);
+		schedulerJobDTO.setStopDaysRepeat(stopDays);
+		schedulerJobDTO.setSyncStartRequired(syncStartRequired);
 		return schedulerJobDTO;
 	}
 
@@ -731,6 +1122,17 @@
 		UserComputationalResource computationalResource = new UserComputationalResource();
 		computationalResource.setStatus("running");
 		return new UserInstanceDTO().withUser(USER).withExploratoryName(EXPLORATORY_NAME)
-				.withResources(Collections.singletonList(computationalResource));
+				.withResources(singletonList(computationalResource));
+	}
+
+	private AwsComputationalResource getComputationalResource(DataEngineType dataEngineType,
+															  boolean syncStartRequired) {
+		final SchedulerJobDTO schedulerJobData = new SchedulerJobDTO();
+		schedulerJobData.setSyncStartRequired(syncStartRequired);
+		return AwsComputationalResource.builder()
+				.computationalName("compName")
+				.imageName(DataEngineType.getDockerImageName(dataEngineType))
+				.schedulerJobData(schedulerJobData)
+				.build();
 	}
 }
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SystemInfoServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SystemInfoServiceImplTest.java
new file mode 100644
index 0000000..ca3835c
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/SystemInfoServiceImplTest.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.resources.dto.SystemInfoDto;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import oshi.SystemInfo;
+import oshi.hardware.CentralProcessor;
+import oshi.hardware.GlobalMemory;
+import oshi.hardware.HWDiskStore;
+import oshi.hardware.HardwareAbstractionLayer;
+import oshi.software.os.FileSystem;
+import oshi.software.os.OSFileStore;
+import oshi.software.os.OperatingSystem;
+import oshi.software.os.OperatingSystemVersion;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class SystemInfoServiceImplTest {
+
+	private static final String OS_VERSION = "OS version";
+	private static final String OS_FAMILY = "OS FAMILY";
+	private static final String BUILD_NUMBER = "BUILD 1.0";
+	private static final String PROCESSOR_MODEL = "Proc model";
+	private static final long AVAILABLE_MEMORY = 100L;
+	private static final long USABLE_SPACE = 100L;
+	private static final long TOTAL_SPACE = 1000L;
+	@Mock
+	private SystemInfo si;
+
+	@InjectMocks
+	private SystemInfoServiceImpl systemInfoService;
+
+	@Test
+	public void getSystemInfo() {
+		final OperatingSystem os = mock(OperatingSystem.class);
+		final HardwareAbstractionLayer hardwareAbstractionLayer = mock(HardwareAbstractionLayer.class);
+		final OperatingSystemVersion operatingSystemVersion = mock(OperatingSystemVersion.class);
+		final CentralProcessor centralProcessor = mock(CentralProcessor.class);
+		final GlobalMemory globalMemory = mock(GlobalMemory.class);
+		final FileSystem fileSystem = mock(FileSystem.class);
+		final OSFileStore osFileStore = new OSFileStore();
+		osFileStore.setUsableSpace(USABLE_SPACE);
+		osFileStore.setTotalSpace(TOTAL_SPACE);
+		when(fileSystem.getFileStores()).thenReturn(new OSFileStore[]{osFileStore});
+
+		when(operatingSystemVersion.getVersion()).thenReturn(OS_VERSION);
+		when(operatingSystemVersion.getBuildNumber()).thenReturn(BUILD_NUMBER);
+		when(hardwareAbstractionLayer.getDiskStores()).thenReturn(new HWDiskStore[]{});
+		when(os.getFamily()).thenReturn(OS_FAMILY);
+		when(os.getVersion()).thenReturn(operatingSystemVersion);
+		when(si.getOperatingSystem()).thenReturn(os);
+		when(os.getFileSystem()).thenReturn(fileSystem);
+		when(globalMemory.getAvailable()).thenReturn(AVAILABLE_MEMORY);
+		when(hardwareAbstractionLayer.getMemory()).thenReturn(globalMemory);
+		when(centralProcessor.getModel()).thenReturn(PROCESSOR_MODEL);
+		when(hardwareAbstractionLayer.getProcessor()).thenReturn(centralProcessor);
+		when(si.getHardware()).thenReturn(hardwareAbstractionLayer);
+
+		SystemInfoDto systemInfo = systemInfoService.getSystemInfo();
+
+		assertEquals(BUILD_NUMBER, systemInfo.getOsInfo().getBuildNumber());
+		assertEquals(OS_VERSION, systemInfo.getOsInfo().getVersion());
+		assertEquals(OS_FAMILY, systemInfo.getOsInfo().getFamily());
+		assertEquals(PROCESSOR_MODEL, systemInfo.getProcessorInfo().getModel());
+		assertEquals(AVAILABLE_MEMORY, systemInfo.getMemoryInfo().getAvailableMemory());
+		assertEquals(1, systemInfo.getDisksInfo().size());
+
+		verify(si).getOperatingSystem();
+		verify(si).getHardware();
+		verifyNoMoreInteractions(si, fileSystem);
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserGroupServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserGroupServiceImplTest.java
new file mode 100644
index 0000000..bcbbb3a
--- /dev/null
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserGroupServiceImplTest.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.epam.dlab.backendapi.service.impl;
+
+import com.epam.dlab.backendapi.dao.UserGroupDao;
+import com.epam.dlab.backendapi.dao.UserRoleDao;
+import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
+import com.epam.dlab.exceptions.DlabException;
+import com.epam.dlab.exceptions.ResourceNotFoundException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.util.Collections;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class UserGroupServiceImplTest {
+
+	private static final String ROLE_ID = "Role id";
+	private static final String USER = "test";
+	private static final String GROUP = "admin";
+	@Mock
+	private UserRoleDao userRoleDao;
+	@Mock
+	private UserGroupDao userGroupDao;
+	@InjectMocks
+	private UserGroupServiceImpl userGroupService;
+
+	@Rule
+	public ExpectedException expectedException = ExpectedException.none();
+
+	@Test
+	public void createGroup() {
+		when(userRoleDao.addGroupToRole(anySet(), anySet())).thenReturn(true);
+
+		userGroupService.createGroup(GROUP, Collections.singleton(ROLE_ID), Collections.singleton(USER));
+
+		verify(userRoleDao).addGroupToRole(Collections.singleton(GROUP), Collections.singleton(ROLE_ID));
+		verify(userGroupDao).addUsers(GROUP, Collections.singleton(USER));
+	}
+
+	@Test
+	public void createGroupWithNoUsers() {
+		when(userRoleDao.addGroupToRole(anySet(), anySet())).thenReturn(true);
+
+		userGroupService.createGroup(GROUP, Collections.singleton(ROLE_ID), Collections.emptySet());
+
+		verify(userRoleDao).addGroupToRole(Collections.singleton(GROUP), Collections.singleton(ROLE_ID));
+		verify(userGroupDao, never()).addUsers(anyString(), anySet());
+	}
+
+	@Test
+	public void createGroupWhenRoleNotFound() {
+		when(userRoleDao.addGroupToRole(anySet(), anySet())).thenReturn(false);
+
+		expectedException.expect(ResourceNotFoundException.class);
+		userGroupService.createGroup(GROUP, Collections.singleton(ROLE_ID), Collections.singleton(USER));
+	}
+
+	@Test
+	public void getAggregatedRoles() {
+		when(userRoleDao.aggregateRolesByGroup()).thenReturn(Collections.singletonList(getUserGroup()));
+
+		final List<UserGroupDto> aggregatedRolesByGroup = userGroupService.getAggregatedRolesByGroup();
+
+		assertEquals(1, aggregatedRolesByGroup.size());
+		assertEquals(GROUP, aggregatedRolesByGroup.get(0).getGroup());
+		assertTrue(aggregatedRolesByGroup.get(0).getRoles().isEmpty());
+
+		verify(userRoleDao).aggregateRolesByGroup();
+		verifyNoMoreInteractions(userRoleDao);
+	}
+
+	@Test
+	public void addUserToGroup() {
+		userGroupService.addUsersToGroup(GROUP, Collections.singleton(USER));
+
+		verify(userGroupDao).addUsers(eq(GROUP), refEq(Collections.singleton(USER)));
+		verifyNoMoreInteractions(userRoleDao, userGroupDao);
+	}
+
+	@Test
+	public void addRolesToGroup() {
+		when(userRoleDao.addGroupToRole(anySetOf(String.class), anySetOf(String.class))).thenReturn(true);
+
+		userGroupService.updateRolesForGroup(GROUP, Collections.singleton(ROLE_ID));
+
+		verify(userRoleDao).addGroupToRole(refEq(Collections.singleton(GROUP)), refEq(Collections.singleton(ROLE_ID)));
+		verify(userRoleDao).removeGroupWhenRoleNotIn(GROUP, Collections.singleton(ROLE_ID));
+		verifyNoMoreInteractions(userRoleDao);
+	}
+
+	@Test
+	public void removeUserFromGroup() {
+
+		userGroupService.removeUserFromGroup(GROUP, USER);
+
+		verify(userGroupDao).removeUser(GROUP, USER);
+		verifyNoMoreInteractions(userGroupDao);
+	}
+
+	@Test
+	public void removeGroupFromRole() {
+
+		when(userRoleDao.removeGroupFromRole(anySetOf(String.class), anySetOf(String.class))).thenReturn(true);
+
+		userGroupService.removeGroupFromRole(Collections.singleton(GROUP), Collections.singleton(ROLE_ID));
+
+		verify(userRoleDao).removeGroupFromRole(refEq(Collections.singleton(GROUP)),
+				refEq(Collections.singleton(ROLE_ID)));
+		verifyNoMoreInteractions(userRoleDao);
+	}
+
+	@Test
+	public void removeGroupFromRoleWithException() {
+		when(userRoleDao.removeGroupFromRole(anySetOf(String.class), anySetOf(String.class))).thenReturn(false);
+
+		expectedException.expectMessage("Any of role : [" + ROLE_ID + "] were not found");
+		expectedException.expect(ResourceNotFoundException.class);
+
+		userGroupService.removeGroupFromRole(Collections.singleton(GROUP), Collections.singleton(ROLE_ID));
+	}
+
+	@Test
+	public void removeGroup() {
+
+		when(userRoleDao.removeGroup(anyString())).thenReturn(true);
+		doNothing().when(userGroupDao).removeGroup(anyString());
+
+		userGroupService.removeGroup(GROUP);
+
+		verify(userRoleDao).removeGroup(GROUP);
+		verify(userGroupDao).removeGroup(GROUP);
+		verifyNoMoreInteractions(userGroupDao, userRoleDao);
+	}
+
+	@Test
+	public void removeGroupWhenGroupNotExist() {
+
+		when(userRoleDao.removeGroup(anyString())).thenReturn(false);
+		doNothing().when(userGroupDao).removeGroup(anyString());
+
+		userGroupService.removeGroup(GROUP);
+
+		verify(userRoleDao).removeGroup(GROUP);
+		verify(userGroupDao, never()).removeGroup(GROUP);
+		verifyNoMoreInteractions(userGroupDao, userRoleDao);
+	}
+
+	@Test
+	public void removeGroupWithException() {
+		when(userRoleDao.removeGroup(anyString())).thenThrow(new DlabException("Exception"));
+
+		expectedException.expectMessage("Exception");
+		expectedException.expect(DlabException.class);
+
+		userGroupService.removeGroup(GROUP);
+	}
+
+	@Test
+	public void updateGroup() {
+		userGroupService.updateGroup(GROUP, Collections.singleton(ROLE_ID), Collections.singleton(USER));
+
+		verify(userGroupDao).updateUsers(GROUP, Collections.singleton(USER));
+		verify(userRoleDao).removeGroupWhenRoleNotIn(GROUP, Collections.singleton(ROLE_ID));
+		verify(userRoleDao).addGroupToRole(Collections.singleton(GROUP), Collections.singleton(ROLE_ID));
+		verifyNoMoreInteractions(userRoleDao, userGroupDao);
+	}
+
+	private UserGroupDto getUserGroup() {
+		return new UserGroupDto(GROUP, Collections.emptyList(), Collections.emptySet());
+	}
+}
\ No newline at end of file
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java
index 47a000d..5343c2b 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package com.epam.dlab.backendapi.service.impl;
 
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/util/CSVFormatterTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/util/CSVFormatterTest.java
index 0233246..cdbe93f 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/util/CSVFormatterTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/util/CSVFormatterTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.util;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/util/DateRemoverUtilTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/util/DateRemoverUtilTest.java
index f0aec47..5677e77 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/util/DateRemoverUtilTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/util/DateRemoverUtilTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.util;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/util/RequestBuilderTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/util/RequestBuilderTest.java
index 3812c39..268ec6f 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/util/RequestBuilderTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/util/RequestBuilderTest.java
@@ -1,17 +1,20 @@
 /*
- * Copyright (c) 2018, EPAM SYSTEMS INC
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package com.epam.dlab.backendapi.util;
@@ -31,12 +34,13 @@
 import com.epam.dlab.dto.base.DataEngineType;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsDTO;
+import com.epam.dlab.dto.exploratory.LibInstallDTO;
 import com.epam.dlab.dto.gcp.GcpCloudSettings;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyDTO;
 import com.epam.dlab.exceptions.DlabException;
 import com.epam.dlab.model.ResourceData;
 import com.epam.dlab.model.ResourceType;
-import com.epam.dlab.model.exloratory.Exploratory;
+import com.epam.dlab.model.exploratory.Exploratory;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -107,6 +111,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -238,6 +244,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -273,6 +281,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -308,6 +318,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -376,6 +388,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -444,6 +458,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -508,6 +524,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -562,7 +580,7 @@
 		when(settingsDAO.getAwsVpcId()).thenReturn("someAwsVpcId");
 		when(settingsDAO.getConfTagResourceId()).thenReturn("someConfTagResourceId");
 
-		requestBuilder.newLibInstall(userInfo, uiDto);
+		requestBuilder.newLibInstall(userInfo, uiDto, new ArrayList<LibInstallDTO>());
 
 		verify(configuration, times(3)).getCloudProvider();
 		verify(settingsDAO).getServiceBaseName();
@@ -572,6 +590,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -586,7 +606,7 @@
 		when(settingsDAO.getAzureSubnetName()).thenReturn("someAzureSubnetId");
 		when(settingsDAO.getAzureVpcName()).thenReturn("someAzureVpcId");
 
-		requestBuilder.newLibInstall(userInfo, uiDto);
+		requestBuilder.newLibInstall(userInfo, uiDto, new ArrayList<LibInstallDTO>());
 
 		verify(configuration, times(3)).getCloudProvider();
 		verify(settingsDAO).getServiceBaseName();
@@ -606,7 +626,7 @@
 		when(settingsDAO.getServiceBaseName()).thenReturn("someSBN");
 		when(settingsDAO.getConfOsFamily()).thenReturn("someConfOsFamily");
 
-		requestBuilder.newLibInstall(userInfo, uiDto);
+		requestBuilder.newLibInstall(userInfo, uiDto, new ArrayList<LibInstallDTO>());
 
 		verify(configuration, times(3)).getCloudProvider();
 		verify(configuration).getMaxUserNameLength();
@@ -636,6 +656,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -690,7 +712,7 @@
 		when(settingsDAO.getAwsVpcId()).thenReturn("someAwsVpcId");
 		when(settingsDAO.getConfTagResourceId()).thenReturn("someConfTagResourceId");
 
-		requestBuilder.newLibInstall(userInfo, uiDto, computationalResource);
+		requestBuilder.newLibInstall(userInfo, uiDto, computationalResource, new ArrayList<LibInstallDTO>());
 
 		verify(configuration, times(3)).getCloudProvider();
 		verify(settingsDAO).getServiceBaseName();
@@ -700,6 +722,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -714,7 +738,7 @@
 		when(settingsDAO.getAzureSubnetName()).thenReturn("someAzureSubnetId");
 		when(settingsDAO.getAzureVpcName()).thenReturn("someAzureVpcId");
 
-		requestBuilder.newLibInstall(userInfo, uiDto, computationalResource);
+		requestBuilder.newLibInstall(userInfo, uiDto, computationalResource, new ArrayList<LibInstallDTO>());
 
 		verify(configuration, times(3)).getCloudProvider();
 		verify(settingsDAO).getServiceBaseName();
@@ -734,7 +758,7 @@
 		when(settingsDAO.getServiceBaseName()).thenReturn("someSBN");
 		when(settingsDAO.getConfOsFamily()).thenReturn("someConfOsFamily");
 
-		requestBuilder.newLibInstall(userInfo, uiDto, computationalResource);
+		requestBuilder.newLibInstall(userInfo, uiDto, computationalResource, new ArrayList<LibInstallDTO>());
 
 		verify(configuration, times(3)).getCloudProvider();
 		verify(configuration).getMaxUserNameLength();
@@ -764,6 +788,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -830,33 +856,17 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
 	@Test
 	public void newComputationalCreateForAzure() {
 		when(configuration.getCloudProvider()).thenReturn(CloudProvider.AZURE);
-		when(settingsDAO.getServiceBaseName()).thenReturn("someSBN");
-		when(settingsDAO.getConfOsFamily()).thenReturn("someConfOsFamily");
-		when(settingsDAO.getAzureRegion()).thenReturn("someAzureRegion");
-		when(settingsDAO.getAzureResourceGroupName()).thenReturn("someAzureResourceGroup");
-		when(settingsDAO.getAzureSecurityGroupName()).thenReturn("someAzureResourceGroupName");
-		when(settingsDAO.getAzureSubnetName()).thenReturn("someAzureSubnetId");
-		when(settingsDAO.getAzureVpcName()).thenReturn("someAzureVpcId");
 
-		ComputationalCreateFormDTO form = new AwsComputationalCreateForm();
-
-		requestBuilder.newComputationalCreate(userInfo, uiDto, form);
-
-		verify(configuration, times(3)).getCloudProvider();
-		verify(settingsDAO).getServiceBaseName();
-		verify(settingsDAO).getConfOsFamily();
-		verify(settingsDAO).getAzureRegion();
-		verify(settingsDAO).getAzureResourceGroupName();
-		verify(settingsDAO).getAzureSecurityGroupName();
-		verify(settingsDAO).getAzureSubnetName();
-		verify(settingsDAO).getAzureVpcName();
-		verifyNoMoreInteractions(configuration, settingsDAO);
+		expectedException.expect(UnsupportedOperationException.class);
+		requestBuilder.newComputationalCreate(userInfo, uiDto, new AwsComputationalCreateForm());
 	}
 
 	@Test
@@ -900,6 +910,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -974,6 +986,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookVpcId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -1044,6 +1058,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -1118,6 +1134,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
@@ -1188,6 +1206,8 @@
 		verify(settingsDAO).getAwsSubnetId();
 		verify(settingsDAO).getAwsVpcId();
 		verify(settingsDAO).getConfTagResourceId();
+		verify(settingsDAO).getAwsNotebookSubnetId();
+		verify(settingsDAO).getAwsNotebookVpcId();
 		verifyNoMoreInteractions(configuration, settingsDAO);
 	}
 
diff --git a/services/settings/aws/mongo_settings.json b/services/settings/aws/mongo_settings.json
index a86d491..d1b0323 100644
--- a/services/settings/aws/mongo_settings.json
+++ b/services/settings/aws/mongo_settings.json
@@ -30,3 +30,11 @@
   "_id": "aws_security_groups_ids",
   "value": "sg-1a23bc45"
 }
+{
+  "_id": "aws_notebook_vpc_id",
+  "value": "vpc-12a345b6"
+}
+{
+  "_id": "aws_notebook_subnet_id",
+  "value": "subnet-78cd901e"
+}