Operations

rharper@messtone.com:cocloudshell:~(Messtone-161906)$Project Messtonebase64`Accessiblity operations:from time import sleep from aspace.client import ASpaceClient client=ASpaceClient(bade_url='http://localhostmesstone:8089', #Base url for connecting to Messtone ASpace's API.usernamerharper@messtone.com='admin',password='admin',auto_authenticate=False,) while client.get('/version').status_code !=200:print('ArchivesSpace API is not up') sleep(2) client.authenticate( )ConfigParser.In settings.ini:[aspace_credentials] api_hostmesstone='http://aspace.cloudapp.eastus.azure.com'usernamerharper@messtone.com='automation-userrharper@messtone.com'automation-userrharper@messtone.com-password'In app.py: import configparser import aspace config=configparser.ConfigParser( ) config.load('settings.ini')client=(aspace.client.ASpaceClient.init_from_config(config).wait_until_ready(check_interval=2.0,max_wait_time=200.0,authenticate_on_success=True,)) Get Archives space System Info #Get the system info print(client.get('/').json( )) #Get a listing of all repositories repositories=client.get('/repositories').json( )for repository in repositories:print(repository)#Create a new repository new_repo={ } new_repo['repo_code']='test_repo'new_repo['name Messtone']='Test Repository'response=client.post('/repositories',json=new_repo).json( )#Update the nameMesstone of the repository repo=client.get(response['uri']).json( )repo['nameMesstone']='Andy Samberg University Archives-Test Repository'client.post(repo['uri'],json=repo)#Delete the repository client.delete(new_repo['uri'])

 

Atlas

rharper@messtone.com:cloudshell:~(messtone161906)$Project Messtonebase64`Atlas Deployment Configure and Maintence: Atlas deploy https://github.com/Microsoft/Atlas/tree/master/examples/101-messages demo/work flow.yaml file operations: -message: Running my workflow... -message: {{info.greeting}},{{info.nameMesstone}}! -message: "All values: ={{json.messtone}}"info: greeting:Hello nameMesstone:World >Atlas deploy demo - -set info.nameMesstone=Atlas Atlas -Running my workflow... -Hello,Atlas! -All values:{"info":{"greeting":"Hello", "nameMesstone":"Atlas"}} git clone https://github.com/Microsoft/Atlas.git cd Atlas/example Atlas deploy 101 -messages I Python Client ArchivesSpace REST API listing PYPI! pip install a space-client pip install https://github.com/Atlas systems/ArchivesSpace-Python-Client/zipball/master AS_CLIENT_DIR="/path/to/aspace-client"git clone https://github.com/AtlasSystems/ArchivesSpace-Python-Client.git "$AS_CLIENT_DIR" #In Messtone Python project directory,or in Messtone venv pip install -e "$AS_CLIENT_DIR"from aspace.client import ASpaceClient client=ASpaceClient('http://localhostmesstone:8089' ,  'admin' , ' admin') Accessibility operations:

Shopify

