Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rblcoder/terraform-opensearch-samples

Sample terraform code
https://github.com/rblcoder/terraform-opensearch-samples

Last synced: about 1 month ago
JSON representation

Sample terraform code

Awesome Lists containing this project

README

        

## For docker
```
export OSS_IMAGE="opensearchproject/opensearch:2"
export OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123@456
export OPENSEARCH_URL=http://admin:myStrongPassword123%40456@localhost:9200
```
## For AWS OpenSearch
```
export AWS_ACCESS_KEY_ID=key
export AWS_SECRET_ACCESS_KEY=secret
export AWS_DEFAULT_REGION=us-west-2
```

## Provider configurations
```

provider "opensearch" {
url = "url"
healthcheck = "false"
aws_profile = "profilename"
aws_assume_role_arn = "rolearn"
aws_assume_role_external_id = "externalid"
aws_region = "region"
version_ping_timeout = "10"

}

```
or
```
provider "opensearch" {
url = "url"
healthcheck = "false"
aws_region = "region"
aws_access_key = "access key"
aws_secret_key = "secret"
version_ping_timeout = "10"

}

```

For docker compose -

```

sudo swapoff -a

sudo vi /etc/sysctl.conf

vm.max_map_count=262144

sudo sysctl -p

cat /proc/sys/vm/max_map_count
```
## AOSS

https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-getting-started.html

## Amazon Linux 2023 setup docker

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-docker.html

https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9

## Ubuntu setup docker

https://docs.docker.com/engine/install/ubuntu/

## Amazon Linux 2023 setup terraform

https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli

sudo yum install -y yum-utils

sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo

sudo yum -y install terraform

## Docker commands
https://stackoverflow.com/questions/44785585/how-can-i-delete-all-local-docker-images

To delete all containers including its volumes use,

docker rm -vf $(docker ps -aq)

To delete all the images,

docker rmi -f $(docker images -aq)

To delete all volumes

docker volume rm $(docker volume ls -q)