Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per...

81
Integrating cloud services with Polaris Presented by: Wes Osborn

Transcript of Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per...

Page 1: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Integrating cloud services with PolarisPresented by: Wes Osborn

Page 2: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Topics

Why the cloud?

Cloud Backups

DNS

Notices

Page 3: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

IAAS vs PAAS Cloud Providers

IAAS = Infrastructure as a Service

Run a virtual machine on somewhere else

PAAS = Platform as a Service

Services that you can “bolt” together

Page 4: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Why the Cloud?Because it’s easy and they are better than you

Page 5: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Azure Certifications

Page 6: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

AWS Certifications

Page 7: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Uptime – Really Hard

Page 8: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Those pesky nines

Page 9: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

More Features – Can you do this?

Page 10: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

More Features – Can you do this?

Page 11: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Because technology changeshttp://youtu.be/Uk_vV-JRZ6E?t=16s

Page 12: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

BackupsCan you ever be too safe?

Page 13: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Do you follow the 3-2-1backup rule?

3 Copies

2 Formats

1 Stored Offsite

Cloud backups can help!

Page 14: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Azure & SQL 2014

Integrated – set and forget it

Very fast upload speeds – over 800 Mb/s!

Inexpensive - the price is always going down

Page 15: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Cost of Tape Loader

Page 16: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Azure storage cost for CLC’s database

Page 17: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Azure Backup Running

Page 18: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Major setup steps

1. Setup Azure Storage Blob

2. Setup Encryption

3. Run manual backup

4. Setup managed backup

5. Perform test restore

Page 19: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

You don’t have a backup unless you’ve tested your restore procedureWithout a restore it’s just bits taking up space

Page 20: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Setting up Azure Storage Blobhttp://www.sqlcoffee.com/SQLServer2014_0006.htm

^^^^Caution only use to Setup Azure Storage^^^^

Page 21: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Setting up Encryptionhttp://go.clcohio.org/iZKnH

^^^^Setup local encrypted backups^^^^

Page 22: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Keep the Keys!!!!!!!!!!!!!!!

Keep the Password!!!!!!!!!!!!!!!

Otherwise No Backup

Page 23: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Testing Manual Backup to Azure

Page 24: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Encrypt Manual Backup

Page 25: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Testing Manual Backup to Azure

Page 26: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Automating Azure Backups

Page 27: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Azure Restoreinstructions documenthttp://go.clcohio.org/azurerestorepug2014From your friends at the CLC

Page 28: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

DNSWhy would you want to run this internally?

Page 29: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Benefits of “outsourcing” DNS

Reliable – If DNS doesn’t work, its all gone

Better performance

Cool DNS hacks

Page 30: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Amazon Web Services Route 53

Cheap and Reliable

Page 31: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

AWS Route 53 Setup

1. Create zones (domainname.org)

2. Create records (MX, A, CNAME, etc.)

3. Test using AWS Name Servers

4. Update Registrar

Page 32: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Creating a Hosted Zone

Page 33: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Creating a record set

Page 34: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Testing your new DNS entries

Page 35: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Making live – Updating your Name Server records

Page 36: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Other DNS Hacks Creating a PAC Down page (S3)

Page 37: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Other DNS Hacks Creating a PAC Down page (R 53)

Page 38: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Creating a PAC Down pageWhat the patron sees

Page 39: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Cool hack – Redirect “naked” request to www

If you type in: clcohio.org

You’ll be redirected to: www.clcohio.org

Page 40: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Creating a S3 bucketto handle the redirect

Page 41: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Pointing to the S3 bucket

Page 42: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

NoticesMake your life easier and your patrons happier

Page 43: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Improving Notices

Improving Email Notices

Improving Telephone Notices

Improving SMS Notices

Page 44: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

What delivery service should I use?

Polaris

Server

Delivery

Service

Patron’s

Inbox

SMTP

RelayBetter

Email

How to make better email

Page 45: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Why CLC uses Mandrill

Great reporting

Individual IP

