Fixed bug in new version of opensearch
This commit is contained in:
@@ -51,9 +51,9 @@ SHUFFLE_ELASTIC=true
|
||||
|
||||
# DATABASE CONFIGURATIONS
|
||||
DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
||||
SHUFFLE_OPENSEARCH_URL=http://shuffle-opensearch:9200
|
||||
SHUFFLE_OPENSEARCH_USERNAME=
|
||||
SHUFFLE_OPENSEARCH_PASSWORD=
|
||||
SHUFFLE_OPENSEARCH_URL=https://shuffle-opensearch:9200
|
||||
SHUFFLE_OPENSEARCH_USERNAME=admin
|
||||
SHUFFLE_OPENSEARCH_PASSWORD=admin
|
||||
SHUFFLE_OPENSEARCH_CERTIFICATE_FILE=
|
||||
SHUFFLE_OPENSEARCH_APIKEY=
|
||||
SHUFFLE_OPENSEARCH_CLOUDID=
|
||||
|
||||
@@ -2,7 +2,7 @@ module shuffle
|
||||
|
||||
go 1.13
|
||||
|
||||
replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
|
||||
//replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
|
||||
|
||||
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
|
||||
|
||||
@@ -24,7 +24,7 @@ require (
|
||||
github.com/elastic/go-elasticsearch/v7 v7.12.0 // indirect
|
||||
github.com/elastic/go-elasticsearch/v8 v8.0.0-20210519083322-55daf7425ecb // indirect
|
||||
github.com/frikky/kin-openapi v0.39.0
|
||||
github.com/frikky/shuffle-shared v0.0.57
|
||||
github.com/frikky/shuffle-shared v0.0.60
|
||||
github.com/fsouza/go-dockerclient v1.7.2 // indirect
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/go-git/go-billy/v5 v5.0.0
|
||||
|
||||
@@ -3082,7 +3082,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[INFO] TRY TO SET APP TO LIVE!!!")
|
||||
//log.Printf("[INFO] TRY TO SET APP TO LIVE!!!")
|
||||
user, err := shuffle.HandleApiAuthentication(resp, request)
|
||||
if err != nil {
|
||||
log.Printf("Api authentication failed in verify swagger: %s", err)
|
||||
@@ -3136,7 +3136,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[INFO] EDITING APP WITH ID %s and md5 %s", app.ID, newmd5)
|
||||
log.Printf("[INFO] %s is EDITING APP WITH ID %s and md5 %s", user.Id, app.ID, newmd5)
|
||||
newmd5 = app.ID
|
||||
}
|
||||
|
||||
@@ -3944,9 +3944,9 @@ func runInitEs(ctx context.Context) {
|
||||
|
||||
schedules, err := shuffle.GetAllSchedules(ctx, "ALL")
|
||||
if err != nil {
|
||||
log.Printf("Failed getting schedules during service init: %s", err)
|
||||
log.Printf("[WARNING] Failed getting schedules during service init: %s", err)
|
||||
} else {
|
||||
log.Printf("Setting up %d schedule(s)", len(schedules))
|
||||
log.Printf("[INFO] Setting up %d schedule(s)", len(schedules))
|
||||
url := &url.URL{}
|
||||
for _, schedule := range schedules {
|
||||
if schedule.Environment == "cloud" {
|
||||
@@ -3983,7 +3983,7 @@ func runInitEs(ctx context.Context) {
|
||||
|
||||
users, err := shuffle.GetAllUsers(ctx)
|
||||
if len(users) == 0 {
|
||||
log.Printf("Trying to set up user based on environments SHUFFLE_DEFAULT_USERNAME & SHUFFLE_DEFAULT_PASSWORD")
|
||||
log.Printf("[INFO] Trying to set up user based on environments SHUFFLE_DEFAULT_USERNAME & SHUFFLE_DEFAULT_PASSWORD")
|
||||
username := os.Getenv("SHUFFLE_DEFAULT_USERNAME")
|
||||
password := os.Getenv("SHUFFLE_DEFAULT_PASSWORD")
|
||||
if len(username) == 0 || len(password) == 0 {
|
||||
@@ -4005,7 +4005,7 @@ func runInitEs(ctx context.Context) {
|
||||
}
|
||||
_ = setUsers
|
||||
|
||||
log.Printf("Starting cloud schedules for orgs!")
|
||||
log.Printf("[INFO] Starting cloud schedules for orgs if enabled!")
|
||||
type requestStruct struct {
|
||||
ApiKey string `json:"api_key"`
|
||||
}
|
||||
@@ -4023,7 +4023,7 @@ func runInitEs(ctx context.Context) {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Printf("Should start schedule for org %s", org.Name)
|
||||
log.Printf("[DEBUG] Should start schedule for org %s", org.Name)
|
||||
job := func() {
|
||||
err := remoteOrgJobHandler(org, interval)
|
||||
if err != nil {
|
||||
@@ -4614,7 +4614,7 @@ func runInit(ctx context.Context) {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Printf("Should start schedule for org %s", org.Name)
|
||||
log.Printf("[DEBUG] Should start schedule for org %s", org.Name)
|
||||
job := func() {
|
||||
err := remoteOrgJobHandler(org, interval)
|
||||
if err != nil {
|
||||
@@ -5568,7 +5568,7 @@ func initHandlers() {
|
||||
for {
|
||||
_, err = shuffle.RunInit(*dbclient, *es, storage.Client{}, gceProject, "onprem", true, elasticConfig)
|
||||
if err != nil {
|
||||
log.Printf("[DEBUG] Error in initial database connection. Retrying in 5 seconds. %s", err)
|
||||
log.Printf("[ERROR] Error in initial database connection. Retrying in 5 seconds. %s", err)
|
||||
time.Sleep(5 * time.Second)
|
||||
continue
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
frontend:
|
||||
build: ./frontend
|
||||
#build: ./frontend
|
||||
image: ghcr.io/frikky/shuffle-frontend:nightly
|
||||
container_name: shuffle-frontend
|
||||
hostname: shuffle-frontend
|
||||
@@ -16,7 +16,7 @@ services:
|
||||
depends_on:
|
||||
- backend
|
||||
backend:
|
||||
build: ./backend
|
||||
#build: ./backend
|
||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
||||
container_name: shuffle-backend
|
||||
hostname: ${BACKEND_HOSTNAME}
|
||||
@@ -66,14 +66,14 @@ services:
|
||||
- CLEANUP=${SHUFFLE_CONTAINER_AUTO_CLEANUP}
|
||||
restart: unless-stopped
|
||||
opensearch:
|
||||
image: opensearchproject/opensearch:latest
|
||||
image: opensearchproject/opensearch:1.0.0-rc1
|
||||
hostname: shuffle-opensearch
|
||||
container_name: shuffle-opensearch
|
||||
environment:
|
||||
- bootstrap.memory_lock=true
|
||||
- "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
|
||||
- opendistro_security.disabled=true
|
||||
- discovery.seed_hosts=shuffle-opensearch
|
||||
- cluster.routing.allocation.disk.threshold_enabled=false
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
curl -XPUT http://localhost:9200/_cluster/settings -H "Content-Type:application/json" -d \
|
||||
curl -XPUT -u admin:admin https://localhost:9200/_cluster/settings -H "Content-Type:application/json" -k -d \
|
||||
'{
|
||||
"transient": {
|
||||
"cluster.routing.allocation.disk.threshold_enabled": false
|
||||
}
|
||||
}'
|
||||
|
||||
curl -XPUT http://localhost:9200/_all/_settings -H "Content-Type: application/json" -d \
|
||||
curl -XPUT -u admin:admin https://localhost:9200/_all/_settings -H "Content-Type: application/json" -k -d \
|
||||
'{
|
||||
"index.blocks.read_only_allow_delete": null
|
||||
}'
|
||||
|
||||
Reference in New Issue
Block a user