Skip to content

Commit

Permalink
PMM7 Fix IP issue (#42)
Browse files Browse the repository at this point in the history
Fix IP/Port issue and Updates
  • Loading branch information
saikumar-vs authored Apr 4, 2024
1 parent d1704f6 commit dc3cc98
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
36 changes: 18 additions & 18 deletions pmm_psmdb-pbm_setup/docker-compose-sharded.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rs101
hostname: rs101
Expand All @@ -44,9 +44,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rs102
hostname: rs102
Expand All @@ -64,9 +64,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rs103
hostname: rs103
Expand All @@ -84,9 +84,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rs201
hostname: rs201
Expand All @@ -104,9 +104,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rs202
hostname: rs202
Expand All @@ -124,9 +124,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rs203
hostname: rs203
Expand All @@ -144,9 +144,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rscfg01
hostname: rscfg01
Expand All @@ -164,9 +164,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rscfg02
hostname: rscfg02
Expand All @@ -184,9 +184,9 @@ services:
privileged: true
environment:
- "PBM_MONGODB_URI=mongodb://${PBM_USER:-pbm}:${PBM_PASS:-pbmpass}@127.0.0.1:27017"
- "PMM_AGENT_SERVER_ADDRESS=pmm-server:8443"
- "PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER_CONTAINER_ADDRESS:-pmm-server:8443}"
- "PMM_AGENT_SERVER_USERNAME=admin"
- "PMM_AGENT_SERVER_PASSWORD=password"
- "PMM_AGENT_SERVER_PASSWORD=${ADMIN_PASSWORD:-password}"
- "PMM_AGENT_SERVER_INSECURE_TLS=1"
container_name: rscfg03
hostname: rscfg03
Expand Down
2 changes: 1 addition & 1 deletion pmm_psmdb-pbm_setup/start-rs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

pmm_server_admin_pass=${ADMIN_PASSWORD:-password}
profile=${COMPOSE_PROFILES:-classic}
mongo_setup_type=${}MONGO_SETUP_TYPE:-pss}
mongo_setup_type=${MONGO_SETUP_TYPE:-pss}

docker network create qa-integration || true
docker network create pmm-qa || true
Expand Down
8 changes: 4 additions & 4 deletions pmm_qa/pmm-framework.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/python3 -E
import subprocess
import argparse
import os
Expand Down Expand Up @@ -117,7 +117,7 @@ def setup_ps(db_type, db_version=None, db_config=None, args=None):
'PS_NODES': '1',
'PS_VERSION': ps_version,
'PMM_SERVER_IP': args.pmm_server_ip or container_name or '127.0.0.1',
'PS_CONTAINER': 'pdmysql_pmm_' + str(ps_version),
'PS_CONTAINER': 'ps_pmm_' + str(ps_version),
'CLIENT_VERSION': get_value('CLIENT_VERSION', db_type, args, db_config),
'QUERY_SOURCE': get_value('QUERY_SOURCE', db_type, args, db_config),
'PS_TARBALL': get_value('TARBALL', db_type, args, db_config),
Expand Down Expand Up @@ -348,7 +348,7 @@ def setup_psmdb(db_type, db_version=None, db_config=None, args=None):
# Define environment variables for playbook
env_vars = {
'PSMDB_VERSION': psmdb_version,
'PMM_SERVER_CONTAINER_ADDRESS': f'{args.pmm_server_ip}:8443' or f'{container_name}:8443' or '127.0.0.1:443',
'PMM_SERVER_CONTAINER_ADDRESS': f'{args.pmm_server_ip}:443' or f'{container_name}:8443' or '127.0.0.1:443',
'PSMDB_CONTAINER': 'psmdb_pmm_' + str(psmdb_version),
'ADMIN_PASSWORD': os.getenv('ADMIN_PASSWORD') or args.pmm_server_password or 'admin',
'PMM_CLIENT_VERSION': get_value('CLIENT_VERSION', db_type, args, db_config),
Expand Down Expand Up @@ -438,7 +438,7 @@ def setup_database(db_type, db_version=None, db_config=None, args=None):
"--database mysql=5.7,QUERY_SOURCE=perfschema,SETUP_TYPE=gr,CLIENT_VERSION=3-dev-latest "
"--database pdpgsql=16,USE_SOCKET=1,CLIENT_VERSION=3.0.0 "
"--database psmdb=latest,SETUP_TYPE=psa,CLIENT_VERSION=3.0.0)")
parser.add_argument("--pmm-server-ip", nargs='?', help='PMM Server IP to connect', default='pmm-server')
parser.add_argument("--pmm-server-ip", nargs='?', help='PMM Server IP to connect')
parser.add_argument("--pmm-server-password", nargs='?', help='PMM Server password')
parser.add_argument("--client-version", nargs='?', help='PMM Client version/tarball')
parser.add_argument("--verbose", "--v", action='store_true', help='Display verbose information')
Expand Down
6 changes: 3 additions & 3 deletions pmm_qa/pmm3-client-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

echo "start installing pmm-agent"

Expand Down Expand Up @@ -41,7 +41,7 @@ if [ ! -z "$upgrade" ]; then
fi

port=8443
if [[ "$pmm_server_ip" == "127.0.0.1" ]]; then
if [[ ! "$pmm_server_ip" =~ ^"pmm-server"$ ]]; then
port=443
fi

Expand Down Expand Up @@ -72,7 +72,7 @@ if [[ "$client_version" == "pmm3-latest" ]]; then
fi

## Only supported for debian based systems for now
if [[ "$client_version" == 3* ]]; then
if [[ "$client_version" =~ ^"3." ]]; then
## Note: only experimental packages are present atm.
wget -O pmm-client.deb https://repo.percona.com/pmm3-client/apt/pool/experimental/p/pmm-client/pmm-client_${client_version}-6.$(lsb_release -sc)_amd64.deb
dpkg -i pmm-client.deb
Expand Down

0 comments on commit dc3cc98

Please sign in to comment.