虚机all in one环境测试安装heat

[root@armstrong ~]# tmux at -t mysql
MariaDB [(none)]> CREATE DATABASE heat;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' \
-> IDENTIFIED BY 'HEAT_DBPASS';
Query OK, rows affected (0.01 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' \
-> IDENTIFIED BY 'HEAT_DBPASS';
Query OK, rows affected (0.00 sec) [root@armstrong ~]# source keystonerc_admin 创建heat用户
[root@armstrong ~(keystone_admin)]# openstack user create --domain default --password-prompt heat
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 0952d5ebdcaa43c288020364987503bf |
| name | heat |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
将heat用户加入amdin角色
[root@armstrong ~(keystone_admin)]# openstack role add --project services --user heat admin 创建heta和heat-cfb服务实体
[root@armstrong ~(keystone_admin)]# openstack service create --name heat --description "Orchestration" orchestration
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Orchestration |
| enabled | True |
| id | 3a423bcb425f4b0b814d53352eb2e16e |
| name | heat |
| type | orchestration |
+-------------+----------------------------------+
[root@armstrong ~(keystone_admin)]# openstack service create --name heat-cfn --description "Orchestration" cloudformation
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Orchestration |
| enabled | True |
| id | 56672ffcfef14ffbbb041287e16bb0dd |
| name | heat-cfn |
| type | cloudformation |
+-------------+----------------------------------+ [root@armstrong ~(keystone_admin)]# openstack service list
+----------------------------------+-----------+----------------+
| ID | Name | Type |
+----------------------------------+-----------+----------------+
| 0bf0839f5a2a4a8d99450f0473403b32 | keystone | identity |
| 3a423bcb425f4b0b814d53352eb2e16e | heat | orchestration |
| 4542364e029e4a2cb7320b0338a21177 | cinderv2 | volumev2 |
| 50144c64d7bd44a5a3d0e9fb8473da37 | cinder | volume |
| 56672ffcfef14ffbbb041287e16bb0dd | heat-cfn | cloudformation |
| 602a478cc2584269b24f7c0e9dda5c36 | glance | image |
| 807e8d2d91cc426cad435f907eb52601 | cinderv3 | volumev3 |
| 86d499b6413d4328969c82765f1f5044 | neutron | network |
| a4934bdd925f4cf9be7be020206c9751 | placement | placement |
| e3c14c540fb54031a84ee2a5689c34ab | nova | compute |
+----------------------------------+-----------+----------------+ 创建Orchestration endpoint
[root@armstrong nova(keystone_admin)]# openstack endpoint create --region RegionOne orchestration public http://192.168.122.209:8004/v1/%\(tenant_id\)s
+--------------+----------------------------------------------+
| Field | Value |
+--------------+----------------------------------------------+
| enabled | True |
| id | 04710a3160c74386825b11595e13b10b |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3a423bcb425f4b0b814d53352eb2e16e |
| service_name | heat |
| service_type | orchestration |
| url | http://192.168.122.209:8004/v1/%(tenant_id)s |
+--------------+----------------------------------------------+
[root@armstrong nova(keystone_admin)]# openstack endpoint create --region RegionOne orchestration internal http://192.168.122.209:8004/v1/%\(tenant_id\)s
+--------------+----------------------------------------------+
| Field | Value |
+--------------+----------------------------------------------+
| enabled | True |
| id | 3da6845f138f416196c420ee4a8c94bc |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3a423bcb425f4b0b814d53352eb2e16e |
| service_name | heat |
| service_type | orchestration |
| url | http://192.168.122.209:8004/v1/%(tenant_id)s |
+--------------+----------------------------------------------+
[root@armstrong nova(keystone_admin)]# openstack endpoint create --region RegionOne orchestration admin http://192.168.122.209:8004/v1/%\(tenant_id\)s
+--------------+----------------------------------------------+
| Field | Value |
+--------------+----------------------------------------------+
| enabled | True |
| id | f1bceb3152f747fb8e1244398a157090 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3a423bcb425f4b0b814d53352eb2e16e |
| service_name | heat |
| service_type | orchestration |
| url | http://192.168.122.209:8004/v1/%(tenant_id)s |
+--------------+----------------------------------------------+ [root@armstrong nova(keystone_admin)]# openstack endpoint list |grep orchestration
+----------------------------------------------------------------------------------------------------------------------------------------------------+
| 04710a3160c74386825b11595e13b10b | RegionOne | heat | orchestration | True | public | http://192.168.122.209:8004/v1/%(tenant_id)s |
| 3da6845f138f416196c420ee4a8c94bc | RegionOne | heat | orchestration | True | internal | http://192.168.122.209:8004/v1/%(tenant_id)s |
| f1bceb3152f747fb8e1244398a157090 | RegionOne | heat | orchestration | True | admin | http://192.168.122.209:8004/v1/%(tenant_id)s |
+----------------------------------------------------------------------------------------------------------------------------------------------------+ 创建cloudformation endpoint
[root@armstrong nova(keystone_admin)]# openstack endpoint create --region RegionOne cloudformation public http://192.168.122.209:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | d6c3d5a7e57749d6a6e769d4fea77c67 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 56672ffcfef14ffbbb041287e16bb0dd |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://192.168.122.209:8000/v1 |
+--------------+----------------------------------+
[root@armstrong nova(keystone_admin)]# openstack endpoint create --region RegionOne cloudformation internal http://192.168.122.209:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 4a7dd256dd044f37849ba08cdb12abf6 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 56672ffcfef14ffbbb041287e16bb0dd |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://192.168.122.209:8000/v1 |
+--------------+----------------------------------+
[root@armstrong nova(keystone_admin)]# openstack endpoint create --region RegionOne cloudformation admin http://192.168.122.209:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 173892f7410a4dc4976ffe2a5adfb005 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 56672ffcfef14ffbbb041287e16bb0dd |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://192.168.122.209:8000/v1 |
+--------------+----------------------------------+
[root@armstrong nova(keystone_admin)]# openstack endpoint list |grep cloudformation
173892f7410a4dc4976ffe2a5adfb005 | RegionOne | heat-cfn | cloudformation | True | admin | http://192.168.122.209:8000/v1 4a7dd256dd044f37849ba08cdb12abf6 | RegionOne | heat-cfn | cloudformation | True | internal | http://192.168.122.209:8000/v1 d6c3d5a7e57749d6a6e769d4fea77c67 | RegionOne | heat-cfn | cloudformation | True | public | http://192.168.122.209:8000/v1 创建包含堆栈项目和用户的域
[root@armstrong nova(keystone_admin)]# openstack domain create --description "Stack projects and users" heat
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Stack projects and users |
| enabled | True |
| id | 22388bd950cb495caf0b666dde11333e |
| name | heat |
| tags | [] |
+-------------+----------------------------------+ 创建heat_domain_admin用户来管理域中的项目和用户
[root@armstrong nova(keystone_admin)]# openstack user create --domain heat --password-prompt heat_domain_admin
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | 22388bd950cb495caf0b666dde11333e |
| enabled | True |
| id | 0c858402292a4a8480715a213d563ccb |
| name | heat_domain_admin |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+ 将admin角色添加到域中的heat_domain_admin用户,通过heat_domain_admin用户启用管理堆栈管理权限
[root@armstrong nova(keystone_admin)]# openstack role add --domain heat --user-domain heat --user heat_domain_admin admin 创建heat_stack_owner角色
[root@armstrong nova(keystone_admin)]# openstack role create heat_stack_owner
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | e7523e56d0c14d8588c600567a8e95c8 |
| name | heat_stack_owner |
+-----------+----------------------------------+ 向demo项目和demo用户添加heat_stack_owner角色以启用演示用户的堆栈管理
[root@armstrong nova(keystone_admin)]# openstack role add --project demo --user demo heat_stack_owner 创建heat_stack_user角色
[root@armstrong nova(keystone_admin)]# openstack role create heat_stack_user
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | 49908672b7bc4d5699d053174b102ce1 |
| name | heat_stack_user |
+-----------+----------------------------------+ 安装和配置组件
[root@armstrong nova(keystone_admin)]#yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine 编辑heat配置文件
cat /etc/heat/heat.conf
[DEFAULT]
transport_url = rabbit://guest:guest@192.168.122.209:5672
heat_metadata_server_url = http://192.168.122.209:8000
heat_waitcondition_server_url = http://192.168.122.209:8000/v1/waitcondition
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = heat
stack_user_domain_name = heat [database]
connection = mysql+pymysql://heat:HEAT_DBPASS@192.168.122.209/heat [keystone_authtoken]
auth_uri = http://192.168.122.209:5000
auth_url = http://192.168.122.209:35357
memcached_servers = 192.168.122.209:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = services
username = heat
password = heat [trustee]
auth_type = password
auth_url = http://192.168.122.209:35357
username = heat
password = heat
user_domain_name = default [clients_keystone]
auth_uri = http://192.168.122.209:5000 同步数据库
[root@armstrong nova(keystone_admin)]# su -s /bin/sh -c "heat-manage db_sync" heat
-- ::42.367 WARNING oslo_config.cfg [-] Option "db_backend" from group "DEFAULT" is deprecated. Use option "backend" from group "database".-- ::42.495 INFO migrate.versioning.api [-] -> ...
-- ::42.727 INFO migrate.versioning.api [-] done
-- ::42.727 INFO migrate.versioning.api [-] -> ...
-- ::42.761 INFO migrate.versioning.api [-] done
-- ::42.762 INFO migrate.versioning.api [-] -> ...
-- ::42.804 INFO migrate.versioning.api [-] done
-- ::42.804 INFO migrate.versioning.api [-] -> ...
-- ::42.810 INFO migrate.versioning.api [-] done
-- ::42.810 INFO migrate.versioning.api [-] -> ...
-- ::42.815 INFO migrate.versioning.api [-] done
-- ::42.815 INFO migrate.versioning.api [-] -> ...
-- ::42.821 INFO migrate.versioning.api [-] done
-- ::42.821 INFO migrate.versioning.api [-] -> ...
-- ::42.826 INFO migrate.versioning.api [-] done
-- ::42.826 INFO migrate.versioning.api [-] -> ...
-- ::42.833 INFO migrate.versioning.api [-] done
-- ::42.834 INFO migrate.versioning.api [-] -> ...
-- ::42.940 INFO migrate.versioning.api [-] done
-- ::42.940 INFO migrate.versioning.api [-] -> ...
-- ::42.992 INFO migrate.versioning.api [-] done
-- ::42.992 INFO migrate.versioning.api [-] -> ...
-- ::42.997 INFO migrate.versioning.api [-] done
-- ::42.997 INFO migrate.versioning.api [-] -> ...
-- ::43.002 INFO migrate.versioning.api [-] done
-- ::43.002 INFO migrate.versioning.api [-] -> ...
-- ::43.007 INFO migrate.versioning.api [-] done
-- ::43.007 INFO migrate.versioning.api [-] -> ...
-- ::43.012 INFO migrate.versioning.api [-] done
-- ::43.013 INFO migrate.versioning.api [-] -> ...
-- ::43.017 INFO migrate.versioning.api [-] done 启动服务
[root@armstrong nova(keystone_admin)]# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-api.service to /usr/lib/systemd/system/openstack-heat-api.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-api-cfn.service to /usr/lib/systemd/system/openstack-heat-api-cfn.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-engine.service to /usr/lib/systemd/system/openstack-heat-engine.service.
[root@armstrong nova(keystone_admin)]# systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service 验证服务状态
[root@armstrong heat(keystone_admin)]#source keystonerc_admin
[root@armstrong ~(keystone_admin)]# openstack orchestration service list
+-----------+-------------+--------------------------------------+-----------+--------+----------------------------+--------+
| Hostname | Binary | Engine ID | Host | Topic | Updated At | Status |
+-----------+-------------+--------------------------------------+-----------+--------+----------------------------+--------+
| armstrong | heat-engine | 7953d573-ebb6-4bc9-804a-5fff4f44a71a | armstrong | engine | --13T03::28.000000 | up |
| armstrong | heat-engine | 88b6c902-09fe-46fb-87a0-6baf762a8ad3 | armstrong | engine | --13T03::01.000000 | down |
| armstrong | heat-engine | c81c847b-45e3-46ec-8c6a-d32b61dcfe11 | armstrong | engine | --13T03::28.000000 | up |
| armstrong | heat-engine | ab960cdb--4ab2-a93d-86f74bfb7179 | armstrong | engine | --13T03::01.000000 | down |
| armstrong | heat-engine | 0b7a2c59-7cdf-47e8-a58b-06aa11556682 | armstrong | engine | --13T03::01.000000 | down |
| armstrong | heat-engine | 6cf3b8df-391b--b37e-856b9d7cd0ef | armstrong | engine | --13T03::01.000000 | down |
| armstrong | heat-engine | 6fbad63a-e6fa--9c04-7e6c0cca2b2e | armstrong | engine | --13T03::28.000000 | up |
| armstrong | heat-engine | b55005dc-cf1e-455c-b5b0-20aa46bf1340 | armstrong | engine | --13T03::28.000000 | up |
+-----------+-------------+--------------------------------------+-----------+--------+----------------------------+--------+ 验证支持的resource type
[root@armstrong ~(keystone_admin)]# openstack orchestration resource type list
+------------------------------------------+
| Resource Type |
+------------------------------------------+
| AWS::AutoScaling::AutoScalingGroup |
| AWS::AutoScaling::LaunchConfiguration |
| AWS::AutoScaling::ScalingPolicy |
| AWS::CloudFormation::Stack |
| AWS::CloudFormation::WaitCondition |
| AWS::CloudFormation::WaitConditionHandle |
| AWS::CloudWatch::Alarm |
| AWS::EC2::EIP |
| AWS::EC2::EIPAssociation |
| AWS::EC2::Instance |
| AWS::EC2::InternetGateway |
| AWS::EC2::NetworkInterface |
| AWS::EC2::RouteTable |
| AWS::EC2::SecurityGroup |
| AWS::EC2::Subnet |
| AWS::EC2::SubnetRouteTableAssociation |
| AWS::EC2::VPC |
| AWS::EC2::VPCGatewayAttachment |
| AWS::EC2::Volume |
| AWS::EC2::VolumeAttachment |
| AWS::ElasticLoadBalancing::LoadBalancer |
| AWS::IAM::AccessKey |
| AWS::IAM::User |
| AWS::RDS::DBInstance |
| OS::Cinder::EncryptedVolumeType |
| OS::Cinder::QoSAssociation |
| OS::Cinder::QoSSpecs |
| OS::Cinder::Quota |
| OS::Cinder::Volume |
| OS::Cinder::VolumeAttachment |
| OS::Cinder::VolumeType |
| OS::Glance::Image |
| OS::Heat::AccessPolicy |
| OS::Heat::AutoScalingGroup |
| OS::Heat::CloudConfig |
| OS::Heat::DeployedServer |
| OS::Heat::InstanceGroup |
| OS::Heat::MultipartMime |
| OS::Heat::None |
| OS::Heat::RandomString |
| OS::Heat::ResourceChain |
| OS::Heat::ResourceGroup |
| OS::Heat::ScalingPolicy |
| OS::Heat::SoftwareComponent |
| OS::Heat::SoftwareConfig |
| OS::Heat::SoftwareDeployment |
| OS::Heat::SoftwareDeploymentGroup |
| OS::Heat::Stack |
| OS::Heat::StructuredConfig |
| OS::Heat::StructuredDeployment |
| OS::Heat::StructuredDeploymentGroup |
| OS::Heat::TestResource |
| OS::Heat::UpdateWaitConditionHandle |
| OS::Heat::Value |
| OS::Heat::WaitCondition |
| OS::Heat::WaitConditionHandle |
| OS::Keystone::Domain |
| OS::Keystone::Endpoint |
| OS::Keystone::Group |
| OS::Keystone::GroupRoleAssignment |
| OS::Keystone::Project |
| OS::Keystone::Region |
| OS::Keystone::Role |
| OS::Keystone::Service |
| OS::Keystone::User |
| OS::Keystone::UserRoleAssignment |
| OS::Neutron::AddressScope |
| OS::Neutron::ExtraRoute |
| OS::Neutron::FloatingIP |
| OS::Neutron::FloatingIPAssociation |
| OS::Neutron::FlowClassifier |
| OS::Neutron::MeteringLabel |
| OS::Neutron::MeteringRule |
| OS::Neutron::Net |
| OS::Neutron::NetworkGateway |
| OS::Neutron::Port |
| OS::Neutron::PortPair |
| OS::Neutron::ProviderNet |
| OS::Neutron::QoSBandwidthLimitRule |
| OS::Neutron::QoSDscpMarkingRule |
| OS::Neutron::QoSPolicy |
| OS::Neutron::Quota |
| OS::Neutron::RBACPolicy |
| OS::Neutron::Router |
| OS::Neutron::RouterInterface |
| OS::Neutron::SecurityGroup |
| OS::Neutron::SecurityGroupRule |
| OS::Neutron::Subnet |
| OS::Neutron::SubnetPool |
| OS::Neutron::Trunk |
| OS::Nova::Flavor |
| OS::Nova::FloatingIP |
| OS::Nova::FloatingIPAssociation |
| OS::Nova::HostAggregate |
| OS::Nova::KeyPair |
| OS::Nova::Quota |
| OS::Nova::Server |
| OS::Nova::ServerGroup |
| OS::Senlin::Cluster |
| OS::Senlin::Node |
| OS::Senlin::Policy |
| OS::Senlin::Profile |
| OS::Senlin::Receiver |
+------------------------------------------+ 验证模板版本
[root@armstrong ~(keystone_admin)]# openstack orchestration template version list
+--------------------------------------+------+------------------------------+
| Version | Type | Aliases |
+--------------------------------------+------+------------------------------+
| AWSTemplateFormatVersion.-- | cfn | |
| HeatTemplateFormatVersion.-- | cfn | |
| heat_template_version.-- | hot | |
| heat_template_version.-- | hot | |
| heat_template_version.-- | hot | |
| heat_template_version.-- | hot | |
| heat_template_version.-- | hot | |
| heat_template_version.-- | hot | heat_template_version.newton |
| heat_template_version.-- | hot | heat_template_version.ocata |
| heat_template_version.-- | hot | heat_template_version.pike |
| heat_template_version.-- | hot | heat_template_version.queens |
+--------------------------------------+------+------------------------------+

packstack测试环境安装heat的更多相关文章

  1. [转载]SharePoint 2013测试环境安装配置指南

    软件版本 Windows Server 2012 标准版 SQL Server 2012 标准版 SharePoint Server 2013 企业版 Office Web Apps 2013 备注: ...

  2. AlwaysOn可用性组测试环境安装与配置(一)--SQL群集环境搭建

    一.测试环境介绍 1. 宿主使用工作站(HYPR-V)基本配置如下: 处理器:Intel(R) Core(TM) i5-4470 CPU @ 3.20GHz 3.20GHz 内存(RAM):8.00G ...

  3. tidb测试环境安装,离线部署

    1.环境以及规划 机器:centos7.5 ; 文件系统为ext4:内存16g:cpu8核,共三个节点: ip hostname roles --- tidb tipd tikv --- tidb t ...

  4. 利用docker搭建测试环境--安装

    软件测试过程中,总会碰到测试环境不够用的尴尬情况.即时有了机器还要经历装系统,配置环境,调试等一系列繁琐的问题.虽然市面上也有一些批处理话的工具(如salt,fabric等),但是还是需要实体机器作为 ...

  5. cts 测试环境安装 ubuntu

    1 下载cts测试包 和 sdk 包 http://source.android.com/compatibility/downloads.html  ----cts 包 http://develope ...

  6. ubuntu-10.04的测试环境 安装测试 Coreseek开源中文检索引擎-Sphinx中文版

    主要参考文档:http://www.coreseek.cn/products-install/install_on_bsd_linux/ 一. 32位版本: coreseek安装需要预装的软件: ap ...

  7. python爬虫之MongoDB测试环境安装

    一.   下载 从http://www.mongodb.org/downloads地址中下载:mongodb-linux-x86_64-2.4.11.tar 二.  安装 1>设置mongoDB ...

  8. appium+android测试环境安装

    1. jdk配置 一.背景 JDK已经更新到12了,但是由于很多工具仍然未及时更新,故推荐最稳定的JDK版本1.8.x: JDK需要配置通常情况下,JDK配置分为三项: JAVA_HOME:某些软件仍 ...

  9. AlwaysOn可用性组测试环境安装与配置(二)--AlwaysOn配置(界面与T-SQL)

    四.AlwaysOn配置 1.开启AlwaysOn高可用性功能. 1.1.开启Server01的可用性组 1.2.需要重启服务:属于SQL server群集节点的服务,需要通过故障转移界面重启 1.3 ...

随机推荐

  1. nodejs 的一些PHP函数库

    http://locutus.io/php/ nodejs 的一些PHP函数库 PHP extensions in JavaScript array array_change_key_case arr ...

  2. 0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch

    It is from the full Github-Gist: Bugfix for Zend Framework 1 in Magento (>= 1.7..) + PHP 5.6 http ...

  3. 20145238-荆玉茗 《Java程序设计》第8周学习总结

    20145238 <Java程序设计>第8周学习总结 教材学习内容总结 第15章 通用API 15.1.1 ·java.util.logging包提供了日志功能相关类与接口,使用日志的起点 ...

  4. Scrivener 中文语言包

    Scrivener 中文语言包 随着OS X EI Capitan的发布,Scrivener 也升级到了2.7,程序没有大的变化,主要是为了兼容10.11并更新了图标. 原来的2.6的中文语言包无法在 ...

  5. 如何提高mysql的安全性?

    1.如果 MySQL 客户端和服务器端的连接需要跨越并通过不可信任的网络,那么需要使用 ssh 隧道来加密该连接的通信.2.使用 set password 语句来修改用户的密码,先“mysql -u ...

  6. 头部导航悬浮,css

    .header{ position:fixed; z-index:100; left:; right:; } 如图.

  7. python配置日志的几种方式

    使用的是logging模块,关于logging模块内容,可以看我的另一篇博客:https://www.cnblogs.com/kuxingseng95/p/9464347.html 作为开发者,我们一 ...

  8. JQuery实现子级选择器

    效果图如下: HTML代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charse ...

  9. pip安装第三方包总失败

    第一步:升级pip python -m pip install -U pip 第二布:安装想下载的第三方包 python -m pip install xx 一般来说pip安装不会失败的,失败的话就尝 ...

  10. PCA 实例演示二维数据降成1维

    import numpy as np # 将二维数据降成1维 num = [(2.5, 2.4), (0.5, 0.7), (2.2, 2.9), (1.9, 2.2), (3.1, 3.0), (2 ...