Find the lowest latency Azure regions from your place using azping

azping is a command line tools that help you find the lowest latency Azure Region from your place. It acutally reports median latency to Azure regions. It is a fork of gcping. What does azping actually evalulate? azping evalulate the median latecy of http requests to Azure blob storage endpoints located in each of Azure reagions from your place. Number of requests to be made to each region is 5 by default, but it can be changed with -n parameter that you can give in executing azping command....

<span title='2019-08-10 00:00:00 +0000 UTC'>August 10, 2019</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;Yoichi Kawasaki

Unofficial tips for CKA and CKAD exams

I’ve taken both Certified Kubernetes Administrator (CKA) and Certified Kubernetes Application Developer (CKAD) exams in the past 2 weeks and fortunately passed both. This is a blog article on tips for both exams based on my experiences. About the exam and its curriculum CKA focus on managing and operating kubernetes cluster including troubleshooting while CKAD forcus on managing and deploying applicaionts to kubernetes cluster. It’s very important to read and understand the exam curriculum and their relevant pages on kubernetes....

<span title='2019-03-18 00:00:00 +0000 UTC'>March 18, 2019</span>&nbsp;·&nbsp;4 min&nbsp;·&nbsp;Yoichi Kawasaki

Easy way to SSH into Azure Kubernetes Service cluster node VMs

This is an article on how you can SSH into Azure Kubernetes Service (AKS) cluster node VMs using kubectl-plugin-ssh-jump. Motivation I wanted to SSH into Azure Kubernetes Service (AKS) cluster node VMs, then looking up azure docs I found a relevant page - Connect with SSH to Azure Kubernetes Service (AKS) cluster nodes for maintenance or troubleshooting. But when I first saw this procedure, I thought this was very troublesome. Lazy person like me couldn’t accept going thourgh all the steps just to SSH into AKS cluster nodes VMs....

<span title='2019-02-12 00:00:00 +0000 UTC'>February 12, 2019</span>&nbsp;·&nbsp;6 min&nbsp;·&nbsp;Yoichi Kawasaki

Set of Envoy Proxy features demos

Set of demos to demonstrate Envoy Proxy features HTTP Routing: Simple Match Routing All traffic is routed by the front envoy to the service containers. Internally the traffic is routed to the service envoys, then the service envoys route the request to the flask app via the loopback address. In this demo, all traffic is routed to the service envoys like this: A request (path /service/blue & port 8000) is routed to service_blue A request (path /service/green & port 8000) is routed to service_green A request (path /service/red & port 8000) is routed to service_red Key definition 1 - virtual_hosts in front-envoy....

<span title='2019-01-14 00:00:00 +0000 UTC'>January 14, 2019</span>&nbsp;·&nbsp;5 min&nbsp;·&nbsp;Yoichi Kawasaki

Quick Start with Azure Functions V2 Python (Preview)

Today (Sept 25, 2018 JST), Azure Functions supports Python development using Python 3.6 on the Functions v2 (cross-platform) runtime. You can now use your Python code and dependencies on Linux-based Functions. This is an article on quick start with Azure Functions V2 Python (Preview) showing how you can quickly start Python function development on Azure Function V2 runtime. 1. Prerequisites for Buidling & Testing Locally Python 3.6 (For Python function apps, you have to be running in a venv) Azure Functions Core Tools 2....

<span title='2018-09-25 00:00:00 +0000 UTC'>September 25, 2018</span>&nbsp;·&nbsp;6 min&nbsp;·&nbsp;Yoichi Kawasaki

Accessing RBAC enabled Kubernetes Dashboard

This is an article on how you can configure Service Account and RoleBinding in order to make Dashbaord work. As of release Kubernetes v1.7, Dashboard no longer has full admin privileges granted by default. All the privileges are revoked and only minimal privileges granted, that are required to make Dashboard work. With default priviledge, you’ll see the following errors showed up on the Dashboard. [Azure Kubernetes Service (AKS)] RBAC is enabled by default Since Azure CLI version 2....

<span title='2018-08-11 00:00:00 +0000 UTC'>August 11, 2018</span>&nbsp;·&nbsp;5 min&nbsp;·&nbsp;Yoichi Kawasaki

Moving to Jekyll based Github page

I’ve moved my blog site from Wordpress to Jekyll based Github page. There are a few reasons for this: I wanted to manage my blog data on Github I wanted to switch from HTML based to Markdown I wanted more static approach like generating once, not dynamically rendering for every request (for performance reason) After a few minutes of googling, I came up with Jekyll and found it much easier to manage my blog data with Jekyll than with Wordpress....

