Create AWS Vpc and Ec2 via Terraform

What we will do Create new VPC Create an Internet Gateway and a NAT gateway Define subnets Create security group Create EC2 instance Integration with gitlab CI Define terraform file We will create few .tf files: backend.tf for integration with gitlab CI, we need save state file on AWS S3 bucket, otherwise Terraform will create resources every time we run CI pipeline. terraform { backend "s3" { key = "terraform-pipeline/terraform.

How to Develop DynamoDB Locally

Download DynamoDB wget https://s3.ap-southeast-1.amazonaws.com/dynamodb-local-singapore/dynamodb_local_latest.tar.gz Extract file tar zxvf dynamodb_local_latest.tar.gz Start Dynamo DB locally We can start Dynamo DB service with docker or with JAVA. start with docker edit docker-compose.yml version: '3.8' services: dynamodb-local: command: "-jar DynamoDBLocal.jar -sharedDb -optimizeDbBeforeStartup -dbPath ./data" image: "amazon/dynamodb-local:latest" container_name: dynamodb-local ports: - "8000:8000" volumes: - "./docker/dynamodb:/home/dynamodblocal/data" working_dir: /home/dynamodblocal start container docker-compose up -d start with JAVA directly java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb Create fake aws credential edit .

Using Aws Documentdb With Golang

Background AWS Document DB是基本兼容Mongo DB的AWS服务,Mongo DB是比较流行的非结构化文档数据库。使用Golang操作Document DB的方法

Gitlab Pipeline Trigger

使用Gitlab作为CI/CD工具,有的情况下需要从一个项目中触发两一个项目的pipeline,例如这样的场景:Project A是某个服务,

Oauth2 Authcode Logic

Oauth2协议中,authcode也就是授权码模式的逻辑是需要用户参与的授权方式。它的步骤如下: (A)用户访问客户端,后者将前者导向认证服

How to install mysql client on AWS ECS task

If we need to install MySQL client on an AWS ECS task, Here is the steps: install wget apt install wget install MySQL client wget [https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb](https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb) apt install lsb-release gnupg -y dpkg -i mysql-apt-config_0.8.16-1_all.deb apt update apt install mysql-client -y when connect to MySQL server add param: --ssl-mode=DISABLED

php的Yaf框架类加载顺序研究

代码 注册ini设置到global_library变量(yaf.c) STD_PHP_INI_ENTRY("yaf.library", "", PHP_INI_ALL, OnUpdateString, global_library, zend_yaf_globals, yaf_globals) 把global_library和local_library都