Screencast: Serverless HipChat Connect - HipChat plugin [AWS API Gateway, Lambda, DynamoDB and S3]
Open Source project by GorillaStack.
How we used the Serverless framework to create a HipChat Connect plugin. You can use our boilerplate to run a HipChat connect plugin using AWS API Gateway, Lambda, DynamoDB and S3.
Repository: https://bitbucket.org/gorillastack/serverless-hipchat-connect
GorillaStack: https://www.gorillastack.com
--
Script:
Hi, my name is Elliott Spira from GorillaStack and we are doing a screencast of
how to get started with our serverless hipchat connect boilerplate repository
First thing we are going to do is clone the repository and change directory to
the root directory of the project.
Now we install the serverless framework
And then the grunt-cli
Now we install the project dependencies (all the dependencies for the serverless project)
Then we change to the restApi directory and install these dependencies. This
keeps our lambda function zip file smaller and makes deploying quicker!
Now we are going to set up a development environment. We will use ngrok to give
our localhost https endpoints for our emulated api gateway and for our emulated
s3 bucket (using python SimpleHTTPServer). Copy both urls to our config.json file.
Now we run babel to transpile our es6 code to es5, to make it compatible with
AWS lambda's version of nodejs. We have two grunt tasks available to you, one
for single run use, and one that runs in watch mode. Let's leave it in watch mode.
Now we run our grunt task to start our emulated s3 bucket.
We start up DynamoDB local for our local persistence layer.
We now run a grunt task to create our DynamoDB local tables.
Run sls offline start to start emulating api gateway on localhost port 3000.
One of the static assets we serve is an install page. This has an
'Add to Hipchat' button and information about the plugin.
Clicking 'Add to Hipchat' brings us to our integrations page and brings up modals
to select a chat room and verify the granting of permissions.
In our boilerplate we have an example 'echo' webhook, a glance, a sidebar that
can update our glance, post a card and launch a dialog.
I'll just demonstrate how a plugin can also be added using your plugin's descriptor url.
But enough about development environments... Let's go live!
First thing we do is use serverless to create a new stage called 'beta'. This
creates a new cloudformation stack just for this stage.
Now we will deploy our lambda function and all API Gateway endpoints for this stage.
We will copy the endpoint URL back to our config.json file.
Then we update the name and region in our S3 bucket endpoint in the config.json file.
Now we substitute our config.json properties for the stage into our static asset templates
and deploy to a new S3 bucket for this stage.
As you can see, we now have our assets hosted on s3 and can add the hipchat connect
plugin as we did before.
And there you have it. A HipChat connect plugin running in Lambda, API Gateway, S3 and DynamoDB
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Screencast: Serverless HipChat Connect - HipChat plugin [AWS API Gateway, Lambda, DynamoDB and S3]», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.