<span title='2018-07-05 00:00:00 +0000 UTC'>July 5, 2018</span>&nbsp;·&nbsp;6 min&nbsp;·&nbsp;Yoichi Kawasaki

Kubernetes x PaaS コンテナアプリケーションのNoOpsへの挑戦 (Japan Container Days v18.04)

先日、4月19日に開催されたJapan Container Days v18.04にて「Kubernetes x PaaS – コンテナアプリケーションのNoOpsへの挑戦」というタイトルでセッションを担当させていただいた。その名の通りメインがKubernetesで、KubernetesアプリケーションにおいてNoOps(運用レス)を目指すためのにどういった工夫ができるのか、どういったものを活用していけばよいのか、という内容です。このブログではJapan Container Daysでの発表に使用したスライドの共有とセッションに中のサンプルやデモについて補足させていただく。 Session Slides Kubernetes x PaaS – コンテナアプリケーションの NoOpsへの挑戦 from Yoichi Kawasaki 補足情報 1. Open Service Broker for AzureでAzure Database for MySQLの利用 スライドでお見せした実際のファイルを使ってAzure Database for MySQLのサービスインスタンス作成、バインディング、そして実際のアプリケーションからの利用までの流れを紹介させていただく。 Open Service Broker for AzureプロジェクトのGithubにあるサンプルファイルmysql-instance.yamlとmysql-binding.yamlを使ってそれぞれServiceInstanceとServiceBindingを作成する ` # Provisioning the database, basic50 plan ... $ kubectl create -f mysql-instance.yaml # Wait until ServiceInstance named example-mysql-instance get ready 'Status => Ready', # then execute the following to create a binding for this new database, $ kubectl create -f mysql-binding....

<span title='2018-04-25 00:00:00 +0000 UTC'>April 25, 2018</span>&nbsp;·&nbsp;3 min&nbsp;·&nbsp;Yoichi Kawasaki

Controlling Azure Media Services traffic with Traffic Manager

This is an article on how you can achieve Azure Media Services (AMS) streaming traffic distribution with Traffic Manager. The process for a client to find target AMS streaming endpoints The figure shows how a client find target AMS streaming endpoints with Traffic Manager and requests from video players are distributed to streaming endpoints in AMS: When AMS endpoints are added to an Azure Traffic Manager profile, Azure Traffic Manager keeps track of the status of the endpoints (running, stopped, or deleted) so that it can decide which of those endpoints should receive traffic....

<span title='2018-01-06 00:00:00 +0000 UTC'>January 6, 2018</span>&nbsp;·&nbsp;5 min&nbsp;·&nbsp;Yoichi Kawasaki

15分でお届けするElastic Stack on Azure設計・構築ノウハウ

UPDATED on Feb 3, 2018 - Elastic社イベントサイトを追加 イベント開催日から少々時間が経過したが、Elastic {ON} Tour 2017 東京(2017年12月14日開催)というElastic社オフィシャルのユーザーカンファレンスにて登壇させていただく機会があり、そこで「15分でお届けする Elastic Stack on Azure 設計・構築ノウハウ」というお題でお話をさせていただいた。個人的にとても大好きなプロダクトなので、そのユーザーカンファレンスでお話をさせていただいたということと、そのプロダクトのAzureでの利用促進に微力ながらも貢献できたということは光栄至極である。ここではそのElastic {ON} Tourでの発表で使用したスライドに補足解説を加えて共有させていただく。 セッションスライド(+デモ動画) 15分でお届けする Elastic Stack on Azure 設計・構築ノウハウ from Yoichi Kawasaki 補足解説 デプロイメント AzureでのElastic Stackの利用は当然ながら仮想マシン(VM)を並べてそこにクラスタを構築することになる。残念ながら現時点でマネージドのElasticサービスはAzureには存在しない。VMベースということで特にオンプレと変わらずマニュアルであったり、ChefやAnsibleなどの構成管理ツールを使ってクラスタを組んだり柔軟な構築が可能であるものの、ここではAzureでの構築ということでARMテンプレートを使ったデプロイメントの方法を紹介している。 Azure Marketplaceからのデプロイ:最も手っ取り早い方法。30日のX-Packトライアルライセンスが付いていて、トライアル期間が過ぎてもBYOLでライセンスの更新が可能。テンプレートでは2017年12月時点でv2.0.2 〜 v5.6.3の選択が可能。何も考えず最新版をご利用ください。 Github上のARMテンプレートをカスタマイズしてデプロイ:Elastic社が用意したGithub上のARMテンプレートがあるのでそれを自分の要件に応じてカスタマイズしてデプロイメントをする。Azure CLIやPowerShellなどコマンドを使ったデプロイメントが可能なので構成管理ツールに組み込んで周辺環境を合わせて自動構築設定も可能。慣れてきたらこちらがよいでしょう。 推奨仮想ハードウェアとDISK Elasticクラスタ全体のパフォーマンスを引き出すためには機能別に適正なVMインスタンスとサイズを選択ください。またVMにアタッチするディスクについてはビルトインで可用性設定がされているManaged Disk、もしくはPremium Managed Diskを選択することをお忘れなく。 可用性の設定について AzureでIaaSで可用性の設定といえばおなじみの可用性セット(Availability Set)と可用性ゾーン(Availability Zone)。当然Elastic Stackのクラスタを組む時もこれらの設定を入れましょうというお話。可用性ゾーンは、その可用性レベルの高さから将来的には可用性ゾーンが主流な設定になっていくはずであるものの、2017年12月時点でPreviewリリースであり、利用可能リージョンが米国東部第2、西ヨーロッパのみというとても限定的なものとなっている。現時点でプロダクション用途となると可用性セット一択なので何も考えずに可用性セットを組んでください。 可用性セット(Availability Set) 一つのDCの中で同一の物理ラックや電源などを配置しないようにして、障害が発生してもグループの中のどこかのVMは生きているようにする設定のこと VM SLA 99.95%で提供 可用性ゾーン(Availability Zone) 各VMを別々のゾーンに配置するのでDCレベルの障害につよい(それぞれゾーンは電源、ネットワーク、冷却装置が完全に物理的に分離されたものとなっている)。ちなみに、Azureのリージョンは複数のデータセンターで構成されており、その間を高速なバックボーンで接続して1つのリージョンとして透過的に利用が可能となっているのでこのようなことができるわけだ VM SLA 99.99%で提供 【注意点】可用性ゾーンの設定ではDCが分かれて配置されるので次の2点の考慮が必要:(1)マスターは各ゾーンに分散するように各ゾーン最低1ノード配置すること(2)データノードはゾーンにまたがる通信が極力起こらないように工夫すること。これを実現するのがShard Allocation Awarenessという仕組みで、この仕組みをつかうことで 同一ゾーン内に配置されているノードだけで完全なシャードを保持するようにして、検索要求が同一ゾーン内で完結できるように設定が可能となる ネットワークセキュリティグループの設定 AzureのIaaSにおけるネットワークフィルタリングの設定に、ネットワークセキュリティグループ(NSG)とよばれるL4フィルタリングがある。当然ながら、既にX-Packを導入していればそのセキュリティ機能の1つとしてネットワークレベルのアクセス制御についても行うことができるが、X-Packを導入していない場合は確実にNSGの設定は必要になってくる。また、Elastic Stack以外のアプリケーションとの連携の際にも必ず必要になってくる。Azure上でのシステム構築では欠かすことのできない設定の1つ。 Azureサービスからのデータコレクション Azure VMについては、オンプレ同様に、ビルトインのBeatsやlogstashとの連携により、そのログやMetricsなどのデータコレクションを実現することができる。一方、Azureが特に力を入れているPaaS(Platform as a Services)からのデータコレクションについてはどうかというと、下記のサービスについては既にビルトインで用意されている機能や、コミュニティ製Logstash Input プラグインを利用することでデータコレクションを実現することができる。 H2M_LI_HEADER Azure Blob Storage: logstash-input-azureblob H2M_LI_HEADER Azure Service Bus (Topic): logstash-input-azuretopic H2M_LI_HEADER Azure Event Hub: logstash-input-azureeventhub H2M_LI_HEADER Azure SQL Database: logstash-input-jdbc H2M_LI_HEADER Azure Database for MySQL: logstash-input-jdbc H2M_LI_HEADER Azure Database for PostgreSQL: logstash-input-jdbc H2M_LI_HEADER Azure HDInsight: ES-Hadoopによる連携...

<span title='2018-01-01 00:00:00 +0000 UTC'>January 1, 2018</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Yoichi Kawasaki