tested on Ubuntu artful/17.10

useradd -m -g users -G sudo,wheel -s /bin/bash -d /opt/stack stack
echo "stack ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/stack
su - stack
git clone https://git.openstack.org/openstack-dev/devstack

checkout the stable branch of OpenStack/DevStack e.g.,

cd devstack/
git checkout stable/pike
vi local.conf

[[local|localrc]]
#WARNING: this script has not been tested on artful
FORCE=yes
ADMIN_PASSWORD=password_here
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

time ./stack.sh

at the end of the install process you will get the dashboard URL to access.

refs.