-
Notifications
You must be signed in to change notification settings - Fork 7
Installation: Create an admin user
You'll need to create an admin user to review the Resque queues and to administer other users' information.
-
From the home page of your application, click the "Login" link in the top right corner of the screen.
-
On the login page, scroll down and click "Sign up."
-
Enter an email address and a password, confirm the password, and click "Sign up".
-
In the terminal window, navigate to the home directory of the application by entering the command
cd /opt/$HYDRA_NAME
. -
Open the rails console in production by entering the command
rails console production
. -
Select your user by entering the command
u=User.first
. The results should show the details of the user profile, including the email address you used to sign up. -
Make your user an admin by entering the command
u.admin=true
. -
Save your user profile by entering the command
u.save
. -
Exit the rails console by typing
exit
which will return you to the main terminal window.The output for Steps 4-9 should look similar to this: [your_username@ip ~]$ cd /opt/$HYDRA_NAME
[your_username@ip hydradam]$ rails console production
Loading production environment (Rails 4.0.2)
irb(main):001:0> u=User.first
=> #<User id: 1, email: "", encrypted_password: "$2a$10$FTvgfANI2CLh86WKlLyRcueUavcGXZz0aK7m73TIF.Ui...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 1, current_sign_in_at: "2014-02-06 02:56:55", last_sign_in_at: "2014-02-06 02:56:55", current_sign_in_ip: "67.7.233.226", last_sign_in_ip: "67.7.233.226", created_at: "2014-02-06 02:56:55", updated_at: "2014-02-06 02:56:55", guest: false, facebook_handle: nil, twitter_handle: nil, googleplus_handle: nil, display_name: nil, address: nil, admin_area: nil, department: nil, title: nil, office: nil, chat_id: nil, website: nil, affiliation: nil, telephone: nil, avatar_file_name: nil, avatar_content_type: nil, avatar_file_size: nil, avatar_updated_at: nil, group_list: nil, groups_last_update: nil, directory: nil, admin: nil>
irb(main):002:0> u.admin=true
=> true
irb(main):003:0> u.save
=> true
irb(main):004:0> exit
- Open a web browser and navigate to http://yourwebsite/admin/dashboard and/or to http://yourwebsite/admin/queues. You should see the administrative portals for users and for Resque workers.
Proceed to Set up Resque Pool or return to the Overview page.