text 设置VALUE-DOMAIN DDNS,ConoHa用Vagrantfile(vagrant-conoha)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 设置VALUE-DOMAIN DDNS,ConoHa用Vagrantfile(vagrant-conoha)相关的知识,希望对你有一定的参考价值。

```
+--------------------------------------+--------------------------------------------+------------+-----------+--------------+---------------+
| ID                                   | Name                                       | Visibility | Size (Mo) | Min RAM (Go) | Min Disk (Go) |
+--------------------------------------+--------------------------------------------+------------+-----------+--------------+---------------+
| 7c3dd8da-eda6-4139-8f26-08886c39404e | wordpress                                  | private    | 6944      | 0            | 20            |
| e7e0f369-edc8-4cd6-a2fd-7aa6c5d9809c | nginx                                      | private    | 6883      | 0            | 20            |
| 93a82beb-a624-435c-a233-2a968c549469 | mysql                                      | private    | 6982      | 0            | 20            |
| bdb40c5c-6d1e-4537-96ca-8e76563586b4 | conoha_1st_img                             | private    | 6832      | 0            | 20            |
| b2e06d42-4c68-4792-87c4-e6faff3c5c0c | vmi-drupal-8.4.2-centos-7.4-amd64-20gb     | public     | 2534      | 0            | 20            |
| ae172d73-d16c-42b7-bc32-41b40ca40e63 | vmi-drupal-8.4.2-centos-7.4-amd64          | public     | 2534      | 0            | 50            |
| 9b70032f-c486-4fd9-9e00-e7899d336406 | vmi-minecraft-1.12.2-centos-7.4            | public     | 2207      | 0            | 50            |
| 95450a81-8194-4ff2-aab6-4f2595da56bb | vmi-centos-7.4-amd64-20gb                  | public     | 1739      | 0            | 20            |
| 5a933dc9-c2ec-48d7-98e4-a72d408c9ffb | vmi-centos-7.4-amd64                       | public     | 1739      | 0            | 50            |
| 391d1b9f-5f16-443e-a8bd-dd46fb744a2e | vmi-gitlab-10.0-centos-7.3-20gb            | public     | 3432      | 0            | 20            |
| 4cc9cf05-3113-437b-95d7-c5912423c585 | vmi-gitlab-10.0-centos-7.3                 | public     | 3432      | 0            | 50            |
| 6c9adc89-d1af-4eea-8bdb-47fe0057b6fa | vmi-jenkins-2.60-centos-7.3-unified-20gb   | public     | 2521      | 0            | 20            |
| f3fd7d12-03af-46ac-b53a-ee04dec23d38 | vmi-jenkins-2.60-centos-7.3-unified        | public     | 2521      | 0            | 50            |
| a030c166-6e67-4a28-bf9d-af7e096e4591 | vmi-netbsd-7.1-amd64                       | public     | 841       | 0            | 50            |
| c52d0b83-c2ef-4661-be0e-5e2cbb0bf744 | vmi-netbsd-7.1-amd64-20gb                  | public     | 816       | 0            | 20            |
| cb9174eb-c25b-4762-8db2-6a2c0d102c43 | vmi-docker-17.06-ubuntu-16.04-unified-20gb | public     | 4040      | 0            | 20            |
| 726d1f6a-8af0-4fd3-854a-05fb74391224 | vmi-lemp-centos-7.3-unified-20gb           | public     | 2523      | 0            | 20            |
| a6dfcbc7-13e3-4146-81e5-cfb51266135a | vmi-docker-17.06-ubuntu-16.04-unified      | public     | 4040      | 0            | 50            |
| 3718c231-2d85-43dc-a87a-830f6ed6b674 | vmi-lemp-centos-7.3-unified                | public     | 2523      | 0            | 50            |
| e743e81b-fbee-42aa-bd8f-c84dc990bb0a | vmi-fedora-26-amd64                        | public     | 1620      | 0            | 50            |
| 28a0e1ca-e4d2-4bb0-a290-bc51a0ca34a5 | vmi-fedora-26-amd64-20gb                   | public     | 1659      | 0            | 20            |
| 0c25f6d8-f706-44de-8032-a3d7dfe30541 | vmi-redmine-3.4-centos-7.3-unified-20gb    | public     | 3352      | 0            | 20            |
| 08847571-a260-4af3-a13d-16fe68162016 | vmi-redmine-3.4-centos-7.3-unified         | public     | 3352      | 0            | 50            |
| a28ad8eb-a23b-45c1-83f6-1b7b17a0ac89 | vmi-arch-amd64                             | public     | 2147      | 0            | 50            |
| efd589e6-6d6f-458b-923a-400d64924978 | vmi-debian-9.0-amd64-unified-20gb          | public     | 1805      | 0            | 20            |
| 86ef477d-5789-4a5a-b739-5219021252c8 | vmi-debian-9.0-amd64-unified               | public     | 1805      | 0            | 50            |
| 26ef30ba-5d04-4ffe-91eb-58c069927dc3 | vmi-arch-amd64-20gb                        | public     | 2691      | 0            | 20            |
| ff75715d-551a-4ea9-97fd-14eea8e11b08 | vmi-zbx-3.0-centos-7.3                     | public     | 4132      | 0            | 50            |
| 9c4a6abb-0bcb-43ed-a685-0407f1176ad7 | vmi-debian-7.11-i386-20gb                  | public     | 1313      | 0            | 20            |
| 772fa27e-adf6-424e-b6db-15089c3407ca | vmi-debian-7.11-i386                       | public     | 1260      | 0            | 50            |
| 27f791e7-2c15-4a00-8689-3131d3932e9a | vmi-debian-7.11-amd64-20gb                 | public     | 2106      | 0            | 20            |
| e012238a-53b6-403e-8c19-36075d6cc5f1 | vmi-debian-7.11-amd64                      | public     | 1409      | 0            | 50            |
| 3bb9c09d-d58a-4469-af73-c79c0bc2d8b9 | vmi-rails-5.1-centos-7.3-unified-20gb      | public     | 3113      | 0            | 20            |
| ffdf2454-38cc-424b-8b6b-199df7574b13 | vmi-rails-5.1-centos-7.3-unified           | public     | 3113      | 0            | 50            |
| 40707657-ec0d-4576-ac4c-946e9ac24038 | vmi-django-1.11-centos-7.3-unified-20gb    | public     | 2816      | 0            | 20            |
| 58f7e55b-3ee7-4b76-bdd6-4733bf6fc18d | vmi-concrete5-8.10-centos-7.3-unified-20gb | public     | 2753      | 0            | 20            |
| c57c8902-c5cd-4f45-92e8-dcfffbcb07ce | vmi-django-1.11-centos-7.3-unified         | public     | 2816      | 0            | 50            |
| efcef3d4-5db8-4ef2-ac2e-ce7130092f62 | vmi-concrete5-8.10-centos-7.3-unified      | public     | 2753      | 0            | 50            |
| 2765f574-b157-4313-95dd-4baa816e1227 | vmi-centos-6.8-i386                        | public     | 1361      | 0            | 50            |
| f608392b-fe8f-42f1-b10b-cdae2729026e | vmi-lamp-centos-7.3-unified                | public     | 2501      | 0            | 50            |
| 3dea6146-0046-41a8-80b0-eb01522b99d4 | vmi-lamp-centos-7.3-unified-20gb           | public     | 2501      | 0            | 20            |
| 9535ed04-83ad-4694-bb2e-0759784d1689 | vmi-centos-6.8-i386-20gb                   | public     | 1242      | 0            | 20            |
| 30159dae-2a02-4e7c-ba9e-4658935ad6cf | vmi-centos-6.8-amd64-20gb                  | public     | 1292      | 0            | 20            |
| 7a2de560-1bc6-42aa-8fd8-4da4978b2ec7 | vmi-centos-6.8-amd64                       | public     | 1246      | 0            | 50            |
| e354b6d1-aa29-4eac-bdc4-a4aa48f2a4d6 | vmi-owncloud-10.0-centos-7.3-unified-20gb  | public     | 2646      | 0            | 20            |
| befddd69-8c6a-466a-836b-d512e68d070a | vmi-joomla-3.7-centos-7.3-unified-20gb     | public     | 2893      | 0            | 20            |
| 2e4d8079-abbd-45bd-ad6d-7435d78f711f | vmi-owncloud-10.0-centos-7.3-unified       | public     | 2646      | 0            | 50            |
| 927e415e-1f27-45f6-96ee-59bdc144fec2 | vmi-joomla-3.7-centos-7.3-unified          | public     | 2893      | 0            | 50            |
| 7c88cf7b-4548-4deb-a46c-609c2f4fd3ce | vmi-mediawiki-1.28-centos-7.3-unified-20gb | public     | 3209      | 0            | 20            |
| 38723d3e-d5b0-4f29-88b9-3d1d6ee1fd92 | vmi-mediawiki-1.28-centos-7.3-unified      | public     | 3209      | 0            | 50            |
| 0c90acd2-7825-4c39-94b0-fc68d2eb1baf | vmi-centos-6.9-i386-20gb                   | public     | 1507      | 0            | 20            |
| c99f70fa-40c7-4b48-b67b-e8f89676b7a5 | vmi-centos-6.9-i386                        | public     | 1546      | 0            | 50            |
| 083e8546-b77a-4e2d-95cf-9caf4cdbcedb | vmi-centos-6.9-amd64-20gb                  | public     | 1578      | 0            | 20            |
| fdb77dff-cb7e-4f3a-9c58-2c7349cde01f | vmi-centos-6.9-amd64                       | public     | 1594      | 0            | 50            |
| c27521b1-8c9a-4591-913e-397620593042 | vmi-mastodon-1.2-ubuntu-16.04-unified-20gb | public     | 5901      | 0            | 20            |
| 18720683-728d-425b-8607-5d9c9533822f | vmi-mastodon-1.2-ubuntu-16.04-unified      | public     | 5901      | 0            | 50            |
| 24897046-a9f8-436a-9d69-b9432422932f | vmi-opensuse-42.2-amd64-unified-20gb       | public     | 2743      | 0            | 20            |
| 776039c7-50ed-4f5e-b98f-8a94e39aa304 | vmi-opensuse-42.2-amd64-unified            | public     | 2743      | 0            | 50            |
| 2286b897-7eb9-4dcf-8847-6af18bae6450 | vmi-debian-8.7-i386-unified-20gb           | public     | 1916      | 0            | 20            |
| 1444e96a-7455-41ac-a744-bf1150a23324 | vmi-debian-8.7-amd64-unified-20gb          | public     | 2226      | 0            | 20            |
| 8c9f7e23-c42e-4eeb-9672-786d80ce84aa | vmi-debian-8.7-i386-unified                | public     | 1916      | 0            | 50            |
| a63a4659-3ff7-416d-9d83-931f68c820c8 | vmi-debian-8.7-amd64-unified               | public     | 2226      | 0            | 50            |
| 5e4dbea8-db3f-4675-b789-0b4ccfcab83c | vmi-mongodb-3.4-centos-7.3-unified-20gb    | public     | 2782      | 0            | 20            |
| 89890ae4-9330-4ed5-a522-d1bfb716ef5d | vmi-mongodb-3.4-centos-7.3-unified         | public     | 2782      | 0            | 50            |
| fc199af0-9f7e-4d39-9219-fe74cfbd9ac2 | vmi-ubuntu-14.04-i386-unified-20gb         | public     | 2407      | 0            | 20            |
| c171aae7-d3b7-4776-b3df-9b4130d48019 | vmi-ubuntu-14.04-amd64-unified-20gb        | public     | 2906      | 0            | 20            |
| 9155c52d-81dd-4a65-a234-8feaa403ac6f | vmi-ubuntu-14.04-i386-unified              | public     | 2407      | 0            | 50            |
| c50d92b9-f9c8-4fb0-868c-5601f8c9195e | vmi-ubuntu-14.04-amd64-unified             | public     | 2906      | 0            | 50            |
| b78cb72c-dd3e-452a-ad9a-a8860ef6fd41 | vmi-centos-7.3-amd64-unified-20gb          | public     | 2219      | 0            | 20            |
| 1788b029-1b7a-43eb-a89d-02abd0866458 | vmi-centos-7.3-amd64-unified               | public     | 2219      | 0            | 50            |
| ccc8b06b-7ee4-4d70-b410-34662e607bbd | vmi-hinemos-6.0-centos-7.3-unified-20gb    | public     | 2462      | 0            | 20            |
| a8275afd-1a23-4c2d-86e2-ea315f576c58 | vmi-hinemos-6.0-centos-7.3-unified         | public     | 2462      | 0            | 50            |
| 89be042d-c2c1-4702-9ea5-bafc6fa3218c | vmi-piwik-3.0-centos-7.3-unified-20gb      | public     | 2383      | 0            | 20            |
| dbaae5d7-0393-4897-808e-27559bd2528f | vmi-basercms-4.0-centos-7.3-unified-20gb   | public     | 2412      | 0            | 20            |
| 9abad71b-5530-437c-9211-6fd27cd1b314 | vmi-piwik-3.0-centos-7.3-unified           | public     | 2383      | 0            | 50            |
| b6648f3e-d232-4e19-9cc4-89043cad55eb | vmi-basercms-4.0-centos-7.3-unified        | public     | 2412      | 0            | 50            |
| 65cfff0d-baac-4e5b-8263-f949c9ed7ed3 | vmi-ubuntu-16.04-i386-unified-20gb         | public     | 3014      | 0            | 20            |
| fdedd7ed-2a4b-4de6-88ba-364deb25e193 | vmi-ubuntu-16.04-amd64-unified-20gb        | public     | 3361      | 0            | 20            |
| ec2bfd27-7793-4f53-8ab6-936c79a06213 | vmi-ubuntu-16.04-i386-unified              | public     | 3014      | 0            | 50            |
| b9e54c41-cda9-4d84-8248-808bfaf6c793 | vmi-ubuntu-16.04-amd64-unified             | public     | 3361      | 0            | 50            |
| a1229749-a3e1-4098-88dc-9b19e7aad22e | vmi-zabbix-2.4-centos-7.2-20gb             | public     | 3282      | 0            | 20            |
| b9ccf65f-cdd5-4fce-bb16-679985020a5f | vmi-redis-3.2-centos-7.2-20gb              | public     | 3076      | 0            | 20            |
| c03ec927-88d0-41c1-8e64-e9e7029d7e59 | vmi-wordpress-kusanagi-centos-7.2-20gb     | public     | 2534      | 0            | 20            |
| 222b39bd-91c8-420e-a39e-1ec67d151997 | vmi-openbsd-6.0-amd64-20gb                 | public     | 1036      | 0            | 20            |
| c0e04c75-62af-43ee-aaf5-665ab8730032 | vmi-freebsd-10.3-zfs-amd64-20gb            | public     | 2206      | 0            | 20            |
| ac2fd4ab-cc87-4b86-bf6a-73f2d3f23e8a | vmi-freebsd-10.3-amd64-20gb                | public     | 2774      | 0            | 20            |
| 77271182-f24f-4d69-9bba-d56dc00b03d3 | vmi-centos-7.1-amd64-20gb                  | public     | 1511      | 0            | 20            |
| aec25e57-d992-42b5-9824-584f0b4d7060 | vmi-centos-6.7-i386-20gb                   | public     | 1280      | 0            | 20            |
| 025defb8-0cbb-48de-8ffb-1b11130e4866 | vmi-centos-6.7-amd64-20gb                  | public     | 1445      | 0            | 20            |
| f8ff2137-980c-4e48-85c6-6d9caea0c021 | vmi-centos-6.6-i386-20gb                   | public     | 1234      | 0            | 20            |
| e3c65854-29e2-41ef-a37b-79db8536dfca | vmi-centos-6.6-amd64-20gb                  | public     | 1384      | 0            | 20            |
| 1e6bf6ca-d221-49e8-9496-c33b51f5ed58 | vmi-centos-7.2-amd64-20gb                  | public     | 3067      | 0            | 20            |
| 88503ca6-5d0f-454e-9b51-2e42d72d7d09 | vmi-wordpress-kusanagi-centos-7.2          | public     | 3260      | 0            | 50            |
| e4b459c0-c850-4416-a6e9-79a933240c8c | vmi-freebsd-10.3-zfs-x86_64                | public     | 2329      | 0            | 50            |
| 23effbeb-dd21-45e4-a0db-bea595e990d0 | vmi-freebsd-10.3-x86_64                    | public     | 2666      | 0            | 50            |
| 0ed01013-93b9-454d-af05-ab421d5a0b3f | vmi-openbsd-6.0-amd64                      | public     | 1550      | 0            | 50            |
| 460819d9-25de-44e0-a239-b0e0b33eb91d | vmi-redis-3.2-centos-7.2                   | public     | 1930      | 0            | 50            |
| ac965a99-7318-44e2-b61c-60788213e9bc | vmi-zabbix-2.4-centos-7.2                  | public     | 1897      | 0            | 50            |
| e141fc06-632e-42a9-9c2d-eec9201427ec | vmi-centos-7.2-amd64                       | public     | 1795      | 0            | 50            |
| 21113ec0-3d41-499b-8733-812eb4230e7b | vmi-centos-7.1-amd64                       | public     | 1463      | 0            | 50            |
| cd13a8b9-6b57-467b-932e-eee5edcd8d6c | vmi-centos-6.7-amd64                       | public     | 1891      | 0            | 50            |
| 9ef2815a-23a9-4647-97f0-4047b3a819a3 | vmi-centos-6.7-i386                        | public     | 1729      | 0            | 50            |
| 49848467-c2b6-4d45-b8af-3b62dd4dbfde | vmi-centos-6.6-amd64                       | public     | 1824      | 0            | 50            |
| da1da341-d68c-4fa7-b283-70019fba6b36 | vmi-centos-6.6-i386                        | public     | 1852      | 0            | 50            |
+--------------------------------------+--------------------------------------------+------------+-----------+--------------+---------------+
```
```
+--------------------------------------+---------+------+----------+----------------+
| ID                                   | Name    | vCPU | RAM (Mo) | Disk size (Go) |
+--------------------------------------+---------+------+----------+----------------+
| 294639c7-72ba-43a5-8ff2-513c8995b869 | g-2gb   | 3    | 2048     | 50             |
| 3aa001cd-95b6-46c9-a91e-e62d6f7f06a3 | g-16gb  | 8    | 16384    | 50             |
| 62e8fb4b-6a26-46cd-be13-e5bbf5614d15 | g-4gb   | 4    | 4096     | 50             |
| 7eea7469-0d85-4f82-8050-6ae742394681 | g-1gb   | 2    | 1024     | 50             |
| 965affd4-d9e8-4ffb-b9a9-624d63e2d83f | g-8gb   | 6    | 8192     | 50             |
| a20905c6-3733-46c4-81cc-458c7dca1bae | g-32gb  | 12   | 32768    | 50             |
| c2a97b05-1b4b-4038-bbcb-343201659279 | g-64gb  | 24   | 65536    | 50             |
| d92b02ce-9a4f-4544-8d7f-ae8380bc08e7 | g-512mb | 1    | 512      | 20             |
+--------------------------------------+---------+------+----------+----------------+
```
# $ vagrant up --provider=conoha

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.ssh.username = 'root'
  config.ssh.pty      = true

  config.vm.provider :conoha do |conoha|
    conoha.openstack_auth_url = 'https://identity.tyo1.conoha.io/v2.0'

    conoha.username           = 'gnXX12345678'
    conoha.password           = 'YOURPASSWORD'
    conoha.tenant_name        = 'gnYY12345678'

    conoha.flavor             = 'g-1gb'
    conoha.image              = 'vmi-centos-7.4-amd64'

    conoha.region             = "tyo1"
    conoha.admin_pass         = "ROOT_PASSWORD"
    conoha.metadata           = {
      instance_name_tag: "YOUR_INSTANCE_NAME"
    }
    conoha.security_groups    = [
      "default",
      "gncs-ipv4-all",
      "gncs-ipv6-all",
    ]
  end
  
  # the contents of this section depends on you...
  config.vm.provision "shell", inline: <<-SHELL
    yum update -y
    yum install -y vim git wget curl tig zsh

    # Set VALUE-DOMAIN DDNS
    CONOHA_DOMAIN_NAME="your-host.name"
    CONOHA_SUBDOMAIN_NAME="your-subdomain"
    CONOHA_DDNS_PASSWORD="value-domain-ddns-password"
    CONOHA_IP_ADDRESS=`curl inet-ip.info`
    VALUE_DOMAIN_ACCESS_URI="https://dyn.value-domain.com/cgi-bin/dyn.fcg?d=${CONOHA_DOMAIN_NAME}&p=${CONOHA_DDNS_PASSWORD}&h=${CONOHA_SUBDOMAIN_NAME}&i=${CONOHA_IP_ADDRESS}"

    curl --get "${VALUE_DOMAIN_ACCESS_URI}"

    # Create General User with sudo
    USERNAME='foobar'
    PASSWORD='hogehoge'

    useradd -m -G wheel -s /bin/bash "${USERNAME}"
    echo "${PASSWORD}" | passwd --stdin "${USERNAME}"
    sed -e "s/PasswordAuthentication no/PasswordAuthentication yes/g" -i /etc/ssh/sshd_config

    systemctl restart sshd
  SHELL
end

以上是关于text 设置VALUE-DOMAIN DDNS,ConoHa用Vagrantfile(vagrant-conoha)的主要内容,如果未能解决你的问题,请参考以下文章

华硕路由器怎么使用ipv6做ddns?

在TP-LINK路由器上设置花生壳DDNS

海康网络录像机上网设置

linux初学者-DDNS配置篇

大华硬盘录像机网络摄像机 网络硬盘录像机外网远程设置DDNS方法

老毛子ipv6 ddns