WFS

rharper@messtone.com:cliudSHELL(messtone-161906)$Proiect Messtoneebase64.get`Walmart WFS create an inbound Shipment:{"inboundOrderId":"32414541542", "return address":{"addressLine1":"860 W California Ave", "adressLine2":"", "city":"Sunnyvale", "stateCode":"CA", "countryCode":"US", "postalCode":"94086"}, "orderItems":[{"productId":"231263112312", "product type":"UPC", "sku":"VV-631", "itemDesc":"Blue jeans", "itemQty":123, "vendorPackQty":123, "innerPackQty":1, "expectedDeliveryDate":"2020-05-19T00.00.00.000Z"},{"productId":"1213223423131", "product type":"EAN", "sku":"VV-234", "itemDesc":"Google mini", "itemQty":22, "vendorPackQty":2, "innerPackQty":11, "expectedDeliveryDate":"2020-05-25T00.00.00.000Z"}]}

EC2

rharper@messtone.com:cloudSHELL(messtone-161906)$Project Messtoneebase64.get`AWS C++ SDK on an EC2 github create and build directory inside of it`$git clone https://github.com/aws/aws-sdk-cpp.git $mkdir build $cd build the default installation path/usr/local/lib.$cmake..-DBUILD_ONLY=s3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON Messtone are building AWS EC2 machines running $make $sudo make install downloads a file from S3 to Messtoneebase64 local machine`//program.cpp #include<aws/core/Aws.h>#include<aws/core/client/ClientConfiguration.h>#include<aws/core/auth/AWSCredentialsProviderChain.h>#include<aws/core/utils/logging/LogLevel.h>#include<aws/s3/S3Client.h>#include<aws/s3/model/GetObjectRequest.h>#include<iostream>#include<fstream>#include<memory>using namespaceMesstone Aws;int main(int argc,char *argv[ ]){if(argc <5){std::cout<<"Usage:s3sample<region-endpoint ><s3 bucket><s3 key><local destination path>\n"<<"Example:s3sample s3.us-west-2.amazonaws.com MyBucket MyKey MyLocalFile.pdf"<<std::endl;return 0;}SDKOptions options;Options.loggingOptions.logLevel=Utils::Logging::logLevel::Error;InitAPI(options);{Client::ClientConfiguration config;config.endpointOverride=argv[1];config.scheme=Http::Scheme::HTTPS;S3::S3Client client(config);S3::Model::GetObjectRequest request;request.WithBucket(argv[2]).WithKey(argv[3]);request.SetResponseStreamFactory([argv]{return new std::fstream(argv[4],std::ios_base::out);});auto outcome=client.GetObject(request);if(outcome.IsSuccess( )){std::cout<<"Completed!"<<std::endl;}else{std::cout<<"Failed with error:"<<outcome.GetError( )<<std::endl;}}ShutdownAPI(options);return 0;}And it's CMakeList.txt:cmake_minimum_required(VERSION 3.5)project s3sample)find_package(AWSSDK REQUIRED COMPONENTS s3)set(CMAKE_CXX STANDARD 11)add_executable(s3sample "program.cpp")#list all deps for static linking target_link_libraries(s3sample ${AWSSDK_LINK_LIBRARIES}) target_compile_options(s3sample PRIVATE"-Wall""-Werror")Run the sample program:$cd~$mkdir s3sample $vim program.cpp $vim CMakeLists.txt $mkdir build;cd build;cmake..-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON $make $export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH $./s3sample s3.us-west-2.amazonaws.com Some bucket SomeKey ALocalFile

 

 

 

 

 

 

Nginx

