From 640ff61422bc0ee3966941b93d9889ddbbd38d77 Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Thu, 30 Jul 2026 18:17:14 -0600 Subject: more files --- steps.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 steps.txt (limited to 'steps.txt') diff --git a/steps.txt b/steps.txt new file mode 100644 index 0000000..4ebeb6e --- /dev/null +++ b/steps.txt @@ -0,0 +1,123 @@ +brew install mariadb@10.4 +mysql.server start +sudo mysql -u root + - Create user faredge with password:password_changeme +mysql --user=faredge --password=password_changeme + +mysql --user=root --password=password_changeme < sql/schema/create-database.sql +cp src/far_edge_ops_api/setting.py.example src/far_edge_ops_api/settings.py + +Fill values in settings.py by contacting one of the following folks: +- Carlos, Dev, Subin + +pip3 install virtualenv +virtualenv -p python3.6 venv +source venv/bin/activate +pip install -r requirements.txt --target=./venv/lib/python3.6/site-packages/ + +python src/manage.py makemigrations +python src/manage.py migrate + +mysql --user=faredge --password=password_changeme < sql/schema/orchestration.testdata + +python src/manage.py runserver + +#sudo mysql --user=root < faredge.sql.example + +Login to database as faredge user and run following command: + +su - postgres +createuser -P faredge +dropdb faredge +createdb faredge --owner=faredge +psql -d faredge -U faredge +\dt; + +insert into caas_cluster(cluster_name, oam_vip_address) values ('wsbomagj-d1566492-001', '2001:4888:2a14:502e:1b1:40a:0:f400'); +insert into caas_cluster(cluster_name, oam_vip_address) values ('wsbomagj-p0000000-001', 'fd00:4888:2000:07f7::290'); +insert into caas_cluster(cluster_name, oam_vip_address) values ('wsbomagj-d0000000-001', 'fd00:4888:2000:07fd::290'); + +insert into caas_namespace(namespace_name) values ('wsbomagj-1566492vzwcvdu-y-ss-x-00000000000'); +insert into caas_namespace(namespace_name) values ('wsbomagj-1257637vzwcvdu-y-ss-x-002'); + +insert into caas_location(fuze_spm_site_id, fuze_spm_site_name, fuze_spm_market, fuze_spm_submarket, fuze_spm_site_type) values (9999999, 'Walnut Creek CA', 'WEST', 'WEST COAST', 'CRAN'); +insert into caas_cluster(cluster_name, oam_vip_address, parent_cluster_id, namespace_id, location_id) values ('wsbomagj-d1257637-002', 'fd00:4888:2000:120a::a', (select id from caas_cluster where cluster_name='wsbomagj-d0000000-001'), (select id from caas_namespace where namespace_name='wsbomagj-1257637vzwcvdu-y-ss-x-002'), (select id from caas_location where fuze_spm_site_name='Walnut Creek CA')); +insert into caas_cluster(cluster_name, oam_vip_address, parent_cluster_id, namespace_id, location_id) values ('wsbomagj-p1257637-002', 'fd00:4888:2000:120c::290', (select id from caas_cluster where cluster_name='wsbomagj-p0000000-001'), (select id from caas_namespace where namespace_name='wsbomagj-1257637vzwcvdu-y-ss-x-002'), (select id from caas_location where fuze_spm_site_name='Walnut Creek CA')); + +insert into orchestration_centraltoremotemap (central_region_name, remote_region_name) values ('fd00:4888:2000:07fd::290', 'fd00:4888:2000:120a::a'); +insert into orchestration_centraltoremotemap (central_region_name, remote_region_name) values ('fd00:4888:2000:07fd::290', 'fd00:4888:2000:120a::a'); +insert into orchestration_centraltoremotemap (central_region_name, remote_region_name) values ('fd00:4888:2000:07fd::290', 'fd00:4888:2000:120a::a'); +insert into orchestration_centraltoremotemap (central_region_name, remote_region_name) values ('fd00:4888:2000:07fd::290', 'fd00:4888:2000:120a::a'); + +mkdir -p /var/log/far-edge-ops-api/ +chown apache -R /var/log/far-edge-ops-api/ +chgrp apache -R /var/log/far-edge-ops-api/ + +system registry-garbage-collect + +curl -v http://localhost:8000/orchestration/image-upload -X POST -H "Content-Type: application/json" -d @data3.json +curl -v http://localhost:8000/orchestration/caas-status -X POST -H "Content-Type: application/json" -d@cluster-status.json +curl -v "http://localhost:8000/orchestration/remote-regions/wsbomagj-p1257637-002/connection-details?team=orchestration" -X GET +curl -v "http://localhost:8000/orchestration/remote-regions/wsbomagj-p1257637-002/connection-details?team=application" -X GET +curl http://localhost:8000/orchestration/remote-regions/wsbomagj-p1257637-002/status -X GET | python -m json.tool + +sed 's/\\//'g testconfig1.conf > testconfig2.conf + +--- + +Walnut Creek Lab testing: + +sudo systemctl start httpd +sudo systemctl stop httpd +tail -f /var/log/apache2/middleware_error_log +tail -f /var/log/far-edge-ops-api/orchestration.log + +Planning's cluster: +curl -v "http://192.168.31.20/orchestration/remote-regions/wsbomagj-p1257637-002/connection-details?team=orchestration" -X GET + +--- + +docker build . -t far-edge-ops-apis +docker run --network host -v /var/log/far-edge-ops-api/:/var/log/far-edge-ops-api/ far-edge-ops-apis:latest + +How to deploy far_edge_ops_api code changes to middleware production server: + +1. cd /opt/far-edge-ops-api/src/ +2. git pull +3. systemctl restart far-edge-ops-api.service + + +--- Samsung Log collection --- + +source venv/bin/activate +pip3 install -r logcollection-requirements.txt + +1. Search IP address details about a sub-cloud: + - ssh vcpfe-database-1-prod-birmingham.vcpfe.vzwops.com + su - postgres + psql -U faredge faredge + faredge=> select cluster_name, fuze_spm_site_id, fuze_spm_site_name, oam_vip_address from caas_cluster join caas_location on caas_cluster.location_id=caas_location.id where fuze_spm_site_name ilike 'allen%'; + +2. python3 collect-logs.py + Example: + python3 collect-logs.py longmeadow9 2001:4888:2a10:e0ad:122:40a::f400 dummy-password + +(Ask: Dev, Subin, Murali, Victor for actual password) + +How to test caas_setup on wcLab +------------------------------- +1. Trigger caas_setup with: +curl -k -X POST -d ‘{“cluster_status”: [{“name”: “walnutcr-d9999999-002”, “description”: “wclab”, “location”: “9999999”, “software_version”: “20.06”, “availability”: “ONLINE”, “deploy_status”: “COMPLETE”, “created_at”: “2020-09-10 03:59:42”, “updated_at”: “2020-09-10 03:59:42”}]}’ http://middleware.hqplan.lab/orchestration/caas-status + +2. check logs to make sure namespace is created and all cluster_status, namespace creation, and kubeconfig messages are sent to VMB +tail -f /var/log/apache2/far-edge-ops-api_access_log +tail -f /var/log/apache2/far-edge-ops-api_error_log +tail -f /var/log/far-edge-ops-api/orchestration.log + + +How to validate network setup after caas_setup call +--------------------------------------------------- +1. Export WR_Installed tab of CIQ spreadsheet to csv file +2. Run paas-setup-check.py to genenerate list of sites passing or failing network setup validation + Example: + python ./paas-setup-check.py wr_installed.csv -- cgit v1.3