You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Frederik Højlund 0ad45eb173 Initial github commit 1 year ago
gradle/wrapper Gradle files, Project scope testing 1 year ago
specs Added ucloud models for deserialization. Openapi generator can be used to generate some models but modifications needed to be made, WIP 1 year ago
src Initial github commit 1 year ago
.gitignore Initial commit, template code 1 year ago
Dockerfile dockerfile and stuff 1 year ago
README.md Updated readme 1 year ago
build.gradle.kts Initial github commit 1 year ago
docker-compose.yml Save templates in database. Docker Compose file for postgress db testing. Tests. Database migrations 1 year ago
gradlew Gradle files, Project scope testing 1 year ago
gradlew.bat Gradle files, Project scope testing 1 year ago

README.md

OpenStackGatewayPOC

Gateway for routing traffic to openstack

Microstack Openstack Setup

First, install microstack:

sudo snap install microstack --beta --devmode
sudo microstack init --auto --control

User setup

Create user:
microstack.openstack user create ucloud --password 1234

Create project:
microstack.openstack project create ucloud

Create role:
microstack.openstack role create ucloud

To assign a user to a project, you must assign the role to a user-project pair. To do this, you need the user, role, and project IDs. List users and note the user ID you want to assign to the role:
microstack.openstack user list

List role IDs and note the role ID you want to assign:
microstack.openstack role list

List projects and note the project ID you want to assign to the role: Assign a role to a user-project pair:
microstack.openstack role add --user ucloud --project PROJECT_ID ucloud

Model generation.

./gradlew openApiGenerate

can be used to generate models Not everything works however. I needed to use the bulkrequest model from ucloud as well as some modifications to them. This will need to be updated in the future. It uses the spec definition from the specs folder.

Datebase migrations

./gradlew diffChangeLog

can be used to generate database migrations. They do not merge very good with existing migrations. Also, for some reason, the migration always contain a change to create the hibernate sequence. When generating new migrations this will need to be removed. The code should be moved to a seperate file in the “changes” folder and included in the changelog-master. This is a bit dirty, but it works for now. The alternative is to define migrations manually.