{"id":532,"date":"2020-10-08T20:51:25","date_gmt":"2020-10-09T01:51:25","guid":{"rendered":"http:\/\/nukeitmike.com\/blog\/?p=506"},"modified":"2020-10-08T20:51:25","modified_gmt":"2020-10-09T01:51:25","slug":"twram","status":"publish","type":"post","link":"https:\/\/blog.nukeitmike.com\/index.php\/2020\/10\/08\/twram\/","title":{"rendered":"TWRAM"},"content":{"rendered":"<p>I currently own 3 domains, one of which you are visiting now.&#160; Another domain I own is much less useful, and really was the result of a joke.<\/p>\n<p>I have until now hosted it on a Windows Server, and wanted to move it to Azure.&#160; It isn\u2019t a very complicated as it is just a single page.&#160; I had help building it many years ago, and the key element on the page was a (yuck) Flash image.&#160; <\/p>\n<p>So I started out the afternoon with the desire to move it to Azure, into a storage account, and serve it up as static web content.&#160; Easy.&#160; No problem.&#160; Except\u2026<\/p>\n<p>The original home doesn\u2019t have https.&#160; Why would it?&#160; It is around 15 years old and has a single static page.<\/p>\n<p>It also has a Flash swf as the primary element.&#160; Well, that isn\u2019t good.<\/p>\n<p>I also don\u2019t like to do things the easy way, because I like to take easy things and&#160; use them to understand more complicated concepts.<\/p>\n<h4>So\u2026 here goes:<\/h4>\n<p>First to fix the page, so that it isn\u2019t using flash.&#160; I could just put a static image, but in this case, that just feels wrong.&#160; So in a \u2018flash\u2019 of brilliance, I asked my friend which tool he uses\/recommends for creating gif files.&#160; He said he uses \u2018gifcam\u2019 and then since I asked him he went and found another one in just a few minutes.&#160; He now uses (and I used) \u2018screentogif\u2019.&#160; You can find it with a quick search.<\/p>\n<p>So I used screentogif to record the swf and then save it as a gif.&#160; (Link to the results at the bottom).&#160; One problem down, two (at least) to go.<\/p>\n<p>Next I went through <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/blobs\/storage-blob-static-website-host\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial<\/a> (sort of) to figure out how to configure Blob Storage to host static web content.&#160; <\/p>\n<p>So I created the storage account, enabled Static website, and set the default document name.&#160; I already had content, so I didn\u2019t need the &#8216;hello world\u2019 part.&#160; I was going to work on integrating this deployment into a CI\/CD pipeline, but bailed on it because I found a link on the page that needed to be updated (it wasn\u2019t safe for work, though it had been originally).&#160; I needed to get this deployed and replace the current site.<\/p>\n<p>Using VS Code to deploy works very well per the tutorial.&#160; I will work on the CI\/CD part for one of the other sites I need to move.<\/p>\n<p>Next problem, repointing my DNS.&#160; Easy, just follow the next <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/blobs\/storage-custom-domain-name?tabs=azure-portal\" target=\"_blank\" rel=\"noopener noreferrer\">tutorial<\/a>.&#160; Which is where I hit the problem with HTTPS vs HTTP.&#160; I could easily just not require a secure connection and get it to work, but I want to move my stuff to HTTPS because it is good practice.<\/p>\n<p>But to do that you have to enable Azure CDN for your blob or web endpoint.&#160; So on to the next <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/blobs\/static-website-content-delivery-network\" target=\"_blank\" rel=\"noopener noreferrer\">article.<\/a>&#160; At least Microsoft is getting better with their documentation, and this part is pretty straight forward.&#160; Once you follow a couple of steps, you get your content served up via CDN over HTTPS.&#160; <\/p>\n<p>Next, we need to add the custom domain to the CDN endpoint.&#160; That <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cdn\/cdn-map-content-to-custom-domain\" target=\"_blank\" rel=\"noopener noreferrer\">article is here.<\/a>&#160; In the article, it talks about how to do a temporary mapping to avoid down time.&#160; None of my sites are critical.&#160; Downtime isn\u2019t an issue, so I skipped that part.<\/p>\n<p>Once I swapped over to the CDN location, the site was available via HTTPS, but there was a certificate error.&#160; to fix this, click on the CDN Custom Domain, and turn on the custom <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cdn\/cdn-custom-ssl?tabs=option-1-default-enable-https-with-a-cdn-managed-certificate\" target=\"_blank\" rel=\"noopener noreferrer\">domain HTTPS<\/a>.&#160; It is evidently free and managed by Azure.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.nukeitmike.com\/wp-content\/uploads\/2020\/10\/image-10.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"margin: 0px; display: inline; background-image: none;\" border=\"0\" alt=\"image\" src=\"https:\/\/i0.wp.com\/blog.nukeitmike.com\/wp-content\/uploads\/2020\/10\/image_thumb-10.png?resize=244%2C132&#038;ssl=1\" width=\"244\" height=\"132\" \/><\/a><\/p>\n<p>That process takes a few minutes and you should have your CNAME in place before you kick it off, so that you don\u2019t have to wait for an email to authorize it.<\/p>\n<p>I know that this has been a long post, and if I wasn\u2019t lazy, I would break it up into multiple posts, with more pictures.&#160; But, I am lazy, so this is what you get.<\/p>\n<p><a href=\"https:\/\/www.theworldrevolvesaroundmichael.com\/\">https:\/\/www.theworldrevolvesaroundmichael.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I currently own 3 domains, one of which you are visiting now.&#160; Another domain I own is much less useful, and really was the result of a joke. I have until now hosted it on a Windows Server, and wanted to move it to Azure.&#160; It isn\u2019t a very complicated as it is just a&hellip; <a class=\"more-link\" href=\"https:\/\/blog.nukeitmike.com\/index.php\/2020\/10\/08\/twram\/\">Continue reading <span class=\"screen-reader-text\">TWRAM<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2,10,11,37],"tags":[58,92,94,112,168,182],"class_list":["post-532","post","type-post","status-publish","format-standard","hentry","category-azure","category-general-info","category-humor","category-web-stuff","tag-cdn","tag-flash","tag-gif","tag-learning","tag-static-web-page","tag-twram","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/scW544-twram","_links":{"self":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/comments?post=532"}],"version-history":[{"count":0,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/532\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/media?parent=532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/categories?post=532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/tags?post=532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}