Document How to Run in Azure VM
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- azure, node.js, postgresql, shell, ubuntu
研究方向
未指定目標文件。先找出專案現有的部署或託管文件,然後將其中的慣例與此 issue 中的 Azure VM 步驟進行比較。當一份易於維護的 Azure VM 指南涵蓋 PostgreSQL、PostGraphile 啟動、外部存取、驗證以及中斷程序時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
Feature description
Document how to run in Azure on a VM.
Motivating example
I wanted to host in Azure and followed the steps below.
Steps that enabled me to host in an Azure VM:
Using Graphile over PostgreSQL 12
Created Ubuntu 20.04 Gen1 VM in Azure using static IP address
Connect using OSX Terminal SSH command
Launchpad
Terminal
ssh {vm_username}@{ip_address}
Create database user
sudo adduser {database_username}
Install PostgreSQL
sudo apt-get update
sudo apt-get install postgresql-12
CREATE ROLE {datebase_username} WITH LOGIN CREATEDB ENCRYPTED PASSWORD '{database_user_password}';
CREATE DATABASE {database_name};
GRANT ALL PRIVILEGES ON DATABASE {database_name} to {database_username};
\q
su {database_username}
psql -d {database_name}
CREATE TABLE testtable(
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL
);
\d
psql "postgres://{database_username}:{database_user_password}@localhost/{database_name}"
Note: connection strings require URL encoding.
Steps above were adapted from https://tecadmin.net/install-postgresql-server-on-ubuntu/
PostgreSQL Adding GUID (UUID) Support:
sudo su postgres
psql {database_name}
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
SELECT uuid_generate_v4();
Steps above were adapted from https://www.postgresqltutorial.com/postgresql-uuid/#:~:text=The%20Basics%20Of%20PostgreSQL%20UUID,table%20with%20UUID%20column.
Install NPM
sudo apt install npm
Install Yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
Install PostGraphile
yarn add postgraphile
Install Optional Plugins
yarn add @graphile-contrib/pg-simplify-inflector
Start Graphile with:
npx postgraphile \
--subscriptions \
--watch \
--dynamic-json \
--no-setof-functions-contain-nulls \
--no-ignore-rbac \
--no-ignore-indexes \
--show-error-stack=json \
--extended-errors hint,detail,errcode \
--append-plugins @graphile-contrib/pg-simplify-inflector \
--export-schema-graphql schema.graphql \
--graphiql "/graphiql" \
--enhance-graphiql \
--allow-explain \
--enable-query-batching \
--legacy-relations omit \
--connection postgres://{database_username}:{database_user_password}@localhost/{database_name} \
--owner-connection postgres://postgres:{postgress_password}@localhost/{database_name} \
--schema public \
--host 0.0.0.0
Documentation: CLI Usage: https://www.graphile.org/postgraphile/usage-cli/
Note: By default only localhost works but the --host 0.0.0.0 argument enables access from outside the server.
Note: sudo tcpdump port 5000 can be used to debug network issues to determine if traffic is hitting the server.
Verify Server is Working:
curl http://{vm_ip_address}:5000/graphiql
Disconnect Graphile execution from SSH window:
# Press <ctrl+z>
bg
disown -h
- 主要語言
- SCSS
- 星號
- 27
- 分支
- 124
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
graphile/graphile.github.io 的其他 Issue
-
help wanted quick
難度 2/5 1-3 小時 新手友好度 38/100
graphile/graphile.github.io#401 · 1 則留言 · 1 個 reaction ·
-
website: Update details on homepage and sponsor page可能重新可做 @jemgillam 於 1119 天前認領,目前沒有進行中的 PR。 未關閉quick
graphile/graphile.github.io#399 · 4 則留言 · 已指派 1 人 ·
-
sponsor page: New wording around Grafast needed!可能重新可做 @jemgillam 於 1149 天前認領,目前沒有進行中的 PR。 未關閉
graphile/graphile.github.io#393 · 1 個 reaction · 已指派 1 人 ·
-
難度 2/5 1-3 小時 新手友好度 38/100
graphile/graphile.github.io#341 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 25/100
graphile/graphile.github.io#280 · 2 則留言 · 5 個 reaction ·
查看 graphile/graphile.github.io 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 80/100
huggingface/huggingface_hub#5443 ·
維護者通常 1 天內回覆
-
needs-triage
難度 1/5 1 小時以內 新手友好度 85/100
Azure/azure-sdk-for-python#50155 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
EtcdCluster deletion never completes with the cert-manager provider when a Certificate is missing未關閉
難度 2/5 1-3 小時 新手友好度 78/100
etcd-io/etcd-operator#577 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100