提交 18498311 编写于 作者: T TommyLike

Append jenkins file change for testing

上级 bfb46f51
......@@ -12,4 +12,8 @@ resources into kubernetes cluster.
# Command to generate the final yaml
```$xslt
helm template ./jenkins --namespace jenkins-system -f jenkins/values.yaml -f jenkins/hw_override.yaml --name openeuler
```
\ No newline at end of file
```
# Node Notes
jenkins slave's working dir will be put at the path of `/jenkins_agent_dir` therefore it's required to make the folder ready
before assign any pods into that nodes.
\ No newline at end of file
......@@ -8,11 +8,11 @@ master:
# test pod will be created to test the readness of master web UI if enabled.
testEnabled: false
# used to specify the Elb ID which used for master service
huaweielbID: 1b8c18b6-0dd1-411a-b3bc-393bccd8d718
huaweielbID: e1bb61d2-6101-419f-97d8-c76b1020a0c1
# used to specify the service type of master service
serviceType: LoadBalancer
# EIP for node load balancer
loadBalancerIP: 159.138.51.146
loadBalancerIP: 114.116.250.98
# used to specify the service port for master web UI
servicePort: 80
# used to specify the service node port for master web UI
......@@ -23,7 +23,7 @@ master:
# request resource for master pod
resources:
requests:
cpu: "4000m"
cpu: "8000m"
memory: "8192Mi"
limits:
cpu: "8000m"
......@@ -64,13 +64,17 @@ agent:
# Resource request for cloud 1 agents.
resources:
requests:
cpu: "8000m"
memory: "8192Mi"
limits:
cpu: "8000m"
memory: "8192Mi"
cpu: "2000m"
memory: "4096Mi"
#Used in job to specify which kind of agent to use for example arm or x86
componentName: "jenkins-slave-x86"
envVars:
- name: JENKINS_AGENT_WORKDIR
value: /home/jenkins/agent-working-dir
volumes:
- type: HostPath
mountPath: /home/jenkins/agent-working-dir
hostPath: /jenkins_agent_dir
#Configure option for cloud 2 provider
cloud2:
name: kubernetes-arm-cluster
......@@ -82,13 +86,17 @@ agent:
# Resource request for cloud 2 agents.
resources:
requests:
cpu: "8000m"
memory: "8192Mi"
limits:
cpu: "8000m"
memory: "8192Mi"
cpu: "2000m"
memory: "4096Mi"
#Used in job to specify which kind of agent to use for example arm or x86
componentName: "jenkins-slave-arm"
envVars:
- name: JENKINS_AGENT_WORKDIR
value: /home/jenkins/agent-working-dir
volumes:
- type: HostPath
mountPath: /home/jenkins/agent-working-dir
hostPath: /jenkins_agent_dir
persistence:
# Whether to enable persistent volume
......
......@@ -62,7 +62,7 @@ data:
{{- end }}</nodeSelector>
<nodeUsageMode>EXCLUSIVE</nodeUsageMode>
<volumes>
{{- range $index, $volume := .Values.agent.volumes }}
{{- range $index, $volume := .Values.agent.cloud1.volumes }}
<org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
{{- range $key, $value := $volume }}{{- if not (eq $key "type") }}
<{{ $key }}>{{ $value }}</{{ $key }}>
......@@ -97,8 +97,6 @@ data:
# enough time to migrate.
<resourceRequestCpu>{{.Values.agent.cloud1.resources.requests.cpu}}</resourceRequestCpu>
<resourceRequestMemory>{{.Values.agent.cloud1.resources.requests.memory}}</resourceRequestMemory>
<resourceLimitCpu>{{.Values.agent.cloud1.resources.limits.cpu}}</resourceLimitCpu>
<resourceLimitMemory>{{.Values.agent.cloud1.resources.limits.memory}}</resourceLimitMemory>
<envVars>
<org.csanchez.jenkins.plugins.kubernetes.ContainerEnvVar>
<key>JENKINS_URL</key>
......@@ -108,7 +106,7 @@ data:
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
</containers>
<envVars>
{{- range $index, $var := .Values.agent.envVars }}
{{- range $index, $var := .Values.agent.cloud1.envVars }}
<org.csanchez.jenkins.plugins.kubernetes.PodEnvVar>
<key>{{ $var.name }}</key>
<value>{{ $var.value }}</value>
......@@ -169,7 +167,7 @@ data:
{{- end }}</nodeSelector>
<nodeUsageMode>EXCLUSIVE</nodeUsageMode>
<volumes>
{{- range $index, $volume := .Values.agent.volumes }}
{{- range $index, $volume := .Values.agent.cloud2.volumes }}
<org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
{{- range $key, $value := $volume }}{{- if not (eq $key "type") }}
<{{ $key }}>{{ $value }}</{{ $key }}>
......@@ -204,8 +202,6 @@ data:
# enough time to migrate.
<resourceRequestCpu>{{.Values.agent.cloud2.resources.requests.cpu}}</resourceRequestCpu>
<resourceRequestMemory>{{.Values.agent.cloud2.resources.requests.memory}}</resourceRequestMemory>
<resourceLimitCpu>{{.Values.agent.cloud2.resources.limits.cpu}}</resourceLimitCpu>
<resourceLimitMemory>{{.Values.agent.cloud2.resources.limits.memory}}</resourceLimitMemory>
<envVars>
<org.csanchez.jenkins.plugins.kubernetes.ContainerEnvVar>
<key>JENKINS_URL</key>
......@@ -215,7 +211,7 @@ data:
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
</containers>
<envVars>
{{- range $index, $var := .Values.agent.envVars }}
{{- range $index, $var := .Values.agent.cloud2.envVars }}
<org.csanchez.jenkins.plugins.kubernetes.PodEnvVar>
<key>{{ $var.name }}</key>
<value>{{ $var.value }}</value>
......
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDbJoHskFbcEYm2qbBWPbc0FJyMOum3w4/9/NfJ50FPreGBe6icadNfm08/pYVB9W7do/g262bt/PC96fJWpuPdFIB2TX7rxlBiI+DYXNZdwuaLBjTTTPWJSKK3d97noYg5HXPI1JqTb7LDQLiushU/pZA8hYlwyUNsPsBo/Vs7WIbC1xf153AHdjOE4Q0G0Ab56oFdy9g9g8avdUDuLojWgfJJqobQM5r5V7vJBNk9jnPD8mOikV/pjl09mmmxgNfVDuu9/I+9ySLOZ4zvZU6Y7uCy8gtKgGUfWtnWlcfuUdeLfK3+Gfd9NBGx8tZu0t5VHM6h+VXgUCoRmVRPjgtAbM3ERioZsXdzN+Qv87e6CY4tTlOkeToXIrzb8TLK5S2y7ERfKIaugeIxlsUG0aAz2+F5t3xweqdqhpU2vupjQEJ8FyYvVzKj4IE63hfUeVuNQmIg1bpsw0oAPm+nQwOWr/e49aBp1NoR6F9HVE/TjhZuDCaejmEN7VMHPmGVcUXG8RqgYzXFfkuWlwpT4YT0J+u+lYuLa3ozM/dNckk92mbg+mD3ccAoPwZlWjVp+BFfKQBKpRfUNncwaU0Y6UtxA7co80KdzrkA6xse2/r7ApUmj6mP12z7L6nj8+mv500F7dHkxmrQQnmpG6ovY+XqZTZFYOlHHUrbjXJEsoSPkw== jenkins_master
\ No newline at end of file
#!/usr/bin/env bash
disk_name=$1
if [[ ! -e ${disk_name} ]]; then
echo "disk ${disk_name} not existed"
exit 1
fi
if [[ ! -e ~/.ssh/authorized_keys ]]; then
echo "public key file for jenkins master not exists"
exit 1
fi
# install required tools
sudo yum install -y java-1.8.0-openjdk
sudo yum install -y git
# prepare disk
mkfs.ext4 ${disk_name}
mkdir /jenkins_home
mount ${disk_name} /jenkins_home
chmod 600 ~/.ssh/authorized_keys
#!/usr/bin/env bash
disk_name=$1
if [[ ! -e ${disk_name} ]]; then
echo "disk ${disk_name} not existed"
exit 1
fi
if [[ ! -e ~/.ssh/authorized_keys ]]; then
echo "public key file for jenkins master not exists"
exit 1
fi
# install required tools
zypper install -y java-1_8_0-openjdk
zypper install -y git
# prepare disk
mkfs.ext4 ${disk_name}
mkdir /jenkins_home
mount ${disk_name} /jenkins_home
chmod 600 ~/.ssh/authorized_keys
#!/usr/bin/env bash
# Usage: ./setup.sh <script-name> <ip-address> <data-disk-name>
script_name=$1
ip_address=$2
disk_name=$3
scp ./authorized_keys root@${ip_address}:~/.ssh/
scp ./${script_name} root@${ip_address}:~/
ssh root@${ip_address} "chmod +x ~/${script_name} && ~/${script_name} ${disk_name}"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册