sudo hostnamectl set-hostname tux-OnPrem
export PS1="[\u@tux-OnPrem]\$ "
# \w Full Path
export PS1="\n\[\e[01;33m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[01;36m\]\h\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;35m\]\w\[\e[0m\]\[\e[01;37m\] \[\e[0m\]\n$ "
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install GeckoDriver | |
cd /bin | |
url=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | python -c "import sys, json; print(next(item['browser_download_url'] for item in json.load(sys.stdin)['assets'] if 'linux64' in item.get('browser_download_url', '')))") | |
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum -y install wget python-pip firefox | |
wget $url | |
tar -xvzf geckodriver-*-linux64.tar.gz | |
rm -rf geckodriver-*-linux64.tar.gz | |
chmod +x geckodriver | |
cp geckodriver wires |
AWS Systems Manager lets you remotely and securely manage the configuration of your managed instances. It helps you automate management tasks.
- Create IAM Role - Assign Permissions
- Create EC2 & Assign IAM Role - "AmazonEC2RoleforSSM" role to an Amazon EC2 instance with "AmazonSSMFullAccess" Permissions
- Bootstrap with SSM
- Run Command
#!/bin/bash
cd /tmp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Scalable Wordpress instance", | |
"Parameters": { | |
"InstanceType": { | |
"Type": "String", | |
"Description": "Instance type", | |
"Default": "t2.medium", | |
"AllowedValues": [ "t2.medium", "t2.large" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://python-guide-pt-br.readthedocs.io/en/latest/dev/virtualenvs/ | |
### Install Python Virtual Environment package using `pip` | |
pip install virtualenv | |
### Start by making a new directory to work with: | |
### mkdir -p <path-to-env-directory> | |
mkdir -p /var/flask-app && cd /var/flask-app |
# Install pip & Git
yum -y install epel-release
yum -y install python-pip git
# Install pre-requisites
yum -y install libxml2-python python-lxml
# Install latex2edx using pip
pip install -e git+https://github.com/mitocw/latex2edx.git#egg=latex2edx
#https://github.com/nodesource/distributions#rpminstall
curl -sL https://rpm.nodesource.com/setup_7.x | bash -
yum install -y nodejs
yum install -y gcc-c++ make
node --version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Recipe for creating and updating security groups programmatically. | |
""" | |
import collections | |
import boto |