Google Cloud deployment guide

MikoPBX Installation deployment Guide using Google Cloud

Authorize on the platform https://console.cloud.google.com/

Let's start configuring

For quick and convenient navigation on the Google Cloud platform, use the search pane

Creating storage

  1. Open Navigation menu / Products & solutions / Storage / Cloud Storage

  2. On the Cloud Storage tab select Create

  3. Enter the storage name, for example miko-images

  4. Use default values for other fields

  5. After entering the values, click the Create button

  1. Open the created miko-images storage

  2. On the opened tab select UPLOAD FILES

  3. Upload the file from the MikoPBX distribution with the .vhd extension

  4. Wait for the file upload to complete

Connecting Cloud Build API

  1. Open Navigation menu / APIs & Services / Library / Google Enterprise API / Cloud Build API

  2. On the opened tab select ENABLE

Check the roles for the Cloud Build service account:

  1. Select your Google Cloud project

  2. Check the Include Google-provided role grants checkbox

  3. In the table, find the row with the email address ending with @cloudbuild.gserviceaccount.com

  4. Select Edit principal

  5. The roles to be granted to the Cloud Build service account are Compute Admin and Service Account User

If the required roles are not present, add them and click SAVE

Connecting Compute Engine API

  1. Open Navigation menu / APIs & Services / Library / Google Enterprise API / Compute Engine API

  2. On the opened tab select ENABLE

Creating an image

  1. Open Navigation menu / Products & solutions / Compute / Compute Engine

  2. Go to the Storage / Images section

  3. Select CREATE IMAGE to create a new image

  4. Enter the image name, for example mikopbx-new-image

  5. Specify the source type - Virtual disk (VMDK, VHD)

  6. Select Virtual disk file under the BROWSE link, Browse / miko-images / .vhd

  7. Uncheck the Install guest packages checkbox

  8. In the Operating system on virtual disk field specify - No operating system. Data only.

  9. Use default values for other fields

  10. After entering the values, click the Create button and wait for the image creation to complete

Creating a virtual machine

  1. In the Compute Engine tab go to the Virtual machines / VM Instance section

  2. Select CREATE INSTANCE

  3. Enter the virtual machine name, for example mikopbx-vm

  1. In the Machine configuration / General purpose table select Series - N1

  1. In the Machine type section choose Shared-core / f1-micro from the dropdown menu

  1. In the Boot disk section select CHANGE

  2. On the opened tab go to CUSTOM IMAGES

  3. In the Image field select the previously created mikopbx-new-image

  4. Use default values for other fields on the tab

  5. Click the SELECT button

  1. In the Advanced options / Disks section select ADD NEW DISK

  2. On the opened tab enter the disk name for data storage, for example disk-storage-mikopbx

  3. Specify the disk size of at least 50GB

  4. Use default values for other fields on the tab

  5. Click the SAVE button

If you have an SSH key, proceed as follows:

  1. In the Advanced options / Security / MANAGE ACCESS section, select ADD ITEM

  2. Specify it in the SSH key field

If you don't have an SSH key, proceed directly to step 18

  1. Use default values for other fields

  2. After entering the values, click the CREATE button

Configuring ports for incoming connections

  1. Open Navigation menu / VPC network / Firewall

  2. Select CREATE FIREWALL RULE to create a new rule for incoming connections

  3. Enter the name of the new rule, for example internal-allow

  1. Specify Direction of traffic - Ingress

  2. Specify Targets

  3. From the Source filter dropdown menu select IPV4 ranges and in the Source IPv4 ranges field enter 0.0.0.0/0

  1. In the Protocols and ports section check the TCP (Ports - 0-65535) and UDP (Ports - 0-65535) checkboxes

  1. Use default values for other fields

  2. After entering the values, click the CREATE button

Starting MikoPBX

  1. Open the Compute Engine tab and go to the Virtual machines / VM Instance section

  2. Go to the created virtual machine mikopbx-vm

  3. On the opened tab navigate to Logs / Serial port 1 (console)

  1. Copy the external address of the created virtual machine and enter it in the browser's address bar

  2. For login use the login and password provided in Serial port 1 (console)

Авторизуйтесь на платформе https://console.cloud.google.com/

Приступим к настройке

Для быстрого и удобного поиска на платформе Google Cloud используйте панель поиска

Создание хранилища

  1. Откройте Navigation menu / Products & solutions / Storage / Cloud Storage

  2. На вкладке Cloud Storage выберите Create

  3. Введите имя хранилища, например miko-images

  4. Для других полей используйте значения по умолчанию

  5. Завершив ввод значений, нажмите кнопку Create

  6. Откройте созданное хранилище miko-images

  7. На открывшейся вкладке выберите UPLOAD FILES

  8. Загрузите файл из дистрибутива MikoPBX с расширением .vhd

  9. Дождитесь окончания загрузки файла

