<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Christopher A. Ryan on Medium]]></title>
        <description><![CDATA[Stories by Christopher A. Ryan on Medium]]></description>
        <link>https://medium.com/@Christopher.Ryan?source=rss-76684bf48c41------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0AUshwewoXmgGxixyqjaMg.jpeg</url>
            <title>Stories by Christopher A. Ryan on Medium</title>
            <link>https://medium.com/@Christopher.Ryan?source=rss-76684bf48c41------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 16:41:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Christopher.Ryan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CI/CD & Separation of Duties]]></title>
            <link>https://medium.com/@Christopher.Ryan/ci-cd-separation-of-duties-9beb4557446a?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/9beb4557446a</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[separation-of-duties]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Fri, 08 Jun 2018 22:34:21 GMT</pubDate>
            <atom:updated>2018-06-08T22:34:21.161Z</atom:updated>
            <content:encoded><![CDATA[<p>(This article starts out at a high level but goes into technical depth. So, if that’s what you came here for then skip my soapbox tantrum; I’ll point out where you should start.)</p><p>In smaller companies the topic of Separation of Duties doesn’t really come up, probably because everyone wears multiple hats. However, in the enterprise, especially long established ones, Security insists on this as a bedrock from which to build anything. Silos are constructed with delineations well defined and aligned to business and IT functions. Centralization of functions drives this ideology and it has served the enterprise well for many years. One department, used simply as an illustration, is responsible for application deployment and their workflow contains matured processes, policies, and maybe even “automation.” I will get back to “automation” in a moment but for now we accept it as fact. Only this department claims ownership to these processes and procedures and maintains the gate in which every application __must__ go through on its way to a production deployment.</p><p>Let’s get to “automation.” Usually this term is reserved in these traditional environments for manual processes that have been left untouched or unmodified in all but name. Replaced is the manual checklist for deploying code into production and in its place is a script that runs a few commands. Automated? Maybe. But since the script is custom built for Every. Single. Application. and can only be initiated by the Deployment Team, does it even matter that it was changed? Of course not! The consumption of the “service” is the same from the customer’s point of view.</p><p>Okay, I could continue on about “automation” but I’ll save it for a future post. Let’s get back to Separation of Duties.</p><p>Today, practices behind cool new words like DevOps, DevSecOps, DevOpsSec, CI/CD, CD/CI, CD/CD, etc. are playing havoc on the enterprise in general and on Security in specific and how these teams and enterprises adapt and adopt to this change will contribute to the success of the business goals that IT is supposed to support.</p><p>Gone are the traditional definitions of concepts like Separation of Duties; <strong>These can burn in hell</strong>. (Okay, maybe not but it sure sounds good.)</p><p>No, we cannot toss them out, as much as we would like, but we can help redefine them in a way that provides the assurance that Security (and the enterprise) demands but is flexible enough to meet the needs of modern workflows (e.g. agile). Sounds good, but how do we accomplish this?</p><p>TL;DR;</p><p>(You Technical People Can Pick Up Here!)</p><p>This article focuses on a single workflow — that of application architecture deployment. It will look at how to architect an application that includes IaC in a way that provides separation but in a way that also meets the demands of the development teams.</p><p>Punchline: Stacks.</p><p>That’s it. Stacks. You need stacks. You need stacks that are self-consumable, independent of your application, and general enough for reuse.</p><p>That’s it. You can leave now. But, if you don’t know exactly what I’m talking about then you should probably read on.</p><p><strong>Stack</strong></p><p>What is a stack? Think of it as a layer. Remember your times playing with those little plastic bricks? You can think of those bricks as components that make up a stack. Maybe you built a template for a house. That is a stack. Now, this stack can be consumed by the “buyers” (application developers). They may “build” (deploy) a stack that is a larger house, or one that auto-scales to more than the default, etc. but they still are deploying a house.</p><p>What we see in enterprises these days is the concept of a code repository that contains several of these stacks. In the world of AWS, they build several stacks:</p><ol><li>A stack for the AWS account. This might contain general roles, an S3 bucket for state files, and a DynamoDB table for Terraform locks.</li><li>Next, a VPC is deployed that contains general IAM, subnets, and some security groups.</li><li>After that the development team might decide to deploy a static resource stack that consists of an AuroraDB, and a few more application-specific buckets.</li></ol><p>At this point the static portion of the application architecture is completed. These stacks that were deployed are generic enough that they can be consumed by any application development initiative and defined with simply a unique terraform.tfvars file. With the exception of the static resource stack, they should all be considered safe to destroy at will because they were built as code (but that’s outside the scope of this document).</p><p>The last step is to then deploy the application stack itself. This stack consists of the EC2 instances, Lambda functions, or whatever else is required that can be considered ephemeral and torn down with each new deployment.</p><p>Okay, so we have separated our application into various sub-stacks but how do we reuse them and how does it provide Separation of Duties?</p><p><strong>Separation of Duties / Separation of Responsibilities</strong></p><p>The separation requirements are fulfilled by the repository location of these stacks. As a simple example, let’s deploy a web-based application. It consists of a web server behind an auto scaling group (ASG), an elastic load balancer (ELB), and served by data from a database.</p><p>In GitHub there could be a single repository, let’s call it “AWS-Stacks.” The repository might look something like this:</p><p>AWS-Stacks<br>- sh/ &lt;Deployment Scripts&gt;<br>- stacks/<br>- stacks/account<br>- stacks/vpc<br>- stacks/database<br>- stacks/compute</p><p>Each stack would work the same so we just need to pick on one for our example. Let’s pick on the Compute.</p><p>Inside the stacks/compute folder will be the following structure:</p><p>stacks/compute/<br>- templates/jsontemplates.j2<br>- main.tf<br>- variables.tf</p><p>The templates/jsontemplates.j2 will contain the template for the terraform.tfvars file and a templating engine will be used to replace the variables with actual values that define the deployed application. The output of this will be redirected to a file called terraform.tfvars and be placed in the stacks/compute folder. (Your scripts in the bin/ folder will be executed by your CI engine and execute the templating engine.)</p><p>So, your engine runs, executes your script, executes your template engine to find/replace values in jsontemplates.j2 and redirect the output to terraform.tfvars file. Cool. But……. where did the values come from for the templating engine?</p><p>Great question. They came from the application repo. The development team creates a json file called myApplication.json that contained all of the values that define their application. Now when the engine runs it can grab this file, extract all of the values, and pass it to the templating engine for the find/replace. Simple*</p><p>Do you see now how you have separation of duties? The application developers have full configuration control over their application but only need to know how to create the myApplication.json file. They place it in their repository and then another team creates the pipeline that consumes this file. Since this file defines everything about the application, they have the control that they need and the separation that Security demands.</p><p>To round this out, take a look at what the myApplication.json file might look like:</p><p>{<br> {“application_stack”:”compute”},<br> {“asg_for_public_tier”:”4&quot;},<br>{“asg_for_private_tier”:”6&quot;},<br>{“route_53_public_dns”:”myApplication.myCo.com”},<br>….<br>}</p><p>Now, if this compute stack doesn’t fit the needs of the next application team then you can extend this stack or create a new one. In either case, you have control of the stack but the application developers have control of the consumption of it.</p><p>The very last thing that I’d like to mention is that your json file will probably not be that simple. The example above dictates that you’d need a separate file for each environment. Instead, a better way would be to add those into a single json file and then use your script to determine which environment it was being deployed into. From there, it would then select the necessary values from the json file for that environment. It might look something like this:</p><p>…<br>{<br> “asg_for_public_tier”:<br>{ “dev”:”1&quot;,<br>“qa”:”1&quot;,<br>“stress”:”5&quot;,<br>“prd”:”15&quot;}<br>}<br>…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9beb4557446a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure tunnel into a private AWS EC2 instance]]></title>
            <link>https://medium.com/@Christopher.Ryan/secure-tunnel-into-a-private-aws-ec2-instance-152b69c936ec?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/152b69c936ec</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[bastion]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Fri, 21 Apr 2017 19:32:48 GMT</pubDate>
            <atom:updated>2017-04-21T19:32:48.200Z</atom:updated>
            <content:encoded><![CDATA[<p>A quick internet search will uncover many examples of architecting a bastion host on AWS to access private EC2 instances. But what they all seem to offer is nothing more than a Linux server in a public subnet that is reachable via port 22 and is granted access to EC2 instances located in a private subnet.</p><p>This is all well and good (and secure) until someone gains access to the bastion host. From there he (of course not /she/ because a /she/ would NEVER do anything unethical) has potential access to all of the private hosts.</p><p>Not good.</p><p>Not good at all.</p><p>Of course, one will argue that the whole point of a bastion host is exactly that — to gain access to private hosts. And rightly so! I wouldn’t argue with that point, either. What I /am/ arguing is that all of the examples that I have seen instruct the user to place SSH keys on the bastion host. Doing so is insecure and introduces an attack vector that is easily mitigated.</p><p>And therein lies the main point of this article.</p><p>How do you protect your private hosts from a compromised bastion? By not storing your keys on the bastion.</p><p>Ever.</p><p>Period.</p><p>What you do is create a tunnel from your local workstation, /through/ the bastion, and /to/ the private server. Your SSH keys are never stored on the bastion.</p><p>Ready to begin?</p><p>First you need a VPC with a private and public subnet. You also need a bastion and private host. Since there are so many tutorials out there for this I’m going to skip the instructions.</p><p>Once you have an environment you can create your tunnel. Again, you are going to start at your local workstation and tunnel /through/ your bastion and /into/ your private host. You are not going to stop at your bastion.</p><p>ssh -i $ssh_key -f -L 4567:$private_host_ip:22 \<br>$bastion_user@$bastion_host “sleep 10” &amp;&amp; \<br>ssh -i $ssh_key -p 4567 $private_host_user@localhost</p><p>That’s it. Let’s look at this in a bit more detail:</p><ul><li>i $ssh_key — This is the key file that you used when you built the AWS hosts. You need to point to it in the command</li><li>4567 — This is the port that you are going to use to make a connection from your local server (on port 4567) to the private server (on port 22) /through/ the bastion.</li><li>the second ssh command will run on the private server and provide a shell for you to work in.</li></ul><p>That’s really all there is to it. Now if your bastion host is compromized there will be no keys stored there that can be used to access your private hosts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=152b69c936ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Infrastructure as Code: Part 1]]></title>
            <link>https://medium.com/@Christopher.Ryan/infrastructure-as-code-part-1-96d47cc9b57c?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/96d47cc9b57c</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Wed, 18 May 2016 18:10:03 GMT</pubDate>
            <atom:updated>2016-05-19T16:11:57.631Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the first post in a series and it describes how to configure (and manage) a continuous integration / development / deployment environment. I will update this page with links to the other posts as they are created.</p><p><strong>The goal is to have as much of your infrastructure and systems in a Git repository so that it can be easily deployed and managed.</strong> This means that we will rely heavily on tools like Git, Terraform, Docker, Chef, and Jenkins. Everything will be stored in Git — even the Jenkins jobs. Again, the goal is to put everything possible in the source repository.</p><p>We will be using AWS (free tier) for this environment and it will look something like this. Note that this image will continue to change as more of the infrastructure is built and documented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*2hwuLoMglgOSzogOpxq9LA.jpeg" /></figure><p>Right now we are focused on setting up the network components of the environment: subnet, security groups, routing tables, etc. The NAT server will be used for VPN connectivity to the hosts in the private subnet but since there are none running the instance sits unconfigured. The Tyler server is a REST API server that will eventually be deployed as a Docker image on a host in my house. This will be used to communicate with my Amazon Echo to control my house (more on that later). Eventually this environment will also host Jarvis and the other CI/CD components.</p><p><strong>Resources</strong></p><p>The following are resources that I used when creating this environment. They are invaluable and worth a bookmark. In fact, I got much of my configuration from these sites.</p><ul><li><a href="https://www.airpair.com/aws/posts/ntiered-aws-docker-terraform-guide">Guide to automating a multi-tiered application securely on AWS with Docker and Terraform</a></li><li><a href="https://aws.amazon.com/blogs/apn/terraform-beyond-the-basics-with-aws/">Terraform: Beyond the Basics with AWS | Amazon Web Services</a></li><li><a href="https://www.airpair.com/docker/posts/efficiant-development-workfow-using-git-submodules-and-docker-compose">Efficient development workflow using Git submodules and Docker Compose</a></li></ul><p><strong>Development Workstation</strong></p><p>The first thing that we need to do is configure our workstation. This should be a Linux box.</p><pre>WORK=”$HOME/code/iac”; export WORK<br>mkdir -p $WORK</pre><p><strong>AWS</strong></p><p>We also need access to AWS so create an account if you haven’t done so already. Then, create a file to store your AWS credentials.</p><pre>cat ~/.aws/credentials<br>[default]<br>aws_access_key_id = ASFDASDFASDFASDFASDAFASD<br>aws_secret_access_key = ASDFASDFASDFASFSADFASDFASDFASDFSAFASDF</pre><p><strong>GIT: Terraform Repository</strong></p><p>The first thing that we want to do is set up the infrastructure on AWS. We’ll use Terraform to configure it. This will allow us to store our configuration in GitHub. You’ll need an account on GitHub, of course. Eventually, this repository will become a Git submodule (more on that later).</p><pre>mkdir $WORK/terraform<br>cd $WORK/terraform<br>curl -u ‘acer123acer123’ <a href="https://api.github.com/user/repos">https://api.github.com/user/repos</a> -d ‘{“name”: “terraform”}’<br>git init<br>touch README.md</pre><pre>cat &lt;&lt; EOF &gt; .gitignore<br>*.tfvars<br>*.tfstate<br>*.tfstate.backup<br>.terraform<br>ssh/*<br>EOF</pre><pre>git remote add terraform git@github.com:acer123acer123/terraform.git<br>git add .<br>git commit -m &#39;initial commit&#39;<br>git push terraform master</pre><p><strong>GIT: Tyler Repository</strong></p><p>We’ll create a brand new repository for my Tyler application. Again, this will be a submodule eventually but for now it is independent of any other repository.</p><pre>mkdir $WORK/tyler<br>cd $WORK/tyler<br>curl -u ‘acer123acer123’ <a href="https://api.github.com/user/repos">https://api.github.com/user/repos</a> -d ‘{“name”: “tyler”}’<br>git init<br>touch README.md</pre><pre>git remote add tyler git@github.com:acer123acer123/tyler.git<br>git add .<br>git commit -m &#39;initial commit&#39;<br>git push tyler master</pre><p><strong>Terraform</strong></p><p>We now have our workstation, GitHub, and AWS set up. We can now begin working. The first thing that we’ll do is create the necessary Terraform files. Make sure you store them in GitHub! My repository is <a href="https://github.com/acer123acer123/terraform">here</a>.</p><pre>cd $WORK<br>mkdir terraform; cd terraform</pre><pre># VERY INSECURE. CHANGE IT AFTER CREATING THE HOSTS<br>mkdir ssh<br>ssh-keygen -t rsa -C &quot;insecure-deployer&quot; -P &#39;&#39; -f ssh/insecure-deployer</pre><pre>vi key-pairs.tf   #add below contents to this file<br>resource &quot;aws_key_pair&quot; &quot;deployer&quot; {<br>  key_name = &quot;deployer-key&quot;<br>  public_key = &quot;${file(\&quot;ssh/insecure-deployer.pub\&quot;)}&quot;<br>}</pre><pre>vi *.tf  #See GitHub for current contents</pre><pre>cat terraform.tfvars<br>region = &quot;us-west-1&quot;</pre><p>Running terraform plan and terraform apply will create the infrastructure pictured above.</p><p><strong>Tyler (Docker, NGINX, Flask)</strong></p><p>Tyler is a Flask REST API server that will communicate with Amazon Echo in my house. I’ll document that more fully in the future but you can see the code <a href="https://github.com/acer123acer123/tyler">here</a>. You’ll note that it is still in a very early development stage and only one route is working; the other ones are samples that I might use later in development.</p><p>The workflow that we set up here is somewhat simple. We will store our application code in GitHub along with our Dockerfile. Then, when we build our image it will download the latest application code.</p><p>The only “trick” to ensuring that the image is built with the latest version of your code is to vi Dockerfile and update the comment in the RUN git clone…. line. When you update this, Docker notices and doesn’t use the cache for this command — and will instead retrieve the latest code from GitHub.</p><pre>#See Git for application source code and files.</pre><pre>vi Dockerfile <br>#----- Start file contents -----#<br>FROM danriti/nginx-gunicorn-flask<br>MAINTAINER Chris Ryan &lt;<a href="/service/mailto:christopher.ryan@gmail.com">christopher.ryan@gmail.com</a>&gt;<br>RUN apt-get update &amp;&amp; apt-get install -y git iputils-ping<br>WORKDIR /deploy/app<br>RUN rm /deploy/app/*<br>RUN git clone <a href="https://github.com/acer123acer123/tyler.git">https://github.com/acer123acer123/tyler.git</a> /deploy/app &amp;&amp; git checkout #version 1.0.9<br>#----- End file contents -----#</pre><pre>vi requirements.txt <br>#----- Start file contents -----#<br>Flask==0.10.1<br>Jinja2==2.7.3<br>MarkupSafe==0.23<br>Werkzeug==0.10.4<br>argparse==1.2.1<br>itsdangerous==0.24<br>wsgiref==0.1.2<br>#----- End file contents -----#</pre><pre>git add .<br>git commit -m &#39;updated with new files&#39;<br>git push tyler master</pre><pre>docker build -t christopherryan/tyler:v1 .<br>docker run --name=tyler -d -p 80:80 christopherryan/tyler:v1</pre><pre># When you change the code, you need to change the comment in the Docker file so that the cache is updated from Git.</pre><p><strong>Where are we?</strong></p><p>What can you do up to this point? You can check out the terraform repository and then deploy it using <strong>terraform apply</strong>. What you will discover is that the tyler server is responding to REST requests from the internet. It isn’t doing anything, yet but it will have been built and configured automatically to pull the latest Tyler code from GitHub, build a Docker image, and deploy it into a container. Very cool, indeed!</p><p>That’s it for now. The next part will be to add a Jenkins server to watch for changes to the GitHub repository and build new Docker images.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96d47cc9b57c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Challenging Facebook via AWS]]></title>
            <link>https://medium.com/@Christopher.Ryan/challenging-facebook-via-aws-821fafff1487?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/821fafff1487</guid>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Fri, 29 Apr 2016 12:37:05 GMT</pubDate>
            <atom:updated>2016-04-29T12:37:39.535Z</atom:updated>
            <content:encoded><![CDATA[<p>Dear Amazon Web Services,</p><h3>Overview</h3><h3>Retail (on/offline)</h3><p>The battle for consumer attention has shifted from the traditional model of broadcast, print, and online impressions to social network spaces. Providers of these services, such as Facebook have historically been ignored as a threat to the retail space but this can no longer be the case. Today’s customer is more equipped to research prior to purchase and is more likely to make any purchase decision only after engagement in these online social settings. This behavior introduces a new attack vector from ecosystems that were once harmless.</p><p>Additionally, the introduction of virtual reality and the goal of mass adoption promise a new and exciting platform for retailers. It is little wonder that Facebook has purchased one such startup company and is positioning the technology as a vehicle to enter the retail space.</p><h3>Facebook / Social Networking</h3><p>The Facebook statistics are easy to collect: 1.6 billion active users, each spending an average of 40 minutes per day on the site, etc. What is interesting is the “call to action” (CTA) statistic. The generated revenue and sales volume does not seem to be readily available but it is widely published that the “Shop Now” button accounts for 75% of all CTA buttons activated on the site. Where are these users completing their purchase? Is it Amazon? Is it the vendor’s site? Eventually the user will stay on Facebook for the entire purchasing cycle:</p><p>· Social interaction with friends concerning an upcoming purchase.</p><p>· He can gather additional information about the product without leaving the Facebook ecosystem.</p><p>· Advertisement or some (FB Messenger) other personal engagement with a CTA.</p><p>· Purchase handled within Facebook.</p><p>· Discussion surrounding the purchase is propagated throughout the user’s social network and the cycle repeats itself.</p><h3>Reduction of AWS demand</h3><p>The AWS platform provides for far more than simply hosting retail catalogs but as the purchasing habits of consumers migrate from independent research-based to social-discussion based the need for product catalogs is greatly reduced. Because the user is no longer relying on self-research she finds herself spending less time on a retail chain’s online storefront browsing or searching a catalog. Instead, she decides that she needs a specific product and, through the social network that she has created is able to quickly identify a specific make and model that fits her requirements. In this scenario the retail chain will no longer find it necessary to provide a catalog of products online because the consumer does not utilize that vehicle any longer. Or, more realistically, the compute requirements for the online product portfolio is reduced to reflect the decreased customer count on the site.</p><h3>Internet of Things</h3><p>Ready or not (from a security, standards, and infrastructure perspective), IoT is here to stay. As devices of all types begin to communicate consumer purchase practices will be influenced. For example, an automobile component:</p><p>· crosses a threshold for an oil change and</p><p>· sends a notification to the auto manufacturer (or IoT service provider) which</p><p>· runs software that reviews the calendar of the owner as well as the appointment book of the user’s local auto mechanic.</p><p>· The software then updates the user’s calendar as well as the auto mechanic’s appointment book and then</p><p>· notifies the user of the upcoming appointment.</p><h3>Defining the War</h3><p>In the above “Internet of Things” example there is no social network interaction — yet, and <em>this</em> serves as the framework for defining the next challenge to retail establishments. Why is Facebook, as the social network of choice for this document, not involved in this interaction? There is little doubt that the automobile manufacturer, IoT provider, user, and mechanic are all on Facebook. How was Facebook left out of this exchange and how can it engage itself in the future? Answering these questions provides further opportunities for engagement by Facebook and the realization of new revenue streams.</p><p>It is critical for Amazon to combat these challenges and I believe it is uniquely structured to do so where others have failed. Google Groups, for example was a challenge to Facebook but failed miserably, in part because of the difficulty of migrating vast communities from one social platform to another. I believe that this was the wrong approach. A new interface or platform is not enough to motivate the community to migrate. Simply put, we cannot ask a user to migrate. Instead, we need to create an ecosystem where the user feels “left out” and aggressively moves himself.</p><p>The remaining portion of this document details the overall strategic direction for the execution of this plan.</p><h3>Offensive Position</h3><h3>Facebook for IoT</h3><p>Facebook is focused on human relationships and, only recently computer-to-human ones. Their blind spot is the emerging IoT market. Although very immature there is a tremendous potential for changing the behaviors and interactions of individuals. This is where Amazon can be most effective in their engagement with Facebook’s users.</p><p>The AWS IoT platform provides a rich toolset for manufacturers to build human interactions with their products but the architecture creates a silo, or isolated environment for the devices and users. Not only this but the manufacturer is left implementing a repository for any collected data — and complete freedom to select the location of this data (private data center or public cloud). This further propagates the isolationist model with silo after silo of independent and segregated repositories of data with no standardized structure or relationship between each.</p><p>Amazon has an opportunity to expand the IoT product to include a standardized and centralized location for all collected data. Each manufacturer is provided a secure location for any collected data and is offered tools to analyze and export this data at will.</p><h3>Manufacturer / Supplier Adoption</h3><p>What would the motivation be for a manufacture to adopt this repository? Simple. The ability to analyze collected data from other manufacturers as well as from other products that the user interacts with. As more and more devices submit data to this centralized repository, the relationships between these separate devices, as well as the interactions between a user and his multiple devices becomes clearer. In many ways this would be a Facebook for IoT devices: how do separate devices work together for the good of the user and how do the user devices work towards the good of other users? We can apply this idea to the auto mechanic example above.</p><h3>Consumer Engagement</h3><p>What would the motivation be for the consumer to adopt this repository? Again, this is quite simple; he wants control over his devices. He will have oversite and control over his calendar, automobile, and mechanic of choice. He will find that he spends more time on this platform as a conductor of sorts — leading and directing his orchestra of IoT devices. From his automobile and oil to his washing machine and detergent, he will configure the interaction points between each device and between his vendors/suppliers of choice. And, because all of his devices speak to a centralized, standard, single repository, the value to the user is easily realized.</p><h3>Sales</h3><p>It is easy to envision this platform driving sales to Amazon.com for supplies and also purchases of new IoT devices. Furthermore, it could have a positive impact on the adoption rate of the Alexa product line if integration of this platform is properly implemented.</p><h3>Natural Migration to Social Site</h3><p>Finally, we come to the natural migration to this platform as a destination for social interaction. At this point we find manufacturers, suppliers, and users adopting this platform as their destination of choice for all things IoT. The final step is simply to further encourage use of this site over Facebook. How? By providing better value. What if there were the ability to leverage the Amazon.com platform for personal garage sales that are offered to the user’s local network? Or, 3D printing? Or community co-operative activities? Granted, these examples are not specific to IoT but they derive value beyond what is available from Facebook and as more devices adopt this platform, more users will be drawn to it. As more users are drawn to it, they will look for reasons to stay. And, eventually find that they are spending far less time on Facebook then they were previously.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=821fafff1487" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS and Healthcare]]></title>
            <link>https://medium.com/@Christopher.Ryan/aws-and-healthcare-90a3db78417d?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/90a3db78417d</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Fri, 29 Apr 2016 12:35:08 GMT</pubDate>
            <atom:updated>2016-04-29T12:36:07.944Z</atom:updated>
            <content:encoded><![CDATA[<p>Challenges in the Healthcare Space</p><h3>Introduction</h3><p>Hospital organizations are searching for solutions to address increasing financial pressures originating from many fronts. Constantly changing government regulations, decreased reimbursements for government sponsored programs, increased patient volume, and the management of an explosion of growth in patient data contributes to the pressure on a hospital’s financial position. Unlike traditional businesses that sell products or services, hospitals are rarely able to discontinue services that are not cost effective and must find creative solutions to overcome these challenges. Mergers and acquisitions, the outsourcing of non-patient services, and the adoption of emerging technologies provide opportunities for hospitals to survive and continue to offer lifesaving care to the patients that they serve.</p><p>This paper narrows the focus of this broad conversation to just three core topics and provides a roadmap for the adoption of AWS resources that can meet these challenges in new and creative ways.</p><h3>IT Challenges. AWS Solutions.</h3><h3>Hospital Consolidation</h3><p>Hospitals are merging and being acquired at a record pace. The years between 2004 and 2009 recorded an average of 55 mergers and/or acquisitions. However, in 2010 the number increased to about 70 and continued to climb until 2012 where it peaked at around 95<a href="#_edn1">[i]</a>. Since 2012, the yearly average is declining but not because of decreased interest instead, it is simply because most of the smaller, single campus organizations are now part of larger systems. The mergers today seem to be a consolidation of large hospital systems into even larger ones.</p><p>These mergers and acquisitions introduce two unique challenges for the IT organizations that support them.</p><h3>The Wrong Kind of “Fluid IT”</h3><p>For many years, hospitals had outsourced their Information Technology services to outside organizations. The goal was to drive down IT costs while at the same time extract increasing value from these companies that were experts in the healthcare industry. A core value proposition offered by these companies included the migration of the hospital’s data center to one owned by the outsourcing vendor. Valuable hospital real estate became immediately available for transformation into billable areas of service. These included new patient offices, laboratories, and even patient rooms.</p><p>This model served a hospital well until it was merged or acquired by another organization that had also outsourced its IT services. The hospital was now faced with the expense of migrating their data center from one location to another — and doing so without affecting patient services or care.</p><p>A typical data center migration project takes about 6 months of planning. During this time, all IT resources are dedicated to this project and all other IT initiatives are frozen. Considerable time and expense is expected for the actual execution of the migration. An entire weekend is dedicated to the actual event and usually involves the transport of thousands of pounds of IT hardware via private plane and/or carrier.</p><p>Even then, after the successful execution of this enormous and expensive project, there are no assurances of permanency. Another merger or acquisition (and thus another data center migration) could be just around the corner. It is not uncommon for a hospital to face this challenge more than once over any 5-year period.</p><h3>AWS Solutions</h3><p>The challenge described above is far more complex than a company simply trying to reduce costs and complexity or even to increase opportunities for innovation.<a href="#_edn2">[ii]</a> It is to transform the way IT services are offered to accommodate future mergers and acquisitions. Simply put, the transition of support from one IT company to another should be a task and not a project. Costs should be driven out of this activity and application unavailability should be eliminated. Furthermore, the care of the patient and his data should remain unaffected during these transitions.</p><p>The solution is the migration of the data center to AWS resources. Below are several services that are required or useful in this initiative.</p><h4>AWS Direct Connect</h4><p>The dedicated connection that AWS Direct Connect<a href="#_edn3">[iii]</a> provides is a requirement for hospital environments because of the amount of data transferred from digital imaging (see below) as well as the criticality and availability of patient data to the hospital staff.</p><h4>Amazon VPC</h4><p>Another requirement is the Amazon Virtual Private Cloud<a href="#_edn4">[iv]</a> which provides an isolated section of the AWS cloud for the hospital environment. Since there will always be a small data center footprint in the hospital because of digital imaging the corporate network must be extended to AWS for seamless transfer of application data.</p><h4>Amazon EC2 &amp; Amazon Elastic Block Store</h4><p>Amazon EC2<a href="#_edn5">[v]</a> and Amazon Elastic Block Store<a href="#_edn6">[vi]</a> form the foundational building blocks for the organization’s data center.</p><h4>AWS Import/Export Snowball &amp; VM Import/Export</h4><p>The initial migration of the vast amounts of patient and hospital data to AWS resources is handled by the AWS Import/Export Snowball solution.<a href="#_edn7">[vii]</a> The hundreds of terabytes of digital images, database backups, and other data can be transferred to AWS resources simply and cost effectively with this tool.</p><p>VM Import/Export<a href="#_edn8">[viii]</a> is utilized for the migration of server instances to the AWS EC2 resources.</p><h4>AWS Storage Gateway</h4><p>Once the AWS environment has been seeded with enterprise data it is necessary to implement the AWS Storage Gateway<a href="#_edn9">[ix]</a> to keep this data in sync until the migration of the data center is concluded.</p><h4>Amazon RDS &amp; AWS Database Migration Service</h4><p>The AWS Database Migration Service<a href="#_edn10">[x]</a> provides a migration path to the Amazon environment but the Amazon RDS<a href="#_edn11">[xi]</a> provides the necessary tools to run proprietary and open source databases upon completion of the migration.</p><h4>Amazon WorkSpaces</h4><p>Hospitals typically utilize virtual desktop and/or application infrastructure solutions after the data center is migrated to the outsourcing vendor’s location. Replacing this complex infrastructure and cost (hardware, software, licensing, support) with Amazon WorkSpaces<a href="#_edn12">[xii]</a> is an obvious decision.</p><h3>Digital Imaging</h3><p>The past several years have been witness to the replacement of physical imaging with digital. No longer is this technology limited to the wealthiest of hospitals but now even small practices are implementing technology to securely capture and store patient images and other electronic data. Combined with ever expanding HIPAA and other federal regulations the amount of data being collected and stored is growing at an alarming rate.</p><h3>Protecting Digital Images</h3><p>The challenge for hospitals to secure, store and protect this data for many years is becoming increasingly difficult for even the largest hospital systems. Data requirements for Picture Archiving and Communication Systems (PACS) can easily start with 100 terabytes and increase to many hundreds in a few short years. Specific challenges include the yearly storage and hardware acquisitions of 36%<a href="#_edn13">[xiii]</a> of the initial application cost as well as backing up and recovering this data during this rapid and constant growth.</p><p>Many hospitals have discovered that it is not cost effective to back up this data using traditional tools. Tape drives and disk-based backups simply can’t address the enormous amount of data created by these applications. The solution traditionally adopted is twofold: Replicate the data locally at the storage layer (RAID1+0) and then replicate that data to an offsite, similarly sized storage device. This creates a minimum of three copies of data, a very complex and expensive infrastructure, but still does not protect against data corruption. For that, there is no simple solution.</p><h3>PACS Basics</h3><p>It is necessary to very briefly explain the data lifecycle of a PACS image before discussing AWS solutions that address these challenges.</p><p>A patient arrives at a medical facility and is escorted to the diagnostic device (called a modality). This modality might be a simple digital X-Ray machine that captures a single image or it might be a Magnetic Resonance Imaging (MRI) machine that produces hundreds (or thousands) of high definition, very large digital files.</p><p>These files are temporarily stored locally on the modality and only removed after several days. This provides the technician the ability to resend these images to the central PACS storage if necessary but also allow a medical doctor the ability to view, and add notes to the images directly from the modality if desired.</p><p>Once the images have been captured and the technician, or medical doctor has added additional notes or other data, a copy of these images are sent to the central PACS location. Immediately these images are duplicated and one copy compressed. The uncompressed, lossless original is stored on high-speed storage devices in an area called a “short term repository” and a compressed, lossless copy is created and stored on slower, less expensive storage in an area called a “long term repository.”</p><p>The short term repository is used as a staging device for the radiologists. As this data ages (usually determined in weeks) the files are simply deleted. If the study is required to be viewed by the radiologist at a later time, the application retrieves a copy from the long term repository and stages it in the short term repository for use.</p><h3>Local Storage Requirements</h3><p>The size and quantity of PACS data currently prohibits the relocation of the short term repository to a remote geographic data center. The ability of a doctor to very quickly retrieve and view a patient’s file could determine if that patient lives or dies; it truly is that critical.</p><p>Hospitals have long determined that the short term repository must remain close to the patient — even if this means giving up expensive real estate on campus to house the system.</p><p>However, the long term repository is much more forgiving to geographic relocation and can easily be transferred to AWS resources.</p><h3>AWS Solutions</h3><p>Many of the AWS solutions mentioned above are appropriate for the migration and long term support of the PACS environment and so they will not be repeated in this section.</p><h4>Amazon Elastic File System</h4><p>Traditional PACS applications were built on top of proprietary UNIX servers and required fiber or direct attached storage. Demands for increased storage and normal market forces have driven changes in this architecture. More vendors are building their applications on open source operating systems as well as leveraging file based storage devices instead of block.</p><p>Amazon EFS<a href="#_edn14">[xiv]</a> allows for long term repositories to be located on SSD storage and connected to the PACS servers via the NFS protocol.</p><h4>Amazon Glacier</h4><p>Amazon Glacier<a href="#_edn15">[xv]</a> (along with AWS Storage Gateway) is a perfect solution for providing long term repositories on less expensive disk. The protocol used is iSCSI and provides another seamless migration from expensive, hospital owned storage to Amazon resources.</p><h3>Disaster Protection</h3><h3>Disaster Recovery</h3><p>Business continuity planning and disaster recovery is important to any business but critical to a hospital organization. This is especially true after a natural disaster. A traditional business usually has an expectation of zero customers immediately following the event as well as a window of time allowed for business recovery. A hospital, on the other hand becomes busier than ever immediately following an event. This demands the hospital to not simply recover from a disaster but to support an increased workload immediately after the occurrence in parallel with its own recovery efforts.</p><p>Just as critical to the continuity of clinical services is the security and availability of patient data after an event. Even if the hospital does not survive the disaster, the patient data must. This lesson was learned by many patients following the Katrina Hurricane in 2005. Hospitals that were ill-prepared for the storm and had inadequate protections for patient data provided a disservice to the patients that they had once served. Many patients discovered too late that all of their information stored at the hospital was lost. Cancer patients, for example, found that all record of their past treatments were destroyed and unrecoverable. At what point would doctors in the new location continue the treatment? Picking the wrong point to continue (repeating a treatment or skipping one) could have disastrous effects on the outcome of care for this patient.</p><h3>AWS Solutions</h3><p>The comprehensive resources and services offered by Amazon provide a HIPAA certified, safe and redundant location for patient data. Access to data can survive even if the hospital doesn’t and that can mean the difference between a person’s life and her death.</p><h3>Conclusion</h3><p>This whitepaper focused on just three core challenges that hospitals face and how AWS resources can be leveraged to meet these challenges, drive down information technology costs, and provide the necessary flexibility in today’s world of merging and acquisitions. There are many other challenges not described in this document where AWS can be leveraged to further reduce operating costs and provide flexibility in the ever-changing healthcare landscape. Future whitepapers will focus on these additional challenges and also provide insight into areas where AWS is positioned to drive innovation in healthcare space.</p><h3>Contributors</h3><p>The following individuals and organizations contributed to this document:</p><p>· Christopher A. Ryan, Sr. Infrastructure Architect</p><h3>Notes</h3><p><a href="#_ednref1">[i]</a> The Health Care M&amp;A Information Source, <a href="http://www.healthcaremanda.com/">www.healthcareMandA.com</a></p><p><a href="#_ednref2">[ii]</a> Introduction to AWS Economics, <a href="https://d0.awsstatic.com/whitepapers/introduction-to-aws-cloud-economics-final.pdf">https://d0.awsstatic.com/whitepapers/introduction-to-aws-cloud-economics-final.pdf</a></p><p><a href="#_ednref3">[iii]</a> AWS Direct Connect, <a href="https://aws.amazon.com/directconnect">https://aws.amazon.com/directconnect</a></p><p><a href="#_ednref4">[iv]</a> Amazon VPC, <a href="https://aws.amazon.com/vpc">https://aws.amazon.com/vpc</a></p><p><a href="#_ednref5">[v]</a> Amazon EC2, <a href="https://aws.amazon.com/ec2">https://aws.amazon.com/ec2</a></p><p><a href="#_ednref6">[vi]</a> Amazon Elastic Block Store, <a href="https://aws.amazon.com/ebs">https://aws.amazon.com/ebs</a></p><p><a href="#_ednref7">[vii]</a> AWS Import/Export Snowball, <a href="http://aws.amazon.com/importexport">http://aws.amazon.com/importexport</a></p><p><a href="#_ednref8">[viii]</a> VM Import/Export, <a href="https://aws.amazon.com/ec2/vm-import">https://aws.amazon.com/ec2/vm-import</a></p><p><a href="#_ednref9">[ix]</a> AWS Storage Gateway, <a href="https://aws.amazon.com/storagegateway">https://aws.amazon.com/storagegateway</a></p><p><a href="#_ednref10">[x]</a> AWS Database Migration Service, <a href="https://aws.amazon.com/dms">https://aws.amazon.com/dms</a></p><p><a href="#_ednref11">[xi]</a> Amazon RDS, <a href="https://aws.amazon.com/rds">https://aws.amazon.com/rds</a></p><p><a href="#_ednref12">[xii]</a> Amazon WorkSpaces, <a href="https://aws.amazon.com/workspaces">https://aws.amazon.com/workspaces</a></p><p><a href="#_ednref13">[xiii]</a> Archiving, Chapter 7: Storage and Cost Justifications, <a href="http://siim.org/?page=archiving_chapter7">http://siim.org/?page=archiving_chapter7</a></p><p><a href="#_ednref14">[xiv]</a> Amazon EFS, <a href="https://aws.amazon.com/efs">https://aws.amazon.com/efs</a></p><p><a href="#_ednref15">[xv]</a> Amazon Glacier, <a href="https://aws.amazon.com/glacier">https://aws.amazon.com/glacier</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90a3db78417d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS: SNS, Lambda, & ALEXA]]></title>
            <link>https://medium.com/@Christopher.Ryan/aws-sns-lambda-alexa-21665a1802c7?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/21665a1802c7</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[alexa]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Fri, 22 Apr 2016 18:47:01 GMT</pubDate>
            <atom:updated>2016-04-22T18:47:01.140Z</atom:updated>
            <content:encoded><![CDATA[<p>Yes! Even Alexa! The code is more proof-of-concept right now but it works and I thought that I would share.</p><h4>Process flow</h4><p>Amazon Echo/Tap -&gt; Lambda -&gt; SNS -&gt; Mobile Phone</p><h4>Alexa Skill</h4><p>Name: textContact<br>Invocation Name: text contact<br>Intent Schema:</p><pre>{<br>    “intents”: [<br>      {<br>        “intent”: “TextContact”,<br>        “slots”: [<br>        {<br>          “name”: “FirstName”,<br>          “type”: “NAME”<br>        },<br>       {<br>         “name”: “TextMessage”,<br>         “type”: “AMAZON.LITERAL”<br>       }<br>      ]<br>    },<br>   {<br>      “intent”: “AMAZON.HelpIntent”<br>   }<br>  ]<br>}</pre><p>Custom Slot Types: NAME<br>Custom Slot Values: Chris, etc…<br>Sample Utterances: <br> TextContact text {FirstName} {I am texting you|TextMessage}<br>Endpoint: (Your Lambda function’s ARN)</p><p>Once you have added the Lambda function you can test this with the sample utterance: Text Chris This is my first message!</p><h4>Lambda</h4><p>Name: textFamilyMember</p><p>Code:</p><pre>“””<br>This code will allow Alexa to text a contact. <br>For ease of coding the contact list is hard coded in this <br>function but eventually would need to be removed before it was published<br>as a public skill. Of course, that will create a whole new can<br>of worms to figure out how to integrate with ????? for contact information.</pre><pre>Initial Code: 4/4/2016 — Chris Ryan<br>“””</pre><pre>from __future__ import print_function<br>import boto3<br>sns = boto3.client(‘sns’)</pre><pre>def lambda_handler(event, context):<br> print(“event.session.application.applicationId=” +<br> event[‘session’][‘application’][‘applicationId’])<br> <br> if event[‘session’][‘new’]:<br> on_session_started({‘requestId’: event[‘request’][‘requestId’]},<br> event[‘session’])<br> <br> if event[‘request’][‘type’] == “LaunchRequest”:<br> return on_launch(event[‘request’], event[‘session’])<br> elif event[‘request’][‘type’] == “IntentRequest”:<br> return on_intent(event[‘request’], event[‘session’])<br> elif event[‘request’][‘type’] == “SessionEndedRequest”:<br> return on_session_ended(event[‘request’], event[‘session’])<br> <br>def on_intent(intent_response, session):<br> print(“on_intent requestId=” + intent_response[‘requestId’] +<br> “, sessionId=” + session[‘sessionId’])<br> <br> intent = intent_response[‘intent’]<br> intent_name = intent_response[‘intent’][‘name’]<br> <br> if intent_name == “TextContact”:<br> return text_contact(intent_response, session)<br> elif intent_name == “AMAZON.HelpIntent”:<br> return get_welcome_response()<br> else:<br> raise ValueError(“Invalid intent”)<br> <br>def on_session_started(session_started_request, session):<br> print(“on_session_started requestId=” + session_started_request[‘requestId’]<br> + “, sessionId=” + session[‘sessionId’])</pre><pre>def on_launch(launch_request, session):<br> print(“on_launch requestId=” + launch_request[‘requestId’] + <br> “, sessionId=” + session[‘sessionId’])<br> return get_welcome_response()<br> <br>def get_welcome_response():<br> session_attributes = {}<br> card_title = “Text Contact”<br> speech_output = “Please tell me who you want to text and “ \<br> “the message that you want to text them by saying, “ \<br> “tell Kim hello.”<br> <br> reprompt_text = “Please tell me who you want to text by saying, “\<br> “tell Kim hello.”<br> <br> should_end_session = False<br> return build_response(session_attributes, build_speechlet_response(<br> card_title, speech_output, reprompt_text, should_end_session))<br> <br>def build_speechlet_response(title, output, reprompt_text, should_end_session):<br> return {<br> ‘outputSpeech’: {<br> ‘type’: ‘PlainText’,<br> ‘text’: output<br> },<br> ‘card’: {<br> ‘type’: ‘Simple’,<br> ‘title’: ‘SessionSpeechlet — ‘ + title,<br> ‘content’: ‘SessionSpeechlet -’ + output<br> },<br> ‘reprompt’: {<br> ‘outputSpeech’: {<br> ‘type’: ‘PlainText’,<br> ‘text’: reprompt_text<br> }<br> },<br> ‘shouldEndSession’: should_end_session<br> }</pre><pre>def build_response(session_attributes, speechlet_response):<br> return {<br> ‘version’: ‘1.0’,<br> ‘sessionAttributes’: session_attributes,<br> ‘response’: speechlet_response<br> }</pre><pre>def on_session_ended(session_ended_request, session):<br> print(“on_session_ended requestId=” + session_ended_request[‘requestId’] +<br> “, sessionId=” + session[‘sessionId’])</pre><pre>def text_contact(session_tc, session):<br> print(“text_contact requestId=” + session_tc[‘requestId’] +<br> “, sessionId=” + session[‘sessionId’])<br> card_title = “Texting Contact”<br> session_attributes = {}<br> should_end_session = False</pre><pre>first_name = session_tc[‘intent’][‘slots’][‘FirstName’][‘value’]<br> text_message = session_tc[‘intent’][‘slots’][‘TextMessage’][‘value’]<br> speech_output = “I will tell “ + first_name + “ “ + text_message<br> reprompt_text = “You can tell me who to text by saying, “ \<br> “tell Kim hello.”<br> SNSarn=’’<br> <br> if first_name == “Kim”:<br> SNSarn=”..... SNS ARN ....&quot;</pre><pre>elif first_name == “Chris”:<br> SNSarn=&quot;... SNS ARN ...&quot;</pre><pre>else:<br> speech_output = “I don’t know who “ + first_name + “ is.” \<br> “ Please try again.”<br> reprompt_text = “I don’t know who “ + first_name + “ is.” \<br> “ Please try again.” <br> <br> if SNSarn:<br> response = sns.publish(<br> TopicArn = SNSarn,<br> Subject=text_message,<br> Message=text_message<br> )<br><br> <br> return build_response(session_attributes, build_speechlet_response(<br> card_title, speech_output, reprompt_text, should_end_session))</pre><h4>SNS</h4><p>All that’s left is to create an SMS endpoint and modify the Lambda function with the ARN.</p><h4>Limitations</h4><p>I’m sure you can guess what the limitations are but they include:<br>- Hard coded users and text numbers<br>- Inability to publish this to anyone else (internal, developer) use only</p><p>But, it was a fun exercise.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21665a1802c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance: Splunk, Citrix, VMware]]></title>
            <link>https://medium.com/@Christopher.Ryan/performance-splunk-citrix-vmware-fe3eca642818?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe3eca642818</guid>
            <category><![CDATA[citrix]]></category>
            <category><![CDATA[vmware]]></category>
            <category><![CDATA[splunk]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Thu, 31 Mar 2016 12:57:21 GMT</pubDate>
            <atom:updated>2016-03-31T12:57:21.493Z</atom:updated>
            <content:encoded><![CDATA[<p>CareTech Solutions is an information technology (IT) and Web products and services provider for U.S. hospitals and health systems. Since 1998, our dedicated experts have been creating value for clients through customized IT solutions that contribute to improving the patient experience while lowering healthcare costs. From implementing emerging technologies to supporting day-to-day IT operations, CareTech Solutions offers industry-leading health information technology services that help hospitals simplify and manage complex IT initiatives while maximizing their investment in IT.</p><p>A client of CareTech Solutions is a healthcare provider that offers care in over 50 facilities spread across several states. Additionally, they have many employees that access compute services from homes and small offices over consumer rated network connections.</p><p>To support a daily concurrent user count of over 700 desktop connections, CareTech Solutions architected and implemented a large VMware and Citrix environment that included state of the art hardware from major vendors. Some examples include the Cisco Nexus platform for data transport, IBM for FC attached storage, and HP for compute enclosures and blades. The technologies employed upon this hardware foundation included VMware ESXi, Citrix Application &amp; Desktop Virtualization, Citrix Netscaler Gateway, and IBM SAN Volume Controller (SVC), Fiber Channel over Ethernet (FCoE), and a number of monitoring packages to identify issues.</p><p>The client presented sporadic complaints of slow response time for some of its users. There were no obvious patterns such as geographic location of the user, time of day, network access method (MPLS, T1, consumer network connection), Citrix server, or ESXi host. The complaints were not predictable, the symptoms were not reproducible, and there was no way to correlate the complaints to any particular log message or error from any discrete hardware or infrastructure layer.</p><p>Further investigation into each separate incident identified a pattern and pointed to congestion on the external internet segments. This was especially apparent with employees working from home. Figure 1 is a screenshot from the Citrix InSight Center for one such user. Note the high WAN latency and Client Side Retransmits values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*NeWbnZqGOTokDLOQR7ikxw.png" /></figure><p>Figure 1</p><p>These abnormal values could be found in every reported incident and it seemed like the problem was easily identified: users accessing the environment over a public internet connection were susceptible to WAN latency and packet retransmissions. The antithesis to this conclusion was that some users at some sites with MPLS and dedicated circuits were also reporting similar performance degradations. There were just no patterns in any of these complaints. A user at one site might experience slow performance while the person sitting next to her would not.</p><p>An enormous amount of effort was spent in an attempt to identify any type of pattern or correlation between a single incident and one or more layers in the overall infrastructure. Investigation was further complicated by barriers between technology realms. For example, a Citrix administrator was unable to log into a network switch to review logs. Coordination between many different groups was therefore necessary just to troubleshoot a single reported incident. To facilitate this and drive any potential efficiency into the process, a daily meeting was set up between all infrastructure groups to go over logs, discuss theories, and plan next steps. Very quickly it became clear that reviewing logs one at a time provided very little value. This data had to be consolidated from all layers (application, hypervisor, server, network, storage, and hardware) and made available to every administrator that was working on this issue. Furthermore, the collected data had to be presented in a way that correlations could be found between the log messages and even the count of log entries.</p><p>CareTech Solutions had recently implemented Splunk Enterprise and several Splunk applications. Because implementation was still in an early stage it was leveraged by only a very small number of administrators. However, the senior administrator that championed the implementation was an expert on the platform and was able to assist in the collection and presentation of data from every layer of the client’s infrastructure. Immediately two separate error messages in the ESXi logs presented itself. Of those two, one proved critical on the eventual identification and resolution of the core issue. The error described “lost access to volume due to connectivity issues.” This error led CareTech to investigate the storage infrastructure including the FCoE switches, storage devices, and fiber cables. Since there were multiple paths from every server to every storage device there was no reason that a host should experience lost access to any storage. An enormous effort was expended to eliminate each hardware and network segment from the list of potential sources for this message; no root cause was found in any investigated item.</p><p>Meanwhile, work continued to correlate the storage errors to log entries from the Citrix environment. Using Splunk to consolidate and report on the error messages a correlation was found. Figure 2 &amp; 3 show a sample of data collected and reported from Splunk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oeOtTMQPOaAhEC_n1NZ7oQ.png" /></figure><p>Figure 2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*mE1YATbyUQRyAJsQCNmQSQ.png" /></figure><p>Figure 3</p><p>These two charts imply a build up of Client retransmitted packets immediately preceding a number of storage disconnections.</p><p>Following each disconnect message, the Citrix ICA round trip time values begin to fluctuate. This is not easily observable in the consolidated data presented in Figure 2 but is evident in an individual session as illustrated in Figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*qxO3ZHYi2TUUohHiTggSBA.png" /></figure><p>Figure 4</p><p>Furthermore, traffic from the Citrix server seems to stop as shown in Figure 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*qSzkQgKHannYPGTuiStmvw.png" /></figure><p>Figure 5</p><p>It was now clear that the root cause was not an external internet segment or even a Citrix performance problem. There was a problem with the storage layer — but not at a physical or communication level. These potential areas had been ruled out, in part because of hardware redundancies built into the environment and also because of further research through Splunk.</p><p>Investigation expanded beyond the client’s environment and into CareTech Solutions’ other customers. Although no other client was presenting similar symptoms, similar storage messages were reported through Splunk. Not only were there several different storage devices there were several different physical data centers.</p><p>Focus was shifted away from the client’s immediate environment and onto the storage disconnection messages. Dashboards were created in Splunk to further prove this theory and to provide confirmation of any positive or negative impact once a solution was implemented.</p><p>Continued research lead CareTech Solutions to eventually discover a change in how VMware handles file locking as implemented in a software update. SCSI reservations were replaced with Atomic Test and Set (ATS) algorithms for storage devices that support hardware acceleration. The firmware version of IBM’s StorWize V7000 storage devices do not support this algorithm and this incompatibility was the root cause of the error messages. Immediately after turning off ATS and using SCSI reservations, CareTech Solutions observed a positive impact to the client’s Citrix environment. The storage error messages were eliminated and the users reported a significant decrease in response time within Citrix sessions.</p><p>Once the logs were directed to and processed by Splunk, the technical team was able to correlate entries from the various infrastructure and software layers along a single timeline. Identifying the complaining devices and focusing on the interaction between those devices helped narrow the efforts towards the eventual discovered cause.</p><p>After weeks and countless hours of searching through hundreds of individual log files by the various disciplines, identifying and eliminating every independent issue, the correlation of log events that Splunk illuminated accelerated the troubleshooting and intensified focus to a single area within the infrastructure. That focus was shared by all individual groups, the problem was quickly identified, and the resolution deployed. The effectiveness and focus provided by Splunk achieved a savings in time and effort and ultimately dollars for the customer and for CareTech Solutions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe3eca642818" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS: Lambda, S3, DynamoDB, CLI]]></title>
            <link>https://medium.com/@Christopher.Ryan/aws-lambda-s3-dynamodb-cli-948270d7515c?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/948270d7515c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[dynamodb]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Wed, 30 Mar 2016 19:17:57 GMT</pubDate>
            <atom:updated>2016-03-30T19:17:57.433Z</atom:updated>
            <content:encoded><![CDATA[<p>I was speaking to someone recently who stated that he was trying to extract EXIF data from some images that he had. Now, there are many ways to skin this cat but I was working with AWS at the time and thought that this would be an opportunity to try my hand at a proof of concept. Now, the code below is by no means production ready and would take some work to make it really usable but I’m hopeful that it provides the necessary information for you to follow my logic and enough code for you to build from it.</p><p><strong>Workflow</strong></p><p>The workflow is as follows:</p><ul><li>User uploads a jpg into a bucket on S3</li><li>A Lambda function kicks off and extracts EXIF information</li><li>This EXIF information is then loaded into DynamoDB</li></ul><p>Most of this was created using CLI beause it is easier to document and replicate. However, there were a couple of items that I did use the web front end for and they are noted below.</p><p><strong>DynamoDB</strong></p><p>I used the web front end for this because I wanted to see how it worked. There is an easy CLI command to create this but since I didn’t use it I am not documenting it here.</p><p>Table: CreateThumbnailEXIF</p><p>Key: imageName (String)</p><p><strong>Lambda</strong></p><p>Here is where I used my CLI skilz….</p><p>First, some variables</p><pre>source_bucket=christopherryanimage<br>target_bucket=${source_bucket}resized</pre><pre>function=ExtractEXIF<br>lambda_execution_role_name=lambda-$function-execution<br>lambda_execution_access_policy_name=lambda-$function-execution-access<br>lambda_invocation_role_name=lambda-$function-invocation<br>lambda_invocation_access_policy_name=lambda-$function-invocation-access<br>log_group_name=/aws/lambda/$function</pre><p>Next, we need to get an image that contains EXIF information. We will also copy it up to our bucket. Why is it called HappyFace.jpg? Because that’s what the AWS image-resize tutorial used so I went with it for this first image.</p><pre>wget -q -OHappyFace.jpg ‘<a href="http://ptforum.photoolsweb.com/ubbthreads.php?ubb=download&amp;Number=1024&amp;filename=1024-2006_1011_093752.jpg%27">http://ptforum.photoolsweb.com/ubbthreads.php?ubb=download&amp;Number=1024&amp;filename=1024-2006_1011_093752.jpg&#39;</a></pre><pre>aws s3 cp HappyFace.jpg s3://$source_bucket/</pre><p>You will need to set up a Python virtual environment and install Pillow and exifread. I’ll leave it to you to do that (it is well documented elsewhere).</p><p>Create the actual Create_Thumbnail.py Lambda python file that will be executed on the AWS servers:</p><pre>from __future__ import print_function<br>import boto3<br>import os<br>import sys<br>import uuid<br>from PIL import Image<br>import PIL.Image<br>from PIL.ExifTags import TAGS<br>import logging<br>logger = logging.getLogger()<br>logger.setLevel(logging.INFO)</pre><pre>s3_client = boto3.client(‘s3’)<br>db_client = boto3.client(‘dynamodb’)<br>def resize_image(image_path, resized_path):<br>    with Image.open(image_path) as image:<br>    image.thumbnail(tuple(x / 2 for x in image.size))<br>    image.save(resized_path)</pre><pre>def get_exif(fn, key, bucket):<br>    ret = {}<br>    i = Image.open(fn)<br>    info = i._getexif()<br>    for tag, value in info.items():<br>    decoded = TAGS.get(tag, tag)<br>    ret[decoded] = value</pre><pre>    db_client.put_item(TableName=’CreateThumbnailEXIF’, Item={<br>        ‘imageName’:{‘S’:key},<br>        ‘image’:{‘S’:key},<br>        ‘LightSource’:{‘S’: str(ret[‘LightSource’])},<br>        ‘ResolutionUnit’:{‘S’: str(ret[‘ResolutionUnit’])},<br>        ‘Flash’:{‘S’: str(ret[‘Flash’])},<br>        ‘ExifVersion’:{‘S’: str(ret[‘ExifVersion’])},<br>        ‘ExposureBiasValue’:{‘S’: str(ret[‘ExposureBiasValue’])},<br>     })</pre><pre>    for k, v in ret.items():<br>        print(k, v)<br>        return ret</pre><pre>def handler(event, context):<br>    logger.info(‘got event{}’.format(event))<br>    logger.info(‘got context{}’.format(context))<br>    for record in event[‘Records’]:<br>        bucket = record[‘s3’][‘bucket’][‘name’]<br>        key = record[‘s3’][‘object’][‘key’]<br>        download_path = ‘/tmp/{}{}’.format(uuid.uuid4(), key)<br>        upload_path = ‘/tmp/resized-{}’.format(key)<br>        s3_client.download_file(bucket, key, download_path)<br>        get_exif(download_path, key, bucket)<br>        #resize_image(download_path, upload_path)<br>        #s3_client.upload_file(upload_path, ‘{}resized’.format(bucket), key)</pre><p>Zip up the files and place them on the AWS server. Below are the commands to create the necessary IAM roles and policies.</p><pre>zip -r $function.zip *</pre><pre>lambda_execution_role_arn=$(aws iam create-role \<br>--role-name “$lambda_execution_role_name” \<br>--assume-role-policy-document ‘{<br>   “Version”: “2012–10–17”,<br>   “Statement”: [<br>   {<br>     “Sid”: “”,<br>     “Effect”: “Allow”,<br>     “Principal”: {<br>       “Service”: “lambda.amazonaws.com”<br>     },<br>     “Action”: “sts:AssumeRole”<br>   }<br>  ]<br>  }’ \<br>--output text \<br>--query ‘Role.Arn’<br>)</pre><pre>aws iam put-role-policy \<br>--role-name “$lambda_execution_role_name” \<br>--policy-name “$lambda_execution_access_policy_name” \<br>--policy-document ‘{<br>   “Version”: “2012–10–17”,<br>   “Statement”: [<br>  {<br>    “Effect”: “Allow”,<br>    “Action”: [<br>    “logs:*”<br>   ],<br>    “Resource”: “arn:aws:logs:*:*:*”<br>  },<br>  {<br>    “Effect”: “Allow”,<br>    “Action”: [<br>    “s3:GetObject”<br>   ],<br>    “Resource”: “arn:aws:s3:::’$source_bucket’/*”<br>  },<br>  {<br>    “Effect”: “Allow”,<br>    “Action”: [<br>    “s3:PutObject”<br>    ],<br>    “Resource”: “arn:aws:s3:::’$target_bucket’/*”<br>   }<br>  ]<br> }’</pre><pre>aws lambda create-function \<br> --region us-west-2 \<br> --function-name $function \<br> --zip-file fileb://$function.zip \<br> --role $lambda_execution_role_arn \<br> --handler $function.handler \<br> --runtime python2.7 \<br> --profile adminuser \<br> --timeout 10 \<br> --memory-size 1024</pre><p><strong>S3 Buckets</strong></p><p>This was the first task and it required the web front end. I could not find any way in the CLI to create these buckets and assign them to the us-west-2 region. So, I gave up and grabbed my mouse.</p><p>You will need two buckets. One of them is called “whatever” and the other one has “resized” added to the original bucket as a suffix. Why two buckets? Because I was also playing around with resizing the images and that code came from AWS tutorials. I figured I would leave it in this document so you could see where I was going with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*TY1kcTI-L34kJPnMbShjFA.jpeg" /></figure><p>Next, make sure that your Lambda function executes when you add a file to the image bucket.</p><p>That’s it. Now you should see the DynamoDB tables populate with data for each image you add to the image bucket. You can also see that adding the resize functionality is very simple at this point.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=948270d7515c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS CLI & Lambda]]></title>
            <link>https://medium.com/@Christopher.Ryan/aws-cli-lambda-c63224b3236a?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/c63224b3236a</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Wed, 30 Mar 2016 13:23:48 GMT</pubDate>
            <atom:updated>2016-03-30T13:23:48.625Z</atom:updated>
            <content:encoded><![CDATA[<p>Lots of letters in the title and few words. If you don’t know what the title means then read on. Otherwise you can skip to the next section.</p><p><strong>Level Set</strong></p><p><strong>AWS</strong> — This stands for <a href="http://aws.amazon.com/">Amazon Web Services</a>. That’s well and good but what does that mean? Their <a href="https://aws.amazon.com/what-is-aws/">website</a> states that:</p><blockquote>Amazon Web Services (AWS) is a secure <a href="https://aws.amazon.com/what-is-cloud-computing/">cloud</a> services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow. Explore how millions of <a href="https://aws.amazon.com/solutions/case-studies/">customers</a> are currently leveraging AWS cloud <a href="https://aws.amazon.com/products/">products</a> and <a href="https://aws.amazon.com/solutions/">solutions</a> to build sophisticated applications with increased flexibility, scalability and reliability.</blockquote><p>Cool. So it is a cloud platform. However, don’t let that simple description deceive you. AWS is far more powerful than just a platform that offers a place to host your virtual servers, databases, and files. There is far more available. Virtual networks, API gateways, content delivery networks, micro services hosting, and high availability offerings are just a sample of what AWS offers a customer. So, take some time to click through the above links and become familiar with what AWS offers. I am confident that you will be surprised.</p><p><strong>Lambda</strong> — It is an AWS product that allows you to run code without worrying about server resources. From <a href="https://aws.amazon.com/lambda/">Amazon’s</a> site:</p><blockquote>AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume — there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service — all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.</blockquote><p><strong>CLI</strong> — This simply means “Command Line Interface.” It is a way of managing software or services (not just AWS) from the command line instead of pointing and clicking your way through an activity.</p><p><strong>Why CLI?</strong></p><p>Why would you care to learn and use CLI? It takes time to learn and everything you can do with it can also be accomplished through the web interface. The answer is simple — automation. I remember a very long time ago when I was first starting down the UNIX administration career path a mentor told me that you can always judge the competency of an administator by his weight. Yes, his weight! It was easy science, he stated. A competent administrator will automate everything: monitoring to remediation, initial configuration to decommission, and even daily tasks. (I once read where an admin had created scripts that interfaced with the coffee maker so that a cup would be waiting for him when he approached the device.) A good admin, he summarized could be observed doing nothing except watching his screen because everything had been automated. With all of that free time he would spend much of it eating. Thus, gain weight. Conversely, a new administrator would stay fit and thin by keeping busy manually performing tasks and monitoring environments.</p><p><strong>The Meat</strong></p><p>So you know understand the title as well as the motivation behind learning the CLI commands while using AWS Lambda. I am not going to repeat the information found throughout Amazon’s site but will instead just point to it where appropriate.</p><p>You must first set up your CLI environment. Instructions can be found <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html">here</a>.</p><p>With CLI installed you are ready to begin deploying your code in Lambda.</p><p>NOTE: Some of this code has been collected from other websites and documentation but modified here for this publication.</p><p>First, let’s set some variables:</p><pre>function=hello_python<br>lambda_execution_role_name=lambda-$function-exec-role<br>lambda_execution_access_policy_name=lambda-$function-exec-access<br>lambda_invocation_role_name=lambda-$function-invocation-role<br>lambda_invocation_access_policy_name=lambda-$function-invocation<br>log_group_name=/aws/lambda/$function</pre><p>Next, let’s create the python code that will run in the Lambda environment:</p><pre>cat &gt; ./hello_python.py&lt;&lt;EOF<br>def my_handler(event, context):<br> message = ‘Hello {} {}!’.format(event[‘first_name’], event[‘last_name’])<br> return { ‘message’: message }<br>EOF</pre><p>Let’s create the test JSON while we are at it:</p><pre>cat &gt; ./$function-data.json&lt;&lt;EOF</pre><pre>{<br> “first_name”: “Bob”,<br> “last_name”: “Smith”<br>}</pre><pre>EOF</pre><p>zip the file so that we can upload it to Lambda:</p><pre>zip -r $function.zip $function.py</pre><p>Now we need to create the IAM role:</p><pre>lambda_execution_role_arn=$(aws iam create-role \<br> --role-name “$lambda_execution_role_name” \<br> --assume-role-policy-document ‘{<br>   “Version”: “2012–10–17”,<br>   “Statement”: [<br>     {<br>       “Sid”: “”,<br>       “Effect”: “Allow”,<br>       “Principal”: {<br>         “Service”: “lambda.amazonaws.com”<br>       },<br>       “Action”: “sts:AssumeRole”<br>     }<br>  ]<br>}’ \<br> --output text \<br> --query ‘Role.Arn’<br>)</pre><p>We next need to create the policy for the execution of the Lambda function:</p><pre>aws iam put-role-policy \<br> --role-name “$lambda_execution_role_name” \<br> --policy-name “$lambda_execution_access_policy_name” \<br> --policy-document ‘{<br> “Version”: “2012–10–17”,<br> “Statement”: [<br>   {<br>     “Effect”: “Allow”,<br>     “Action”: [<br>       “logs:*”<br>     ],<br>     “Resource”: “arn:aws:logs:*:*:*”<br>   },<br>  {<br>    “Effect”: “Allow”,<br>    “Action”: [<br>      “s3:GetObject”<br>    ],<br>    “Resource”: “arn:aws:s3:::’$source_bucket’/*”<br>   },<br>  {<br>    “Effect”: “Allow”,<br>    “Action”: [<br>      “s3:PutObject”<br>    ],<br>    “Resource”: “arn:aws:s3:::’$target_bucket’/*”<br>   }<br> ]<br>}’</pre><p>We are now ready to create the function (change the <strong>adminuser</strong> to whatever user you have set up)</p><pre>aws lambda update-function-code \<br> --region us-west-2 \<br> --function-name $function \<br> --zip-file fileb://$function.zip \<br> --role $lambda_execution_role_arn \<br> --handler $function.my_handler \<br> --runtime python2.7 \<br> --profile <strong>adminuser</strong> \<br> --timeout 15 \<br> --memory-size 512</pre><p>We are now ready to test it:</p><pre>aws lambda invoke-async --function-name “$function” --invoke-args “$function-data.json”</pre><p>You can log into AWS CloudWatch and view the logs of this run.</p><p>Of course, you probably want to make changes to your code and test it all again. To do that, you need a way to update the function.</p><p>The first step is to update your code.</p><p>Then, you need to create a new zip file:</p><pre>zip -r $function.zip $function.py</pre><p>Next, you need to update your function with the new code:</p><pre>aws lambda create-function \<br> --region us-west-2 \<br> --function-name $function \<br> --zip-file fileb://$function.zip</pre><p>Finally, you can execute it again:</p><pre>aws lambda invoke-async --function-name “$function” --invoke-args “$function-data.json”</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c63224b3236a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Set up an SVN version control repository]]></title>
            <link>https://medium.com/@Christopher.Ryan/set-up-an-svn-version-control-repository-a89bfa727a59?source=rss-76684bf48c41------2</link>
            <guid isPermaLink="false">https://medium.com/p/a89bfa727a59</guid>
            <category><![CDATA[svn]]></category>
            <dc:creator><![CDATA[Christopher A. Ryan]]></dc:creator>
            <pubDate>Wed, 30 Mar 2016 12:20:53 GMT</pubDate>
            <atom:updated>2016-03-30T12:20:53.240Z</atom:updated>
            <content:encoded><![CDATA[<p>On your server:</p><pre># yum -y install subversion<br># svnadmin create /var/svn</pre><p>Now that we have a repository. We can add projects to it.</p><pre># cd /my/scripts<br># svn import cfg2html2 file:///var/svn/cfg2html2 -m &quot;Initial import&quot;</pre><p>The files are in the repository. We can now check them out.</p><pre>#svn checkout file:///var/svn/cfg2html2</pre><p>Modify your files and then commit them</p><pre>#Modify your code<br>#Show the status of files (add, modify, delete)<br>#svn status<br>#update sources in case someone else modified them<br>#svn update<br>#Now, commit the changes<br>#svn commit -m &quot;Modified main script.&quot;</pre><p>Lots of commands can be used but here are some that are important</p><pre>#svn list file:///var/svn/cfg2html2<br>#svn status [-v] [-u]<br>#svn add myFile<br>#svn delete myFile<br>#svn copy myFile myFileNew<br>#svn move myFile MyFileNew<br>#svn mkdir myDir</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a89bfa727a59" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>