$ aws configure AWS Access Key ID [None]: YOURKEY
AWS Secret Access Key [None]: YOURSECRETKEY
Default region name [None]: us-west-2
Default output format [None]: json
#!/bin/bash | |
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
region=$(curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}') | |
clear | |
echo " The Id of this EC2 Instance is : $instanceId" | |
echo " The Region of this EC2 Instance is : $region" |
# Install aws-codedeploy-agent and required gems | |
sudo apt-get install -y git | |
codedeploy_git_url='https://github.com/aws/aws-codedeploy-agent.git' | |
git clone "$codedeploy_git_url" | |
sudo gem install bundler | |
sudo mv aws-codedeploy-agent /opt/codedeploy-agent | |
cd /opt/codedeploy-agent | |
bundle install --system | |
# Setup permissions |
FROM jeanblanchard/java:8 | |
LABEL environement="dev" service="book" owner="rcherara" | |
LABEL Description="This image is used to start the rest-example executable" Vendor="API Books" Version="1.0" | |
MAINTAINER rcherara | |
WORKDIR /opt/rest-example/ | |
COPY target/rest-example-0.1.0.jar rest-example-0.1.0.jar | |
CMD java -jar rest-example-0.1.0.jar | |
EXPOSE 7680 | |
#!/bin/bash | |
# Create a new user using Service Account mechanism of Kubernetes, | |
kubectl apply -f dashboard-adminuser.yaml | |
# Bearer Token | |
# Now we need to find token we can use to log in. | |
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}') | |
echo "Now copy the token and paste it into Enter token field on log in screen." |
#!/bin/sh | |
# Install ufw | |
sudo apt install ufw | |
# Create setup_firewall.sh and run | |
chmod +x ./setup_firewall.sh | |
# Then run the script: | |
sudo ./setup_firewall.sh. |
$ git init | |
$ git add . | |
$ git commit -m "First commit" | |
$ git remote add origin https://github.com/Reddah-Cherara/rcherara-api-book-go.git | |
$ git remote -v | |
$ git push -u origin master | |
$ git push --force https://github.com/Reddah-Cherara/rcherara-api-book-go.git | |
$ git push -u origin master |