Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN实习生计划
Gitpod
提交
99c6ce26
G
Gitpod
项目概览
CSDN实习生计划
/
Gitpod
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gitpod
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
99c6ce26
编写于
8月 25, 2020
作者:
C
Christian Weichel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[installer gcp] Add certbot support
上级
d30775ca
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
0 deletion
+55
-0
components/proxy/Dockerfile
components/proxy/Dockerfile
+1
-0
install/gcp-terraform/main.tf
install/gcp-terraform/main.tf
+2
-0
install/gcp-terraform/modules/helm/main.tf
install/gcp-terraform/modules/helm/main.tf
+10
-0
install/gcp-terraform/modules/helm/variables.tf
install/gcp-terraform/modules/helm/variables.tf
+11
-0
install/gcp-terraform/variables.tf
install/gcp-terraform/variables.tf
+5
-0
install/installer/cmd/gcp.go
install/installer/cmd/gcp.go
+26
-0
未找到文件。
components/proxy/Dockerfile
浏览文件 @
99c6ce26
...
...
@@ -41,6 +41,7 @@ RUN apt-get update && apt-get install -yq \
# Include certbot into the proxy for HTTPS termination
RUN
curl
-o
/usr/bin/lama
-L
https://github.com/csweichel/lama/releases/download/v0.3.0/lama_0.3.0_Linux_x86_64
&&
\
chmod
+x /usr/bin/lama
**
\
mkdir
-p
/var/www/lama/nginx
&&
\
touch
/var/www/lama/nginx/status
&&
\
apt-get update
&&
\
...
...
install/gcp-terraform/main.tf
浏览文件 @
99c6ce26
...
...
@@ -70,6 +70,8 @@ module "helm" {
]
forceHTTPS
=
var
.
force_https
certificateEmail
=
var
.
certificate_email
certbotEnabled
=
var
.
certbot_enabled
requirements
=
[
module
.
network
.
done
,
...
...
install/gcp-terraform/modules/helm/main.tf
浏览文件 @
99c6ce26
...
...
@@ -60,6 +60,16 @@ resource "helm_release" "gitpod" {
value
=
"[]"
}
set
{
name
=
"components.proxy.certbot.enaled"
value
=
var
.
certbotEnabled
}
set
{
name
=
"components.proxy.certbot.email"
value
=
var
.
certificateEmail
}
depends_on
=
[
var
.
requirements
]
...
...
install/gcp-terraform/modules/helm/variables.tf
浏览文件 @
99c6ce26
...
...
@@ -53,3 +53,14 @@ variable "forceHTTPS" {
type
=
bool
default
=
false
}
variable
"certbotEnabled"
{
type
=
bool
default
=
false
}
variable
"certificateEmail"
{
type
=
string
}
install/gcp-terraform/variables.tf
浏览文件 @
99c6ce26
...
...
@@ -46,4 +46,9 @@ variable "image_prefix" {
variable
"force_https"
{
type
=
bool
default
=
false
}
variable
"certbot_enabled"
{
type
=
bool
default
=
false
}
\ No newline at end of file
install/installer/cmd/gcp.go
浏览文件 @
99c6ce26
...
...
@@ -67,6 +67,32 @@ var gcpCmd = &cobra.Command{
if
err
!=
nil
{
ui
.
Fatalf
(
"cannot update the
\"
domain
\"
terraform variables:
\n\t
%q"
,
err
)
}
}
else
{
err
=
terraform
.
PersistVariable
(
tfvarsfn
,
terraform
.
PersistVariableOpts
{
Name
:
"force_https"
,
Sources
:
[]
terraform
.
VariableValueSource
{
func
(
name
string
,
spec
terraform
.
VariableSpec
)
(
value
string
,
ok
bool
)
{
return
"true"
,
true
}},
},
terraform
.
PersistVariableOpts
{
Name
:
"certbot_enabled"
,
Sources
:
[]
terraform
.
VariableValueSource
{
func
(
name
string
,
spec
terraform
.
VariableSpec
)
(
value
string
,
ok
bool
)
{
return
"true"
,
true
}},
},
terraform
.
PersistVariableOpts
{
Name
:
"certificate_email"
,
Spec
:
terraform
.
VariableSpec
{
Description
:
"Gitpod will attempt to issue HTTPS certificates for you. Please provide an email that's used with Let's Encrypt to do so."
,
Validate
:
func
(
val
string
)
error
{
if
!
strings
.
Contains
(
val
,
"@"
)
{
return
fmt
.
Errorf
(
"not a valid email address"
)
}
return
nil
},
},
},
)
if
err
!=
nil
{
ui
.
Fatalf
(
"cannot update the
\"
domain
\"
terraform variables:
\n\t
%q"
,
err
)
}
}
terraform
.
Run
([]
string
{
"init"
},
terraform
.
WithBasedir
(
basedir
),
terraform
.
WithFatalErrors
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录