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
# 安装 kubespray | |
cd /opt | |
git clone https://github.com/kubernetes-sigs/kubespray.git | |
cd kubespray | |
pip3 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com | |
# 配置集群 | |
# Copy ``inventory/sample`` as ``inventory/mycluster`` | |
cp -rfp inventory/sample inventory/mycluster |
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
# Install k8s after installing LXD for Kubernetes training | |
--- | |
## 1. Install LXC packge and init LXD on Ubuntu 20.04 / 22.04 | |
```bash | |
$ sudo apt-get update && sudo apt-get install lxc -y | |
$ sudo systemctl status lxc |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="info" monitorInterval="30"> | |
<Properties> | |
<Property name="LOG_DATE_PATTERN">{yyyy-MM-dd HH:mm:ss.SSS}</Property> | |
<Property name="LOG_LEVEL_PATTERN">{-%5p}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, TRACE=blue} %style{${sys:PID}}{magenta} [%15.15t] %style{%-40.40C{1.}(:%L)}{cyan}</Property> | |
<Property name="LOG_MESSAGE_PATTERN">: %m%n%xwEx</Property> | |
</Properties> | |
<Appenders> | |
<Console name="CONSOLE" target="SYSTEM_OUT"> |
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
@EnableFeignClients(basePackages ="com.seulseul") | |
@Configuration | |
public class OpenFeignConfig implements Jackson2ObjectMapperBuilderCustomizer { | |
@Bean | |
public Retryer retryer() { | |
// 재시도는 1초를 시작으로, 최대 2초로 재시도하고, 최대 3번을 재시도한다. | |
return new Retryer.Default(1000, 2000, 3); | |
} |
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
ext { | |
set('springCloudVersion', "2021.0.7") | |
} | |
dependencyManagement { | |
imports { | |
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" | |
} | |
} |
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
create table revinfo ( | |
rev bigserial not null, | |
revtstmp int8, | |
CONSTRAINT revinfo_pkey PRIMARY KEY (rev) | |
); | |
create table revchanges ( | |
rev int8 not null, | |
entityname varchar(255) | |
); |
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
# helm standalone | |
helm install mysql-standalone -n mysql bitnami/mysql -f mysql-standalone.yaml --version 9.10.08 --create-namespace | |
# helm replication | |
helm install mysql-replication -n mysql bitnami/mysql -f mysql-replication.yaml --version 9.10.08 --create-namespace | |
## | |
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace mysql mysql-standalone -o jsonpath="{.data.mysql-root-password}" | base64 -d) |
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
# ---------------------------- | |
# stages | |
# ---------------------------- | |
stages: | |
- build_source # 소스 빌드 단계 | |
- build_push_docker_image # 도커라이징 & 도커 이미지 push 단계 | |
- deploy # gitops push | |
# ---------------------------- | |
# variables |
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
FROM ubuntu:20.04 | |
LABEL description="ubuntu:20.04 + ttyd + kubectl" | |
## https://github.com/tsl0922/ttyd | |
# 1) install apt package | |
RUN apt-get update -y && apt-get install tini bash tzdata sudo nano curl lrzsz -y | |
# 2) install ttyd (version > 1.7.3) |
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
# AWS Load Balancer Controller using ALB Ingress | |
# https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/examples/aws/alb-full.yaml | |
# minimal settings needed to run gitlab on ALB | |
# Note that when using an ALB ingress controller we need to use a separate NLB for gitlab-shell (ssh) connections. | |
# Disable nginx-ingress | |
nginx-ingress: | |
enabled: false | |
# Common settings for AWS Load Balancer Controller | |
global: |
NewerOlder