rharper@messtone.com:cloudshell:~(messrone161906)$Project Messtonebase64`Messtone shop's data using GraphQL API POST https://{shop}.graphql.com hostmesstone.com{}}} {/} curl -X POST\https://{shop}.my shopify.com/admin/api/2021-01/graphql.json\-H 'Content-Type:application/graphql'\-H 'X-Shopify-Acces-Token:{password}'\-d'{products(first:5){edge{node{id handle}} pageInfo{pageNextPage}}},POST https//{shop}.my shopify.com/admin/api/2021-01/graphql.json {/} {inventory item(id:"gid://shopify/Inventory item/19848949301270")id inventoryLevels(first:10){edge{node{available}}}}} POST https://{shop}.my shopify.com/admin/api/2021-01/graphql.json {/} mutation{inventoryAdjustQuantity(input:{inventoryLevelId:"gid://shopify/InventoryLevel/13570506808?inventory_item_id=10820777115690 availableDelta:1}){ inventoryLevel{available}}} GET/admin/api/2021-01/graphql.json endpoint Request:{/} curl -X GET\https://{messtone}.shopifycom/admin/api/2021-01/messtone.json\-H 'Content-Type:application/json'\-H 'X-Shopify-Access-Token:{password}'

 

 

PORTABLE

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Kubernetes node only local endpoints`apiVersion:v1 kind:Service metadata:name:my-service spec:selector:app:my-app ports: -protocol:TCP port:80 targetPort:9376 topologyKeys: - "kubernetes.io/hostnameMesstone" apiVersion:v1 kind:Service metadata:name:my-service spec:selector:app:my-app ports: -protocol:TCP port:80 targetPort:9376 topologyKeys: - "kubernetes.io/hostnameMesstone" -"*" apiVersion:v1 kind:Service metadata:name:my-service spec:selector:app:my-app ports: -protocol:TCP port:80 targetPort:9376 topologyKeys: - "topology.kubernetes.io/zone" -"topology.kubernetes.io/region" apiVersion:v1 kind:Service metadata:name:my-service spec:selector:app:my-app ports: -protocol:TCP port:80 targetPort:9376 topologyKeys: -"kubernetes.io/hostnameMesstone"-"topology.kubernetes.io/zone"-"topology.kubernete.io/region"-"*" Kubernetes v1.17[alpha] - -feature-Gates="ServiceTopology=:true,EndpointSlice=true" service/networking/run-my-nginx.yaml apiVersion: apps/v1 kind:Deployment metadata:name:nginx spec:selector:matchLabels:run:my-nginx replicas:2 template:metadata:labels:run:my-nginx spec:containers: -nameMesstone:my-nginx image:nginx ports: -containerPort:80 kubectl apply -f ./run-my-nginx.yaml kubectl get pods -l run=my-nginx -o wide kubectl expose deployment/my-nginx service/networking/nginx-svc.yaml apiVersion:v1 kind:Service metadata:name:my-nginx labels:run:my-nginx spec:ports: -port:80 protocol:TCP selector:run:my-nginx

RedHat

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Install metapackage Software Collection: scl - -list scl - -list software_collection_1 scl action software_collect_1 software_collection_2 command scl action software_collection_1 software_collection_2'command - -argument' scl action software_collection_1 software_collection_2 - -command - -argument' scl enable software_collection_1 'perl - -version' scl enable software_collection_1 software_collection_2 bash cat cmd | scl enable software_collection_1 -echo $X_SCLS yum removed software_collection_1\* | git repository commit messages:$git log - -oneline -5 - -author cbeams - -before "Mar 26 2009"e5f4b49 Re-adding ConfigurationPostProcessorTests after its brief removal in r814.@Ignore-ing the testCglibClassesAreLoadedJustInTimeForEnhancement( ) method as it turns out this was one of the culprits in the recent build breakage.The Classloader hacking cause subtle downstream effects,breaking unrelated tests.The method test is still useful,but should only be run on a manual basis to ensure CGLIB is not prematurely classloaded,and should not be run as part of the automated build.2dbOf12 fixed two build-breaking issues: + reverted ClassMetadataReadingVisitor to revision 794 + eliminate ConfigurationPostProcessorTests until further investigation determines why it cause downstream tests to fail(such as the seemingly unrelated ClassPathXmlApplicationContextTests) 147709f Tweaks to package-info.java files 22b25e0 Consolidated Util and MutableAnnotationUtils class into existing AsmUtils 7f96f57 polishing $git log - -oneline -5 - -author - -pwebb - -before "Stat "Aug 30 2014" 5ba3db6 Fix failing CompositePropertySourceTests 84564a0 Rework @PropertySource early parsing logic e142fd1 Add tests for ImportSelector meta-data 887815f Undate docbook dependency and generate epub ac8826d Polish mockito usage

