Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
fucking_shell_scripts
Advanced tools
The easiest, most common sense server configuration management tool...because you just use fucking shell scripts.
Completely confused by Chef? Blowing your brains out over Ansible? Lost control of your Puppets? Wanna just use fucking shell scripts to configure a server? Read on!
gem install fucking_shell_scripts
mkdir config_management
Folder structure:
/servers
(required) - yaml server definitions (see example below)
/scripts
(required) - the shell scripts that will configure your servers (see example below)
/files
(optional) - files to be transferred to servers (nginx.conf, ssh keys, database.yml, etc.)
An example folder structure:
./config_management
├── files
│ ├── keys
│ │ └── deploy_key
│ └── rails_config
│ └── database.yml
├── scripts
│ ├── apt.sh
│ ├── deploy_key.sh
│ ├── git.sh
│ ├── redis.sh
│ ├── ruby2.sh
│ ├── rubygems.sh
│ ├── search_service_code.sh
│ └── search_service_env.sh
└── servers
├── defaults.yml
└── search-server.yml
The server definition file defines how to build a type of server. Server definitions override settings in defaults.yml
.
# servers/search-server.yml
##################################################
# This file defines how to build our search server
##################################################
name: search-server
size: c1.xlarge
availability_zone: us-east-1d
image: ami-90374bf9
key_name: pd-app-server
private_key_path: /Users/yourname/.ssh/pd-app-server
security_groups: search-service # override the security_groups defined in defaults.yml
############################################
# Files necessary to build the search server
############################################
files:
- files/keys/deploy_key
###########################################
# Scripts needed to build the search server
###########################################
scripts:
- scripts/apt.sh
- scripts/search_service_env.sh
- scripts/git.sh
- scripts/ruby2.sh
- scripts/rubygems.sh
- scripts/redis.sh
- scripts/deploy_key.sh
servers/defaults.yml
has the same structure and keys a server definition file, except, you cannot define scripts or files.
# servers/defaults.yml
################################
# This file defines our defaults
################################
security_groups: simple-group
size: c1.medium
image: ami-e76ac58e
availability_zone: us-east-1d
key_name: global-key
cloud:
provider: AWS
aws_access_key_id: <%= ENV["AWS_ACCESS_KEY"] %>
aws_secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
region: us-east-1
Anything passed in the 'cloud' key will be directly passed to
Fog::Compute.new
. See the fog website for more info.
FSS will consider any values that look like "ENV[VAR_NAME]" to be environment variables, and will attempt to look up that environment variable. If FSS does not find that variable, an exception will be raised.
Seriously...just write shell scripts.
Want to install Ruby 2? Here's an example:
#!/bin/sh
#
# scripts/ruby2.sh
#
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz
tar -xzf ruby-2.0.0-p247.tar.gz
cd ruby-2.0.0-p247
./configure --prefix=/usr/local
make
sudo make install
rm -rf /tmp/ruby*
fss search-server
This command does 2 things:
To build only:
fss --build search-server
To configure only:
fss --instance-id i-9ad6d7af --configure search-server
Note: --instance-id
is required when using the --configure
option
rm -rf ~/old_config_management/chef
HOLY SHIT! THAT WAS EASY.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that fucking_shell_scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.