Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8,635 changed files
with
1,329,364 additions
and
224,191 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
variable "huawei_access_key" { | ||
sensitive = true | ||
type = string | ||
} | ||
|
||
variable "huawei_secret_key" { | ||
sensitive = true | ||
type = string | ||
} | ||
|
||
variable "huawei_region" { | ||
default = "cn-north-4" | ||
} | ||
|
||
variable "instance_name" { | ||
default = "ci" | ||
} | ||
|
||
variable "instance_image" { | ||
default = "660d40ec-2dc6-44b7-9f4d-7ae5bdf5319a" | ||
} | ||
|
||
variable "flavor_id" { | ||
default = "kc1.2xlarge.2" | ||
} | ||
|
||
variable "instance_securitygroup" { | ||
default = [ | ||
"62555a74-5dcb-4fe3-8763-2c4d835b73c8"] | ||
} | ||
|
||
variable "instance_availability_zone" { | ||
default = "cn-north-4b" | ||
} | ||
|
||
variable "instance_os_disk_size" { | ||
default = 100 | ||
} | ||
|
||
variable "instance_vxnet" { | ||
default = "eb86da07-01a2-40d5-8c45-6f38ae389592" | ||
} | ||
|
||
variable "instance_keypair" { | ||
default = "build" | ||
} | ||
|
||
terraform { | ||
required_providers { | ||
huaweicloud = { | ||
source = "huaweicloud/huaweicloud" | ||
version = "1.25.0" | ||
} | ||
ansible = { | ||
source = "nbering/ansible" | ||
version = "1.0.4" | ||
} | ||
} | ||
|
||
backend "local" { | ||
} | ||
} | ||
|
||
provider "huaweicloud" { | ||
access_key = var.huawei_access_key | ||
secret_key = var.huawei_secret_key | ||
region = var.huawei_region | ||
} | ||
|
||
resource "huaweicloud_compute_instance" "ci" { | ||
name = var.instance_name | ||
image_id = var.instance_image | ||
flavor_id = var.flavor_id | ||
security_group_ids = var.instance_securitygroup | ||
key_pair = var.instance_keypair | ||
availability_zone = var.instance_availability_zone | ||
system_disk_size = var.instance_os_disk_size | ||
|
||
network { | ||
uuid = var.instance_vxnet | ||
} | ||
} | ||
|
||
resource "ansible_host" "ci" { | ||
inventory_hostname = huaweicloud_compute_instance.ci.access_ip_v4 | ||
groups = [ | ||
"runner"] | ||
vars = { | ||
ansible_user = "root" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
variable "qingcloud_access_key" { | ||
sensitive = true | ||
type = string | ||
} | ||
|
||
variable "qingcloud_secret_key" { | ||
sensitive = true | ||
type = string | ||
} | ||
|
||
variable "qingcloud_zone" { | ||
default = "pek3c" | ||
} | ||
|
||
variable "instance_name" { | ||
default = "ci" | ||
} | ||
|
||
variable "instance_image" { | ||
default = "img-96mbphfy" | ||
} | ||
|
||
variable "instance_class" { | ||
default = 202 | ||
} | ||
|
||
variable "instance_cpu" { | ||
default = 8 | ||
} | ||
|
||
variable "instance_memory" { | ||
default = 16384 | ||
} | ||
|
||
variable "instance_os_disk_size" { | ||
default = 100 | ||
} | ||
|
||
variable "instance_vxnet" { | ||
default = "vxnet-5tjdylj" | ||
} | ||
|
||
variable "instance_keypair" { | ||
default = [ | ||
"kp-o07unn26"] | ||
} | ||
|
||
terraform { | ||
required_providers { | ||
qingcloud = { | ||
source = "HashDataInc/qingcloud" | ||
version = "1.2.7" | ||
} | ||
ansible = { | ||
source = "nbering/ansible" | ||
version = "1.0.4" | ||
} | ||
} | ||
} | ||
|
||
provider "qingcloud" { | ||
access_key = var.qingcloud_access_key | ||
secret_key = var.qingcloud_secret_key | ||
zone = var.qingcloud_zone | ||
} | ||
|
||
|
||
resource "qingcloud_instance" "ci" { | ||
name = var.instance_name | ||
image_id = var.instance_image | ||
instance_class = var.instance_class | ||
cpu = var.instance_cpu | ||
memory = var.instance_memory | ||
os_disk_size = var.instance_os_disk_size | ||
managed_vxnet_id = var.instance_vxnet | ||
keypair_ids = var.instance_keypair | ||
} | ||
|
||
resource "ansible_host" "ci" { | ||
inventory_hostname = qingcloud_instance.ci.private_ip | ||
groups = [ | ||
"runner"] | ||
vars = { | ||
ansible_user = "root" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
%define _rpmfilename %%{ARCH}/%%{NAME}-%{cbdb_version}-%%{RELEASE}.%%{ARCH}.rpm | ||
%define bin_cbdb %{prefix}/%{name}-%{cbdb_version} | ||
|
||
# Disable build-id in generated RPM | ||
%define _build_id_links none | ||
|
||
%{!?cbdb_install_prefix: %define cbdb_install_prefix /usr/local} | ||
|
||
Name: cloudberry-db | ||
Version: %{version} | ||
Release: 1%{?dist} | ||
Summary: A High Performance Massively Parallel Data Warehouse | ||
|
||
Group: Applications/Databases | ||
License: Apache License Version 2.0 | ||
URL: http://www.hashdata.cn | ||
Source0: bin_cbdb.tar.gz | ||
Prefix: %{cbdb_install_prefix} | ||
AutoReqProv: no | ||
|
||
Requires: apr apr-util | ||
Requires: bash | ||
Requires: bzip2 | ||
Requires: curl | ||
Requires: iproute | ||
Requires: krb5-devel | ||
Requires: less | ||
Requires: libcurl | ||
Requires: libxml2 | ||
Requires: libyaml | ||
Requires: openldap | ||
Requires: openssh | ||
Requires: openssh-clients | ||
Requires: openssh-server | ||
Requires: openssl | ||
Requires: openssl-libs | ||
Requires: perl | ||
Requires: python3-devel | ||
Requires: readline | ||
Requires: rsync | ||
Requires: sed | ||
Requires: tar | ||
Requires: which | ||
Requires: zip | ||
Requires: zlib | ||
|
||
%description | ||
A High Performance Massively Parallel Data Warehouse | ||
|
||
%prep | ||
%setup -q -c -n %{name}-%{cbdb_version} | ||
|
||
%install | ||
mkdir -p %{buildroot}/%{prefix}/%{name}-%{cbdb_version} | ||
cp -R * %{buildroot}/%{prefix}/%{name}-%{cbdb_version} | ||
exit 0 | ||
|
||
%files | ||
%{prefix}/%{name}-%{cbdb_version} | ||
%config(noreplace) %{prefix}/%{name}-%{cbdb_version}/greenplum_path.sh | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%post | ||
ln -sT "${RPM_INSTALL_PREFIX}/%{name}-%{cbdb_version}" "${RPM_INSTALL_PREFIX}/%{name}" || true | ||
|
||
%postun | ||
if [ $1 -eq 0 ] ; then | ||
if [ "$(readlink -f "${RPM_INSTALL_PREFIX}/%{name}")" == "${RPM_INSTALL_PREFIX}/%{name}-%{cbdb_version}" ]; then | ||
unlink "${RPM_INSTALL_PREFIX}/%{name}" || true | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.