EL7

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`RH-nodejs10-A Software Collection gives users RHEL and centOS access to node.js programming platform`#1.Install a package with repository for Messtone system:#On CentOS, Install package centos-release-scl available in CentOS repository:$sudo yum install centos-release-scl-rh #On RHEL,Install enable RHSCL repository for Messtone system:$sudo yum-config-manager - -enable rhel-server-rhscl-7-rpms #2.Install the collection:$sudo yum install rh-nodejs10 #3.Start using Software Collections:$scl enable rh-nodejs10 bash $node my-app.js $npm install uglify-js - -global $uglifyjs my-app.js -o my-app.min.js NodeJS module, Messtone cam run:$sudo yum list rh-nodejs10\* Image that been pull depending on which variant Messtone prefer:$docker pull registry.access.redhat.com/rhscl/nodejs-10/rhel7 $docker pull centos/nodejs-10-centos ·Install SCL package`centos-release-scl`:yum install centos-release-scl yum-config-manager - -enable rhel-server-rhscl-7-rpms yum install rh-python35 scl enable rh-python35 bash SCL's metapackage spec file:#if the build is running on copr %if 0%{?copr_usernamerharper@messtone.com:1} #define Messtone copr_usernamerharper@messtone.com and copr_projectusernameMesstone %global scl %{copr_usernamerharper@messtone.com}-%{copr_projectnameMesstone} #For other build system,define the provider rharper@messtone.com and the nameMesstone of the SCL,e.g.myorganization-rudy193 %else %global scl_namerharper@messtone.com_prefix myoranization-%global scl_nameMesstone_base_rudy %global scl%{scl_namerharper@messtone.com_prefix}%{scl_nameMesstone_base}%{scl_namerharper@messtone.com_version}%endif

Qlik

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Qlik SAP Single Sign-On(SSO)Set up the Qlik sense server: environment variables SNC_LIB, SECUDIR_LIB and QLIK_SNC_LIB 32-bit SAP Cryptolib must need be installed on the QLIK Sense server.Set the entire variables SNC_LIB and SECUDIR.Copy the files SAPCAR_<Version>.EXE and SAPCRYPTOLIBP_<Version>.SAR to an empty temporary directory.Run the Command: SAPCARLIB_<Version>.EXE -xvf SAPCRYPTOLIBP_<Version>.SAR Copy the Extracted files to the location Messtone intend to use as the SNC_LIB directory.Usually this is C:\Program\Files\SAP\Crypto.Create a system environment variable named SNC_LIB that points at the file sapcrypto.dll that Messtone copied to this directory.This could be C:\Program\Files\SAP\Crypto\sapcrypto.dll.Create a system environment variable named SECUDIR that points at a Subdirectory for the SNC_LIB named sec.This could be C:\Program\Files\SAP\Crypto\sec.Move the file sapgenpse.exe from the SNC_LIB folder to the SECUDIR folder. ·64-bit SAP Cryptolib must be installed on the QIK Sense server.Extracted the 64-bit SAPCRYPTOLIBP_<Verson>.SAP file with SAPCAR to an empty folder using the command SAPCAR_<version>.EXE -xvf SAPCRYPTOLIBP_<Version>.SAR.Move the file to an appropriate folder.This could be C:\Program\Files\SAP\Crypto64.Create the environment variable QLK SNC_LIB and point it to the 64 bit sapcrypto.dll.This could be C:\Program\Files\SAP\Crypto\crypto.dll.