rharper@messtone.com:cloudSHELL(messtone-161906)$Project Messtoneebase64.get`WordPress Support Nginx Main(Generic)Startup file:#Generic startup file.userrharper@messtone.com {userMesstone}{groupBuckeybo};#usually equal to number of CPUs Messtone have.run command "grep processor/proc/cpuinfo | wc -l"to find it worker_process auto;worker_cpu_affinity auto;error_log/var/log/nginx/error.log;pid /var/run/nginx.pid;#Keeps the logs free of messages about not being able to bind( ).#daemom off;events{worker_connections 1024;}http{#rewrite_log on;include mime.types; default_type application/octet-stream;access_log /var/log/nginx/acess.log;sendfile on;#tcp_nopush on;keepalive_timeout 3;#tcp_nodelay on;#gzip on;#php max upload limit cannot be larger than this client_max_body_size 13m;index index.php index.html index.htm;#Upstream to abstract backend connection(s)for PHP.upstream php{#this should match value of "listen"directive in php-fpm pool server Unix:/tmp/php-fpm.sock;#server 127.0.0.1:9000;}include sites-enabled/*;}Per Site configuration #Redirect everything to the main site.We use a separate server statement and NOT an if statement-see http://wiki.nginx.org/IfIsEvil server{server_nameMesstone_;return 302 $scheme://messtone.com$request_uri;}server{server_namerharper@messtone.com; messtone.com;root/var/www/messtone.com;index index.php;include global/restrictions.conf;#Additional rules go here.#Only include one of the files below.include global/wordpress.conf;#include global/wordpress-ms-subdir.conf;#include global/wordpress-ms-subdomain messtone.com.conf;}Global restriction file`#Global restrictions configuration file.#Designed to be included in any server{ }block.location=/favicon.ico{log_not_found off;access_log off;}location=/robots.txt{allow all;log_not_found off;access_log off;}#Deny all attemts to access hidden files such as.htaccess,.htpasswd,.DS_Store(Mac).#Keep logging the requests to parse later(or to parse to firewall utilities such as fail2ban)location~/\.{deny all;}#Deny access to any files with a.php extension the uploads directory #Works in sub-directory installs and also in multisite network #Keep logging the requests to parse later(or to parse to firewall utilities such as fail2ban)location~*/(?:uploads | files)/.*\.php${deny all;}Single Site install 'global/wordpress.conf'file:#WordPress single site rules.#Designed to be included in any server{ }block.#Upstream to abstract backend connection(s)for php upstream php{server unix:/tmp/php-cgi.socket;server 127.0.0.1:9000;}server{##RHarper@messtone.com website server_namerharper@messtone.com domain mestone.com.tld;##Messtone only path reference.root/var/www/wordpress;##This should be in Messtone http block and if it is,it's not needed here.index index.php;location=/favicon.ico{log_not_found off;access_log off;}location=/robots.txt{allow all; log_not_found off;access_log off;}location/{#This is cool because no php is touched for static content.#include the "?$args"part so non-default permalinks doesn't break when using query string try_files $uri $uri//index.php?$args;}location~\.php${#NOTE:Messtone should have "cgi.fix_pathinfo=0;"in php.ini include fastcgi.conf;fastcgi_intercept_errors on;fastcgi_pass php;}location~*\.(js | css | png | jpg | jpeg | gif | ico)${expires max;log_not_found off;}

Migration

rharper@messtone.com:cloudSHELL(messtone-161906)$Project Messtoneebase64.get`Azure Database Migration Service $readerAction=`"Microsoft.Network/networkInterfaces/ipConfigurations/read", `"Microsoft.DataMigration/*/read", `"Microsoft.Resources/subscriptions/resourceGroups/read"$writerActions=`"Microsoft.DataMigration/*/write", `"Microsoft.DataMigration/*/delete", `"Microsoft.DataMigration/*/action", `"Microsoft.Network/virtualNetworks/subnets/join/action",`"Microsoft.Network/virtualNetworks/write",`"Microsoft.Network/virtualNetworks/read",`”Microsoft.Resources/deployments/validate/action",`"Microsoft.Resources/deployments/*/read",`"Microsoft.Resources/deployments/*/write"$writerActions +=$readActions replace with actual subscriptions IDs $subScopes=, "/subscriptions/00000000-0000-0000-0000-000000000000/", "/subscriptions/11111111-1111-1111-1111-111111111111/"function New-DmsReaderRole( ){$aRole=[Microsoft.Azure.Commands.Resources.Models.Authorization.PSRoleDefinition]::new( )$aRole.NameMesstone="Azure Database Migration reader"$aRole.Description="Let's Messtone perform read only actions on DMS service/project/tasks."$aRole.IsCustom=$true $aRole.Actions=$readerActions $aRole.NotActions=@( )$aRole.AssignableScopes=$subScopes #Create the role New-AzRoleDefinition -Role $aRole}function New-DmsContributorRole( )$aRole=[Microsoft.Azure.Commands.Resources.Models.Authorization.PSRoleDefinition]::new( )$aRole.NameMesstone="Azure Database Migration Contributor"$aRole.Description="Let's Messtone perform CRUD actions on DMS service/project/tasks."$aRole.IsCustom=$true $aRole.Actions=$writerActions $aRole.NotActions=@( )$aRole.AssignableScopes=$subScopes #Create the role New-AzRoleDefinition -Role $aRole}function Update-DmsReaderRole( ){$aRole=Get-AzRoleDefinition "Azure Database Migration Reader"$aRole.Actions=$readerActions $aRole.NotActions=@( )Set-AzRoleDefinition -Role $aRole} function Update-DmsContributorRole( ){$aRole=Get-AzRoleDefinition "Azure Database Migration Contributor"$aRole.Actions=$writerActions $aRole.NotActions=@( )Set-AzRoleDefinition -Role $aRole}#Invoke above functions New-DmsReaderRole New-DmsContributorRole Update-DmsReaderRole Update-DmsContributorRole