How-To: Recovering a mdadm RAID array with a failed drive
Hard drives can be fickel things. I needed to upgrade my server’s OS from Ubuntu 12.10 to 16.04, but I forgot what drives it had. I wasn’t sure if I had a separate drive for the OS or not, and I am very green when it comes to this type of linux work. To aid in investigating this I opened up the case and looked. Yes, I had three. When I plugged in everything I found one of the drives died during my intrusion.
Hints: Deploying an HTTPS-enabled, Elastic Beanstalk, Python/Pyramid application
Over the last few weeks, I have been learning the best way to deploy a HTTPS-enabled application through trial and error. Three possible options are through the AWS Certificate Manager (ACM), Let's Encrypt, and using your own CA issued certificate. There might be others, but these are the methods I tried. In this article I will go over each and what ended up working for me.
As a general rule, I try to take the path of least resistance. If a method requires learning something I don't immediately know, and it looks like it will take more than a few seconds to understand, I move on to the next best prospective option. Of course if I exhaust every path then I will go back and learn the tech needed. In this example, that technology ended up being .ebextension files and EB CLI, but in hindsight I don't think I needed EB CLI.
We'll be going over
- AWS Certificate Manager
- Let's Encrypt
- Bring your own certificate (BYOC)
- The option that did work
python34 for Amazon Linux is Missing Its Wheels
Since writing my first two posts I found out that I was doing it wrong. In the past I would use virtualenv to create virtual environments. I would also use the activate script which I later found out "drops turds" into your shell environment. All of this was a result of my upbringing in Python, and I suspect that many people still have this issue to some degree. They use what they know works and stick with it.
It seems that Amazon is no different.
How-To: Pyramid Starter on AWS
My previous post showed how to deploy a Pyramid Hello World App to AWS. Deploying the Pyramid Starter App is similar. It is diffferent by the fact that there is more than just a application.py file and a requirements.txt file. However the concepts are the same. The key thing here is that these steps do not require any knowledge of EB CLI. The project can be zipped up and uploaded to the AWS instance.
How-To: Hello Pyramid on AWS
When I tried creating a Pyramid app on AWS I couldn't find any examples or guides. I put together the following How-To to document what I did to get the hello world app from Pyramid's documentation working on AWS. Please be aware that this is not a full fledged application, instead it is a single python script that serves up a very simple application. I also don't attempt to get into anything more than the basics. Things like SSL, database connections, and even version control software is ignored. The goal is to get a very simple app going on AWS for learning purposes. I'll be going over the following:
- Code Deployment
- Complete Code
This site/blog/soapbox is where I intend to post stuff that I feel might help someone even if the only someone is me. For now I only plan to post how-tos and maybe an occasional response to some new tool or workflow.
The site is still being tweaked, so please be patient. As time goes on I will add new features.
In real life, I am a IT manager who started as a PeopleSoft consultant out of college, but then stumbled into Python via PHP (funny story). Since I learned quite a bit about databases in my Peoplesoft days I kept it up by making sure the databases behind the apps I maintained stayed healthy. I eventually landed at BenefitPlan Manager where I am trying to make things a little better each day.