Подключение Cloud Build API

  1. Откройте Navigation menu / APIs & Services / Library / Google Enterprise API / Cloud Build API

  2. На открывшейся вкладке выберите ENABLE

Проверьте роли учетной записи службы Cloud Build, для этого

  1. Выберите свой проект Google Cloud

  2. Установите флажок Include Google-provided role grants

  3. В таблице найдите строку с адресом электронной почты, заканчивающимся на @cloudbuild.gserviceaccount.com

  4. Выберите Править (Edit principal)

  5. Роли, которые должны быть предоставлены учетной записи службы Cloud Build, - Сompute Admin и Service Account User

Если нужных ролей нет, добавьте и нажмите SAVE

Подключение Compute Engine API

  1. Откройте Navigation menu / APIs & Services / Library / Google Enterprise API / Compute Engine API

  2. На открывшейся вкладке выберите ENABLE

Создание образа

  1. Откройте Navigation menu / Products & solutions / Compute / Compute Engine

  2. Перейдите в раздел Storage / Images

  3. Выберите CREATE IMAGE для создания нового образа

  4. Введите имя образа (Name), например mikopbx-new-image

  5. Укажите тип источника (Source) - Virtual disk (VMDK, VHD)

  6. Выберите Virtual disk file по ссылке BROWSE, *Browse / miko-images / .vhd

  7. Уберите флажок Install guest packages

  8. В поле Operating system on virtual disk укажите - No operating system. Data only.

  9. Для других полей используйте значения по умолчанию

  10. Завершив ввод значений, нажмите кнопку Create и дождитесь окончания создания образа

Создание виртуальной машины

  1. Во вкладке Compute Engine перейдите в раздел Virtual machines / VM Instance

  2. Выберите CREATE INSTANCE

  3. Введите имя виртуальной машины (Name), например mikopbx-vm

  4. В таблице Machine configuration / General purpose ****выберите ****Series - N1

  5. В разделе Machine type в выпадающем меню выберите Shared-core / f1-micro

  6. В разделе Boot disk выберите CHANGE

  7. На открытой вкладке перейдите к CUSTOM IMAGES

  8. В поле Image выберите созданный ранее образ mikopbx-new-image

  9. Для других полей на вкладке используйте значения по умолчанию

  10. Нажмите кнопку SELECT

  11. В разделе Firewall ****разрешите HTTP трафик, установите флажок Allow HTTP traffic

  12. В разделе Advanced options / Disks выберите ADD NEW DISK

  13. На открытой вкладке введите имя диска для хранения данных (Name), например disk-storage-mikopbx

  14. Укажите размер диска (Size) не менее 50Гб

  15. Для других полей на вкладке используйте значения по умолчанию

  16. Нажмите кнопку SAVE

Если у вас есть ключ SSH, выполните следующее

  1. В разделе Advanced options / Security / MANAGE ACCESS выберите ADD ITEM

  2. Укажите его в поле SSH key

Если у вас есть нет ключа SSH, сразу перейдите к пункту 19

  1. Для других полей используйте значения по умолчанию

  2. Завершив ввод значений, нажмите кнопку CREATE

Настройка портов для входящих соединений

  1. Откройте Navigation menu / VPC network / Firewall

  2. Выберите CREATE FIREWALL RULE для создания нового правила для входящего соединения

  3. Введите имя нового правила (Name), например http-80

  4. Укажите Direction of traffic - Ingress

  5. Укажите Targets

  6. Из выпадающего меню в поле Source filter выберите IPV4 ranges и в поле Source IPv4 ranges укажите 0.0.0.0/0

  7. В разделе Protocols and ports установите флажок TCP и в поле Ports укажите 80

  8. Для других полей используйте значения по умолчанию

  9. Завершив ввод значений, нажмите кнопку CREATE

  10. Аналогично создайте правило для HTTPS. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - TCP, Ports - 443

  11. Аналогично создайте правило для SIP сигнализации TCP. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - TCP, Ports - 5060

  12. Аналогично создайте правило для SIP сигнализации UDP. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - UDP, Ports - 5060

  13. Аналогично создайте правило для передачи звука RTP. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - UDP, Ports - 10000-10200

Запуск АТС MikoPBX

  1. Откройте вкладку Compute Engine перейдите в раздел Virtual machines / VM Instance

  2. Скопируйте External IP созданной виртуальной машины

  3. Введите в строке браузера External IP

  4. Откройте созданную виртуальную машину

  5. Скопируйте Instance Id - это пароль для входа в АТС по умолчанию

  6. Логин для входа по умолчанию - admin

Last updated

Was this helpful?