1 | DROP PROCEDURE InsertRandomRecords; |
1 | DELIMITER $$ |
To generate 1,000,000 draft orders:
1 | CALL InsertRandomRecords(1000000); |
1 | DROP PROCEDURE InsertRandomRecords; |
1 | DELIMITER $$ |
To generate 1,000,000 draft orders:
1 | CALL InsertRandomRecords(1000000); |
With latest Node.js 6.x.x installed, then install serverless globally:
1 | $ npm install serverless -g |
Create a AWS Lambda skeleton project with serverless:
1 | $ mkdir serverless-example && cd $_ |
For AWS user “ec2-user”, now need to have some policies with permissions to let “serverless” create role, Lambda function and deployment it …
Lambda function role created after Lambda function added and deployed into AWS.
Make sure AWS environment has been set up, including access key, user, group, policies …
Pack and deploy Lambda example into AWS:
1 | $ sls deploy -r ap-southeast-2 -s dev |
A “hello” Lambda function has been created in Lambda after it’s deployed into AWS by “serverless”.
Deployment events generated during Lambda “hello” function deployed into AWS.
Manually create a Lambda Trigger. This time we use AWS API Gateway to trigger / invoke Lambda “hello” function.
After Lambda Trigger created, an exposed RESTful interface for Lambda “hello” function.
Set up AWS API Gateway trigger for Lambda “hello” function. Go to url, e.g.:
Function “hello” log:
1 | { |
1 | package org.paradise.function; |
1 | package org.paradise.function; |
1 | package org.paradise.function; |
1 | package org.paradise.function; |
Enable JVM option to attach a remote debugger:
1 | $ export JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 |
“suspend” set to “y” is to let remote debugger start loading the application.
Now, start running Tomcat. JVM debugging port is bound on port 5005i on the machine runs on Tomcat.
Next, set up SSH tunnel mirror remotei host (ip-10-213-79-77.ap-southeast-2.compute.internal) 5005 port to localhost on port 5005. For example:
1 | $ ssh -L 5005:ip-10-213-79-77.ap-southeast-2.compute.internal:5005 -l ec2-user ip-10-213-79-77.ap-southeast-2.compute.internal |
You can start remote debugging in IDE like IntelliJ and debug the code since.
AngularJS is going to continue to succeed for some time. But change is inevitable.
Web Components are coming.
WebComponents create the ability to do all the sorts of markup-driven programming like AngularJS, ReactJS, but less ecosystem dependent. Because DOM is integration point for all the kinds of JavaScript frameworks. Web Components make it MUCH easier to interoperate between components.
The future isn’t here yet, but it will change fundamental assumptions about how a JavaScript framework should act and what it should be responsible for. Those shifts in assumptions frequently cause frameworks will drop out of the ecosystem quickly than expected.
Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher.
1 | - Antoine de saint Exupery |
It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove.
Make sure Nexus Repository has been setup with Self Signed certificate, certificate for host/server e.g. “silencer.bigpond”.
The following instructions have been successfully tested in Nexus version 3.2.0-01.
Now this approach supports docker pull and docker push.
Work around with “x509: certificate signed by unknown authority“ error by adding “–disable-content-trust” option on docker push command line if Docker doesn’t accept Self-Signed certificate.
1 | 𝜆 keytool -printcert -rfc -sslserver silencer.bigpond:8444 > silencer.bigpond.pem |
1 | 𝜆 screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty |
Inside Docker Virtual Machine, follow these steps:
1 | $ sudo cat silencer.bigpond.pem >> /etc/ssl/certs/ca-certificates.crt |
1 | 𝜆 keytool -printcert -rfc -sslserver silencer.bigpond:8444 > silencer.bigpond.pem |
Inside Docker Virtual Machine, follow these steps:
1 | $ sudo cat silencer.bigpond.pem >> /etc/ssl/certs/ca-certificates.crt |
Press Ctrl + D and Ctrl + D to exist SCREEN program. Type “screen -r” to re-entry SCREEN program.
Download 3rd party Repository server’s certificate. Use tool like KeyStore Explorer to add 3rd party server certificates into existing keystore.jks. Due to a certificate chain that does not exist within the existing Java truststore, Java does not trust the certificate and fails to connect to the application.
1 | 𝜆 docker login silencer.bigpond:18443 |
1 | 𝜆 docker search silencer.bigpond:18443/tomcat |
1 | 𝜆 docker login silencer.bigpond:18444 |
1 | 𝜆 docker build -t jtech/camel-spring:latest . |
1 | 𝜆 docker push --disable-content-trust silencer.bigpond:18444/jtech/camel-spring:latest |
On a Mac at home, with Bigpond internet access. Full host name is silencer.bigpond and IP Address is 10.0.0.9.
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc/ssl |
OR run “nslookup 127.0.0.1” return full domain hostname e.g. “localhost.bigpond”.
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc/ssl |
Now, with latest Nexus (version 3.2.0-01) you can use self-signed server certificate without specifying IP address.
1 | terrence@Silencer /usr/local/nexus-3.2.0-01/etc/ssl |
Change jetty-https.xml file:
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc |
Add SSL port and include jetty-https.xml in file:
1 | terrence@Silencer /Applications/nexus-3.0.0-03/etc |
Retrieve server’s certificate
1 | 𝜆 keytool -printcert -rfc -sslserver silencer.bigpond:8444 > silencer.bigpond.pem |
To get another Source Code Repository server’s certificate
1 | 𝜆 keytool -printcert -rfc -sslserver bitbucket.cd.paradise.org:443 > bitbucket.cd.paradise.org.pem |
Restart Nexus and access: https://localhost:8444
1 | > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target |