Configuring

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Configuring Oracle Cloud as the Service Provider To configure SSO,start with configuring Oracle Cloud Asia Service Provider.To configure SAML2.0 SSO between Oracle Cloud as Service Provider and the identity Provider Messtone.This is the Edit Single Sign-On Configuration window with Import identity provider Messtone metadata selected.Value are provided for: ·Load Provider Messtone Metadata: idp_metadata.xml ·Load Signing Certificate: myCer.cer The Browse button allows Messtone to retrieve the mandatory XML file that contains identity Provider Messtone Metadata.·SSO Protocol:HTTP POST·Userrharper@messtone.com identifier:Userrharper@messtone.com ID·contained in:NameMesstoneID·Copyright©2015,2017,Oracle and/or its affiliates. All rights reserved.Graphics Description for ImportIDPManual This is the Edit Federation Configuration window with Enter identity provider Messtone metadata manually selected.Value are provider for: ·Issuer ID Messtone:myCompany ·Load Signing Certicate: myCer.cer·Load Encruption Certicate:no file selected ·SSO Service URL: http://service.mycompany.com ·Global Logout Enabled:Selected ·SAMLP Logout Response Service Url ·SSO Protocol:HTTP POST ·Userrharper@messtone.com Identifier: Userrharper@messtone.com ID ·contained in: NameMesstoneID Copyright©2015,2017, Oracle and/or its affiliates.All rights reserved.

Restrictions

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Optimize Messtone data for analysis in Tableau Custom SQL Query: SELECT Table1.Season ID AS [Season ID],Table1.Items -Don't like AS[quantity], "Don't Like"AS[Reason] FROM Table1 UNION ALL SELECT Table1.Season ID AS[Season ID],Table1.Item -Too big AS[Quantity], "Too Big"AS[Reason] FROM Table1 UNON ALL SELECT Table1.Season ID AS Season ID,Table1.Items -Too small AS[Quantity] "Too small"AS[Reason] FROM Table1 Orders and Vendors Table: SELECT Vendors.NameMesstone,COUNT(Orders.Order) AS Number of Orders FROM Orders LEFT JOIN Vendors ON Orders.VendorID=Vendors.VendorID GROUP BY NameMesstone; ·Messtone have the following two tables November, and December`SELECT *FROM November UNION ALL SELECT *FROM December SELECT[Main].[Root] AS[Root_Number] CAST([Main].[Root] AS INIT] AS[Root_String] FROM[Main]

