$ sudo apt install curl ca-certificates
$ sudo install -d /usr/share/postgresql-common/pgdg
$ sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
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
#!/bin/bash | |
# Set the profile you want to use for MFA | |
SOURCE_PROFILE="default" | |
MFA_PROFILE="mfa" | |
# Read the MFA device ARN from the credentials file | |
MFA_DEVICE_ARN=$(aws configure get mfa_device_arn --profile $SOURCE_PROFILE) | |
if [ -z "$MFA_DEVICE_ARN" ]; then | |
echo "Error: MFA device ARN not found in the ~/.aws/credentials file for profile $SOURCE_PROFILE" |
Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:
- Model
=>
Elasticsearch (for Storage, Indexing & Search) - View
=>
Kibana (for DataViz & G-Man, yeah the one in half life 😏) - Controller
=>
Logstash (For Logs & Filtering)
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
-- PROJECT-DIRECTORY/ | |
-- modules/ | |
-- <service1-name>/ | |
-- main.tf | |
-- variables.tf | |
-- outputs.tf | |
-- provider.tf | |
-- README | |
-- <service2-name>/ | |
-- main.tf |
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
######################################################################################## | |
# # | |
# Create a new subnet in az-1a and associate it with the az-1a route table # | |
# # | |
######################################################################################## | |
resource "aws_subnet" "extra_az_1a" { | |
vpc_id = var.eks_vpc_id | |
cidr_block = "100.64.0.0/19" | |
availability_zone = "eu-west-1a" |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nodejs-service | |
spec: | |
selector: | |
app: nodejsapp | |
type: LoadBalancer | |
ports: | |
- protocol: TCP |
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
#!/bin/bash | |
# Installs Docker on Ubuntu 20.04 and Linux Mint 20 | |
# based on script and correction at https://forums.linuxmint.com/viewtopic.php?t=325502 | |
# This script is stored at https://gist.github.com/keithrbennett/d96a0409da3f07a5595d4f03d0d18b35. | |
# Check there for updates. | |
set -x | |
sudo apt-get update |
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
version: '4.5' | |
services: | |
# GITLAB | |
gitlab-web: | |
image: 'gitlab/gitlab-ce:latest' | |
restart: always | |
container_name: gitlab-web | |
hostname: '192.168.0.14' | |
environment: |
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
# Add user. | |
useradd -m username | |
# -m creates a home directory for the user. | |
# Set Password. | |
passwd username | |
# Set user group to sudo. | |
usermod -a -G sudo username | |
# -a option to add and ‘-G sudo’ means to add the user to the sudo group. |
NewerOlder