A little background on my context:
We run multiple Solr JVMs per box, which live in directories like:
/mnt/solr_8983
/mnt/solr_8984
/mnt/solr_8985
...
/mnt/solr_${PORT}
A little background on my context:
We run multiple Solr JVMs per box, which live in directories like:
/mnt/solr_8983
/mnt/solr_8984
/mnt/solr_8985
...
/mnt/solr_${PORT}
# A user session class, a simplified mix of the following code samples: | |
# * https://github.com/blog/1661-modeling-your-app-s-user-session | |
# * http://www.jonathanleighton.com/articles/2013/revocable-sessions-with-devise/ | |
class Session < ActiveRecord::Base | |
# Uncomment if you use Hobo Fields, else add these yourself | |
# fields do | |
# session_id :string, :index => true, :unique => true | |
# accessed_at :datetime | |
# user_ip :string |
# Ruby on Rails Development Environment | |
FROM ruby:2.5.0 | |
# Set up Linux | |
RUN apt-get update | |
RUN apt-get install -y build-essential inotify-tools libpq-dev nodejs postgresql-client | |
WORKDIR /app | |
EXPOSE 3000 |
# Place this in your .bashrc | |
# Covers several corner cases such as nested apostrophes, history extraction in screens/subshells, Slack being down, etc. | |
# Strings to replace with your own credentials: | |
## {your email address} (1 instance) | |
## {slack webhook url} (1 instance) | |
## {your computer name} (2 instances) | |
slack() { | |
# Get slack message when a command exits | |
# Example usage: python long_job.py; slack |
Example of a bare-minimum terraform script to setup an API Gateway endpoint that takes records and puts them into an SQS queue.
Start by creating the SQS queue.
resource "aws_sqs_queue" "queue" {
#cloud-config | |
# Enable automatic package updates and upgrades during cloud-init execution | |
package_update: true | |
package_upgrade: true | |
packages: | |
# Security and Hardening | |
- ufw | |
- fail2ban |