Giter Site home page Giter Site logo

serviceforce's People

Contributors

ghermans avatar tjoosten avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

waffle-iron

serviceforce's Issues

Webhosting subscriptions

  • List/add/update/delete Subscriptions
  • List/add/update/delete Email addresses
  • List/add/delete databases
  • List/add/delete database users

Server asset states

A state represents the current operational state of an asset. The state may be status specific (e.g. 'Hardware Problem' is associated only with the Maintenance status), or available for any state (e.g. Running). While a status represents the lifecycle of an asset, the state represents the discrete states within a status. For instance, a machine that is Allocated may be Running or Terminated but in both cases still allocated.

The primary driver for this feature is to support discrete states within Maintenance, so that techs can determine easily why a machine is in maintenance. Additionally being able to hook ticket creation into changing the maintenance state is ideal. For instance if something is having a hardware problem you may want to create a hardware ticket in the datacenter queue, but if the asset is having a network problem you may want to create a ticket in the network queue.

Status State Label State Name Description
Any Failed Failed A service in this state has encountered a problem and may not be operational. It cannot be started nor stopped.
Any New New A service in this state is inactive. It does minimal work and consumes minimal resources.
Any Running Running A service in this state is operational.
Any Stopping Stopping A service in this state is transitioning to Terminated.
Any Terminated Terminated A service in this state has completed execution normally. It does minimal work and consumes minimal resources.
Maintenance Hardware Problem Hardware Problem An asset is experiencing a non-IPMI issue and needs to be examined. It needs investigation.
Maintenance Hardware Testing Hardware Testing Performing some testing that requires putting the asset into a maintenance state.
Maintenance Hardware Upgrade Hardware Upgrade An asset is in need or in process of having hardware upgraded.
Maintenance Network Problem Network Problem An asset is experiencing a network problem that may or may not be hardware related. It needs investigation.
Maintenance Relocation Relocation An asset is being physically relocated.

Domain name diagnostics tool

  • DNS check to see if the domain is pointing to our servers.
  • Run plesk-repair for domain names if the configuration files are broken.

Build up the customer create view?

we import the customers from the suitecrm api

<?php
    $url = "https://staff.idevelopment.be/suitecrm/service/v4_1/rest.php";
    $username = "admin";
    $password = "";

    //function to make cURL request
    function call($method, $parameters, $url)
    {
        ob_start();
        $curl_request = curl_init();

        curl_setopt($curl_request, CURLOPT_URL, $url);
        curl_setopt($curl_request, CURLOPT_POST, 1);
        curl_setopt($curl_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
        curl_setopt($curl_request, CURLOPT_HEADER, 1);
        curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl_request, CURLOPT_FOLLOWLOCATION, 0);

        $jsonEncodedData = json_encode($parameters);

        $post = array(
             "method" => $method,
             "input_type" => "JSON",
             "response_type" => "JSON",
             "rest_data" => $jsonEncodedData
        );

        curl_setopt($curl_request, CURLOPT_POSTFIELDS, $post);
        $result = curl_exec($curl_request);
        curl_close($curl_request);

        $result = explode("\r\n\r\n", $result, 2);
        $response = json_decode($result[1]);
        ob_end_flush();

        return $response;
    }

    //login ----------------------------------------- 
    $login_parameters = array(
         "user_auth" => array(
              "user_name" => $username,
              "password" => md5($password),
              "version" => "1"
         ),
         "application_name" => "RestTest",
         "name_value_list" => array(),
    );

    $login_result = call("login", $login_parameters, $url);

    /*
    echo "<pre>";
    print_r($login_result);
    echo "</pre>";
    */

    //get session id
    $session_id = $login_result->id;

    //get list of records --------------------------------
    $get_entry_list_parameters = array(

         //session id
         'session' => $session_id,

         //The name of the module from which to retrieve records
         'module_name' => 'Accounts',

         //The SQL WHERE clause without the word "where".
         'query' => "",

         //The SQL ORDER BY clause without the phrase "order by".
         'order_by' => "",

         //The record offset from which to start.
         'offset' => '0',

         /*
         A list of link names and the fields to be returned for each link name.
         Example: 'link_name_to_fields_array' => array(array('name' => 'email_addresses', 'value' => array('id', 'email_address', 'opt_out', 'primary_address')))
         */
         'link_name_to_fields_array' => array(
         ),

         //The maximum number of results to return.
         'max_results' => '2',

         //To exclude deleted records
         'deleted' => '0',

         //If only records marked as favorites should be returned.
         'Favorites' => false,
    );

    $get_entry_list_result = call('get_entry_list', $get_entry_list_parameters, $url);

    echo '<pre>';
    print_r($get_entry_list_result);
    echo '</pre>';
