小编Bha*_*min的帖子

如何在cloudformation中更改默认的根EBS大小?[AWS]

考虑到在线数据的文档和解决方案数量较少,我决定解决有关更改通过云形态模板启动的EBS卷的默认大小的常见问题

默认情况下,启动的实例大小为8GB,如果您想知道如何根据您的偏好将其更改为某些内容,而不是您已找到正确的解决方案.

有两种方法可以避免这个问题

解决方案1:使用VolumeAttachment创建新卷(方式不正确)

"EBS" : {
   "Type" : "AWS::EC2::Volume",
   "Properties" : {
      "Size" : "100",
      "AvailabilityZone" : { "Fn::GetAtt" : [ "EC2Instance", "AvailabilityZone" ] }
   }
},

"MountPoint" : {
   "Type" : "AWS::EC2::VolumeAttachment",
   "Properties" : {
      "InstanceId" : { "Ref" : "EC2Instance" },
      "VolumeId"  : { "Ref" : "EBS" },
      "Device" : "/dev/sda1"
   }
}
Run Code Online (Sandbox Code Playgroud)

在这里,我创建了一个新卷并且厌倦了将它附加到不起作用的实例.(CF模板无法启动)

解决方案2.阻止设备映射(正确方式)

使用BlockDeviceMappings是正确的方法

 "BlockDeviceMappings": [
          {
            "DeviceName": "/dev/xvda",
            "Ebs": {
              "VolumeType": "io1",
              "Iops": "300",
              "DeleteOnTermination": "false",
              "VolumeSize": "30"
            }
          }
        ],
Run Code Online (Sandbox Code Playgroud)

不要将设备名称保留为/ dev/xvda1,否则它将无法正常工作.相反,如果所选操作系统是Amazon …

json amazon-ebs amazon-web-services aws-cloudformation

21
推荐指数
1
解决办法
1万
查看次数

错误:找不到表0

我看到有关cannot find table 0数据集不包含表数据的错误.这是我从表中获取行的代码:

    DataTable dt = new DataTable();
    SqlConnection sqlconnection;
    sqlconnection = new SqlConnection(@"connectionstring");
    sqlconnection.Open();
    string sql = "Select (supplier_id,name) from supplier_info where supplier_id= '"+supplierid+"'";
    SqlCommand cmd = new SqlCommand(sql, sqlconnection);
    cmd.CommandType = CommandType.Text;
    SqlDataAdapter adpt = new SqlDataAdapter(cmd);
    DataSet dtset = new DataSet();
    adpt.Fill(dt);
    dt = dtset.Tables[0];
    DataRow dr;
    dr = dt.Rows[0];
    sqlconnection.Close();
    return dr;
Run Code Online (Sandbox Code Playgroud)

业务逻辑代码:

  Cust_datalogic dc = new Cust_datalogic(); //datalogic class
  DataTable dt = new DataTable();
  DataRow dr;
  dr=dc.GetSupplierInfo(id);    //method 
  Supplier_BLL bc = new …
Run Code Online (Sandbox Code Playgroud)

c# sql-server-2008

6
推荐指数
1
解决办法
4万
查看次数

无法连接到Jenkins服务器(Amazon Linux AMI)

当我在Amazon Linux AMI上安装Jenkins时,请按照http://bhargavamin.com/how-to-do/install-jenkins-on-amazon-linux-aws/中提到的步骤进行操作

安装后,我能够通过浏览器打开Jenkins,但是当我选择选项“ Install Plugins ”时,它显示为“ Unable to connect to Jenkins Server”错误。

那么,如何解决这个问题呢?

linux installation amazon-ec2 amazon-web-services jenkins

2
推荐指数
1
解决办法
7067
查看次数