GithubHelp home page GithubHelp logo

irvinezhao / delivery-by-terraform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webankpartners/delivery-by-terraform

0.0 1.0 0.0 528 KB

License: Apache License 2.0

TSQL 85.10% Shell 4.34% Smarty 4.22% HCL 6.34%

delivery-by-terraform's Introduction

中文 / English

公有云软件系统一键交付 (Delivery By Terraform)

使用Terraform一键交付公有云软件系统

使用方法:

1. 下载 Terraform

官方下载地址: https://www.terraform.io/downloads.html

根据操作系统类型下载 e.g.
Windows 64: https://releases.hashicorp.com/terraform/0.12.19/terraform_0.12.19_windows_amd64.zip
Linux 64: https://releases.hashicorp.com/terraform/0.12.19/terraform_0.12.19_linux_amd64.zip

2. 配置 Terraform (以Windows为例)

2.1 下载后解压至任一目录(如d:\terraform)

terraform location

2.2 配置Path,可在任何目录执行terraform

terraform env path

3. 下载本仓库

$cd d:\dev
$git clone https://github.com/jordanzhangsz/delivery-by-terraform.git

4. 运行Terraform部署应用

部署之前先配WeCube打包的镜像仓库密码至环境变量,以及设置mysql的root密码 terraform app password

4.1 部署阿里云

4.1.1 配置Access Key/Secret Key至本地环境变量

terraform ali cloud key

注意: Access Key/Secret Key是敏感信息,建议配置到本地环境变量,不要配置在Terraform的模板文件*.tf里

4.1.2 初始化Terraform
$cd d:\dev\delivery-by-terraform\delivery-wecube\to_ali_cloud
$terraform init    -- 安装阿里云的插件, 需要点实践,因国内网速较慢
4.1.3 执行部署(一键部署)
$cd d:\dev\delivery-by-terraform\delivery-wecube\to_ali_cloud
$terraform apply   -- 执行部署
$.....
$Enter a value: yes  -- 确认执行
$.....

terraform apply

如果你看到这个,说明已部署成功,拷贝输出的URL至浏览器即可访问Wecube wecube

4.1.4 销毁部署 (一键销毁)
$cd d:\dev\delivery-by-terraform\delivery-wecube\to_ali_cloud
$terraform destroy   -- 销毁部署
$.....
$Enter a value: yes  -- 确认执行
$.....

terraform deploy

4.2 部署腾讯云

4.2.1 配置Access Key/Secret Key至本地环境变量

terraform tencent cloud key

注意: Access Key/Secret Key是敏感信息,建议配置到本地环境变量,不要配置在Terraform的模板文件*.tf里

4.1.2 初始化Terraform
$cd d:\dev\delivery-by-terraform\delivery-wecube\to_tencent_cloud
$terraform init    -- 安装腾讯云的插件, 需要点实践,因国内网速较慢
剩余的步骤跟上面的阿里云部署的步骤4.1.3, 4.1.4类似。

delivery-by-terraform's People

Contributors

irvinezhao avatar jordanzhangsz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.