Terraform-云上基础设施自动化工具

这篇具有很好参考价值的文章主要介绍了Terraform-云上基础设施自动化工具。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

https://developer.hashicorp.com/terraform/install?product_intent=terraform
根据操作系统进行对应的安装操作。
这里我选择Windows安装,配置环境变量Path,将路径添加进入
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
输入命令进行验证

$ terraform -v
Terraform v1.6.6
on windows_amd64

编辑器推荐使用VSCode,推荐使用Terraform插件
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

新建文件 main.tf

https://developer.hashicorp.com/terraform/language/providers

https://registry.terraform.io/browse/providers

  • 定义一个提供者(允许我们与一组特定的API进行对话)

.tf文件格式:

provider "提供商" {
  region     =  "资源地区"
  access_key =  "生成的access_key"
  secret_key =  "生成的secret_key"
}

resource "<提供商>_<资源类型>" "名称" {
# 你所定义的资源信息
   key1 = "val1"
   key2 = "val2"
   ...

}

这里以AWS为例
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

  • 身份验证设置

Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
创建访问密钥
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

创建资源

下面演示创建一个EC2实例通过Terraform
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

main.tf

provider "aws" {
  region = "us-east-1"  
  access_key = "AKIA6BOCDBYWM4JBXHNU"
  secret_key = "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"
}

resource "aws_instance" "my_server" {
  ami           = "ami-0c7217cdde317cfec"
  instance_type = "t2.micro"

}

初始时并没有实例
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
VSCode中在项目中输入命令

terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/aws...
- Installing hashicorp/aws v5.32.1...
- Installed hashicorp/aws v5.32.1 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

接下来你的项目中就会多出几个文件

PS C:\Code\Terraform> dir


    目录: C:\Code\Terraform


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2024/1/17     20:22                .terraform
-a----         2024/1/17     20:22           1377 .terraform.lock.hcl
-a----         2024/1/17     20:19            268 main.tf

运行terraform plan去查看.tf文件产生的更改

PS C:\Code\Terraform> terraform plan

