-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MM-24005] Increase limits for ltagent (#220)
* Increase limits for ltagent instances * Remove unused settings from config * Decrease idle timeout for user http connections * Implement uploadBatch utility function * Upload sysctl config to agent instances
- Loading branch information
1 parent
f1a8d54
commit 590bc9c
Showing
8 changed files
with
68 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
"ServerURL": "http://localhost:8065", | ||
"WebSocketURL": "ws://localhost:8065", | ||
"AdminEmail": "[email protected]", | ||
"AdminPassword": "Sys@dmin-sample1", | ||
"MaxIdleConns": 100, | ||
"MaxIdleConnsPerHost": 128, | ||
"IdleConnTimeoutMilliseconds": 90000 | ||
"AdminPassword": "Sys@dmin-sample1" | ||
}, | ||
"UserControllerConfiguration": { | ||
"Type": "simple", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
package terraform | ||
|
||
import ( | ||
"errors" | ||
"fmt" | ||
"strings" | ||
|
||
"github.com/mattermost/mattermost-load-test-ng/deployment/terraform/ssh" | ||
|
||
"github.com/mattermost/mattermost-server/v5/mlog" | ||
) | ||
|
||
type uploadInfo struct { | ||
msg string | ||
srcData string | ||
dstPath string | ||
} | ||
|
||
func uploadBatch(sshc *ssh.Client, batch []uploadInfo) error { | ||
if sshc == nil { | ||
return errors.New("sshc should not be nil") | ||
} | ||
if len(batch) == 0 { | ||
return errors.New("batch should not be empty") | ||
} | ||
|
||
for _, info := range batch { | ||
if info.msg != "" { | ||
mlog.Info(info.msg) | ||
} | ||
rdr := strings.NewReader(info.srcData) | ||
if out, err := sshc.Upload(rdr, info.dstPath, true); err != nil { | ||
return fmt.Errorf("error uploading file, dstPath: %s, output: %q: %w", info.dstPath, out, err) | ||
} | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters