Saturday, May 21, 2016

Upload HTTPS Cert to Cloudfront

23:28:23 ~/data/dronze/keys $ aws iam upload-server-certificate \
   --server-certificate-name dronze.com --certificate-body file://dronze_com_crt.pem \
   --private-key file://dronze_com.key --certificate-chain file://dronze_com.ca-bundle \
   --path /cloudfront/production/
{
    "ServerCertificateMetadata": {
        "ServerCertificateId": "ASCAIDAGVOZBPZ6VJTK7A",
        "ServerCertificateName": "dronze.com",
        "Expiration": "2017-05-22T23:59:59Z",
        "Path": "/cloudfront/production/",
        "Arn": "arn:aws:iam::705212546939:server-certificate/cloudfront/production/dronze.com",
        "UploadDate": "2016-05-22T06:30:39.224Z"
    }
}

Tuesday, May 03, 2016

How to set your log4j2 file to support the lambda appender.

Add to your gradle config:

compile 'com.amazonaws:aws-lambda-java-log4j:1.0.0'
and How to set your log4j2 file to support the lambda appender.



Monday, May 02, 2016

Allowing profiles to be passed to bootRun

Allowing profiles to be passed to bootRun


$ ./gradlew bootRun -PjvmArgs="-Dspring.profiles.active=docker"

Spring Profiles

Spring Profiles

Spring Profiles provide a way to segregate parts of your application configuration and make it only available in certain environments. Any@Component or @Configuration can be marked with @Profile to limit when it is loaded:
@Configuration
@Profile("production")
public class ProductionConfiguration {

    // ...

}
In the normal Spring way, you can use a spring.profiles.active Environment property to specify which profiles are active. You can specify the property in any of the usual ways, for example you could include it in your application.properties:
spring.profiles.active=dev,hsqldb
or specify on the command line using the switch --spring.profiles.active=dev,hsqldb.