{"id":52835,"date":"2019-06-20T13:00:45","date_gmt":"2019-06-20T18:00:45","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=52835"},"modified":"2019-06-20T13:00:45","modified_gmt":"2019-06-20T18:00:45","slug":"cpanel-application-manager-and-app-deployment-101","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/","title":{"rendered":"cPanel Application Manager and App Deployment 101"},"content":{"rendered":"\n


Researching another piece I’ve been writing, I realized that I was grossly unfamiliar with a portion of the cPanel & WHM product.\u00a0For a bit of background, I’ve been using cPanel & WHM for about nine years now, mostly from the end user and system administrator perspectives. Admittedly, I am not a developer, nor do I pretend to be one. Between you and me, I have immense respect for developers and the dark arts magic that they possess to make their tools and applications come to life. <\/p>\n\n\n\n

Now, I will jump at the chance to learn something that I don’t have any knowledge of, which led to my research on the development tools that cPanel offers. While building applications is a topic for another day (let’s be honest, I have a LOT of homework to do before scratching that surface), we can move a little further on in the process and explain how to upload and deploy already existing applications. With the help of a fellow cPaneler, I got a crash course journey in application management and deployment. For those unfamiliar with the process, I’d like to share the knowledge!<\/p>\n\n\n\n


Getting Started<\/h2>\n\n\n\n

The best place to start any journey is the beginning, and at the beginning of every journey, you’re going to need supplies. For the sake of this blog, we’re going to assume you already have an application or a Github repository that you want to deploy as an application on your server (as I do!) and that you have root or reseller-level WHM access to your server. While we have those things, we have a little more preparation to do before we get started. <\/p>\n\n\n\n


First Things First<\/h3>\n\n\n\n

Before we can even plan on deploying an application, we need to make sure our server is up to snuff and has all of the necessary tools to get the job done. For those with some CLI experience, this is a relatively painless experience. If you’re inexperienced, fear not, for I have some instructions to help you out.

1.) Make sure you have the Application Manager<\/em> feature enabled in WHM >> Home >> Packages >> Feature Manager.<\/em> Then, you’ll want to make sure the Feature List your account is using has Application Manager enabled (If you do not have WHM level access, you will want to reach out to your hosting service provider to enable Application Manager):<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n


Make sure that checkbox is ticked! Now that the easy part is done let’s get the heavy lifting out of the way.<\/p>\n\n\n\n


2.) Disclaimer:the next steps in this process can be done in the WHM user interface at Home >> Software >> EasyApache 4<\/a><\/em>, but for the purposes of this blog, I opted to go the API route in order to learn a new process. Are you unfamiliar with APIs<\/a>? So was I! For this blog, I decided to use an API-based method for the rest of the Application setup in order to become more comfortable with the API tools at our disposal. If you’re a bit more familiar than I am with using API functions, I recommend giving our UAPI documentation<\/a> a look to familiarize yourself with the functions available. Stay tuned for more API related blogs coming soon! In the meantime, I recommend using the method that you are most comfortable with. <\/p>\n\n\n\n


If you don’t immediately see the Application Manager in cPanel (cPanel >> Home >> Software >> Application<\/em> Manager) you’re going to need to make sure a few Apache modules are installed on your server: ea-ruby24-mod_passenger<\/code>, ea-apache24-mod_env<\/code>, and ea-nodejs10<\/code> if you want to register a Node.js application (as we do in my example). These modules can be installed via CLI (command line interface) very quickly using the following commands:

yum -y install <name of the module><\/code><\/p>\n\n\n\n


The output will look something like this (this is only a snippet of the output, and includes installing two modules at the same time, so your results may vary)
<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n


I Think I’m a Clone Now<\/h3>\n\n\n\n

3.) Next, you’ll want to set up your application for use. If you want to try this yourself as practice, I suggest following what I did, which was to clone a Github repo of the Phusion Passenger NodeJS Connect demo. Here are the steps (note: you’ll want to change the variables for the user and file pathways to your users and paths, otherwise these API calls will not work properly):<\/em>

<\/p>\n\n\n\n

This API call identifies the user (in this case, nodejsdemo), creates a clone of the Git repository (passenger-nodejs-connect-demo), creates a home for the repository, and pulls from the repository source (the github.com<\/a> link).<\/p>\n\n\n\n


uapi --user=nodejsdemo VersionControl create type=git name='passenger-nodejs-connect-demo' repository_root='\/home\/nodejsdemo\/passenger-nodejs-connect-demo' source_repository='{\"remote_name\":\"origin\",\"url\":\"https:\/\/github.com\/phusion\/passenger-nodejs-connect-demo.git\"}'\n<\/code><\/p>\n\n\n\n


 Your output should look something like this:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n


3.) Now, let’s register the application with the cPanel Application Manager. I again used an API call to do the heavy lifting:<\/p>\n\n\n\n


uapi --user=nodejsdemo PassengerApps register_application name='passenger-nodejs-connect-demo' path='\/home\/nodejsdemo\/passenger-nodejs-connect-demo' domain='nodejsdemo.com' deployment_mode='production' enabled='1'\n<\/code>


If you’re not comfortable using API calls, you can always use the cPanel user interface to do this portion:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

4.) Next, I needed to ensure the application’s dependencies, again using an API call:<\/p>\n\n\n\n

uapi --user=nodejsdemo PassengerApps ensure_deps type='npm' app_path='passenger-nodejs-connect-demo'<\/code><\/p>\n\n\n\n


My results looked like this:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n


5.) And the final step- set proper permissions! For this app to work properly, you’ll want the permissions set to 711. <\/p>\n\n\n\n

