After running devstack, to add a service to openstack you need to run the following as an admin
ubuntu@devstack:~$ keystone service-create --name testservice --type customtype --description "foo"
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | foo |
| id | 0c66370823be4ba785a41482448ef20a |
| name | testservice |
| type | customtype |
+-------------+----------------------------------+
You can associate an endpoint to this service
ubuntu@devstack:~$ keystone endpoint-create --region Region1 --service testservice --publicurl http://127.0.0.1 --adminurl http://127.0.0.1 --internalurl http://127.0.0.1
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| adminurl | http://127.0.0.1 |
| id | c7702766bcd042ed87595775dcc3786c |
| internalurl | http://127.0.0.1 |
| publicurl | http://127.0.0.1 |
| region | Region1 |
| service_id | 0c66370823be4ba785a41482448ef20a |
+-------------+----------------------------------+