How to migrate an admin.inc file which creates a configuration form for settings? I am trying to migrate a module from drupal 7 to drupal 8, but sadly I cannot find any proper documentation on how to do this. I already re-wrote .info file to .info.yml but at this point its just a dead-end. For example I have a admin.inc file which creates a configuration form for settings. It looks like this:

function commerce_shipping_gls_settings() {
  $form = array();
  $form['rates'] = array(
    '#type' =&gt; 'fieldset',
    '#title' =&gt; t('Shipping costs'),
  );
  $form['rates']['commerce_shipping_gls_shipping_rate_amount'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Shipping service rate amount'),
    '#default_value' =&gt; variable_get('commerce_shipping_gls_shipping_rate_amount', 3900),
    '#required' =&gt; TRUE,
    '#element_validate' =&gt; array('element_validate_integer_positive'),
  );
  return system_settings_form($form);
}


I was trying to find how to convert a config file to drupal 8, but sadly I didn't get much. Could someone please give me some guidance on how can I achieve this?
system_settings_form() is replaced by \Drupal\Core\Form\ConfigFormBase in D8.

you can see 
https://www.drupal.org/node/1910694
Working with Configuration Forms

Example:

namespace Drupal\example_module\Forms;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;

class StudentConfigForm extends ConfigFormBase {
  // The Form ID that is used in alter hooks.
  public function getFormId() {
    return 'student_config_form';
  }
  // Configuration names that will be editable
  public function getEditableConfigNames() {
    return ['example_module.student'];
  }

  public function buildForm(array $form, FormStateInterface $form_state, $args = '' ){
    $config = $this-&gt;config('example_module.student');
    $values = $config-&gt;get();
    $form['student'] = array(
      '#type' =&gt; 'details',
      '#title' =&gt; $this-&gt;t('Student'),
      '#open' =&gt; TRUE,
      '#tree' =&gt; TRUE,
    );
    $form['student']['first_name'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; $this-&gt;t('First name'),
      '#default_value' =&gt; $values['student']['first_name']
    );
    $form['student']['last_name'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; $this-&gt;t('Job title'),
      '#default_value' =&gt; $values['student']['last_name']
    );
    $form['student']['age'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; $this-&gt;t('Age'),
      '#default_value' =&gt; $values['student']['age']
    );
    return parent::buildForm($form, $form_state);
  }

  public function submitForm(array &amp;$form, FormStateInterface $state) {
    $values = $state-&gt;getValues();
    $config = $this-&gt;config('example_module.student')
      -&gt;set('student', $values['student'])
      -&gt;save();
  }
}