Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
sb-learning-platform
Commits
2744b45f
Unverified
Commit
2744b45f
authored
2 years ago
by
Anil Gupta
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Issue #KN-439 merge: Merge pull request #1816 from AmiableAnil/csp-migration
Issue #KN-439 feat: Cloud agnostic changes
parents
58846ad5
862fc852
prasath-release-5.2.0_RC6
prasath-5.2.0_RC1
prasath-5.2.0_RC1-uat
release-5.2.0_RC7
release-5.2.0_RC6
release-5.2.0_RC5
release-5.2.0_RC4
release-5.2.0_RC3
release-5.2.0_RC2
release-5.2.0_RC1
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ansible/roles/learning-service/templates/application.conf.j2
+5
-5
ansible/roles/learning-service/templates/application.conf.j2
ansible/roles/lp-synctool-deploy/templates/application.conf.j2
+5
-5
...le/roles/lp-synctool-deploy/templates/application.conf.j2
platform-modules/actors/src/main/java/org/sunbird/learning/util/CloudStore.java
+5
-16
...s/src/main/java/org/sunbird/learning/util/CloudStore.java
platform-modules/pom.xml
+1
-1
platform-modules/pom.xml
with
16 additions
and
27 deletions
+16
-27
ansible/roles/learning-service/templates/application.conf.j2
+
5
−
5
View file @
2744b45f
...
...
@@ -248,11 +248,11 @@ learning.content.type.not.copied.list=["Asset"]
#Youtube License Validation Regex Pattern
youtube.license.regex.pattern=["\\?vi?=([^&]*)", "watch\\?.*v=([^&]*)", "(?:embed|vi?)/([^/?]*)","^([A-Za-z0-9\\-\\_]*)"]
#
Azure
Storage details
cloud_storage_type="{{ cloud_s
tore
}}"
azure
_storage_key="{{
sunbir
d_public_storage_account
_
name}}"
azure
_storage_secret="{{
sunbir
d_public_storage_
account_key
}}"
azure
_storage_container="{{
azure_public_container
}}"
#
Cloud
Storage details
cloud_storage_type="{{ cloud_s
ervice_provider
}}"
cloud
_storage_key="{{
clou
d_public_storage_accountname
}}"
cloud
_storage_secret="{{
clou
d_public_storage_
secret
}}"
cloud
_storage_container="{{
cloud_storage_content_bucketname
}}"
installation.id="{{ instance_name }}"
...
...
This diff is collapsed.
Click to expand it.
ansible/roles/lp-synctool-deploy/templates/application.conf.j2
+
5
−
5
View file @
2744b45f
...
...
@@ -76,11 +76,11 @@ content.postpublish.topic="{{ env }}.content.postpublish.request"
search.lms_es_conn_info="{{ search_lms_index_host }}"
#
Azure
Storage details
cloud_storage_type="{{ cloud_s
tore
}}"
azure
_storage_key="{{
sunbir
d_public_storage_account
_
name}}"
azure
_storage_secret="{{
sunbir
d_public_storage_
account_key
}}"
azure
_storage_container="{{
azure_public_container
}}"
#
Cloud
Storage details
cloud_storage_type="{{ cloud_s
ervice_provider
}}"
cloud
_storage_key="{{
clou
d_public_storage_accountname
}}"
cloud
_storage_secret="{{
clou
d_public_storage_
secret
}}"
cloud
_storage_container="{{
cloud_storage_content_bucketname
}}"
contentTypeToPrimaryCategory {
ClassroomTeachingVideo: "Explanation Content"
...
...
This diff is collapsed.
Click to expand it.
platform-modules/actors/src/main/java/org/sunbird/learning/util/CloudStore.java
+
5
−
16
View file @
2744b45f
...
...
@@ -24,18 +24,9 @@ private static BaseStorageService storageService = null;
private
static
String
cloudStoreType
=
Platform
.
config
.
getString
(
"cloud_storage_type"
);
static
{
if
(
StringUtils
.
equalsIgnoreCase
(
cloudStoreType
,
"azure"
))
{
String
storageKey
=
Platform
.
config
.
getString
(
"azure_storage_key"
);
String
storageSecret
=
Platform
.
config
.
getString
(
"azure_storage_secret"
);
storageService
=
StorageServiceFactory
.
getStorageService
(
new
StorageConfig
(
cloudStoreType
,
storageKey
,
storageSecret
));
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
cloudStoreType
,
"aws"
))
{
String
storageKey
=
Platform
.
config
.
getString
(
"aws_storage_key"
);
String
storageSecret
=
Platform
.
config
.
getString
(
"aws_storage_secret"
);
storageService
=
StorageServiceFactory
.
getStorageService
(
new
StorageConfig
(
cloudStoreType
,
storageKey
,
storageSecret
));
}
else
{
throw
new
ServerException
(
"ERR_INVALID_CLOUD_STORAGE"
,
"Error while initialising cloud storage"
);
}
String
storageKey
=
Platform
.
config
.
getString
(
"cloud_storage_key"
);
String
storageSecret
=
Platform
.
config
.
getString
(
"cloud_storage_secret"
);
storageService
=
StorageServiceFactory
.
getStorageService
(
new
StorageConfig
(
cloudStoreType
,
storageKey
,
storageSecret
));
}
public
static
BaseStorageService
getCloudStoreService
()
{
...
...
@@ -43,10 +34,8 @@ private static String cloudStoreType = Platform.config.getString("cloud_storage_
}
public
static
String
getContainerName
()
{
if
(
StringUtils
.
equalsIgnoreCase
(
cloudStoreType
,
"azure"
))
{
return
Platform
.
config
.
getString
(
"azure_storage_container"
);
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
cloudStoreType
,
"aws"
))
{
return
S3PropertyReader
.
getProperty
(
"aws_storage_container"
);
if
(
Platform
.
config
.
hasPath
(
"cloud_storage_container"
)
&&
!
Platform
.
config
.
getString
(
"cloud_storage_container"
).
equalsIgnoreCase
(
""
))
{
return
Platform
.
config
.
getString
(
"cloud_storage_container"
);
}
else
{
throw
new
ServerException
(
"ERR_INVALID_CLOUD_STORAGE"
,
"Error while getting container name"
);
}
...
...
This diff is collapsed.
Click to expand it.
platform-modules/pom.xml
+
1
−
1
View file @
2744b45f
...
...
@@ -19,7 +19,7 @@
<version.compiler.plugin>
2.3.1
</version.compiler.plugin>
<maven.compiler.target>
1.8
</maven.compiler.target>
<maven.compiler.source>
1.8
</maven.compiler.source>
<cloud.store.version>
1.
2.8
</cloud.store.version>
<cloud.store.version>
1.
4.3
</cloud.store.version>
</properties>
<modules>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets