def scale_horizontally():
    #TODO find a better way to initiate app creation
    for app_id in settings.GLOBAL_SETTINGS['APPS']:
        try:
            App.objects.get(app_id=app_id)
        except ObjectDoesNotExist:
            temp = App(app_id=app_id)
            temp.save()
    total_combinations = optimizer.permutate()
    print total_combinations
    predicted_workload = workload_predictor.predict()
    print predicted_workload
    selected_combinations = optimizer.optimize(total_combinations,
                                               predicted_workload)
    print selected_combinations