HowTo:CS Launch: Difference between revisions

From Computer Science Wiki
Jump to navigation Jump to search
Carnold (talk | contribs)
Created page with "== Introduction == This is a quick start guide for using the CS Launch website and kubernetes resources. It will walk you through setting up a basic website with database support. The first half showing using the web interface, and the second half shows how to do it through a command line interface. == Create a New Project == Access to CS Launch is made through projects. A project is a collection of kubernetes namespaces and resources. You can have access to multipl..."
 
Carnold (talk | contribs)
No edit summary
Line 5: Line 5:
Access to CS Launch is made through projects.  A project is a collection of kubernetes namespaces and resources.  You can have access to multiple projects.  Projects can be shared with other CS members.  The default kubernetes cluster ''Endeavour'' only allows Faculty and Staff to create projects.  After a Faculty member creates a project, it can be shared with CS students.
Access to CS Launch is made through projects.  A project is a collection of kubernetes namespaces and resources.  You can have access to multiple projects.  Projects can be shared with other CS members.  The default kubernetes cluster ''Endeavour'' only allows Faculty and Staff to create projects.  After a Faculty member creates a project, it can be shared with CS students.


* Go to CS Launch website: https://launch.cs.vt.edu
* Go to CS Launch website: '''https://launch.cs.vt.edu'''
* '''Click the login button''' to use your CS username and password to log in
* '''Click the login button''' to use your CS username and password to log in
* The main screen will show a list of kubernetes clusters you have access to, if the list is blank then you don't have access to any clusters
* The main screen will show a list of kubernetes clusters you have access to, if the list is blank then you don't have access to any clusters
* '''Click on the cluster name''' where you want to create the new project
* '''Click on the cluster name''' where you want to create the new project
* This is your cluster dashboard
* This is your '''Cluster Dashboard'''
* From the menu on the left '''Click on ''Projects/Namespaces'''''
* From the menu on the left '''Click on ''Projects/Namespaces'''''
* '''Click on the ''Create Project'' button'''
* '''Click on the ''Create Project'' button'''
Line 22: Line 22:
* '''Click on the ''Create Namespace'' button''' that is associated with the project you want to assign the namespace to
* '''Click on the ''Create Namespace'' button''' that is associated with the project you want to assign the namespace to
* '''Fill in the ''Name'' field''' with a cluster unique name.  The namespace name can be the same as the project name as long as it follows the naming rules and is not already in use.  Kubernetes namespace names must following DNS name rules: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
* '''Fill in the ''Name'' field''' with a cluster unique name.  The namespace name can be the same as the project name as long as it follows the naming rules and is not already in use.  Kubernetes namespace names must following DNS name rules: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
* '''Click on the ''Create'' button'''
== Launching a Database Using Helm==
Kubernetes supports Helm charts to automate deployment of software.  There are existing Helm charts for many popular software projects, such as databases.  Using a Helm chart can make setting up and updating complex software much easier.  This guide will walk you through deploying MariaDB using a Helm chart.
* Navigate to your '''Cluster Dashboard'''
* '''Click on ''Apps''''' from the menu on the left
* '''Click on ''Charts''''' underneath ''Apps''
* We need to find the MariaDB chart
** Make sure to '''select ''Partners'' in the first drop down list'''
** '''Select ''Database'' from the catagories drop down list'''
** '''Click on the ''MariaDB'' tile'''
* '''Click on the ''Install'' button'''
* '''Select the namespace from the drop down list''' where you want the database deployed to
* '''Click on the ''Next'' button'''
* You will be presented with a long list of options and their default values in yaml format
* For our example, '''change the following options''':
<pre>
auth:
  database: cslaunch
  username: cslaunch
  password: 'Insecure'
primary:
  persistence:
    size: 1Gi
</pre>
* '''Click on the ''Install'' button'''
* It will take a minute or two for the deployment to complete.  The site will give you a window to watch the progress, and report any errors that might occur.
* You should now have a running database, but no real way to access it yet
* Other pods in the same namespace will be able to connect to this database using the hostname <code>mariadb</code>

Revision as of 20:39, 2 November 2023

Introduction

This is a quick start guide for using the CS Launch website and kubernetes resources. It will walk you through setting up a basic website with database support. The first half showing using the web interface, and the second half shows how to do it through a command line interface.

Create a New Project

Access to CS Launch is made through projects. A project is a collection of kubernetes namespaces and resources. You can have access to multiple projects. Projects can be shared with other CS members. The default kubernetes cluster Endeavour only allows Faculty and Staff to create projects. After a Faculty member creates a project, it can be shared with CS students.

  • Go to CS Launch website: https://launch.cs.vt.edu
  • Click the login button to use your CS username and password to log in
  • The main screen will show a list of kubernetes clusters you have access to, if the list is blank then you don't have access to any clusters
  • Click on the cluster name where you want to create the new project
  • This is your Cluster Dashboard
  • From the menu on the left Click on Projects/Namespaces
  • Click on the Create Project button
  • Fill in the Name field with a cluster unique name for your project
  • You add additional project members now or later after the project is created
  • Click on the Create button

Create a New Namespace

Kubernetes uses namespaces to separate resources. The CS Launch resources groups namespaces into projects for access control. A project can contain multiple namespaces. At least one namespace is required before resources can be created in a project. To access a namespace you must be a member of the project the namespace is associated with. A namespace can only be associated with a single project.

  • Navigate to the list of projects
    • Click on Projects/Namespaces from the cluster dashboard
  • Click on the Create Namespace button that is associated with the project you want to assign the namespace to
  • Fill in the Name field with a cluster unique name. The namespace name can be the same as the project name as long as it follows the naming rules and is not already in use. Kubernetes namespace names must following DNS name rules: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
  • Click on the Create button

Launching a Database Using Helm

Kubernetes supports Helm charts to automate deployment of software. There are existing Helm charts for many popular software projects, such as databases. Using a Helm chart can make setting up and updating complex software much easier. This guide will walk you through deploying MariaDB using a Helm chart.

  • Navigate to your Cluster Dashboard
  • Click on Apps from the menu on the left
  • Click on Charts underneath Apps
  • We need to find the MariaDB chart
    • Make sure to select Partners in the first drop down list
    • Select Database from the catagories drop down list
    • Click on the MariaDB tile
  • Click on the Install button
  • Select the namespace from the drop down list where you want the database deployed to
  • Click on the Next button
  • You will be presented with a long list of options and their default values in yaml format
  • For our example, change the following options:
auth:
  database: cslaunch
  username: cslaunch
  password: 'Insecure'
primary:
  persistence:
    size: 1Gi
  • Click on the Install button
  • It will take a minute or two for the deployment to complete. The site will give you a window to watch the progress, and report any errors that might occur.
  • You should now have a running database, but no real way to access it yet
  • Other pods in the same namespace will be able to connect to this database using the hostname mariadb