{"id":204,"date":"2021-02-15T11:42:08","date_gmt":"2021-02-15T10:42:08","guid":{"rendered":"https:\/\/hoyre.no\/dokumentasjon\/?post_type=teft-wiki&#038;p=204"},"modified":"2021-02-15T11:43:56","modified_gmt":"2021-02-15T10:43:56","slug":"server-setup","status":"publish","type":"teft-wiki","link":"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/","title":{"rendered":"Server setup"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Deployment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/nyehoyre.stage.hoyre.no\/\">https:\/\/nyehoyre.stage.hoyre.no<\/a>\u00a0is deployed through\u00a0<a href=\"http:\/\/http\/\/hoy-p-ci1.p2.osl.basefarm.net:8080\/\">Jenkins<\/a>\u00a0at Basefarm. VPN is needed, Kim, Kevin and Andr\u00e9 has access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#hosting\"><\/a>Hosting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Basefarm is hosting both stage and production for H\u00f8yre. Basefarm is responsible for server setup and maintenance, with Dekode having limited access to the servers. All access to servers besides web (stage is available on Dekode vpn, prod is public) requires Basefarm VPN. Kim, Kevin and Andr\u00e9 has access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">General notes:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>All outgoing traffic from Basefarm servers are blocked. External HTTP(S) is available through proxy&nbsp;<code>bf-proxy.osl.basefarm.net:8888<\/code>.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#deployment-hoy-p-ci1p2oslbasefarmnet\"><\/a>Deployment: hoy-p-ci1.p2.osl.basefarm.net<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Runs Jenkins, has a custom pipeline set up and does currently NOT use the scripts from tools in repository. Basic SSH access, but no super user privileges on server, all access via&nbsp;<a href=\"http:\/\/hoy-p-ci1.p2.osl.basefarm.net:8080\/\">Jenkins<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#staging--test-server-hoy-t-lemp1p2oslbasefarmnet\"><\/a>Staging \/ test server: hoy-t-lemp1.p2.osl.basefarm.net<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For access, SSH to the server with your credentials provided by Basefarm. All further access is via common user&nbsp;<code>hoy-http<\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Change user to hoy-http:<code>sudo \/bin\/su - hoy-http -s \/bin\/sh<\/code><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We have partial access to nginx config at&nbsp;<code>\/www\/hoyre\/etc\/nginx<\/code>&nbsp;which contains all relevant config for nyehoyre.stage.hoyre.no set up in a manner similar to how SpinupWP does things. See&nbsp;<code>\/www\/hoyre\/etc\/nginx\/nyehoyre.stage.hoyre.no.conf<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Webroot and destination for deployments is at&nbsp;<code>\/www\/hoyre\/nyehoyre.stage.hoyre.no\/www<\/code>. Logs are in&nbsp;<code>\/www\/hoyre\/nyehoyre.stage.hoyre.no\/logs<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL (MariaDB) is running locally on same server. We do not have root access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tools such as WP CLI are available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mailhog is set up on server, WP is configured to send mail on localhost:1025. Mailhog interface at&nbsp;<a href=\"http:\/\/hoy-t-lemp1.p2.osl.basefarm.net:8025\/\">http:\/\/hoy-t-lemp1.p2.osl.basefarm.net:8025\/<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#notes\"><\/a>Notes:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Current version of MariaDB does not support&nbsp;<code>utf8mb4_unicode_520_ci<\/code>&nbsp;collation, and if you are importing a database dump from dev05 it will fail. Solved by running&nbsp;<code>sed -i 's\/utf8mb4_unicode_520_ci\/utf8mb4_unicode_ci\/' dbdump.sql<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#production\"><\/a>Production<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This setup is running in a split configuration, where frontend servers running nginx is separate from servers running php-fpm. Traffic to frontend-servers are loadbalanced by Basefarm and is also where SSL is terminated.&nbsp;<code>\/www\/hoyre\/<\/code>&nbsp;is a NFS mount and will thus be identical for all servers. If you have access to stage setup, you also should have access to production with the same credentials.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#frontend-nginx\"><\/a>Frontend (nginx)<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>hoy-p-lempf1.p2.osl.basefarm.net<\/li><li>hoy-p-lempf2.p2.osl.basefarm.net<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#backend-php-fpm\"><\/a>Backend (php-fpm)<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>hoy-p-lempb1.p2.osl.basefarm.net<\/li><li>hoy-p-lempb2.p2.osl.basefarm.net<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#redis\"><\/a>Redis<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Fully managed by Basefarm, no access. Set up with Redis Object Cache plugin in WP. Host passed in&nbsp;<code>.env<\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>hoy-p-redis1.p2.osl.basefarm.net<\/li><li>hoy-p-redis2.p2.osl.basefarm.net<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/DekodeInteraktiv\/hoyre#mysql\"><\/a>MySQL<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This is 100% managed by Basefarm, and we only have access to the hoyre-user configured in&nbsp;<code>.env<\/code>.<\/p>\n","protected":false},"parent":0,"menu_order":0,"template":"","meta":{"teft_cards_image_url":"","teft_cards_custom_pretitle":"","teft_cards_image_id":0,"teft_cards_image_focal_point_x":0,"teft_cards_image_focal_point_y":0,"teft_cards_title":"","teft_cards_excerpt":"","teft_show_chapters":false,"footnotes":""},"teft-wiki-topic":[],"teft-wiki-audience":[],"class_list":["post-204","teft-wiki","type-teft-wiki","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Server setup - Dokumentasjon<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"nb_NO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Server setup - Dokumentasjon\" \/>\n<meta property=\"og:description\" content=\"Deployment https:\/\/nyehoyre.stage.hoyre.no\u00a0is deployed through\u00a0Jenkins\u00a0at Basefarm. VPN is needed, Kim, Kevin and Andr\u00e9 has access. Hosting Basefarm is hosting both stage [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/\" \/>\n<meta property=\"og:site_name\" content=\"Dokumentasjon\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-15T10:43:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Ansl. lesetid\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutter\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/wiki\\\/server-setup\\\/\",\"url\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/wiki\\\/server-setup\\\/\",\"name\":\"Server setup - Dokumentasjon\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/#website\"},\"datePublished\":\"2021-02-15T10:42:08+00:00\",\"dateModified\":\"2021-02-15T10:43:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/wiki\\\/server-setup\\\/#breadcrumb\"},\"inLanguage\":\"nb-NO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/wiki\\\/server-setup\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/wiki\\\/server-setup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Til hoyre.no\",\"item\":\"https:\\\/\\\/hoyre.no\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Server setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/#website\",\"url\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/\",\"name\":\"Dokumentasjon\",\"description\":\"Bare enda et H\u00f8yres nettsteder-nettsted\",\"publisher\":{\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/#organization\"},\"inLanguage\":\"nb-NO\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/#organization\",\"name\":\"Dokumentasjon\",\"url\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nb-NO\",\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hoyre.no\\\/content\\\/uploads\\\/sites\\\/2\\\/2020\\\/07\\\/dokumentasjon-logo.svg\",\"contentUrl\":\"https:\\\/\\\/hoyre.no\\\/content\\\/uploads\\\/sites\\\/2\\\/2020\\\/07\\\/dokumentasjon-logo.svg\",\"width\":821,\"height\":216,\"caption\":\"Dokumentasjon\"},\"image\":{\"@id\":\"https:\\\/\\\/hoyre.no\\\/dokumentasjon\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Server setup - Dokumentasjon","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"nb_NO","og_type":"article","og_title":"Server setup - Dokumentasjon","og_description":"Deployment https:\/\/nyehoyre.stage.hoyre.no\u00a0is deployed through\u00a0Jenkins\u00a0at Basefarm. VPN is needed, Kim, Kevin and Andr\u00e9 has access. Hosting Basefarm is hosting both stage [&hellip;]","og_url":"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/","og_site_name":"Dokumentasjon","article_modified_time":"2021-02-15T10:43:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Ansl. lesetid":"2 minutter"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/","url":"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/","name":"Server setup - Dokumentasjon","isPartOf":{"@id":"https:\/\/hoyre.no\/dokumentasjon\/#website"},"datePublished":"2021-02-15T10:42:08+00:00","dateModified":"2021-02-15T10:43:56+00:00","breadcrumb":{"@id":"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/#breadcrumb"},"inLanguage":"nb-NO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hoyre.no\/dokumentasjon\/wiki\/server-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Til hoyre.no","item":"https:\/\/hoyre.no"},{"@type":"ListItem","position":2,"name":"Home","item":"https:\/\/hoyre.no\/dokumentasjon\/"},{"@type":"ListItem","position":3,"name":"Server setup"}]},{"@type":"WebSite","@id":"https:\/\/hoyre.no\/dokumentasjon\/#website","url":"https:\/\/hoyre.no\/dokumentasjon\/","name":"Dokumentasjon","description":"Bare enda et H\u00f8yres nettsteder-nettsted","publisher":{"@id":"https:\/\/hoyre.no\/dokumentasjon\/#organization"},"inLanguage":"nb-NO"},{"@type":"Organization","@id":"https:\/\/hoyre.no\/dokumentasjon\/#organization","name":"Dokumentasjon","url":"https:\/\/hoyre.no\/dokumentasjon\/","logo":{"@type":"ImageObject","inLanguage":"nb-NO","@id":"https:\/\/hoyre.no\/dokumentasjon\/#\/schema\/logo\/image\/","url":"https:\/\/hoyre.no\/content\/uploads\/sites\/2\/2020\/07\/dokumentasjon-logo.svg","contentUrl":"https:\/\/hoyre.no\/content\/uploads\/sites\/2\/2020\/07\/dokumentasjon-logo.svg","width":821,"height":216,"caption":"Dokumentasjon"},"image":{"@id":"https:\/\/hoyre.no\/dokumentasjon\/#\/schema\/logo\/image\/"}}]}},"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Dokumentasjon","distributor_original_site_url":"https:\/\/hoyre.no\/dokumentasjon","push-errors":false,"_links":{"self":[{"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/teft-wiki\/204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/teft-wiki"}],"about":[{"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/types\/teft-wiki"}],"version-history":[{"count":2,"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/teft-wiki\/204\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/teft-wiki\/204\/revisions\/206"}],"wp:attachment":[{"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"teft-wiki-topic","embeddable":true,"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/teft-wiki-topic?post=204"},{"taxonomy":"teft-wiki-audience","embeddable":true,"href":"https:\/\/hoyre.no\/dokumentasjon\/wp-json\/wp\/v2\/teft-wiki-audience?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}