SPF & DKIM Anti-SPAM records

Awesome APIs

Inbound processing

Page 46: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Mandrill – Searching Messages

Page 47: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Mandrill – View Content

Page 48: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Mandrill – Bounce Handling

Page 49: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Creating a record set

Page 50: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Updating Patron Account

Page 51: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Mandrill Setup

1. Setup Mandrill Account – Get API keys

2. Setup relay through Polaris SMTPSVC

3. Enjoy!

Page 52: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Get Account info from Mandrill

Page 53: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Verify Polaris SMTP Server

Page 54: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Setup Relay to Mandrill

Launch IIS 6.0 Manager

Right Click on SMTP Server

Click Properties

Page 55: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Entering Credentials

Page 56: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Setting Outbound Port

Page 57: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Creating a record set

Page 58: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Restart and enjoy the goodness!

Page 59: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

APIs + Telephone = Awesome

Page 60: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Why Twilio?

Cheap per minute pricing

Great APIs and logs

No telephony hardware!

Page 61: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Twilio Cost

Page 62: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Annual Costs500-700 calls a day

Page 63: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Twilio - Detailed logs

Page 64: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Twilio - More logging goodness

Page 65: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

IIS ServerTwilio

Server

2. Phone Number Sent

3. Request Call Text

4. Personalized Message Sent

Patron

Phone

7. Status Returned

Polaris

Server

8. Patron Record

Updated

1. Query

DB

table

Page 66: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Use CLC’s softwareOur developer will configure & install CLC’s Twilio integration code for one Polaris library. Must have Polaris API (PAPI).

Page 67: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

SMS Notices Need I say more?

Page 68: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

SMS via Polaris email issues

Complicated for patrons

Complicated for staff

Unreliable – Carriers flag you as SPAM

Page 69: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

+MANDRILL

A better way to send SMS

Page 70: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

SMS via Mandrill and Twilio Setup Summary

1. Decide on domain to setup for handling SMS messages (@sms.domain.org)

2. Setup Mandrill to handle inbound messages for the domain

3. Create web app to handle inbound JSON data from Mandrill and fire off Twilio process

4. Setup DNS MX records to route messages to Mandrill

5. Test by emailing [email protected]

6. Add new mobile carrier for @sms.domain.org and switch all patrons to that carrier, disable others

Page 71: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Hacking the Mobile Carrier List

Page 72: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Adding the Mandrill MX Records to AWS Route 53

Page 73: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Telling Mandrill what to do with the incoming message

Page 74: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Inbound messages delivered to your application as JSON

Page 75: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Message flowing through Mandrill

>Inbound Log

>Outbound Log

Page 76: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Hand off to Twilio for delivery

Page 77: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Patron gets text message

Page 78: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Overview of delivery process1. Polaris generates email for

[email protected]

2. Local Polaris SMTP server hands the message off to Mandrill for delivery

3. Messages is routed from outbound Mandrill service to inbound Mandrill service

4. Inbound Mandrill service posts JSON message data to CLC developed web application

5. CLC web application calls Twilio API to deliver the SMS message

6. Twilio delivers message to patron’s phone

Page 79: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Issues with Twilio SMS1. Can get expensive, $0.0075 per message seems

cheap until you start sending 70,000 a month.

2. Carrier’s would like you to buy short codes, which cost $3,000+ just for the short code.1. If you use traditional “long” phone numbers to deliver the

message, you must buy several messages and rotate them so your messages don’t get flagged as spam.

2. You need to create a sub-account with Twilio to randomize the multiple “long” phone numbers you’re going to use

3. Polaris create SMS messages that are too long can cause delivery problems

Page 80: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Why Cloud Services?Because they’re awesome of course!

Page 81: Integrating cloud services with Polaris · Issues with Twilio SMS 1. Can get expensive, $0.0075 per message seems cheap until you start sending 70,000 a month. 2. Carrier’s would

Questions?

What cool cloud services does your library use?Wes Osborn: [email protected]