TestEngineering/Services/LoopTestEnvironments: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 344: Line 344:


* AWS
* AWS
** This is one m3.medium
** This is in the new Dev IAM
** This is one t2.small
** Look for omxen.dev.mozaws.net
** Look for omxen.dev.mozaws.net



Revision as of 20:11, 29 October 2014

Loop Server Production Environments

  • QA Access: not allowed
  • Pointing Fx Nightly to Production
    • NOTE: Fx Nightly is already set to point to Production by default
  • Quick Verifications
Loop-Server
In the browser: https://loop.services.mozilla.com
Note: the default value of "fakeTokBox" is true for the mock server, false for the live server

In the browser: https://loop.services.mozilla.com/__heartbeat__
{"storage":true,"provider":true}

In the browser: https://loop.services.mozilla.com/push-server-config
{"pushServerURI":"wss://push.services.mozilla.com/"}

curl https://loop.services.mozilla.com
Note: the default value of "fakeTokBox" is true for the mock server, false for the live server

curl -I https://loop.services.mozilla.com
Loop-Client
In the browser: https://call.mozilla.com
Welcome to the Firefox Hello web client.

Browser: https://call.mozilla.com/config.js
now returns all of this info:
var loop = loop || {};
loop.config = {
     bunch of loop-client specific info
};

Browser: https://call.mozilla.com/VERSION.txt

TOS: https://call.mozilla.com/legal/terms/

curl https://call.mozilla.com/
returns a page of HTML

curl -I https://call.mozilla.com/
MSISDN-Gateway
In the browser: https://msisdn.services.mozilla.com
{"name":"mozilla-msisdn-gateway","description":"The Mozilla MSISDN  
Gateway","version":"0.3.2","homepage":"https://github.com/mozilla-services/msisdn-gateway"
,"endpoint":"https://msisdn.services.mozilla.com"}

curl https://msisdn.services.mozilla.com
{"name":"mozilla-msisdn-gateway","description":"The Mozilla MSISDN 
Gateway","version":"0.3.2","homepage":"https://github.com/mozilla-services/msisdn-gateway"
,"endpoint":"https://msisdn.services.mozilla.com"}

curl -I https://msisdn.services.mozilla.com

Loop Server Stage Environment

