This file contains hidden or 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 | |
| AWS_PROFILE=<yourprofile-name> | |
| instanceId=$1 | |
| pubkey="$HOME/.ssh/id_rsa.pub" | |
| sshUser='ec2-user' | |
| az=$(aws ec2 describe-instances --instance-id ${instanceId} --region ap-northeast-1 --query 'Reservations[0].Instances[0].Placement.AvailabilityZone' --output text) | |
| privateIp=$(aws ec2 describe-instances --instance-id ${instanceId} --region ap-northeast-1 --query 'Reservations[0].Instances[0].PrivateIpAddress' --output text) | |
This file contains hidden or 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: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| namespace: vnins | |
| name: ingress-gateway | |
| annotations: | |
| kubernetes.io/ingress.class: alb | |
| alb.ingress.kubernetes.io/scheme: internet-facing | |
| alb.ingress.kubernetes.io/target-type: ip | |
| alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig":{"Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}' |
This file contains hidden or 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
| import * as ec2 from '@aws-cdk/aws-ec2'; | |
| import * as ecs from '@aws-cdk/aws-ecs'; | |
| //import * as ecspat from '@aws-cdk/aws-ecs-patterns'; | |
| import * as iam from '@aws-cdk/aws-iam'; | |
| import { App, Construct, Stack, StackProps, CfnOutput } from '@aws-cdk/core'; | |
| export interface runnerMyStackProps extends StackProps{ | |
| gitlabRegistrationToken: string; | |
| tagLists?: string[]; | |
| } |
This file contains hidden or 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 | |
| export AWS_DEFAULT_REGION=ap-northeast-1 | |
| aws logs describe-log-streams --log-group-name fluentbit-cloudwatch --query 'logStreams[*].logStreamName' --output table \ | |
| | awk '{print $2}' | grep ^$2 \ | |
| | while read x; do echo "deleting $x" ; aws logs delete-log-stream --log-group-name $1 --log-stream-name $x; done |
This file contains hidden or 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: autoscaling/v1 | |
| kind: HorizontalPodAutoscaler | |
| metadata: | |
| name: __API_NAME__ | |
| namespace: __NAMESPACE__ | |
| spec: | |
| maxReplicas: 2 | |
| minReplicas: 1 | |
| scaleTargetRef: | |
| apiVersion: extensions/v1beta1 |
This file contains hidden or 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 | |
| RUNNER_TOKEN=$1 | |
| # Register | |
| docker run -it --rm -v /root/gitlab-runner-sit:/etc/gitlab-runner gitlab/gitlab-runner:alpine \ | |
| register --non-interactive --url https://gitlab.com \ | |
| --registration-token ${RUNNER_TOKEN} --docker-pull-policy if-not-present \ | |
| --docker-volumes /var/run/docker.sock:/var/run/docker.sock --executor docker \ | |
| --docker-volumes /root/.m2:/root/.m2 \ | |
| --docker-image alpine:latest --description "Docker Runner" --docker-privileged \ |
This file contains hidden or 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 | |
| instanceId=$1 | |
| pubkey="$HOME/.ssh/id_rsa.pub" | |
| sshUser='ec2-user' | |
| az=$(aws ec2 describe-instances --instance-id ${instanceId} --query 'Reservations[0].Instances[0].Placement.AvailabilityZone' --output text) | |
| echo "sending public key to ${instanceId}" | |
| aws ec2-instance-connect send-ssh-public-key --instance-id ${instanceId} --instance-os-user ${sshUser} \ |
This file contains hidden or 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 pipefail | |
| if [ $# != 2 ] | |
| then | |
| echo "Please give username and password \n ./init-super-user.sh tempuser 2wsx#EDCv ..." | |
| exit 1 | |
| fi | |
| USER_NAME=$1 |
This file contains hidden or 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 | |
| TMPFILE=/tmp/u53tempfile | |
| TMPFILE_URI="file://$TMPFILE" | |
| AWS=/usr/local/bin/aws | |
| function try { | |
| eval $* | |
| if [ $? -ne 0 ]; then | |
| echo "Error while evaluating \"$*\", exiting..." |
This file contains hidden or 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: "3.7" | |
| services: | |
| nexus: | |
| image: "sonatype/nexus3:3.19.1" | |
| container_name: "nexus" | |
| restart: always | |
| ports: | |
| - "8081:8081" | |
| - "5000:5000" | |
| volumes: |