Terraform used the selected providers to generate the following execution plan. Resource
actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_instance.my_server will be created
  + resource "aws_instance" "my_server" {
      + ami                                  = "ami-0c7217cdde317cfec"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t2.micro"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = (known after apply)
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags_all                             = (known after apply)
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────────────────────── 

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take    
exactly these actions if you run "terraform apply" now.

运行terraform apply构建你的云资源

 C:\Code\Terraform> terraform apply

Terraform used the selected providers to generate the following execution plan. Resource
actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_instance.my_server will be created
  + resource "aws_instance" "my_server" {
      + ami                                  = "ami-0c7217cdde317cfec"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t2.micro"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = (known after apply)
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags_all                             = (known after apply)
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_instance.my_server: Creating...
aws_instance.my_server: Still creating... [10s elapsed]
aws_instance.my_server: Still creating... [20s elapsed]
aws_instance.my_server: Still creating... [30s elapsed]
aws_instance.my_server: Creation complete after 37s [id=i-02ddc2905564010aa]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

现在,我们通过Terraform创建了一个EC2实例,创建好的实例相关参数与我们定义的参数相同
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

更改资源

给EC2实例添加标签

provider "aws" {
  region = "us-east-1"
  access_key = "AKIA6BOCDBYWM4JBXHNU"
  secret_key = "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"
}

resource "aws_instance" "my_server" {
  ami           = "ami-0c7217cdde317cfec"
  instance_type = "t2.micro"
  tags = {
  Name = "ubuntu"
}

}

terraform plan 查看.tf文件运行后产生的改变

PS C:\Code\Terraform> terraform plan 
aws_instance.my_server: Refreshing state... [id=i-02ddc2905564010aa]

Terraform used the selected providers to generate the following execution plan. Resource  
actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_instance.my_server will be updated in-place
  ~ resource "aws_instance" "my_server" {
        id                                   = "i-02ddc2905564010aa"
      ~ tags                                 = {
          + "Name" = "ubuntu"
        }
      ~ tags_all                             = {
          + "Name" = "ubuntu"
        }
        # (30 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

───────────────────────────────────────────────────────────────────────────────────────── 

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to   
take exactly these actions if you run "terraform apply" now.

terraform apply 运行

PS C:\Code\Terraform> terraform apply
aws_instance.my_server: Refreshing state... [id=i-02ddc2905564010aa]

Terraform used the selected providers to generate the following execution plan. Resource  
actions are indicated with the following symbols:
~ update in-place

Terraform will perform the following actions:

# aws_instance.my_server will be updated in-place
~ resource "aws_instance" "my_server" {
  id                                   = "i-02ddc2905564010aa"
  ~ tags                                 = {
  + "Name" = "ubuntu"
}
~ tags_all                             = {
  + "Name" = "ubuntu"
}
# (30 unchanged attributes hidden)

# (8 unchanged blocks hidden)
}

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

aws_instance.my_server: Modifying... [id=i-02ddc2905564010aa]
aws_instance.my_server: Still modifying... [id=i-02ddc2905564010aa, 10s elapsed]
aws_instance.my_server: Still modifying... [id=i-02ddc2905564010aa, 20s elapsed]
aws_instance.my_server: Still modifying... [id=i-02ddc2905564010aa, 30s elapsed]
aws_instance.my_server: Modifications complete after 34s [id=i-02ddc2905564010aa]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

控制台查看配置信息是否改变
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

删除资源

terraform destroy 将摧毁你Terraform定义的的所有资源

PS C:\Code\Terraform> terraform destroy
aws_instance.my_server: Refreshing state... [id=i-02ddc2905564010aa]

Terraform used the selected providers to generate the following execution plan. Resource  
actions are indicated with the following symbols:
- destroy

Terraform will perform the following actions:

# aws_instance.my_server will be destroyed
- resource "aws_instance" "my_server" {
  - ami                                  = "ami-0c7217cdde317cfec" -> null
  - arn                                  = "arn:aws:ec2:us-east-1:965164076588:instance/i-02ddc2905564010aa" -> null
  - associate_public_ip_address          = true -> null
  - availability_zone                    = "us-east-1c" -> null
  - cpu_core_count                       = 1 -> null
  - cpu_threads_per_core                 = 1 -> null
  - disable_api_stop                     = false -> null
  - disable_api_termination              = false -> null
  - ebs_optimized                        = false -> null
  - get_password_data                    = false -> null
  - hibernation                          = false -> null
  - id                                   = "i-02ddc2905564010aa" -> null
  - instance_initiated_shutdown_behavior = "stop" -> null
  - instance_state                       = "running" -> null
  - instance_type                        = "t2.micro" -> null
  - ipv6_address_count                   = 0 -> null
  - ipv6_addresses                       = [] -> null
  - monitoring                           = false -> null
  - placement_partition_number           = 0 -> null
  - primary_network_interface_id         = "eni-05f493db48e53e6d1" -> null
  - private_dns                          = "ip-172-31-81-169.ec2.internal" -> null    
  - private_ip                           = "172.31.81.169" -> null
  - public_dns                           = "ec2-54-159-108-35.compute-1.amazonaws.com"
  -> null
  - public_ip                            = "54.159.108.35" -> null
  - secondary_private_ips                = [] -> null
  - security_groups                      = [
  - "default",
  ] -> null
  - source_dest_check                    = true -> null
  - subnet_id                            = "subnet-0008bd53c4de8c62b" -> null
  - tags                                 = {
  - "Name" = "ubuntu"
} -> null
- tags_all                             = {
  - "Name" = "ubuntu"
} -> null
- tenancy                              = "default" -> null
- user_data_replace_on_change          = false -> null
- vpc_security_group_ids               = [
  - "sg-0269e952138afa470",
] -> null

- capacity_reservation_specification {
  - capacity_reservation_preference = "open" -> null
}

- cpu_options {
  - core_count       = 1 -> null
  - threads_per_core = 1 -> null
}

      - credit_specification {
          - cpu_credits = "standard" -> null
        }

      - enclave_options {
          - enabled = false -> null
        }

      - maintenance_options {
          - auto_recovery = "default" -> null
        }

      - metadata_options {
          - http_endpoint               = "enabled" -> null
          - http_protocol_ipv6          = "disabled" -> null
          - http_put_response_hop_limit = 1 -> null
          - http_tokens                 = "optional" -> null
          - instance_metadata_tags      = "disabled" -> null
        }

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }

      - root_block_device {
          - delete_on_termination = true -> null
          - device_name           = "/dev/sda1" -> null
          - encrypted             = false -> null
          - iops                  = 100 -> null
          - tags                  = {} -> null
          - throughput            = 0 -> null
          - volume_id             = "vol-0996176cc9bdc5548" -> null
          - volume_size           = 8 -> null
          - volume_type           = "gp2" -> null
        }
    }

Plan: 0 to add, 0 to change, 1 to destroy.

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

aws_instance.my_server: Destroying... [id=i-02ddc2905564010aa]
aws_instance.my_server: Still destroying... [id=i-02ddc2905564010aa, 10s elapsed]
aws_instance.my_server: Still destroying... [id=i-02ddc2905564010aa, 20s elapsed]
aws_instance.my_server: Still destroying... [id=i-02ddc2905564010aa, 30s elapsed]
aws_instance.my_server: Still destroying... [id=i-02ddc2905564010aa, 41s elapsed]
aws_instance.my_server: Destruction complete after 44s

Destroy complete! Resources: 1 destroyed.

Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

Terraform 文件

在你进行了上述操作后,项目文件夹会生成一些文件

.terraform   #使用init命令 安装云提供商插件 文件夹
.terraform.lock.hcl # 该文件通常包含 Terraform 对模块版本的锁定信息
main.tf
terraform.tfstate #代表着terraform的所有状态 跟踪创建的一切
terraform.tfstate.backup #这是 terraform.tfstate 文件的备份。在每次 Terraform 执行时,
  Terraform 会自动创建备份文件,以防止在执行期间发生意外的情况。

项目实战

创建EC2实例,将其部署周期自定义子网的VPC上,为其分配一个公共IP地址,我们可以通过SSH连接到它并进行操作,我们还可以设置一个网络服务器在其上运行,以便我们可以处理网络。

  • 创建VPC
  • 创建Internet Gateway
  • 创建Custom Route table
  • 创建Subnet
  • 连接Subnet到Route Table
  • 创建安全组允许端口22,80,443
  • 创建一个网络接口使用子网的IP
  • 分配一个弹性IP给网络接口
  • 创建一个Ubuntu服务器并安装apache2

创建密钥对,允许我们连接到AWS服务器
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生

main.tf

provider "aws" {
    region = "us-east-1"
    access_key = "AKIA6BOCDBYWM4JBXHNU"
    secret_key = "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"
}

# 创建VPC
resource "aws_vpc" "prod-vpc" {
  cidr_block = "10.0.0.0/16"
  tags = {
    Name = "production"
  }
}

#创建网关
resource "aws_internet_gateway" "gw" {
  vpc_id = aws_vpc.prod-vpc.id

}

#创建路由表
resource "aws_route_table" "prod-route-table" {
  vpc_id = aws_vpc.prod-vpc.id

  route {
    cidr_block = "0.0.0.0/0"
    gateway_id = aws_internet_gateway.gw.id
  }

  route {
    ipv6_cidr_block        = "::/0"
    gateway_id = aws_internet_gateway.gw.id
  }

  tags = {
    Name = "Prod"
  }
}

#创建子网
resource "aws_subnet" "subnet-1" {
  vpc_id     = aws_vpc.prod-vpc.id
  cidr_block = "10.0.1.0/24"
  availability_zone = "us-east-1a"
  tags = {
    Name = "prod-subnet"
  }
}

#链接子网和路由表
resource "aws_route_table_association" "a" {
  subnet_id      = aws_subnet.subnet-1.id
  route_table_id = aws_route_table.prod-route-table.id
}

#创建安全组
resource "aws_security_group" "allow_web" {
  name        = "allow_web_traffic"
  description = "Allow Web inbound traffic "
  vpc_id      = aws_vpc.prod-vpc.id

  ingress {
    description = "HTTPS"
    from_port = 443
    to_port = 443
    protocol = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  ingress {
    description = "HTTP"
    from_port = 80
    to_port = 80
    protocol = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  ingress {
    description = "SSH"
    from_port = 22
    to_port = 22
    protocol = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  egress {
    from_port = 0
    to_port = 0
    protocol = "-1"
    cidr_blocks = ["0.0.0.0/0"]
  }

  tags = {
    Name = "allow_web"
  }
}


#创建网络接口
resource "aws_network_interface" "web-server-nic" {
  subnet_id = aws_subnet.subnet-1.id
  private_ips = ["10.0.1.50"]
  security_groups = [aws_security_group.allow_web.id]
}


#设置弹性IP
resource "aws_eip" "one" {
  domain                    = "vpc"
  network_interface         = aws_network_interface.web-server-nic.id
  associate_with_private_ip = "10.0.1.50"
  depends_on = [aws_internet_gateway.gw]
}

#创建ubuntu服务器
resource "aws_instance" "web-server-instance" {
  ami           = "ami-0c7217cdde317cfec"
  instance_type = "t2.micro"
  availability_zone = "us-east-1a"
  key_name = "main-key"
  network_interface {
    device_index = 0
    network_interface_id = aws_network_interface.web-server-nic.id
  }

  user_data = <<-EOF
              #!/bin/bash
              sudo apt update -y
              sudo apt install apache2 -y
              sudo systemctl start apache2
              EOF

  tags = {
    Name = "web-server"
  }
}

检查
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生
复制其公有IP进行访问,成功访问说明Terraform完成自动化云基础设置构建
Terraform-云上基础设施自动化工具,云计算,运维,terraform,自动化,云原生文章来源地址https://www.toymoban.com/news/detail-805394.html

到了这里,关于Terraform-云上基础设施自动化工具的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • IaC基础设施即代码:Terraform使用本地编译(In-house)的Providers

    目录 一、实验 1.环境 2.初始化一个项目 3.Terraform使用本地编译(In-house)的Providers 二、问题 1.Terraform Provider有哪些全网标识符 2.本地安装Terraform Provider有哪些方法 (1)主机 表1-1 主机 主机 系统 软件 备注 pipepoint Linux Terraform 1.6.6 (1)查看版本 (2)初始化 会报错 (1)编写

    2024年01月18日
    浏览(38)
  • 架构师核心-云计算&云上实战(云计算基础、云服务器ECS、云设施实战、云上高并发Web架构)

    阿里云 云计算岗位一般的要求是: 1、常见操作系统的使用与Linux命令行、Shell脚本 2、云计算基础:包括虚拟化技术、云存储、云安全等。 3、网络: 包括NAT、TCP/IP 4、Docker云原生K8S 5、开发环境搭建与部署 6、微服务、DevOps与云原生监控 7、故障排除、日志分析、变更管理 1.

    2024年04月23日
    浏览(52)
  • 自动化编排工具Terraform介绍(一)

    Terraform是什么?:               Terraform 是 HashiCorp 公司旗下的 Provision Infrastructure 产品, 是 AWS APN Technology Partner 与 AWS DevOps Competency Partner。Terraform 是一个 IT 基础架构自动化编排工具,它的口号是“Write, Plan, and Create Infrastructure as Code”, 是一个“基础设施即代码”工具,类似

    2024年02月11日
    浏览(43)
  • 网络基础设施 & 拥塞控制

    我经常说,传统的 TCP 优化已经到顶,不会有大意义了,这有两方面意思。 一方面,内在的,TCP 的 ACK 时钟带回的信息就那么多,用足了又能怎样。一个学习最差的差生能控制的分数是是 0~100 分的区间,宽度足足 100 分,他控制不了自己能考多少分,而一个学习最好的学生

    2024年02月02日
    浏览(46)
  • 公开密钥基础设施PKI

    公开密钥基础设施(PKI,Public Key Infrastructure),是以不对称密钥加密技术为基础,以数据机密性、完整性、身份认证和行为不可抵赖性为安全目的,来实施和提供安全服务的、具有普适性的安全基础设施。具体内容包括: 数字证书 不对称密钥密码技术 认证中心 证书和密钥

    2023年04月08日
    浏览(84)
  • 云计算基础设施总体架构介绍

    云计算基础设施是指由硬件资源和资源抽象控制组件构成的支撑云计算的基础设施,包括为云服务客户提供计算资源、存储资源、网络资源、安全资源所需的软硬件设备及云管理平台。云计算基础设施总体架构如图1 所示。 图1 云计算基础设施总体架构  资源池包括计算资源

    2024年02月11日
    浏览(39)
  • 大数据基础设施搭建 - Redis

    redis是用c写的,因此安装redis需要c语言的编译环境,即需要安装gcc 内容: key:string value:string、list、set、zset、hash 有序可重复 无序不重复 有序不重复,就是在set的基础上,给每个元素绑定了一个分数,按照分数由低到高排序 RDB为快照备份,会在备份时将内存中的所有数据

    2024年01月23日
    浏览(38)
  • 大数据基础设施搭建 - Spark

    内容: 到YARN WEB页面查看任务提交情况 内容: 4.3.1 启动SparkSQL客户端(Yarn方式) 4.3.2 启动Hive客户端 优势在哪里??

    2024年04月09日
    浏览(49)
  • 云计算概论 -- 云基础设施机制

    逻辑网络边界 虚拟服务器 云存储设备 云使用监控 资源复制 一、逻辑网络边界 (一)逻辑网络边界 逻辑网络边界是将一个网络环境与通信网络的其他部分隔离开来,形成一个虚拟网络边界,它包含并隔离了一组相关的基于云的IT资源,这些资源在物理上可能是分布式的。 逻辑

    2023年04月08日
    浏览(51)
  • 大数据基础设施搭建 - Hbase

    首先保证Zookeeper和Hadoop正常运行 新增内容: 使环境变量生效: 不使用hbase内置的zookeeper,使用独立zookeeper 内容: 表明zookeeper集群,hbase web访问路径 内容: regionserver所在机器 内容: 8.3.1 创建表 在first_namespace命名空间中创建表格student,两个列族。info列族数据维护的版本数

    2024年01月24日
    浏览(54)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包