From 0a68a615e3f39efb5a1b55ac7bcb9304d5fff9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Gracia?= Date: Tue, 26 Sep 2023 18:17:30 +0200 Subject: [PATCH] Issue 391: Update Pravega library versions and deployment script (#392) --- benchmark-framework/pom.xml | 11 ++-- driver-pravega/README.md | 24 ++++---- driver-pravega/deploy/deploy.yaml | 61 +++++++++++-------- .../deploy/provision-pravega-aws.tf | 2 +- driver-pravega/deploy/terraform.tfvars | 10 +-- driver-pravega/deploy/vars.yaml | 2 +- driver-pravega/pom.xml | 4 +- 7 files changed, 64 insertions(+), 50 deletions(-) diff --git a/benchmark-framework/pom.xml b/benchmark-framework/pom.xml index 247f97b8..0e324141 100644 --- a/benchmark-framework/pom.xml +++ b/benchmark-framework/pom.xml @@ -71,11 +71,6 @@ driver-nats ${project.version} - - ${project.groupId} - driver-nats-streaming - ${project.version} - ${project.groupId} driver-nsq @@ -145,6 +140,12 @@ HdrHistogram 2.1.12 + + ${project.groupId} + driver-nats-streaming + ${project.version} + provided + org.projectlombok lombok diff --git a/driver-pravega/README.md b/driver-pravega/README.md index e67d9ba2..5b45bb6f 100644 --- a/driver-pravega/README.md +++ b/driver-pravega/README.md @@ -30,13 +30,15 @@ check [how to build Pravega](doc/build_pravega.md). # DEPLOY A PRAVEGA CLUSTER ON AMAZON WEB SERVICES -You can deploy a Pravega cluster on AWS (for benchmarking purposes) using [Terraform 0.12.20](https://www.terraform.io/) and [Ansible 2.8.5](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html). -You’ll need to have both of those tools installed as well as the `terraform-inventory` [plugin](https://github.com/adammck/terraform-inventory) for Terraform. +You can deploy a Pravega cluster on AWS (for benchmarking purposes) using [Terraform 0.12.20](https://www.terraform.io/) +and [Ansible 2.8.5](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) (with a +a version of `Jinja2=<3.0.3`). +You’ll need to have both tools installed, as well as the `terraform-inventory` [plugin](https://github.com/adammck/terraform-inventory) for Terraform. -You also need to install an Ansible modules to support metrics. +You also need to install an Ansible modules to support metrics: ``` -ansible-galaxy install cloudalchemy.node-exporter +ansible-galaxy install cloudalchemy.node_exporter ``` In addition, you’ll need to: @@ -74,7 +76,7 @@ This will install the following [EC2](https://aws.amazon.com/ec2) instances (plu | Resource | Description | Count | |----------------------|-------------------------------------------------------------|-------| | Controller instances | The VMs on which a Pravega controller will run | 1 | -| Bookkeeper instances | The VMs on which a Bookkeeper and Segmentstore will run | 3 | +| Bookkeeper instances | The VMs on which a Bookkeeper and Segment Store will run | 3 | | ZooKeeper instances | The VMs on which a ZooKeeper node will run | 3 | | Client instance | The VM from which the benchmarking suite itself will be run | 2 | @@ -84,12 +86,12 @@ When you run `terraform apply`, you will be prompted to type `yes`. Type `yes` t There’s a handful of configurable parameters related to the Terraform deployment that you can alter by modifying the defaults in the `terraform.tfvars` file. -| Variable | Description | Default | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| -| `region` | The AWS region in which the Pravega cluster will be deployed | `us-west-2` | -| `public_key_path` | The path to the SSH public key that you’ve generated | `~/.ssh/pravega_aws.pub` | -| `ami` | The [Amazon Machine Image (AWI)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) to be used by the cluster’s machines | `ami-9fa343e7` | -| `instance_types` | The EC2 instance types used by the various components | `i3.4xlarge` (BookKeeper bookies), `m5.large`(Controller), `t3.small` (ZooKeeper), `c5.4xlarge` (benchmarking client) | +| Variable | Description | Default | +|-------------------|--------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| `region` | The AWS region in which the Pravega cluster will be deployed | `us-east-2` | +| `public_key_path` | The path to the SSH public key that you’ve generated | `~/.ssh/pravega_aws.pub` | +| `ami` | The [Amazon Machine Image (AWI)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) to be used by the cluster’s machines | `ami-0bb2449c2217cb9b0` | +| `instance_types` | The EC2 instance types used by the various components | `i3en.2xlarge` (Segment Store + Bookkeeper), `m5n.xlarge`(Controller), `t2.small` (ZooKeeper), `m5n.xlarge` (benchmarking client), `t2.large` (metrics) | If you modify the `public_key_path`, make sure that you point to the appropriate SSH key path when running the [Ansible playbook](#_RUNNING_THE_ANSIBLE_PLAYBOOK). diff --git a/driver-pravega/deploy/deploy.yaml b/driver-pravega/deploy/deploy.yaml index 3846fa99..5aebfe16 100644 --- a/driver-pravega/deploy/deploy.yaml +++ b/driver-pravega/deploy/deploy.yaml @@ -98,20 +98,6 @@ echo 'LANG=en_US.utf-8 LC_ALL=en_US.utf-8' > /etc/environment -#- name: Install nmon -# hosts: ["!tier2"] -# tags: ["nmon"] -# connection: ssh -# become: true -# tasks: -# - name: Download nmon -# unarchive: -# src: "http://sourceforge.net/projects/nmon/files/nmon16j.tar.gz" -# remote_src: yes -# dest: /tmp -# - command: cp /tmp/nmon_AMD64_ubuntu1804 /usr/local/bin/nmon -# - command: chmod a+x /usr/local/bin/nmon - - name: Metrics installation hosts: ["metrics"] tags: ["metrics"] @@ -120,13 +106,38 @@ tasks: - name: Add Extras Repo shell: yum-config-manager --enable rhui-REGION-rhel-server-extras - - name: Install RPM packages - yum: pkg={{ item }} state=latest - with_items: - - docker - - systemd: + when: + - ansible_facts['distribution'] == 'RedHat' + - ansible_facts['distribution_major_version'] | int <= 7 + - name: Docker repo + yum_repository: + name: docker + description: repo for docker + baseurl: "https://download.docker.com/linux/centos/{{ ansible_facts['distribution_major_version'] }}/x86_64/stable/" + gpgcheck: no + when: ansible_facts['distribution'] == 'RedHat' + - name: Create Docker repo dir + file: + path: "/etc/yum.repos.d/" + state: directory + - name: Add Docker Centos extras + copy: + dest: /etc/yum.repos.d/docker-ce.repo + content: | + [centos-extras] + name=Centos extras - $basearch + baseurl=http://mirror.centos.org/centos/7/extras/x86_64 + enabled=1 + gpgcheck=1 + gpgkey=http://centos.org/keys/RPM-GPG-KEY-CentOS-7 + - name: Installing docker + yum: + state: latest + pkg: ['slirp4netns', 'fuse-overlayfs', 'container-selinux', 'docker-ce'] + - name: Start docker + service: + name: docker state: started - name: "docker" enabled: yes - name: Prometheus installation @@ -192,7 +203,7 @@ hosts: ["!tier2"] tags: ["node-exporter"] roles: - - cloudalchemy.node-exporter + - cloudalchemy.node_exporter - name: ZooKeeper setup hosts: zookeeper @@ -304,7 +315,7 @@ path: "{{ item.path }}" state: unmounted with_items: - - { path: "/mnt/journal", src: "/dev/nvme0n1" } + - { path: "/mnt/journal", src: "/dev/nvme2n1" } - { path: "/mnt/storage", src: "/dev/nvme1n1" } - name: Format disks filesystem: @@ -312,7 +323,7 @@ dev: '{{ item }}' force: yes with_items: - - '/dev/nvme0n1' + - '/dev/nvme2n1' - '/dev/nvme1n1' - name: Mount disks mount: @@ -322,7 +333,7 @@ opts: defaults,noatime,nodiscard state: mounted with_items: - - { path: "/mnt/journal", src: "/dev/nvme0n1" } + - { path: "/mnt/journal", src: "/dev/nvme2n1" } - { path: "/mnt/storage", src: "/dev/nvme1n1" } - name: BookKeeper setup @@ -350,7 +361,7 @@ dest: "/opt/bookkeeper/bin/common.sh" - name: Format BookKeeper metadata in Zookeeper command: > - bin/bookkeeper shell metaformat -nonInteractive --force + bin/bookkeeper shell initnewcluster args: chdir: /opt/bookkeeper when: groups['bookkeeper'][0] == inventory_hostname diff --git a/driver-pravega/deploy/provision-pravega-aws.tf b/driver-pravega/deploy/provision-pravega-aws.tf index 49f959a7..f3c4b623 100644 --- a/driver-pravega/deploy/provision-pravega-aws.tf +++ b/driver-pravega/deploy/provision-pravega-aws.tf @@ -190,7 +190,7 @@ resource "aws_instance" "metrics" { # Change the EFS provisioned TP here resource "aws_efs_file_system" "tier2" { throughput_mode = "provisioned" - provisioned_throughput_in_mibps = 1000 + provisioned_throughput_in_mibps = 100 tags = { Name = "pravega-tier2" } diff --git a/driver-pravega/deploy/terraform.tfvars b/driver-pravega/deploy/terraform.tfvars index 52c9e863..ecac8977 100644 --- a/driver-pravega/deploy/terraform.tfvars +++ b/driver-pravega/deploy/terraform.tfvars @@ -1,12 +1,12 @@ public_key_path = "~/.ssh/pravega_aws.pub" -region = "us-west-2" -ami = "ami-9fa343e7" // RHEL-7.4 us-west-2 +region = "us-east-2" +ami = "ami-0bb2449c2217cb9b0" // RHEL-7.9 us-east-2 instance_types = { "controller" = "m5.large" - "bookkeeper" = "i3en.6xlarge" + "bookkeeper" = "i3en.2xlarge" "zookeeper" = "t2.small" - "client" = "m5n.8xlarge" + "client" = "m5n.xlarge" "metrics" = "t2.large" } @@ -14,6 +14,6 @@ num_instances = { "controller" = 1 "bookkeeper" = 3 "zookeeper" = 3 - "client" = 2 + "client" = 1 "metrics" = 1 } diff --git a/driver-pravega/deploy/vars.yaml b/driver-pravega/deploy/vars.yaml index 730eb107..e6e9543a 100644 --- a/driver-pravega/deploy/vars.yaml +++ b/driver-pravega/deploy/vars.yaml @@ -13,7 +13,7 @@ # --- -pravegaVersion: "0.10.1" +pravegaVersion: "0.12.0" zookeeperVersion: "3.5.5" bookkeeperVersion: "4.14.2" prometheusVersion: "2.2.1" diff --git a/driver-pravega/pom.xml b/driver-pravega/pom.xml index 5cce48a4..d1d184f9 100644 --- a/driver-pravega/pom.xml +++ b/driver-pravega/pom.xml @@ -27,7 +27,7 @@ - 0.10.2 + 0.12.0 @@ -64,7 +64,7 @@ io.pravega pravega-keycloak-client - 0.11.0 + ${pravegaVersion} org.apache.commons