-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from SumoLogic/hpal_release_v1.0.11
Releasing v.1.0.11
- Loading branch information
Showing
21 changed files
with
469 additions
and
269 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
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 |
---|---|---|
@@ -1,46 +1,59 @@ | ||
We use sumoappclient for testing the lambda paackage. We can install it by: | ||
``` | ||
pip install sumologic-sdk | ||
``` | ||
Description: | ||
``` | ||
sumoappclient [-h] [-e {onprem,aws,gcp,azure}] [-d {prod,test,local}] [-c CONFIGPATH] [-pc PYTHON_CMD] [-g TARGET_FOLDER] | ||
``` | ||
### OnPrem | ||
|
||
Deployment testing for PyPi: | ||
1. For onprem pypi testing of this package, we perform these steps: | ||
* Upgrade the version in the Version file, eg 1.0.10 -> 1.0.11 | ||
1. For generating the build and running locally, we perform these steps: | ||
|
||
* Upgrade the version in the `VERSION` file, eg 1.0.10 -> 1.0.11 | ||
* Run the `build.sh`. | ||
* Create a `mongodbatlas.yaml` in home folder (for ex ~/sumo/mongodbatlas.yaml), refer the `sumomongodbatlascollector/mongodbatlas.yaml` file for instructions on each of the parameter. You can override any parameter in this file | ||
``` | ||
SumoLogic: | ||
HTTP_LOGS_ENDPOINT: <Paste the HTTP Logs source URL from step 2.> | ||
HTTP_METRICS_ENDPOINT: <Paste the HTTP Metrics source URL from step 2.> | ||
MongoDBAtlas: | ||
ORGANIZATION_ID: <Paste the Organization ID from step 1.> | ||
PROJECT_ID: <Paste the Project ID from step 1.> | ||
PRIVATE_API_KEY: <Paste the Private Key from step 1.> | ||
PUBLIC_API_KEY: <Paste the Public Key from step 1.> | ||
``` | ||
* Run the below command to start the collector | ||
``` | ||
python -m sumomongodbatlascollector.main ~/sumo/mongodbatlas.yaml | ||
``` | ||
|
||
2. For deploying on test pypi account we perform these steps: | ||
* Run the following command: | ||
``` | ||
sumoappclient -d sumotest -c mongodbatlas.yaml -e onprem | ||
python -m twine upload dist/* --repository sumotestpypi | ||
``` | ||
* This deploys the package in the testing org of pypi via the credentials stored in the .pypirc file for the sumotestpypi section. You can find the file in the shared vault. | ||
2. For onprem pypi production deployment, we perform these steps: | ||
* Upgrade the version in the Version file, eg 1.0.10 -> 1.0.11 | ||
3. For deploying on prod pypi account we perform these steps: | ||
* Run the following command: | ||
``` | ||
sumoappclient -d sumopypi -c mongodbatlas.yaml -e onprem | ||
python -m twine upload dist/* --repository sumopypi | ||
``` | ||
* This deploys the package in the production org of pypi via the credentials stored in the .pypirc file for the sumopypi section. You can find the file in the shared vault. | ||
|
||
Deployment testing for AWS: | ||
1. For testing of this package, we perform these steps: | ||
* Update .aws file to use a personal aws account credentials | ||
* Create a S3 bucket in the personal aws account | ||
* Set two environment variables: | ||
* export SAM_S3_BUCKET = 'name of the S3 Bucket created' | ||
* export AWS_REGION = 'region of the deployment' | ||
* Upgrade the SemanticVersion in the template.yaml file, eg 1.0.16 -> 1.0.17 | ||
* Run the following command: | ||
``` | ||
sumoappclient -d test -c mongodbatlas.yaml -e aws | ||
### AWS | ||
|
||
1. For testing and deploying the lambda function, we perform these steps: | ||
* Update .aws file to use a personal aws account credentials. | ||
* Create a S3 bucket in the personal aws account. | ||
* In samconfig.toml file update s3_bucket, region parameters. | ||
* Generate credentials in Mongodb atlas portal and update parameter_overrides in samconfig.toml file. | ||
* Upgrade the SemanticVersion in the template.yaml file and s3_prefix in samconfig.toml file | ||
* Run the following commands: | ||
``` | ||
sam build | ||
sam package | ||
sam deploy | ||
``` | ||
* This deploys the package via a personal aws account onto AWS Serverless Application Repository | ||
2. For production deployment, we perform these steps: | ||
* Update .aws file to use sumocontent aws account credentials | ||
* Upgrade the SemanticVersion in the template.yaml file, eg 1.0.16 -> 1.0.17 | ||
* After deploying go the lambda function created by above command and run the function by clicking on test button. | ||
2. For publishing the sam application, we perform these steps: | ||
* Update the s3_bucket parameter to appdevstore bucket | ||
* Run the following command: | ||
``` | ||
sumoappclient -d prod -c mongodbatlas.yaml -e aws | ||
sam publish | ||
``` | ||
* This deploys the package via the sumocontent aws account onto AWS Serverless Application Repository |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
include requirements.txt | ||
include LICENSE | ||
include VERSION | ||
include README | ||
include README.md | ||
include sumomongodbatlascollector/mongodbatlas.yaml | ||
recursive-exclude tests * |
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,3 @@ | ||
python setup.py bdist_wheel | ||
pip uninstall -y sumologic_mongodb_atlas | ||
pip install dist/sumologic_mongodb_atlas*.whl |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
sumologic-appclient-sdk==2.0.10 | ||
sumologic-appclient-sdk>=2.0.10 | ||
requests>=2.32.3 | ||
future-fstrings | ||
future_fstrings==1.2.0 |
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,45 @@ | ||
version = 0.1 | ||
|
||
[default.build] | ||
[default.build.parameters] | ||
cached = true | ||
parallel = true | ||
debug=true | ||
use_container=true | ||
|
||
[default.package] | ||
[default.package.parameters] | ||
output_template_file="packaged.yaml" | ||
s3_prefix="MongoDBAtlas/v1.0.18" | ||
region="us-east-1" | ||
s3_bucket="appdevstore-test" | ||
|
||
[default.deploy.parameters] | ||
capabilities = "CAPABILITY_IAM" | ||
confirm_changeset = true | ||
stack_name="testingMongoDBAtlas" | ||
parameter_overrides="HttpLogsEndpoint=<http logs source endpoint> HttpMetricsEndpoint=<http metrics source endpoint> OrganizationId=<mongodbatlas org id> PrivateApiKey=<mongodbatlas private api key> ProjectId=<mongodb atlas cluster project id> PublicApiKey=<mongodbatlas public api key>" | ||
s3_prefix="MongoDBAtlas/v1.0.18" | ||
region="us-east-1" | ||
s3_bucket="appdevstore-test" | ||
|
||
[default.publish.parameters] | ||
template="packaged.yaml" | ||
region="us-east-1" | ||
|
||
[default.sync.parameters] | ||
watch = true | ||
|
||
[default.local_start_api.parameters] | ||
warm_containers = "EAGER" | ||
|
||
[default.local_invoke.parameters] | ||
parameter_overrides="ENVIRONMENT=onprem HttpLogsEndpoint=<http logs source endpoint> HttpMetricsEndpoint=<http metrics source endpoint> OrganizationId=<mongodbatlas org id> PrivateApiKey=<mongodbatlas private api key> ProjectId=<mongodb atlas cluster project id> PublicApiKey=<mongodbatlas public api key>" | ||
|
||
# https://github.com/aws/aws-sam-cli/issues/5492 | ||
# Allow specification of parameters that should apply to all (or multiple) environments in AWS SAM CLI configuration file (samconfig.toml) | ||
|
||
[prod] | ||
[prod.sync] | ||
[prod.sync.parameters] | ||
watch = false |
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
Oops, something went wrong.