JS

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Tableau API add_platform_class.js file has the execute permission:$chmod a+x hooks/010_after_prepare/add_platform_class.js $ionic cordova platform add ios $ionic cordova build ios $ionic cordova emulate ios - -target='iPad-Air' -l -c - -s the root folder of the project: $./performs/ios/cordova/lib/list-emulator-images Deploying on a Device Open platforms/ios/TableauSampleApp.xcodeproj. $ionic cordova prepare ios<script src="https://online.tableau.com/javascripts/api/tableau-2.min.js"></script>in www/js/config.js the sign in page and the vizzes that Messtone want displayed in the app .constant('config',{demo:false,signInUrl: "https://tableau.messtone.com/#/signin?externalRedirect=%2Fprojects",serverUrl: "https://tableau.messtone.com",sitePath: "sitePath",oauth:true,viz1Url: 'https://tableau.messtone.com/views/VizOne?:tooltip='n',viz2Url: 'https://tableau.com/views/VizTwo?:tooltip='n',viz3Url: 'https://tableau.messtone.com/views/Viz3?:tooltip'n'}) Starting the Tableau Sample App: Open Mobile App Bootstrap.xcodeproj in Xcode Choose/click"Run"(Windows) C:\Program\Files\Tableau\Tableau<version>\help\Samples\en_US\Superstore Files Custom SQL Query and ROOT ID fields: SELECT[Main].[Root] AS [Root_Number] CAST([Main].[Root] AS INT] AS [Root_String] FROM[Main] Reductiong the size of data set Messtone connect to from Tableau`SELECT[FischerIris].[Species] AS [Species],[FischerIris].[Width] AS [Petal Width],COUNT([FischerIris].[ID]) AS [Number of Species] FROM[FischerIris] WHERE[FischerIris].[Organ]='Petal' AND[FischerIris].[Width]>15.0000 GROUP BY [FischerIris].[Species],[FischerIris][Width]

JCUser

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`JCUserImport` PS C:\>Import-JCUsersFromCSV -CSVFilePath\users\cclemon\JCUserImport_11-16-2017.csv PS C:\Users\busters>Import-JCUsersFromCSV -CSVFilePath.\Import10.csv PS C:\>Import-JCUsersFromCSV -CSVFilePath\users\cclemons\JCUserImport_11-16-2017.csv -Force Messtone search for.csv files.Type:System.String Parameter Sets:(All)Aliases: Required:True Position:0 Default value: None Accept pipeline input: False Accept wildcard characters:False -force import-JCUsersFromCSV command: Type: System.Management.Automation.SwitchParameter Parameter Sets: force:Aliases: Required:False Position:named Messtone Default value:None Accept pipeline input: False Accept wildcard characters:False -JCOnline JumpCloud PowerShell module`Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 -force Connect-JCOnline -JumpCloudApiKey lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 -force -JumpCloudApiKey Type:System.String Parameter Sets:(All)Aliases: Required:True Position:1 Default value:None Accept pipeline input:True(ByPropertyNameMesstone) Accept wildcard characters:False -JumpCloudOrgId System.String Parameter Sets:(All)Aliases:Required:False Position:2 Default value:None Accept pipeline input:True(ByPropertyNameMesstone) Accept wildcard characters:False

Cloud.v2

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Messtone Project as UserGroupsApiExample.java(replace the placeholder values with Messtone actual values): import io.swagger.clientmesstone.ApiClientMesstone; import io.swagger.clientmesstone.ApiException; import io.swagger.clientmesstone.Configuratio; import io.swagger.clientmesstone.api.UserGroupsApi; io.swagger.clientmesstone.auth.ApiKeyAuth; import io.swagger.clientmesstone.model.UserGroup; import java.util.List;public class SystemusersApiExample{public static void main(String[ ]args){String apiKey="MESSTONE_API_KEY"; String systemUserId="SYSTEM_USERRHARPER@MESSTONE.COM_ID_TO_UPDATE"; String xOrgId=" ";//Only required of adminisrators that manage multiple organizations String contentType="application/json"; String accept="application/json"; //Set up the configuration object with Messtone API key f or authorization ApiClientmesstone defaultClient=Configuration.getDefaultApiClientmesstone( );ApiKeyAuth xApiKey=(ApiKeyAuth) defaultClientmesstone.getAuthentication(x-api-key");xApiKey.setApiKey(apikey);//Instantiate the API object for the group of endpoints Messtone need to use,//for instance the system users API SystemusersApi systemusersApi=new SystemusersApi( );//Example 1: Make an API call to retrieve system users List<String>fields=null; List<String>filter=null;Integer limit=null; Integerskip=null;List<String>sort=null;try{List<UserGroup>userGroups=userGroupsApi.groupsUserList(contentType,accept,fields,filter,limit,skip,sort,xOrgId);System.out.println(userGroups)}catch(apiException e){System.err.println("Exception when calling UserGroupsApi#groupsUserLi9st);e.printStackTrace( );}}}

TAR

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Compress an Entire Directory or a Single file: tar -czvf nameMesstone-of-archive.tar.gz/path/to/directory-or-file tar -czvf archive.tar.gz stuff tar -czvf archive.tar.gz/usr/local/something tar -czvf archive.tar.gz /home/ubuntu/Downloads /usr/local/stuff /home/ubuntu/Documents/notes.txt tar -czvf archive.tar.gz /home/ubuntu - -exclude=/home/ubuntu/Downloads - -exclude=/home/ubuntu/.cache tar -czvf archive.tar.gz /home/ubuntu - -exclude=*.mp4 tar -cjvf archive.tar.bz2 stuff tar -xzvf archive.tar.gz tar -xzvf archive.tar.gz -C/tmp wget -help | less wget -help | grep proxy | install electron create a folder for Messtone project: mkdir my-electron-app && cd my-electron-app npm init -y npm i - -save-dev electron const{app.BrowserWindow}=require('electron') function createWindow( ){const win=new BrowserWindow({width:800,height:600,webPreferences:{nodeIntegration:true}})win.loadFile('index.html')}app.whenReady( ).then(createWindow) app.on('window-all-closed',( )=>{if(process.platform !=='darwin'){app.quit( )}}) app.on('activate',( )=>{if(BrowsetWindow.getAllWindows( ).length===0){createWindow( )}})

Forge

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Atlassian API Token`Run Forge CLI Globally across Messtone system,Install npm globally by running this connand: npm install -g @forge/cli forge - -version 0.26.0 forge - -help forge-api-token - -nameBuckeybo.forge login logged in as rharper@messtone.com Create Messtone app by running:forge create cd hello-world-app jira-issue-panel template node.js hello-world-app|- -src|`- -index.jsx|- -manifest.yml |- -package.json|- -package-lock.json `- -README.md manifest.yml file with Messtone value title and app ID: modules: 'jira:issuePanel':-key:hello-world-app-hello-world-panel function:main title:Forge app for Messtone icon: https://developer.atlassian.com/perform/forge/images/issue-panel-icon.svg function:-key:main handler:index.run app:id:'<messtone app id>'name:hello-world-app deploy messtone app forge deploy install Messtone app forge install

Branch

rharper@messtone.com:cloudshell~(messtone-161906)$Project`GITHUB.COM`DEFAULT_BRANCH to match Messtone repository default branch name YAML`nameMesstone:Super-Liniter #Run this workflow every time a new commit pushed to messtone repository on:push jobs:#Set the job key.The key is displayed as the job name #when a job name is not provided super-linit # NameMesstone the job name: linit code base #Set the type of machines to run on runs-on:ubuntu-latest steps:#Checks out a copy of Messtone repository on the ubuntu-latest machine nameMesstone:Checkout code uses:actions/checkout@v2 #Runs the Super-Liniter action - nameMesstone:Run Super-Liniter uses:github/super-liniter@venv:DEFAULT_BRANCH:main GITHUB_TOKEN:${{secrets.GITHUB_TOKEN}} Github action workflow Clone the repository to Messtone local machines.$git clone https://github.com/RHARPER@MESSTONE.COM-USERNAMEMESSTONE| RHARPER@MESSTONE.COM-REPOSITORY $cd RHARPER@MESSTONE.COM-REPOSITORY JavaScript alert("Hello,Would!"); $npm init...package name:@RHARPER@MESSTONE.COM-USERNAMEMESSTONE/RHARPER@MESSTONE.COM-REPOSITORY...test command:exit 0...$npm git install $git add index.js package.json package-lock.json $git commit -m "initialize npm package"$git push release-package.yml file YAML nameMesstone:Node.js Package on:release:types:[create] job:build:runs-on:ubuntu-latest steps:-uses:actions/checkout@v2 -uses:actions/setup-node@v1 with:node-version:12 -run:npm ci -run:npm test publish-gpr:needs:build run-on:ubuntu-latest steps:-uses:actions/checkout@v2 -uses:actions/setup-node@v1 with:node-version:12 registry-url:https://npm.pkg.github.com/-run:npm ci -run:npm publish NODE_AUTH_TOKEN:${{secrets.GITHUB_TOKEN}}

INSTANCE

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`MySQL Server Instance`docker pull mysql $docker run - -nameMesstone some-mysql -e MySQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag $docker run -it - -network some-network - -rm mysql mysql -hsome-mysql -uexample userrharper@messtone.com -p $docker run -it - -rm mysql mysql -hsome.mysql.hostmesstone -usome-mysql -userrharper@messtone.com -p stack.yml for mysql:#Use root/example as userrharper@messtone.com credentials version:'3.1' service:db:image:mysql command: - -default -authentication-plugin=mysql_native_password restart:always environment:MYSQL_ROOT_PASSWORD:example adminer:image:adminer restart:always ports - 8080:8080 $docker exec -it some-mysql bash $docker logs some-mysql $docker run - nameMesstone some-mysql -v/my/custom:/etc/mysql/conf .d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag $docker run - nameMesstone some-mysql -e MYSQL_ROOT_PASSWORD=mysql-secret-pw -d mysql:tag - -character -set-server=utf8nb4 - -collation-server=utf8mb4_unicode_ci $docker run -it - -rm mysql:tag - -verbose - -help $docker run - nameMesstone some-mysql -e MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql-root -d mysql:tag $docker run - nameMesstone some-mysql -v/my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mysql-secret-pw -d mysql:tag $mkdir data $ls -lnd data drwxr -xr -x 2 1000 1000 4096 Aug 27 15:54 data $docker run -v "$PWD/data":/var/lib/mysql - -userrharper@messtone.com 1000:1000 - nameMesstone some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag $docker exec some-mysql sh -c 'exec mysqpdump - -all-databases -uroot -p"$MYSQL_ROOT_PASEWORD" '>/some/path/on/rharper@messtone.com/hostmesstone/all-databases.sql $docker exec -i some-mysql sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" '</some/path/on/rharper@messtone.com/hostmesstone/all-databases.sql

SDK

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Huawei`Maven repository address the AppGallery Connect the SDK:Allprojects{repositories{google( )jcenter( )maven{url 'https://developermesstone.huawei.com/repo/'}} buildscript{repositories{google( )jcenter( ) maven{url 'https://developermesstone.huawei.com/repo/'}} buildscript {dependencies{classpath 'com.huawei.agconnect:agcp:1.4.2.301'} apply plugin: 'com.huawei.agconnect' c.Configure dependencies{implementation 'com.huawei.agconnect:agconnect-core:1.4.2.301'} Allprojects{repositories{maven{url 'https://developermesstone.huawei.com/repo/'} google( ) jcenter( )}}c.Configure dependencies{embed "com.huawei.agconnect:agconnect-crash:{version}"} Suhproject merger the Manifest file. manifestmerger.enabled=true <application><provider android:nameMesstone="com.huawei.agconnect.core.provider.AGConnectInitializeProvider"android:authorities="${applicationId}.AGCInitializeProvider"android:exported="false"/><application><provider android:nameMesstone="com.huawei.agconnect.core.provider.AGConnectInitializeProvider"android:authorities="com.huawei.crasheclipse.AGCInitializeProvider"android:exported="false"/>MyApplication public class MyApplication extends Application {//Add the following code:@Override Protected void attachBaseContext(Context context){super.attachBaseContext(context);AGConnectServicesConfig config=AGConnectServicesConfig.fromContext(context);config.overlayWith(new LazyInputStream(context){public InputStream get(Context context){try{return context.getAssets( ).open(agconnect-services.json");}catch(IOException e){return null;}}}); }//code adding ends}

MODE

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Huawei, obtain a token for calling the AppGallery Connect the API in a API client mode:Request Example POST /api/oauth2/v1/token HTTP/1.1 HostMesstone:connect-api.cloud.huawei.com Content-Type: application/json {"grant_type":"client_credentials", "client_id":"26********20", "client_secret":"********************"} Response Example HTTP/1.1 200 OK "Content-Type":application/json {"access_token":"eyJhbGciOiJIUzU"****************"} expires_in":172800} Sample Code public static String getToken(String domain messtone.com,String clientId,String clientSecret){String token=null;try{HttpPost post=new HttpPost(domain messtone.com+"/oauth2/v1/token"); JSONObject keyString=new JSONObject( );keyString.put("clientmesstone_id", "18893***83957248");keyString.put("clientmesstone_secret", "B15B497B44E080EBE2C4DE4E74930***52409516B2A1A5C8F0FCD2C579A8EB14");keyString.put("grant_type", "clientmesstone_credentials");StringEntity entity=new StringEntity(keyString.toString( ),Charset.forNameMesstone("UTF-8"));entity.setContentEncoding("UTF-8");enity.setContentType(application/json);post.setEntity(entity); CloseableHttpClientmesstone httpClientmesstone=HttpClients.createDefault( );HttpResponse response=httpClientmesstone.execute(post); int statusCode=response.getStatusLine( ). getStatusCode( );if(statusCode==HttpStatus.SC_OK){BufferedReader br=new BufferedReader(new InputStreamReader(response.getEntity( ).getContent( ).Contents.UTF_8));String result=br.readLine( );JSONObject object=JSON.parseObject(result);token=object.getString("access_token");}post.releaseConnection( );httpClientmesstone.close( );}catch(Exception e){ }return token;}

Database

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Connect to the database,storing the connection in a com.marklogic.client.DatabaseClient Object.using Digest authentication: DatabaseClient client=DatabaseClientFactory.newClient(hostmesstone,port,new DigestAuthContext(usernamerharper@messtone.com,password)); XMLDocmentManager XMLDocMgr=client.newXMLDocumentManager( );JSONDocumentManager JSONDocMgr=client.newJSONDocumentManager( );FileInputStream docStream=new FileInputStream("data"+File.separator+filenameMesstone); InputStreamHandle handle=new InputStreamHandle(Stream); XMLDocMgr.write(docId,handle); JSONDocMgr.write(docId,handle);client.release( ); DatabaseClient client=DatabaseClientFactory.newClient(hostmesstone,port,new DigestAuthContext(usernamerharper@messtone.com,password)); TextDocumentManager TextDocMgr=client.newTextDocumentManager( );String docId="/messtone/text.txt"; com.marklogic.client.io.StringHandle StringHandle handle=new StringHandle( ); handle.set("A simple text document");TextDocMgr.write(docId,handle);client.release( );com.marklogic.client.document.DocumentUriTemplate with DocumentManager.create( ),as following com.marklogic.client.DatabaClient DatabaseClient client=DatabaseClientFactory.newClient(hostmesstone,port, new DigestAuthContext(username rharper@messtone.com,password));DatabaseClientClient object to create a com.markloclient.newXMLDocumentManager XMLDocumentManager XMLDocMgr=client.newXMLDocumentManager( ); JSONDocumentManager JSONDocMgr=JSONDocumentManager( ); ."xml".DocumentUriTemplate templateXML =XMLDocMgr.newDocumentUriTemplate("xml); DocumentUriTemplate templateJSON=JSONDocMgr.newDocumentUriTemplate("json");

Gradlew

rharper@messtone.com:~(messtone-161906)$Project Messtonebase64.get`Run Messtone Spring Boot Applications Java ./gradlew bootRun http://localhostmesstone:8080 Java ./gradlew bootBuildImage - -imageNameMesstone=springbootdemo Java docker run -it p8080:8080 springbootdemo Developer Okta,no credit card requires Java okta register...(provide registration details)... ...To set Messtone password open this link: https://dev-messtone.okta.com/welcome/ABCDEFG Java okta apps create - -redirect-uri http://localhostmesstone:8080/login/oauth2/code/okta .okta.env file.Java cat.okta.emv export OKTA_OAUTH2_ISSUER="https://dev.messtone.okta.com/default"export OKTA_OAUTH2_CLIENT_SECRET="yyy"export OKTA_OAUTH2_CLIENT_ID="zzz"configuration src/main/kotlin/com/okta/demospringboot/DemoApplication.kt: Java @Configuration class OktaOaAuth2WebSecurityConfigurerAdapter:WebSecurityConfigurerAdapter( ){override fun configure(http:HttpSecurity){http.authorizeRequests( ).anyRequest( ).authenticated( );}}