{"id":161,"date":"2022-10-23T14:45:31","date_gmt":"2022-10-23T14:45:31","guid":{"rendered":"https:\/\/www.grizzly-hills.com\/?p=161"},"modified":"2022-11-27T17:24:16","modified_gmt":"2022-11-27T17:24:16","slug":"creating-a-basic-google-cloud-compute-redis-instance","status":"publish","type":"post","link":"https:\/\/www.grizzly-hills.com\/index.php\/2022\/10\/23\/creating-a-basic-google-cloud-compute-redis-instance\/","title":{"rendered":"Creating a Basic Google Cloud Compute Redis Instance"},"content":{"rendered":"\n<p>I use Redis for many different purposes. Sometimes, I need a large amount of RAM so Redis can act as a key store for megabytes or gigabytes of key values. Sometime I just need distributed locking and small-scale caching. Either way, setting up a Redis instance is a task I find myself performing from time to time.<\/p>\n\n\n\n<p>Regardless of the size of the compute instance, I tend to perform the same steps: Create an Instance, select the machine type, and then under Advanced options &gt; Automation I use a script like this:<\/p>\n\n\n\n<p><code>sudo apt-get update<br>sudo apt-get remove man-db -y<br>sudo apt-get autoremove -y<br>sudo apt-get install -y redis-server<br>sudo sed -r -i 's\/^bind\\s+(.+?)$\/# bind \\1\/' \/etc\/redis\/redis.conf<br>sudo sed -r -i 's\/^protected-mode yes$\/protected-mode no\/' \/etc\/redis\/redis.conf<\/code><\/p>\n\n\n\n<p>The basic idea is this clears out man-db and any unused packages, installs Redis, and then modifies \/etc\/redis.conf for my purposes. And, yes, I tend to remove man-db on my GCP instances, it really speeds up any package updating later on, especially on the smaller machine types.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use Redis for many different purposes. Sometimes, I need a large amount of RAM so Redis can act as a key store for megabytes or gigabytes of key values. Sometime I just need distributed locking and small-scale caching. Either way, setting up a Redis instance is a task I find myself performing from time &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.grizzly-hills.com\/index.php\/2022\/10\/23\/creating-a-basic-google-cloud-compute-redis-instance\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Creating a Basic Google Cloud Compute Redis Instance&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[32,16,33],"class_list":["post-161","post","type-post","status-publish","format-standard","hentry","category-google-cloud","tag-gcp","tag-linux","tag-redis"],"_links":{"self":[{"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/posts\/161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":4,"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":183,"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/posts\/161\/revisions\/183"}],"wp:attachment":[{"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.grizzly-hills.com\/index.php\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}