<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n


Let’s Fire it Up!<\/h3>\n\n\n\n

Now that we have the Application deployed, registered, and with the proper permissions, let’s navigate over to its location (the file path I specified when cloning the Git repo) and see how it works!<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n


We Built this App on Rock and Roll<\/h2>\n\n\n\n

Not bad for a first try! While this is baby steps in terms of writing and managing your applications, it’s a tiptoe into a much bigger pool. Hopefully, you, the reader, learned as much as I did through this process! If you want to discuss app deployment, using cPanel App Manager, my bad puns and more, please join us in our Slack<\/a> and Discord<\/a> channels, or on our official cPanel Subreddit<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"

Researching another piece I’ve been writing, I realized that I was grossly unfamiliar with a portion of the cPanel & WHM product.\u00a0For a bit of background, I’ve been using cPanel & WHM for about nine years now, mostly from the end user and system administrator perspectives. Admittedly, I am not a developer, nor do I […]<\/p>\n","protected":false},"author":77,"featured_media":65185,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49,61],"tags":[],"class_list":["post-52835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-products","category-tips-and-tricks"],"acf":[],"yoast_head":"\ncPanel Application Manager and App Deployment 101 | cPanel<\/title>\n <!-- Mirrored from cpanel.net/wp-json/wp/v2/posts/52835/ by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 06 Sep 2024 10:06:16 GMT --> <meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=_-2622.html \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"cPanel Application Manager and App Deployment 101 | cPanel\" \/>\n<meta property=\"og:description\" content=\"Researching another piece I’ve been writing, I realized that I was grossly unfamiliar with a portion of the cPanel & WHM product.\u00a0For a bit of background, I’ve been using cPanel & WHM for about nine years now, mostly from the end user and system administrator perspectives. Admittedly, I am not a developer, nor do I […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/\" \/>\n<meta property=\"og:site_name\" content=\"cPanel\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cpanel\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-20T18:00:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devel.www.cpanel.net\/wp-content\/uploads\/2019\/06\/2019.06.20.applicationmgr.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"396\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"cPanel Community\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cPanel\" \/>\n<meta name=\"twitter:site\" content=\"@cPanel\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cPanel Community\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/\",\"url\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/\",\"name\":\"cPanel Application Manager and App Deployment 101 | cPanel\",\"isPartOf\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/#website\"},\"datePublished\":\"2019-06-20T18:00:45+00:00\",\"dateModified\":\"2019-06-20T18:00:45+00:00\",\"author\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8\"},\"breadcrumb\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/devel.www.cpanel.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"cPanel Application Manager and App Deployment 101\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#website\",\"url\":\"https:\/\/devel.www.cpanel.net\/\",\"name\":\"cPanel\",\"description\":\"Hosting Platform of Choices\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devel.www.cpanel.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8\",\"name\":\"cPanel Community\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g\",\"caption\":\"cPanel Community\"},\"description\":\"The web hosting industry's most reliable management solution since 1997. With our first-class support and rich feature set, it's easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.net.\",\"sameAs\":[\"https:\/\/cpanel.net\"],\"url\":\"https:\/\/devel.www.cpanel.net\/blog\/author\/cpadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"cPanel Application Manager and App Deployment 101 | cPanel","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/","og_locale":"en_US","og_type":"article","og_title":"cPanel Application Manager and App Deployment 101 | cPanel","og_description":"Researching another piece I’ve been writing, I realized that I was grossly unfamiliar with a portion of the cPanel & WHM product.\u00a0For a bit of background, I’ve been using cPanel & WHM for about nine years now, mostly from the end user and system administrator perspectives. Admittedly, I am not a developer, nor do I […]","og_url":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/","og_site_name":"cPanel","article_publisher":"https:\/\/www.facebook.com\/cpanel\/","article_published_time":"2019-06-20T18:00:45+00:00","og_image":[{"width":1000,"height":396,"url":"https:\/\/devel.www.cpanel.net\/wp-content\/uploads\/2019\/06\/2019.06.20.applicationmgr.png","type":"image\/png"}],"author":"cPanel Community","twitter_card":"summary_large_image","twitter_creator":"@cPanel","twitter_site":"@cPanel","twitter_misc":{"Written by":"cPanel Community","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/","url":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/","name":"cPanel Application Manager and App Deployment 101 | cPanel","isPartOf":{"@id":"https:\/\/devel.www.cpanel.net\/#website"},"datePublished":"2019-06-20T18:00:45+00:00","dateModified":"2019-06-20T18:00:45+00:00","author":{"@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8"},"breadcrumb":{"@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/cpanel-application-manager-and-app-deployment-101\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devel.www.cpanel.net\/"},{"@type":"ListItem","position":2,"name":"cPanel Application Manager and App Deployment 101"}]},{"@type":"WebSite","@id":"https:\/\/devel.www.cpanel.net\/#website","url":"https:\/\/devel.www.cpanel.net\/","name":"cPanel","description":"Hosting Platform of Choices","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devel.www.cpanel.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8","name":"cPanel Community","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g","caption":"cPanel Community"},"description":"The web hosting industry's most reliable management solution since 1997. With our first-class support and rich feature set, it's easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.net.","sameAs":["https:\/\/cpanel.net"],"url":"https:\/\/devel.www.cpanel.net\/blog\/author\/cpadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts\/52835"}],"collection":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/comments?post=52835"}],"version-history":[{"count":0,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts\/52835\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/media\/65185"}],"wp:attachment":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/media?parent=52835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/categories?post=52835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/tags?post=52835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}