Giter Club home page Giter Club logo

aws_vps's Introduction

AWS-VPS

此项目使用AWS-CloudFormation自动创建与管理VPS,配置信息将会自动发送至指定邮箱。

在部署之前,首先完成以下步骤:

  • 注册一个AWS账户
  • 安装AWS-CLI,配置好本地的profile
  • 能运行bash脚本的操作系统环境(Linux,MacOS等)

下面的部署过程均使用bash脚本,但是也可以按照脚本的命令手动创建和销毁stack。

1. 环境初始化

打开run.sh,将下列变量替换成合适的值:

# You need to replace it with your own aws profile name
AWS_PROFILE=admin-master
# The region of S3, you may need to replace it
REGION=ap-east-1
# Set your AWS S3 bucket name and CloudFormation stack names
S3_BUCKET_NAME=vps-fhqou3bjdshobo84
# Your email address for receiving notification
[email protected]

AWS_PROFILE为本地profile的名字,REGION为VPS服务器将要部署的地区(当前为香港),S3_BUCKET_NAME为存储CloudFormation模板的bucket名称(globally unique),SNSSubsciptionEmail为接收配置信息的邮箱地址。

接着,运行下面的命令:

sh run.sh init

该命令将创建一个S3 bucket,上传所需的CloudFormation模板。该命令还将将创建服务器运行的环境,如VPC,Subnet,SNS等。

打开AWS console,进入CloudFormation页面,等待stack创建完毕。创建完成后,你的邮箱将收到订阅邮件,点击订阅。

2. 创建VPS

运行下面的命令:

sh run.sh deploy

该命令将创建一个VPS,并自动配置,发送配置信息到你的邮箱。收到邮件后,在任意客户端中填写配置信息,即可使用此VPS连接。

3. 销毁VPS

运行下面的命令:

sh run.sh delete

该命令将销毁刚刚创建好的VPS。如果连接失败,可销毁VPS后再创建一个新的VPS。

4. 释放资源

运行下面的命令:

sh run.sh clean

该命令将释放第一步创建的所有资源。

aws_vps's People

Contributors

2horse9sun avatar

Stargazers

Dongying Cao avatar  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.