Loop Server Stage Details

  • Versions
    • rpm -qa | grep loop
    • Example:
      • loop-server-svcops 0.10.0-1 x86_64 20905864
      • puppet-config-loop 20140811172607-1 x86_64 14277
  • VERSION.txt
    • ./data/loop-server/VERSION.txt
  • AWS
    • CF stack: loop-server-stage (or similar name)
    • ELB: loop-server-st-ELB-<some value>
    • One instance: look for "loop-server-stage"
  • OS
    • Running SciLinux 6.4
  • Files
    • /data/loop-server
      • especially /data/loop-server/config/settings.json
    • /data/hekad
    • /opt/aws
    • /opt/ec2
    • /opt/openresty
    • /opt/rh
    • /opt/stackdriver
    • /etc/circus.ini
    • /etc/circus.d
    • /etc/circus.d/loopserver.ini
    • /etc/circus.d/hekad-loop.ini
    • /etc/puppet/*
      • especially /etc/puppet/yaml/app
      • /etc/puppet/yaml/app/loop_server.dev.yaml
      • /etc/puppet/yaml/app/loop_server.prod.yaml
      • /etc/puppet/yaml/app/loop_server.stage.yaml
      • /etc/puppet/yaml/app/loop_server.yaml
    • /var/log/*
  • Processes
    • node loop/index.js
    • stackdriver
    • circusd
    • heka.d
    • nginx
  • Logs
    • /var/log/circus.log
    • /var/log/hekad/loop.stdout.log
    • /var/log/hekad/loop.stderr.log
    • /media/ephemeral0/circus/loop_server/loop_server.err.log
    • /media/ephemeral0/circus/loop_server/loop_server.eout.log
    • /media/ephemeral0/nginx/logs/default.access.log (not in use)
    • /media/ephemeral0/nginx/logs/default.error.log (not in use)
    • /media/ephemeral0/nginx/logs/loop_server.access.log
    • /media/ephemeral0/nginx/logs/loop_server.error.log
  • Setting Stage configuration:
    • Toggling the config setting to use either a mock server or a third-party server
    • File: /data/loop-server/config/settings.json
  • Quick Verifications
curl https://loop.stage.mozaws.net

curl -I https://loop.stage.mozaws.net

In the browser: https://loop.stage.mozaws.net/

In the browser: https://loop.stage.mozaws.net/__heartbeat__

In the browser: https://loop.stage.mozaws.net/push-server-config

Loop Client and Server Configurations

  • Yaml Files
    • /etc/puppet/yaml/app
      • loop_client.dev.yaml
      • loop_client.prod.yaml
      • loop_client.stage.yaml
      • loop_client.yaml
      • loop_server.dev.yaml
      • loop_server.prod.yaml
      • loop_server.stage.yaml
      • loop_server.yaml

Loop Client Stage Details

  • Versions
    • rpm -qa | grep loop
  • VERSION.txt
    • /data/loop-client/content/VERSION.txt
  • AWS
    • CF Stack: look for four loop-client-* stacks
    • ELB: loopstage1-loo-ELB-<some value>
    • One loop-client instance: look for "loop-client app server"
  • OS
    • Scientific Linux release 6.4 or 6.5
  • Files
    • /opt/aws
    • /opt/ec2
    • /opt/openresty
    • /opt/rh
    • /opt/stackdriver
    • /data/loop-client
      • especially /data/loop-client/content/config.js
      • Note: this does not contain any app-specific config file in the config directory
    • /data/hekad
    • /etc/heka.d
    • /etc/puppet/yaml
      • especially the following files
      • /etc/puppet/yaml/app/loop_client.dev.yaml
      • /etc/puppet/yaml/app/loop_client.prod.yaml
      • /etc/puppet/yaml/app/loop_client.stage.yaml
      • /etc/puppet/yaml/app/loop_client.yaml
  • Processes
    • look for stackdriver, nginx, python, circus, heka
  • Logs
    • /var/log/circus.log
    • /var/log/hekad/loop-client.stderr.log
    • /var/log/hekad/loop-client.stderr.log
    • /media/ephemeral0/nginx/logs
      • default.access.log
      • default.error.log
      • loop-client.access.log
      • loop-client.error.log
  • Heka
    • /data/hekad
    • /etc/heka.d
  • Quick Verifications
In the browser: https://call.stage.mozaws.net
Welcome to the Firefox Hello web client.

Check the version: https://call.stage.mozaws.net/VERSION.txt 

Check the TOS: https://call.stage.mozaws.net/legal/terms/

curl https://call.stage.mozaws.net

curl -I https://call.stage.mozaws.net

Check that Loop-Client Stage is talking to Loop-Server Stage
In the browser: https://call.stage.mozaws.net/config.js
should return something similar to this
var loop = loop || {};
loop.config = {
 serverUrl: 'https://loop.stage.mozaws.net',
 and a bunch of other loop-client specific stuff
};

Loop Mock Server Stage Details

    • NOTE: This server is used for load testing whenever we do not want to hit the third-party servers. A configuration change must be made in the Loop Server in order to make this work.
  • AWS
    • CF stack: loop-delayed-response (or similar)
    • ELB: loop-delayed-r-ELB-<some value>
    • R53AliasRecord: loop-delayed-response.stage.mozaws.net
    • Instances: 1 m1.small, search for "delayed HTTP server"
  • OS
    • Scientific Linux release 6.4
  • Files
    • /data/delayed
    • /data/delayed/delayed-master
    • /etc/circus.d/
    • /etc/circus.d/loopserver.ini
    • /etc/circus.d/hekad-loop.ini
    • /etc/circus.ini
  • Processes
    • root /usr/bin/python /usr/bin/circusd --log-output /var/log/circus.log --pidfile /var/run/
    • nobody node index.js
  • Logs
    • /var/log/circus.log
  • Quick Verifications
In the browser: https://loop-delayed-response.stage.mozaws.net
ok
  • Access
    • Log in as "ec2-user"

MSISDN Gateway Server Stage Details

  • Versions
    • rpm -qa | grep msisdn
  • Version string
    • /data/msisdn-gateway/VERSION.txt
  • AWS
    • CF Stack: msisdn-gateway-stage or msisdnstage1
    • ELB: msisdn-gateway-ELB-<SOME VALUE> or msisdnstage1-m-ELB-<SOME VALUE>
    • Currently one m3.medium instance, look for msisdn-gateway
  • OS
    • Scientific Linux release 6.4 (Carbon)
  • Files
    • /opt/aws
    • /opt/ec2
    • /opt/openresty
    • /opt/rh
    • /opt/stackdriver
    • /data/hekad
    • /data/msisdn-gateway
    • /etc/puppet/yaml/app, especially
      • msisdn_gateway.dev.yaml
      • msisdn_gateway.prod.yaml
      • msisdn_gateway.stage.yaml
      • msisdn_gateway.yaml
  • Processes
    • Look for stackdriver, python, circus, resty, nginx, node, heka
  • Logs
    • /media/ephemeral0/msisdn-gateway/msisdn-gateway_err.log
    • /media/ephemeral0/msisdn-gateway/msisdn-gateway_out.log
    • /media/ephemeral0/nginx/logs/default.access.log (not in use)
    • /media/ephemeral0/nginx/logs/default.error.log (not in use)
    • /media/ephemeral0/nginx/logs/msisdn-gateway.access.log
    • /media/ephemeral0/nginx/logs/msisdn-gateway.error.log
    • /var/log/circus.log
    • /var/log/hekad/msisdn_gateway.stderr.log
    • /var/log/hekad/msisdn_gateway.stdout.log
  • Configuration File
    • /data/msisdn-gateway/config/production.json
  • Quick Verifications
In the browser: https://msisdn.stage.mozaws.net

In the browser: https://msisdn.stage.mozaws.net/__heartbeat__
returns {"storage":true}

curl https://msisdn.stage.mozaws.net

curl -I https://msisdn.stage.mozaws.net

MSISDN Mock Server Stage Details

  • AWS
    • This is in the new Dev IAM
    • This is one t2.small
    • Look for omxen.dev.mozaws.net
  • Access: SSH
  • OS
    • Amazon Linux AMI release 2014.03
  • Versions
    • TBD
  • Processes
    • Look for nginx, python, omxen
  • Files
    • /home/ec2-user/omxen
    • /opt/aws
  • Logs
    • /var/log/nginx
    • Use: sudo cat nginx/*.log, etc
  • Restarting
    • TBD
  • Quick Verifications
In the browser, http://omxen.dev.mozaws.net/
OMXEN SMS GATEWAY

curl omxen.dev.mozaws.net
OMXEN SMS GATEWAY

curl -I omxen.dev.mozaws.net

Sentry Server Stage Details

  • Versions
    • rpm -qa | grep sentry
  • AWS
    • TBD
  • OS
    • Scientific Linux release 6.3
  • Files
    • /opt/sentry
  • Processes
    • root /usr/bin/python /usr/bin/circusd --log-output /var/log/circus.log --pidfile /var/run/
    • apache /opt/sentry/bin/python /opt/sentry/bin/sentry --config=/etc/sentry.d/sentry.shared.us-east-1.stage.mozaws.net.py start ud
  • Logs
    • /var/log
    • nothing in /media/ephemeral0
  • Heka
    • TBD
  • Quick Verifications
    • For now, just verify the service is running on the host: ps aux | grep sentry

QA Access via a Bastion Host

  • Old Dev IAM
    • SSH with AWS keys to the Stage bastion host in US-East-1. From there SSH directly into any instance using your LDAP name. For the mock server, log in as "ec2-user".
  • New Dev IAM
    • SSH with AWS keys to the Stage bastion host in US-East-1 or EU-West-1. From there SSH directly into any instance using your LDAP name. For the mock server, log in as "ec2-user".

Monitoring the Stage Environment

Monitoring the Production Environment

Loads V1 Services Cluster Environment

Dev Environment

  • AWS
    • CF Stack: ulfr-devstack-loop
    • ELB: ulfr-devstack-ELB-<some value>
    • One instance: search for "loop app server (ulfr-devstack-loop)"
    • CF Stack: bwong-msisdn-dev
    • ELB: bwong-msisdn-d-ELB-<some value>
    • One instance: search for "msisdn_gateway server (bwong-msisdn-dev)"
  • OS
    • TBD
  • Files
    • TBD
  • Processes
    • TBD
  • Logs
    • TBD
  • Heka
    • TBD
  • Quick Verifications
http://loop.dev.mozaws.net
Returns
{
 "name": "mozilla-loop-server",
 "description": "The Mozilla Loop (WebRTC App) server",
 "version": "0.7.0",
 "homepage": "https://github.com/mozilla-services/loop-server/",
 "endpoint": "http://loop.dev.mozaws.net",
 "fakeTokBox": false
}
or similar

http://loop.dev.mozaws.net/__heartbeat__
Returns
 {
 "storage": true,
 "provider": false
}
or similar
http://loop-webapp.dev.mozaws.net
Returns
    Loop
    Welcome to the Loop web client.

http://loop-webapp.dev.mozaws.net/__heartbeat__
Returns 404
http://msisdn.dev.mozaws.net
Returns
{
 "name": "mozilla-msisdn-gateway",
 "description": "The Mozilla MSISDN Gateway",
 "version": "0.3.0-DEV",
 "homepage": "https://github.com/mozilla-services/msisdn-gateway/",
 "endpoint": "https://msisdn.dev.mozaws.net"
}
or similar

http://msisdn.dev.mozaws.net/__heartbeat__
Returns
{
 "storage": true
}
or similar
https://msisdn-dev.stage.mozaws.net
Returns
{
 "name": "mozilla-msisdn-gateway",
 "description": "The Mozilla MSISDN Gateway",
 "version": "0.3.0-DEV",
 "homepage": "https://github.com/mozilla-services/msisdn-gateway/",
 "endpoint": "https://msisdn-dev.stage.mozaws.net"
}
or similar

https://msisdn-dev.stage.mozaws.net/__heartbeat__
Returns
{
 "storage": true
}
or similar

References

OPs Mana and GitHub Pages