tag:blogger.com,1999:blog-43676141385660228602024-02-19T12:08:09.724-05:00OpenBedrockA blog about Bedrock web development, the cloud, Perl and whatever else might come to mind about technology or programming.Unknownnoreply@blogger.comBlogger73125tag:blogger.com,1999:blog-4367614138566022860.post-37953042208067872692019-02-26T00:00:00.000-05:002019-02-26T05:38:22.393-05:00AWS Lambda & Perl/Vendoring Libraries - A Case Study w/Image::Magick (Part II)<a href="https://imagemagick.org/image/logo.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="767" data-original-width="800" height="191" src="https://imagemagick.org/image/logo.png" width="200" /></a><a href="https://openbedrock.blogspot.com/2019/02/aws-lambda-perlvendoring-libraries-case.html" target="_blank">In my last blog, I showed how to create a zipfile that contains a working Image Magick Perl environment you can use when creating Perl Lambdas.</a><br />
<br />
<i>This is part two of a two part blog that discusses how to package libraries for your Perl Lambdas.</i><br />
<a href="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="191" src="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png" /></a>If you recall, in my last blog we created a Docker image and installed the Perl module <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span> by downloading and compiling the latest Image Magick source code. The trick it seemed was to make sure that the environment had no conflicting Image Magick include files. We also used the <span style="font-family: "courier new" , "courier" , monospace;">--with-perl</span> flag to install build PerlMagick rather than using <span style="font-family: "courier new" , "courier" , monospace;">cpanm</span> to download install it from CPAN.<br />
<br />
In order to make <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span> work in the Lambda runtime environment, you'll need one more ingredient - <b><i>the shared libraries specifically used by the Image Magick Perl module</i></b> and possibly any shared libraries used by Image Magick shared libraries.<br />
<br />
When Image Magick was built in our Docker image, the shared libraries were installed to <span style="font-family: "courier new" , "courier" , monospace;">/usr/local/lib</span>. To use Image Magick with Lambda you'll need these shared libraries installed, in the Lambda runtime environment but you won't be able to install them to <span style="font-family: "courier new" , "courier" , monospace;">/usr/local/lib</span>. Using Lambda Layers however you <i>can</i> install libraries to <span style="font-family: "courier new" , "courier" , monospace;">/opt/lib</span>. In the Lambda execution environment <span style="font-family: "courier new" , "courier" , monospace;">LD_LIBRARY_PATH </span>(one of the places where the dynaloader <span style="font-family: "courier new" , "courier" , monospace;">ld</span> will look for shared libraries) points to <span style="font-family: "courier new" , "courier" , monospace;">/opt/lib</span>.<br />
<br />
From the Docker recipe in my previous blog, one of of the last steps is to copy the files created during the Image Magick build to<span style="font-family: "courier new" , "courier" , monospace;"> /opt/lib</span>. I've copied all of the files from the build into <span style="font-family: "courier new" , "courier" , monospace;">/opt/lib</span> however I believe that the Perl module only uses the <span style="font-family: "courier new" , "courier" , monospace;">libMagickCore-6.Q16.so.6.0.0</span>.<br />
<br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;">RUN mkdir /opt/lib; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> cp /usr/local/lib/libMagickCore-6.Q16.so.6.0.0 /opt/lib; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ln -s /opt/lib/libMagickCore-6.Q16.so.6.0.0 /opt/lib/libMagickCore-6.Q16.so; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ln -s /opt/lib/libMagickCore-6.Q16.so.6.0.0 /opt/lib/libMagickCore-6.Q16.so.6; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> cp /usr/local/lib/libMagickWand-6.Q16.so.6.0.0 /opt/lib; \ </span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ln -s /opt/lib/libMagickWand-6.Q16.so.6.0.0 /opt/lib/libMagickWand-6.Q16.so.6; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ln -s /opt/lib/libMagickWand-6.Q16.so.6.0.0 /opt/lib/libMagickWand-6.Q16.so; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> cp /usr/local/lib/libMagick++-6.Q16.so.8.0.0 /opt/lib; \ </span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ln -s /opt/lib/libMagick++-6.Q16.so.8.0.0 /opt/lib/libMagick++-6.Q16.so.8; \</span><br />
<span style="background-color: white; font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ln -s /opt/lib/libMagick++-6.Q16.so.8.0.0 /opt/lib/libMagick++-6.Q16.so;</span><br />
<br />
To see what shared libraries we need we use <span style="font-family: "courier new" , "courier" , monospace;">ldd</span>. First, let's find the shared object that was built for the Perl module.<br />
<div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">bash-4.2# locate Magick | grep perl</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/Image/Magick</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/Image/Magick.pm</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/Image/Magick/Q16.pm</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/auto/Image/Magick</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/auto/Image/Magick/.packlist</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/auto/Image/Magick/Q16</span></div>
<div>
<span style="background-color: yellow; font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/auto/Image/Magick/Q16/Q16.so</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/auto/Image/Magick/Q16/autosplit.ix</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">/usr/local/share/doc/ImageMagick-6/www/perl-magick.html</span></div>
</div>
<div>
<br /></div>
<div>
Next, let's see what shared libraries it requires.</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">bash-4.2# ldd /opt/perl-5.28.1/lib/site_perl/5.28.1/x86_64-linux/auto/Image/Magick/Q16/Q16.so</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> linux-vdso.so.1 => (0x00007fffd1db8000)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> <span style="background-color: yellow;">libMagickCore-6.Q16.so.6 => /tmp/ImageMagick-6.9.10-28/PerlMagick/quantum/../../magick/.libs/libMagickCore-6.Q16.so.6 (0x00007ff1d351b000)</span></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> libm.so.6 => /lib64/libm.so.6 (0x00007ff1d3219000)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> libc.so.6 => /lib64/libc.so.6 (0x00007ff1d2e4c000)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> liblcms2.so.2 => /usr/lib64/liblcms2.so.2 (0x00007ff1d2bf4000)</span></div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> ...</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><br /></span></div>
<div>
This produces a rather lengthy list of shared librararies with l<span style="font-family: "courier new" , "courier" , monospace;">ibMagickCore-Q16.so.6</span> near the top. In general, when building libraries to include in your Lambda Layers, you'll need to identify the shared libraries that do not exist in the standard Lambda runtime and copy those to the <span style="font-family: "courier new" , "courier" , monospace;">/opt/lib</span> directory. In this case, only the one shared library was not found on the standard runtime. I've actually copied more of the Image Magick libraries that are built than is necessary for <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span>, to work in my Docker recipe, however there may be other utilities I may want to take advantage of in the future that require those, therefore it made sense to copy of all of them.</div>
<div>
<br /></div>
<div>
For example, if I want to use the version of the Image Magick <span style="font-family: Courier New, Courier, monospace;">convert</span> utility that was built from source, I would copy that from <span style="font-family: "courier new" , "courier" , monospace;">/usr/local/bin</span>. Taking a look at that binary, we find it also requires <span style="font-family: "courier new" , "courier" , monospace;">libMagickCore-6.Q16.so.6</span> along with <span style="font-family: "courier new" , "courier" , monospace;">libMagickWand-6.Q16.so.6</span>.</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">bash-4.2# /usr/local/bin/convert --version</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">Version: ImageMagick 6.9.10-28 Q16 x86_64 2019-02-24 https://imagemagick.org</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">Copyright: © 1999-2019 ImageMagick Studio LLC</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">License: https://imagemagick.org/script/license.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">Features: Cipher DPC OpenMP</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">Delegates (built-in): bzlib fontconfig freetype gslib jng jpeg lcms lzma png ps tiff x xml zlib</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">bash-4.2# ldd /usr/local/bin/convert | grep -i magick</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> libMagickCore-6.Q16.so.6 => /usr/local/lib/libMagickCore-6.Q16.so.6 (0x00007f2075897000)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"> libMagickWand-6.Q16.so.6 => /usr/local/lib/libMagickWand-6.Q16.so.6 (0x00007f207556d000)</span></div>
</div>
<div>
<br /></div>
<div>
Now with a Lambda Layer that contains Perl 5.28.1, <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span> and its shared libraries we're ready to proceed to the next task in creating our Lambda that interprets QR codes. Next time - <i>Building and Installing the zbar Library</i>. </div>
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-18480084745219051682019-02-25T00:00:00.000-05:002019-02-25T05:43:46.884-05:00AWS Lambda & Perl/Vendoring Libraries - A Case Study w/Image::Magick (Part I)<a href="https://imagemagick.org/image/logo.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="767" data-original-width="800" height="191" src="https://imagemagick.org/image/logo.png" width="200"></a>Now here's where things get interesting.<br>
<br>
<i>This is a two part blog that discusses how to package libraries for your Perl Lambdas.</i><br>
<br>
So you'd like to use <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span> in your Perl Lambda? And you thought you would just <span style="font-family: "courier new" , "courier" , monospace;">use Image::Magick</span>? Or perhaps you were smarter than that because you are using a Lambda Layer and have Perl 5.28.1 installed, so you thought might just install it via your Perl 5.28.1 Docker image that mimics the Lambda runtime environment using <span style="font-family: "courier new" , "courier" , monospace;">cpanm</span>? Well, not so fast...<br>
<a href="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="191" src="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png"></a><br>
The first challenge is installing <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span>, the next challenge is actually running it in your Lambda. Spoiler alert...both of these challenges are possible to overcome! In part 1 we'll install <span style="font-family: "courier new" , "courier" , monospace;">Image::Magick</span>.<br>
<div>
<br></div>
<br>
<a href="http://openbedrock.blogspot.com/2019/02/aws-lambda-perlvendoring-libraries-case.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-80751809873500631092019-02-24T10:17:00.003-05:002019-02-25T09:19:55.502-05:00AWS Lambda & Perl - Using Docker to Build Lambda Layers<div class="separator" style="clear: both; text-align: center;">
<a href="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="191" src="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png"></a></div>
As the Perl Lambda adventure continues, I'm learning more about the Perl toolchain, Lambdas and Docker. After running into an issue with OpenSSL versioning on the <i>supposed </i>AMI that AWS documents as being the official Lambda execution environment <b><i>it appears that it is not</i></b>.<br>
<br>
What does appear to be true is that the image is <i><b>similar</b></i> to the runtime environment. For a truer representation of the Lambda runtime there is a Docker image <b><i>lambci/lambda</i> </b>that has proven to be a closer representation of the Lambda runtime environment. In a previous post I noted that the version of OpenSSL on the AMI is 1.0.2 while the Lambda runtime environment version is 1.0.1. The Docker image has OpenSSL version 1.0.1 installed, so empirically the Docker image does appear to be similar to the Lambda execution environment. Why is this important?<br>
<a href="http://openbedrock.blogspot.com/2019/02/aws-lambda-perl-using-docker-to-build.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-4472258751966958552019-02-21T09:45:00.003-05:002019-02-22T03:13:41.219-05:00AWS Lambda & Perl - The Journey Begins<div class="separator" style="clear: both; text-align: center;">
<a href="https://upload.wikimedia.org/wikipedia/en/thumb/f/f5/Programming_Perl_4th_Ed_cover.png/220px-Programming_Perl_4th_Ed_cover.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="288" data-original-width="220" src="https://upload.wikimedia.org/wikipedia/en/thumb/f/f5/Programming_Perl_4th_Ed_cover.png/220px-Programming_Perl_4th_Ed_cover.png"></a></div>
Perl has been the odd man out as more <i>modern</i> programming languages take hold and gain the support of the software development community. There is no doubt that Perl 5 has been left in the dust with regard to support from vendors of all kinds. It is rare to see an API written for Perl for any of the cloud services. It seems to be left up to the Perl community itself to provide support for many of these APIs.<br>
<br>
A few weeks ago I released <a href="https://github.com/rlauer6/perl-Amazon-Lambda-Runtime" target="_blank">version 0.0.1 of a framework for creating AWS Lambdas in Perl</a>. It is a challenge to continue to develop in Perl and becomes more and more challenging as other languages continue to gain support, however I don't think the Perl community is giving up. While I'm quite willing to learn Python and embrace new methods, I also see the need for supporting legacy environments with a large investment in Perl code. I also enjoy a challenge. :-)<br>
<br>
<a href="http://openbedrock.blogspot.com/2019/02/aws-lambda-perl-journey-begins.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-77033665204499044102019-02-19T21:33:00.000-05:002019-02-25T12:29:05.242-05:00AWS Lambda Gotchas - libcrypt.so.10 Hell and Back<div class="separator" style="clear: both; text-align: center;">
<a href="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="191" src="https://d1.awsstatic.com/Digital%20Marketing/House/PAC/2up/PAC-Q4_House-Ads_Lambda_2up.62dc7e19b7b2e0a2c06821594c31f1ce00a6bdda.png"></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://upload.wikimedia.org/wikipedia/en/e/e0/Programming-republic-of-perl.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="97" data-original-width="97" src="https://upload.wikimedia.org/wikipedia/en/e/e0/Programming-republic-of-perl.png"></a></div>
This is part of continuing series of blog posts regarding <a href="https://openbedrock.blogspot.com/2019/02/aws-lambda-perl-journey-begins.html" target="_blank">AWS Lambda and Perl</a>.<br>
<br>
As I continue my deep dive into making Perl work effectively as a Lambda runtime, I hit the <i>libcrypto</i> wall that so many other people <i>on the wire</i> have encountered...even Pythonistas!<br>
<br>
<a href="http://openbedrock.blogspot.com/2019/02/aws-lambda-gotchas-libcryptso10-hell.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-74022571684916592292019-02-17T15:51:00.000-05:002019-02-18T03:00:35.052-05:00CodeBuild 2019 or "How I built perl for less than 3 cents"<div class="separator" style="clear: both; text-align: center;">
<a href="https://s3.amazonaws.com/apnblog/2016+Blog+Images/Stelligent+Guest+Post/Updates/rsz_figure_3_.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="693" height="152" src="https://s3.amazonaws.com/apnblog/2016+Blog+Images/Stelligent+Guest+Post/Updates/rsz_figure_3_.png" width="320"></a></div>
This is my second (or third) dalliance with <a href="https://aws.amazon.com/codebuild/" target="_blank">AWS CodeBuild</a>. I think I'm starting to like it now though. I recently wrote a bash script to compile a version of perl to create Lambdas as part of my Perl Lambda project. My so-called <a href="https://raw.githubusercontent.com/rlauer6/perl-Amazon-Lambda-Runtime/master/make-a-perl" target="_blank">`make-a-perl` script</a> will <b>instantiate an EC2</b>, <b>download the perl source code</b>, <b>compile it</b>, <b>zip it up</b> and <b>copy it to an S3 bucket</b>.<br>
<br>
I suspected I could use AWS CodeBuild to do all of the aforementioned operations, but did not want to descend down the CodeBuild rabbit hole once more. But alas, the temptation was just too much!<br>
<br>
<a href="http://openbedrock.blogspot.com/2019/02/codebuild-2019-or-how-i-built-perl-for.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-88912215267528574932018-06-10T09:44:00.000-04:002018-06-10T09:44:47.425-04:00RPM Virtual Packages and OrderingI recently decided to use an RPM virtual package (one that offers no files but merely Requires others) in order to lock down the version of packages that were being installed when an EC2 was provisioned. Much to my chagrin it failed miserably when yum loaded packages in an unexpected order. So, can you tell yum what order to load your RPMs?<br>
<br>
<a href="http://openbedrock.blogspot.com/2018/06/rpm-virtual-packages-and-ordering.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-1428647032992086172017-06-28T09:23:00.000-04:002017-06-28T09:27:24.400-04:00Binding parameters for Oracle INTERVAL LiteralsIf you've ever tried to use the Perl DBI to execute a SQL statement like this:<br>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br></b></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b>select sysdate + interval '1' month from dual</b></span><br>
<br>
...and wanted to make the interval a parameter, you may have tried various permutations, gotten frustrated and just injected a string into the query. There is a solution...<br>
<a href="http://openbedrock.blogspot.com/2017/06/binding-parameters-for-oracle-interval.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-11547061499726423672017-03-14T18:40:00.001-04:002017-03-15T08:56:47.350-04:00AWS CodeBuild - HowTo<div class="separator" style="clear: both; text-align: center;">
<a href="http://docs.aws.amazon.com/codebuild/latest/userguide/images/arch.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="276" src="https://docs.aws.amazon.com/codebuild/latest/userguide/images/arch.png" width="400"></a></div>
<a href="http://docs.aws.amazon.com/codebuild" target="_blank">Amazon Web Services' CodeBuild</a> is a managed service that allows developers to build projects from source.<br>
<br>
Typically CodeBuild is used as part of your CI/CD pipeline, perhaps along with other AWS tools like CodeCommit, CodePipeline and CodeDeploy.<br>
<br>
This blog will explore the use of CodeBuild to build the Bedrock project and update a yum repository. Along the way I'll detail some of the things I've learned and the path I took to automating the Bedrock build.<br>
<br>
<a href="http://openbedrock.blogspot.com/2017/03/aws-codebuild-howto.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-83552777137538753952017-03-12T14:00:00.002-04:002017-03-14T18:41:58.650-04:00AWS CodeBuild and why I have no hair left<div class="separator" style="clear: both; margin-right: 25px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVq-1PHJkMIUMvQqMn2AH5JXj82_wtyASr_JMwQwE7tCyGAZWZUFC9PnWYZZax-vqYZqfOiFLocCqfSguLnDQPs9zSxX-NG4GBkImLylB-eoSjz-hF9nIsZ6zZ3472SEFHmH7YnNBAgXo/s1600/hair-pulling.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVq-1PHJkMIUMvQqMn2AH5JXj82_wtyASr_JMwQwE7tCyGAZWZUFC9PnWYZZax-vqYZqfOiFLocCqfSguLnDQPs9zSxX-NG4GBkImLylB-eoSjz-hF9nIsZ6zZ3472SEFHmH7YnNBAgXo/s200/hair-pulling.jpeg" width="200" /></a></div>
<a href="http://openbedrock.blogspot.com/2017/03/aws-codebuild-howto.html" target="_blank">I'll blog soon about AWS CodeBuild</a> and CodePipeline when I get around to documenting all of my frustrations but for now, to save some poor souls from losing their hair, here are some quick tips:<br />
<br />
<br style="clear: both;" />
<ol>
<li>CodeBuild is not very helpful regarding malformed YAML in your <span style="font-family: "courier new" , "courier" , monospace;">buildspec.yml</span> file. If things don't work, check to make sure your <span style="font-family: "courier new" , "courier" , monospace;">buildspec.yml</span> file is well formed.</li>
<li>As if that were not bad enough, even if it is well formed, if you include elements it does not recognize it might just skip them silently. I inadvertently used <span style="font-family: "courier new" , "courier" , monospace;">pre-build</span> instead of <span style="font-family: "courier new" , "courier" , monospace;">pre_build</span> and lost some hair on that one.</li>
<li>As verified in this <a href="https://alexbilbie.com/2016/12/codebuild-codepipeline-update-jekyll-website/" target="_blank">blog post</a>, CodeBuild will not upload artifacts to the root of a bucket - it really wants a folder name. Odd really, since S3 objects have key names and folders do not really exist. I was trying to create a yum repository in a bucket that is hosting a website and wanted my files to in the root of the bucket. No can do pal.</li>
<li>If you want to sync some files to said website bucket and are making the site publicly available by setting permissions as I was using the CLI, you'll need to make sure that your CodeBuild policy that is attached to the role you use to run CodeBuilder has the proper permissions to your S3 <span style="font-family: inherit;">bucket. In this case you'll need </span><span style="font-family: "courier new" , "courier" , monospace;">ListObject, PutObject,</span><span style="font-family: inherit;"> </span><span style="font-family: "courier new" , "courier" , monospace;">GetObject,</span><span style="font-family: inherit;"> and </span><span style="font-family: "courier new" , "courier" , monospace;">PutObjectAcl</span>. Here's what the policy might look like:</li>
</ol>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">{</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Version": "2012-10-17",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Statement": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Effect": "Allow",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Resource": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:logs:us-east-1:*********:log-group:/aws/codebuild/bedrock-build",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:logs:us-east-1:*********:log-group:/aws/codebuild/bedrock-build:*"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ],</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Action": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "logs:CreateLogGroup",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "logs:CreateLogStream",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "logs:PutLogEvents"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ]</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> },</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Effect": "Allow",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Resource": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:s3:::codepipeline-us-east-1-*"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ],</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Action": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "s3:PutObject",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "s3:GetObject",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "s3:GetObjectVersion"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ]</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> },</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> {</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Effect": "Allow",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Resource": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:s3:::openbedrock",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:s3:::openbedrock/*",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:s3:::repo.openbedrock.net",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "arn:aws:s3:::repo.openbedrock.net/*"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ],</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Action": [</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "s3:Put*",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "s3:Get*",</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "s3:List*"</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ]</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> }</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> ]</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span></div>
</div>
<div>
<br /></div>
<div>
<div>
More about my adventures with CodeBuild and CodePipeline later...</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-31764191299232435162016-12-30T06:00:00.000-05:002017-08-29T10:34:25.570-04:00Follow-up: Using AWS Simple Email Service (SES) for Inbound Mail<a href="http://openbedrock.blogspot.com/2016/12/using-aws-simple-email-service-ses-for.html">As I alluded to in my first post on this subject,</a> it's possible to use AWS Lambda to process mail you receive as well. In this final post on AWS Simple Email Service, I'll show you how to forward your email using a Lambda function.<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/follow-up-using-aws-simple-email.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-48909811414303416962016-12-29T12:42:00.000-05:002016-12-29T13:05:49.346-05:00Part 2: Using AWS Simple Email Service (SES) for Inbound Mail<div class="separator" style="clear: both; text-align: center;">
</div>
<br>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://s.yimg.com/uu/api/res/1.2/W8NFSE35yIoxH5HSDB7HUA--/aD0xNjI2O3c9MjQxMjtzbT0xO2FwcGlkPXl0YWNoeW9u/http://media.zenfs.com/en_us/News/ap_webfeeds/625aa5d5e97c4b24ab25ac65cb3e6917.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="215" src="https://s.yimg.com/uu/api/res/1.2/W8NFSE35yIoxH5HSDB7HUA--/aD0xNjI2O3c9MjQxMjtzbT0xO2FwcGlkPXl0YWNoeW9u/http://media.zenfs.com/en_us/News/ap_webfeeds/625aa5d5e97c4b24ab25ac65cb3e6917.jpg" width="320"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Delete, delete, delete, delete, forward...</td></tr>
</tbody></table>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/using-aws-simple-email-service-ses-for.html">In part one of my two part blog</a> on Amazon's Simple Email Service, we set up the necessary resources to receive and process inbound email. In part two, we'll create a worker that reads an SQS queue and forwards the mail to another email address.<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/part-2-using-aws-simple-email-service.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-58506580080391823852016-12-18T15:28:00.001-05:002016-12-18T23:01:34.290-05:00Using AWS Simple Email Service (SES) for Inbound Mail<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://s.yimg.com/uu/api/res/1.2/W8NFSE35yIoxH5HSDB7HUA--/aD0xNjI2O3c9MjQxMjtzbT0xO2FwcGlkPXl0YWNoeW9u/http://media.zenfs.com/en_us/News/ap_webfeeds/625aa5d5e97c4b24ab25ac65cb3e6917.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="215" src="https://s.yimg.com/uu/api/res/1.2/W8NFSE35yIoxH5HSDB7HUA--/aD0xNjI2O3c9MjQxMjtzbT0xO2FwcGlkPXl0YWNoeW9u/http://media.zenfs.com/en_us/News/ap_webfeeds/625aa5d5e97c4b24ab25ac65cb3e6917.jpg" width="320"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Oy! Good thing no one else can see THIS message!</td></tr>
</tbody></table>
We all know what a pain in the rump it is to setup, manage, and secure an inbound mail server. It's a thankless job that is increasingly the point of attack for bad guys. It's also possible that if you screw it up you might find yourself in front of Congress!<br>
<br>
In our architectures, now more than ever, it is important to reduce the surface area for attacks. That means closing down as many access points to your network as possible. SMTP running on port 25 is a gaping hole that most architects interested in securing their networks want turned off, <b><i>like yesterday!</i></b><br>
<br>
If you don't want to completely outsource your inbound mail to a managed service, AWS SES inbound email service is one way to have your cake and eat it too. It's especially useful if you want to allow your application to receive mail but you don't necessarily want or need to host an email service that includes an IMAP or POP server. You may only need to receive mail in which case AWS SES is the perfect solution. Along with a scalable managed service, SES also includes spam filtering capabilities.<br>
<br>
In this <b>two part blog</b>, we'll explore setting up a simple inbound mail handler for <span style="font-family: "courier new" , "courier" , monospace;">openbedrock.ne</span>t using Amazon Web Services Simple Email Service (SES).<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/using-aws-simple-email-service-ses-for.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-3951840815131028512016-12-17T11:36:00.001-05:002016-12-17T16:15:26.040-05:00Using AWS S3 as a Yum RepositoryIn an<a href="http://openbedrock.blogspot.com/2016/04/creating-yum-repository-using-aws-s3.html"> earlier post I described how you can use an S3 bucket to host a yum repository</a>. In this post we'll give the repository a friendlier name and create an index page that's a tad more helpful. If you're not using AWS S3 and CloudFront to host your static assets, you might want to consider looking into this simple to use solution for running a website without having to manage a webserver.<br>
<br>
Visit <a href="http://repo.openbedrock.net/">http://repo.openbedrock.net</a> to see the final product.<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/using-aws-s3-as-yum-repository.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-19162300426612263432016-12-05T09:15:00.000-05:002016-12-05T15:47:28.788-05:00AWS re:Invent - Wrap Up<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgio8CZVa4AK9sWQEu6m_iHELmjLSkvybV2K41VHBskvqnUzu-j1H3ZWo19gy-5nmKxamTJJge5Ev-Z9Md2Lje8QlkrKdVPK9sgHRUkvOVDXNQjX2M87p8qxBWoEHyzud9eQmJ_0zbg82Q/s1600/aa-plane.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgio8CZVa4AK9sWQEu6m_iHELmjLSkvybV2K41VHBskvqnUzu-j1H3ZWo19gy-5nmKxamTJJge5Ev-Z9Md2Lje8QlkrKdVPK9sgHRUkvOVDXNQjX2M87p8qxBWoEHyzud9eQmJ_0zbg82Q/s200/aa-plane.jpeg" width="200"></a></div>
It's Friday, I'm blogging at 33,000 feet and the captain has just turned off the seat belt signs, informed us that it's 50 degrees back at our <b><i>final destination</i></b>, Philadelphia, Pennsylvania and directed us to <i>just sit back and relax</i>. I get very nervous when the captain of a plane flying at 33,000 feet tells me my <i><b>final destination</b></i> is Philadelphia. I'm hoping to do a few more trips to <a href="https://reinvent.awsevents.com/">AWS re:Invent</a> before my <i><b>"final destination</b>" </i>arrives.<br>
<br>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=tecjunmus-20&marketplace=amazon&region=US&placement=B01D5719CW&asins=B01D5719CW&linkId=05140382ebb09906341d6bb490a9314f&show_border=true&link_opens_in_new_window=true&price_color=333333&title_color=0066c0&bg_color=ffffff" style="float: right; height: 240px; padding-left: 10px; width: 120px;">
</iframe>
CloudBlogging (pun intended) about my 5 days at one of the <b><i>most important cloud computing events each year</i></b> thanks to my Acer Chromebook and my free GoGo Inflight passes. I still have 6 left of the 12 I received <a href="http://openbedrock.blogspot.com/2013/11/acer-chromebook-c720-review.html">when I purchased the C720 nearly three years</a> ago prior to attending my second AWS re:Invent extravaganza. Wifi at 33,000 feet is spotty but it is possible to complete a blog post on a 5 hour trip across the country.<br>
<br>
No blog here would be complete without a shameless plug (I promise this is the only plug in the blog) for Chromebooks - #LoveMeSomeChromebook.
<br>
<br>
If you haven't read the rest of this somewhat tantalizing series on AWS re:Invent <a href="http://openbedrock.blogspot.com/2016/11/aws-reinvent-day-1.html">start here.</a> I'll wrap up the blog series with a recap of the week's highlights, opine a bit and provide you with some of the key takeaways. Enjoy!<br>
<a href="http://openbedrock.blogspot.com/2016/12/aws-reinvent-wrap-up.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-74428213539954463272016-12-02T10:47:00.002-05:002016-12-03T15:02:18.045-05:00AWS re:Invent Day 5<div class="separator" style="clear: both; text-align: center;">
</div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://blogs-images.forbes.com/janakirammsv/files/2016/12/werner-reinvent.jpg?width=960" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="http://blogs-images.forbes.com/janakirammsv/files/2016/12/werner-reinvent.jpg?width=960" height="239" width="320"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Werner Vogels does his Superman impression</td></tr>
</tbody></table>
<h2>
Werner Vogels - Keynote</h2>
Lots of announcements from the AWS CTO. Some user stories (Twilio, Netflix, Mapbox, TrainLine), lots of focus on developer tools and big data management tools. <br>
<br>
<h3>
Some highlights:</h3>
<a href="https://aws.amazon.com/glue/"><br></a>
<a href="https://aws.amazon.com/glue/">AWS Glue</a> - ETL pipeline tool<br>
AWS Batch - Ummm, batch processing.<br>
<a href="http://www.forbes.com/sites/janakirammsv/2016/12/01/amazon-ups-the-ante-on-containerization-and-microservices/#5a18bc2c12c7">Lambda@Edge</a> - Lambda on CDNs to move processing away from your server with faster results.<br>
<a href="http://www.geekwire.com/2016/aws-cheat-sheet-key-reinvent-announcements-know-today/"><br></a>
<a href="http://www.geekwire.com/2016/aws-cheat-sheet-key-reinvent-announcements-know-today/">Read more about the announcements here.</a><br>
<br>
...on to my agenda for the day.<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/aws-reinvent-day-5.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-25196183172933437632016-12-01T09:14:00.003-05:002016-12-03T13:24:11.934-05:00AWS re:Invent Day 4<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimR19-Z-JwdAKBPj5EdCITe_5idc2TcUZv_gOKsU-d1_pgjjblyR30MAjBfJZ1_ZmWK_eeFM48Ja_94b-8UXSMsjzULo2JRIWCyAktZARRi8JdQ9sObJbc6ATEifurCW25nyjcsgdgHHw/s1600/image-20161130_124156.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimR19-Z-JwdAKBPj5EdCITe_5idc2TcUZv_gOKsU-d1_pgjjblyR30MAjBfJZ1_ZmWK_eeFM48Ja_94b-8UXSMsjzULo2JRIWCyAktZARRi8JdQ9sObJbc6ATEifurCW25nyjcsgdgHHw/s320/image-20161130_124156.jpg" width="320"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Poolside lunch at Mirage</td></tr>
</tbody></table>
Yet another incredibly long day - breakfast @7:00am, keynote by Andy Jassy, a breakout at 11:00am at the Venetian, a very fast pit stop to try to shovel some lunch before another 1:00pm breakout session at the Mirage, followed by sessions until 6:30pm. Pub Crawl with 30,000 other re:Invent thirsty geeks to 7:30pm.<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/12/aws-reinvent-day-4.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-7419950779118744252016-11-30T02:22:00.005-05:002016-12-03T15:16:08.411-05:00AWS re:Invent Day 3<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikGZvf7TuDw8PU5gkT-c-Gfnptrw1GPW-c8hSc8e9mgkQOu7MwhWSn2UL_qmz2GRr5jwjtJphQG80t1KYs_f8HvCCfPuY6gSEE3vAT1YArn3LFbkdrGChyRyK4zPdWXwxiFhGjW3Hx6_8/s1600/20161129_083202.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikGZvf7TuDw8PU5gkT-c-Gfnptrw1GPW-c8hSc8e9mgkQOu7MwhWSn2UL_qmz2GRr5jwjtJphQG80t1KYs_f8HvCCfPuY6gSEE3vAT1YArn3LFbkdrGChyRyK4zPdWXwxiFhGjW3Hx6_8/s320/20161129_083202.jpg" width="320"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">How do you feed 30,000 people? Hangar 1</td></tr>
</tbody></table>
Intense day 3!<br>
<ul>
<li>5 breakout sessions.</li>
<li>Breakfast at 7:30am, first session 10:00, last session ends at 6:00pm.</li>
<li>Reception in the vendor hall from 6-7pm (lot's of tee shirts and goodies!)</li>
</ul>
<br>
<br>
Read on for some session recaps...<br>
<a href="http://openbedrock.blogspot.com/2016/11/aws-reinvent-day-3.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-14020990907758428972016-11-30T01:33:00.000-05:002016-12-03T15:03:44.413-05:00AWS re:Invent Day 2Monday, November 28th is bootcamp day. Attended an AWS Solutions Architect Associate prep course given by some Amazon employees. Excellent overview of what to expect in the Associates exam with pointers on how to interpret the questions and what you should be focusing on.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKzc2JeZUKtb64CjIzFEngvE9C4Y22rBxTPZLuUAw2XBQ_PasWhJP2TMffXy6c2WJ1AAr7GXGqxQOkjUrQdqvR4QZ7iTGYDeSfdfgC17bdqTE2ELxqWOm9EkDD15_7K8mYQEd8KXiNRiU/s1600/20161129_084053.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKzc2JeZUKtb64CjIzFEngvE9C4Y22rBxTPZLuUAw2XBQ_PasWhJP2TMffXy6c2WJ1AAr7GXGqxQOkjUrQdqvR4QZ7iTGYDeSfdfgC17bdqTE2ELxqWOm9EkDD15_7K8mYQEd8KXiNRiU/s320/20161129_084053.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Yeah, but where's the holodeck?</td></tr>
</tbody></table>
The bootcamp was 4 hours (8am-12pm) at the Wynne Encore. After taking the bootcamp I feel confident in passing the test, but am reminded of how many services AWS encompasses and how deep the information for each service is. I'll study some more. ;-) <br />
<br />
A lot of this is also a moving target as the certification test questions are not keeping up with the announcements being made regarding increasing capacity, capabilities and decreasing prices.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-66402961512031563892016-11-30T01:32:00.003-05:002016-12-03T15:06:32.540-05:00AWS re:Invent Day 1<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8O-W2SpoGhbCr6avfQgfcMPau-LpHyhPTq-db0LFDR31k8UN7lnXZwTC8EmAI1alY8Ka_2rJxzePM4XMeZCve8ADqqNKEeBXY8l1ckukPf7z266hCLV_wGiXF4rY9qLTXhWy02cnkr3Q/s1600/20161127_175821.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8O-W2SpoGhbCr6avfQgfcMPau-LpHyhPTq-db0LFDR31k8UN7lnXZwTC8EmAI1alY8Ka_2rJxzePM4XMeZCve8ADqqNKEeBXY8l1ckukPf7z266hCLV_wGiXF4rY9qLTXhWy02cnkr3Q/s320/20161127_175821.jpg" width="320" /></a>Here we are at the Amazon annual re:Invent for another year of mind blowing technological advancement in cloud computing. This is my fourth year attending and so far I can tell this is going to be filled with exciting technology, even more walking than 2015 (argh!) and even more standing patiently in line. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMqpSaD9oFrVBSr_-nMx7YFF_PKoaVSQLhHYk5_xyHyDcYTd2C1SIwYAU2BZK3EGCSnACdL0EjbywifXyLaIBv0AOKm2uaBhC43oS4pzlNbbtuznU6jC9QE4U4bQvi8Mf_Jsv7_U7Iozg/s1600/20161129_115031.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMqpSaD9oFrVBSr_-nMx7YFF_PKoaVSQLhHYk5_xyHyDcYTd2C1SIwYAU2BZK3EGCSnACdL0EjbywifXyLaIBv0AOKm2uaBhC43oS4pzlNbbtuznU6jC9QE4U4bQvi8Mf_Jsv7_U7Iozg/s320/20161129_115031.jpg" width="320" /></a></div>
Over 30,000 people are registered so it's grown beyond the ability of the Venetian to hold the event. This year there are events at the Mirage and the Wynne hotels in additon to the Venetian, making the logistics of <b><i>schedule making</i></b> a real challenge for both attendees and the conference coordinators.<br />
<br />
Arrived on Sunday and picked up my SWAG...yet another hoody...and a surprise. An Echo Dot sponsored by Capital One!<br />
<br />
I'll be posting some notes about each day...<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-5737717959808611492016-11-10T15:14:00.003-05:002016-11-10T20:23:38.946-05:00Bedrock & Regular ExpressionsRegular expressions are a powerful tool that every programmer should be familiar with. Perl programmers are typically well versed in using regular expressions but you can find many tools and languages that support regular expressions. Even Bedrock!<br>
<br>
<br>
<a href="http://openbedrock.blogspot.com/2016/11/bedrock-regular-expressions.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-89692097578954684552016-04-23T17:47:00.000-04:002016-04-24T18:14:05.056-04:00Creating a yum repository using AWS S3 bucketsHere's a short bash script I use to create a yum repo in an S3 bucket. The script does five (5) things:<br />
<br />
<ol>
<li>creates a local repo in a temporary directory</li>
<li>copies an RPM file to the local repo</li>
<li>creates the yum repository using <span style="font-family: "courier new" , "courier" , monospace;">createrepo</span></li>
<li>syncs the local directory with the S3 bucket</li>
<li>sets public permissions for the bucket (make sure this is what you actually want to do)</li>
</ol>
<div>
Before you get started create the bucket and configure it to host a static website. No worries if you don't actually have an <span style="font-family: "courier new" , "courier" , monospace;">index.html.</span></div>
<div>
<br /></div>
<h4>
<b>Create the bucket:</b></h4>
<div>
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;">$ aws s3 mb s3://openbedrock-repo</span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<h4>
<b>Then configure it to host static files:</b></h4>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">$ aws s3 website s3://openbedrock-repo --index-document index.html</span><br />
<h4>
</h4>
<h4>
Here's the bash script to create the repo:</h4>
</div>
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">1: #!/bin/bash
2:
3: # $ sudo $0 path-to-rpm [bucket]
4:
5: # create a temporary repo
6: repo=$(mktemp -d)
7: mkdir ${repo}/noarch
8: if test -n "$2"; then
9: BUCKET="$2"
10: else
11: BUCKET=openbedrock-repo
12: fi
13:
14: # create a temporary local repo and sync with AWS S3 repo
15: if test -e "$1"; then
16: cp "$1" ${repo}/noarch
17: createrepo $repo
18: # sync local repo with S3 bucket, make it PUBLIC
19: PERMISSION="--grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers"
20: aws s3 sync --recursive --include="*" ${repo} s3://$BUCKET/ $PERMISSION
21: aws s3 ls s3://$BUCKET/
22: # cleanup local copy of repo
23: rm -rf $repo
24: fi
25:
</code></pre>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-33814411888436363322016-04-12T16:01:00.004-04:002016-04-12T16:01:50.253-04:00Catching Exceptions in Bedrock<div class="separator" style="clear: both; text-align: center;">
<a href="http://twiki.openbedrock.net/twiki/pub/Bedrock/BedrockLogos/dino-wtf-x150.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://twiki.openbedrock.net/twiki/pub/Bedrock/BedrockLogos/dino-wtf-x150.png"></a></div>
When things go wrong, it's a good idea to actually try to handle the mess. Most higher level programming languages have exception handling built in. While Bedrock is not a programming language, it is useful for a templating language to have the ability to catch exceptions. Today's blog describes how Bedrock's <span style="font-family: "courier new" , "courier" , monospace;"><try/catch></span> blocks can be use with your Application Plugins.<br>
<div>
</div>
<div>
</div><a href="http://openbedrock.blogspot.com/2016/04/catching-exceptions-in-bedrock.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-34718413808345743622015-04-26T09:24:00.002-04:002016-04-07T08:37:13.990-04:005 Reasons to Love Your ChromebookI'm still adjusting to my gorgeous CB5-571 - Acer 15.6 Chromebook with 1080p Full HD display after using the<br>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://static.acer.com/up/Resource/Acer/Laptops/Chromebook_15/Images/20141223/AcerChromebook15-CB5-571-white-sku-preview.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://static.acer.com/up/Resource/Acer/Laptops/Chromebook_15/Images/20141223/AcerChromebook15-CB5-571-white-sku-preview.png" height="236" width="320"></a></div>
<br>
Acer C720 for nearly two years. I love my itty bitty little C720 and it' still fantastic for traveling and throwing on the couch, but wait until you see the 15.6" Acer Chromebook. Screen is amazing. Videos and sound are awesome! It's big, so if you want to lug a big laptop, this one's for you. I'm holding off on the full review until I've had a full month with the beast, but it really is an amazing piece of technology for the money. Gushing on my Chromebook made me list the 5 things I love about my Chromebook the most.<br>
<a href="http://openbedrock.blogspot.com/2015/04/5-reasons-to-love-your-chromebook.html#more">Read more »</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4367614138566022860.post-13647324170224617822015-04-16T13:56:00.001-04:002016-04-07T08:30:49.647-04:00Using Apache's Swiss Army Knife - mod_rewrite for RESTful endpoints (part III)<div style="text-align: justify;">
<div style="text-align: left;">
<div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfXa4RHcARgbXbBc7KsvPX2R6gsCeDjm9WunRGP5QD6MWL8Bmco3JV32xxti1fd1MdpBkqcOLf5XH_naDl1QLj9zDUMm8Hc9E8-LLwGm2DXbQk3DxRX5fkvBshrjOXrxAHYIe0kKNMfl0/s320/swiss-army-knife.jpg"></div>
</div>
</div>
This is the last blog in my series on Apache's<a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank"> mod_rewrite.</a> In my previous blogs I've explained a little bit about how you can use this Apache module to redirect URLs both internally and externally.<br>
<br>
<div style="text-align: left;">
<a href="http://openbedrock.blogspot.com/2015/04/using-apaches-swiss-army-knife.html" target="_blank">Using Apache's Swiss Army Knife - Part I</a></div>
<div style="text-align: left;">
<a href="http://openbedrock.blogspot.com/2015/04/using-apaches-swiss-army-knife_6.html" target="_blank">Using Apache's Swiss Army Knife - Part II</a><br>
<br>
I've provided a few examples and talked about some of the gotchas that I've encountered. Today we're going to discuss how to use <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank">mod_rewrite</a> to provide an API endpoint that is an alias for your web server's name <b><i>without creating another virtual host</i></b>. In most cases, it makes sense to create another virtual host configuration file to implement your application API, however in the event you don't have access to Apache's configuration files, you can use <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank">mod_rewrite</a> rules in an <span style="font-family: "courier new" , "courier" , monospace;">.htaccess </span>file to achieve nearly the same operations.</div>
<br>
<br>
<a href="http://openbedrock.blogspot.com/2015/04/using-apaches-swiss-army-knife_16.html#more">Read more »</a>Unknownnoreply@blogger.com0