?>

Macaddress Init

We still need to migrate the network mac addresses to the forge:servers command

Server data

Name Type Description
bareMetalId integer The identifier of the bare metal resource
serverName string The name of the bare metal server
serverType string The type of the bare metal resource
reference string A reference for the bare metal server
location object An object with location information
server object An object with server information
network object An object with network information
serverHostingPack object An object with pack information
serviceLevelAgreement object An object with SLA information

DONE: The location object contains the following attributes:

Name Type Description
site string The site where the bare metal server is located
cabinet string The cabinet the bare metal server is located in
rackspace string DEPRICATED
combinationLock string DEPRICATED

DONE: The serviceLevel Agreement object contains the following attributes:

Name Type Description
sla string Human readable name of the SLA agreement
pricePerMonth float Monthly price of the SLA agreement

DONE: The server object contains the following attributes:

Name Type Description
ram string The amount of RAM in the bare metal server
kvm string Flag to indicate KVM is available in the bare metal server (Yes/No)
serverType string Type of bare metal server
processorType string Processor type of the bare metal server
processorSpeed string Clock speed of the processor
numberOfCpus integer Number of processors in the bare metal server
numberOfCores integer Number of cores per processor
hardDisks string Amount and size of harddisks (eg: 1x1TB)
hardwareRaid string Flag to indicate the bare metal server is equipped with hardware raid (Yes/No)

DONE: The network object contains the following attributes:

Name Type Description
dataPack string Human readable name of the datapack
ipsFreeOfCharge integer Amount of IPs you can get with your bare metal server free of charge
ipsAssigned integer Amount of IPs assigned to the bare metal server
excessIpsPrice float Price per IP for extra IPs
dataPackExcess object An object with information about datapack over usage
macAddresses array An array with key mac containing all mac adresses of the bare metal server
pricePerMonth float Monthly price of the datapack

Done: The dataPackExcess object contains the following attributes:

Name Type Description
type string The datapack type, either bandwidth or datatraffic
value float Price used for overusage calcaction per measurement unit
unit string Measuring unit used for overusage calculation

DONE: The serverHostingPack object contains the following attributes:

Name Type Description
reference string Reference set for the bare metal server
bareMetalId integer The identifier of the bare metal resource
serverName string The name of the bare metal server
serverType string The type of the bare metal resource
startDate date Bare metal contract start date
endDate date Bare metal contract end date
contractTerm string Applied contract term

Service status

Service status migration

  • name
  • description
  • bgcolor

Service status seeder <- DB columns

Value Description Background
Running Service is running
Provisioning Service is currently being provisioned info
Provisioned Service is provisioned success
Cancelled Service is cancelled danger
Suspended Service is suspended warning

Customer registration process

  1. Load customers data from Idevelopment/Hcrm and save it to serviceforce #43
  2. Set the customer status to new because we don't have any services assigned to this customer.
  3. Send notification to [email protected] that the user has been created and ready for services assignment.

List all servers from DB

Change the static server list to dynamic

route /servers/lookup
view /resources/views/servers/index

Customers

Workload

  • index - Search customer form
  • Controller
  • Unit test
  • View
  • register - Return register customer form
  • store - Save customer and return to the customer index page.
  • delete - Disable the customer, but don't delete the data.
  • edit - Return update customer form
  • update - Update customer data

customer status is missing

Customer status migration

  • name
  • description
  • bgcolor

Customer status seeder

Value Description Background
Active success
Suspended Suspended due billing or abuse issues warning
Terminated All services are terminated for this account danger

Server Operating systems

TODO

  • retrieve a list of all of available Operating Systems from the API
  • Save them to the DB

Migration

Name Type Description
id integer The identifier for the Operating Systems resource
name string The name of the Operating Systems resource

Fill server switch state

Call the server switch status and output this on the details page.

route: serviceforce.app/servers/details
view: resources/views/servers/details.blade.php

status background

Status class
open success
closed danger

Add artisan command - save pay-as-you-go-instances to BaseServers table

To retrieve a list of all Pay-as-you-go instances send a GET request to /v1/payAsYouGo/bareMetals/instances.

The response will be a JSON object with key instances containing purchased Pay-as-you-go servers with the following attributes:

Name Type Description
bareMetalId string The identifier of the Bare Metal resource
customerNumber string Your customer number
model integer The number of the model that you purchased
pricePerGb number Displays the price that is billed per Gb of traffic
pricePerHour number Displays the price that is billed per hour of instance usage
startedAt string String containing the time in which the instance started to run
destroyedAt string (Optional) If the instance is destroyed, shows the time in which was destroyed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.